<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="keywords" content="9p, 9p2000, research, Plan 9, Inferno, Unix, Open Source, Bell Labs" /> <meta name="description" content="Open source distributed operating system Plan 9 from Bell Labs." /> <link rel="stylesheet" href="/wiki-style.css" media="all" type="text/css" /> <title>Network Configuration (Diff)</title></head><body><h1><a name="top"></a>Network Configuration <i>-Diff-</i></h1> <div class='body'> <!-- ***************************** --> <hr /><div class='diff_head'><a href="index.html">Thu Aug 9 07:49:09 EDT 2007</a>, glenda</div><hr />Thefirstsectionofthispagedescribesthesimplestpossiblesetupforastandaloneterminal,therestofthepagedescribeshowtosetupmorecomplexPlan9network.<a name="STANDALONE_TERMINAL_NETWORK_SETUP" /><h3>STANDALONE TERMINAL NETWORK SETUP</h3> <p class='para'>Toconfigureyournetworkconnectiononastandaloneterminalyouonlyneedtocall<a href="http://plan9.bell-labs.com/magic/man2html/8/ipconfig"><i>ipconfig</i>(8)</a>andrunndb/dns-r.</p> <p class='para'>IfyouhaveDHCPjustrun:<pre> ip/ipconfig</pre> </p> <p class='para'>Ortoexplicitlysettheconfiguration:<pre> ip/ipconfig -g <your-gateway> ether /net/ether0 <your-ip-address> <your-subnet-mask></pre> </p> <p class='para'>Aftercallingipconfigmakesuretorunndb/dns-rtoenablednsresolution.</p> <p class='para'>Tomakethisconfigurationpermanentedityour/rc/bin/termrccommentingoutandediting(ifneeded)thecorrespondinglinesthatcall<a href="http://plan9.bell-labs.com/magic/man2html/8/ipconfig"><i>ipconfig</i>(8)</a>.</p> <p class='para'>Youcanuseip/pingtotestthatyournetworkconnectionisworkingproperly.Ifyouhaveproblemsseethe"troubleshooting"sectionbelow.</p> <a name="NETWORK_DATABASE" /><h3>NETWORK DATABASE</h3> <p class='para'>Plan9usesasingledatabaseforstoringallthenetwork-relatedconfigurationinformationinthesystem.</p> <p class='para'>Thedatabasestorestheconfigurationformachinesspecificallyidentifiablebythelocalinstallation,defaultconfigurationsformachinesinparticularsubnets,domainnameresolutioninformation,andmappingsbetweenTCPservicenamesandportnumbersamongotherthings.</p> <p class='para'>Thedatabaseisassembledfromanumberoftextfilesbearingaparticularrecordstructure.</p> <p class='para'>Thedefaultrootofthedatabaseisthetextfile/lib/ndb/local.Themostimportantentryinthatfileisthe``database=''entry,whichspecifiesalistofotherfilestoinclude.Forexample,<pre>database= file=/lib/ndb/local file=/lib/ndb/local-cs file=/lib/ndb/common</pre> </p> <p class='para'>Itisfromthecontentsofthisfileandthoseinthelistthatthedatabaseisassembled.Thesefilesaretypicallyusedbyndb/cscommandsinthestartupscripts(e.g./rc/bin/cpurc).</p> <p class='para'>Conventionally,thefile/lib/ndb/commonisforstandardportdefinitionsandthelike;theotherfilesholdactualsystemconfiguration.</p> <a name="RECORD_STRUCTURE" /><h3>RECORD STRUCTURE</h3> <p class='para'>Lexically,arecordisanunindentedlinefollowedbyaseriesofindentedlines.Thusanunindentedline,ablankline,oracommentline(onebeginningwith#)endsarecord.</p> <p class='para'>Semantically,arecordisaseriesof``key=value''tuples.Tuplesonthesamelinebindslightlymoretightlythantuplesondifferentlines,butusuallythat'snotimportant.</p> <p class='para'>Anexamplerecordis:<pre> ip=10.247.62.235 ip=10.247.60.200 sys=lusitania ether=0060088bc416 proto=il dom=lusitania.domain.dom</pre> </p> <p class='para'>Thisrecorddefinesasystemnamed``lusitania''withaspecifiedethernetaddress,twoIPaddresses,andafullyqualifieddomainname.The``proto=il''tupleindicatesthatthesystemspeaksIL,thePlan9transportprotocolofchoice.Bydefault,systemsareassumedonlytospeakTCP.</p> <p class='para'>Otherusefulattributesinclude:<pre> auth default Plan 9 authentication server cpu default Plan 9 cpu server dns default DNS server (can be more than one) dnsdomain default DNS domain suffix (can be more than one) fs default Plan 9 file server ipgw IP gateway ipmask IP network mask ipsubmask IP subnetwork mask ntp default NTP server nntp default NNTP server smtp default SMTP server</pre> </p> <a name="IP_HIERARCHY_WALKING" /><h3>IP HIERARCHY WALKING</h3> <p class='para'>MostinformationinthedatabaseisnotstoredineachLines 1–500 of 1860. Load more
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="keywords" content="9p, 9p2000, research, Plan 9, Inferno, Unix, Open Source, Bell Labs" /> <meta name="description" content="Open source distributed operating system Plan 9 from Bell Labs." /> <link rel="stylesheet" href="/wiki-style.css" media="all" type="text/css" /> <title>Network Configuration (Diff)</title> </head> <body> <h1><a name="top"></a> Network Configuration <i>-Diff-</i></h1> <div class='body'> <!-- ***************************** --> <hr /><div class='diff_head'> <a href="index.html">Thu Aug 9 07:49:09 EDT 2007</a>, glenda </div><hr />The first section of this page describes the simplest possible setup for a standalone terminal, the rest of the page describes how to setup more complex Plan 9 network. <a name="STANDALONE_TERMINAL_NETWORK_SETUP" /><h3>STANDALONE TERMINAL NETWORK SETUP</h3> <p class='para'> To configure your network connection on a standalone terminal you only need to call <a href="http://plan9.bell-labs.com/magic/man2html/8/ipconfig"><i>ipconfig</i>(8)</a> and run ndb/dns -r. </p> <p class='para'> If you have DHCP just run: <pre> ip/ipconfig </pre> </p> <p class='para'> Or to explicitly set the configuration: <pre> ip/ipconfig -g <your-gateway> ether /net/ether0 <your-ip-address> <your-subnet-mask> </pre> </p> <p class='para'> After calling ipconfig make sure to run ndb/dns -r to enable dns resolution. </p> <p class='para'> To make this configuration permanent edit your /rc/bin/termrc commenting out and editing(if needed) the corresponding lines that call <a href="http://plan9.bell-labs.com/magic/man2html/8/ipconfig"><i>ipconfig</i>(8)</a>. </p> <p class='para'> You can use ip/ping to test that your network connection is working properly. If you have problems see the "troubleshooting" section below. </p> <a name="NETWORK_DATABASE" /><h3>NETWORK DATABASE</h3> <p class='para'> Plan 9 uses a single database for storing all the network-related configuration information in the system. </p> <p class='para'> The database stores the configuration for machines specifically identifiable by the local installation, default configurations for machines in particular subnets, domain name resolution information, and mappings between TCP service names and port numbers among other things. </p> <p class='para'> The database is assembled from a number of text files bearing a particular record structure. </p> <p class='para'> The default root of the database is the text file /lib/ndb/local. The most important entry in that file is the ``database='' entry, which specifies a list of other files to include. For example, <pre> database= file=/lib/ndb/local file=/lib/ndb/local-cs file=/lib/ndb/common </pre> </p> <p class='para'> It is from the contents of this file and those in the list that the database is assembled. These files are typically used by ndb/cs commands in the startup scripts(e.g. /rc/bin/cpurc). </p> <p class='para'> Conventionally, the file /lib/ndb/common is for standard port definitions and the like; the other files hold actual system configuration. </p> <a name="RECORD_STRUCTURE" /><h3>RECORD STRUCTURE</h3> <p class='para'> Lexically, a record is an unindented line followed by a series of indented lines. Thus an unindented line, a blank line, or a comment line (one beginning with #) ends a record. </p> <p class='para'> Semantically, a record is a series of ``key=value'' tuples. Tuples on the same line bind slightly more tightly than tuples on different lines, but usually that's not important. </p> <p class='para'> An example record is: <pre> ip=10.247.62.235 ip=10.247.60.200 sys=lusitania ether=0060088bc416 proto=il dom=lusitania.domain.dom </pre> </p> <p class='para'> This record defines a system named ``lusitania'' with a specified ethernet address, two IP addresses, and a fully qualified domain name. The ``proto=il'' tuple indicates that the system speaks IL, the Plan 9 transport protocol of choice. By default, systems are assumed only to speak TCP. </p> <p class='para'> Other useful attributes include: <pre> auth default Plan 9 authentication server cpu default Plan 9 cpu server dns default DNS server (can be more than one) dnsdomain default DNS domain suffix (can be more than one) fs default Plan 9 file server ipgw IP gateway ipmask IP network mask ipsubmask IP subnetwork mask ntp default NTP server nntp default NNTP server smtp default SMTP server </pre> </p> <a name="IP_HIERARCHY_WALKING" /><h3>IP HIERARCHY WALKING</h3> <p class='para'> Most information in the database is not stored in each