IPCONFIG(8)                                           IPCONFIG(8)

     NAME
          ipconfig, rip - Internet configuration and routing

     SYNOPSIS
          ip/ipconfig [-ndDrG] [-b baud] [-m mtu] [-g gateway] [-h
          hostname] [-x netmtpt] type device [verb] [local-addr]
          [mask] [remote-addr] [file-server-addr] [auth-server-addr]

          ip/rip [-bdr] [-x netmtpt]

     DESCRIPTION
          Ipconfig binds a device interface (default /net/ether0) to a
          mounted IP stack (default /net) and configures the interface
          with a local address, a mask, and a remote address.  The
          addresses can be specified in the command line or obtained
          via DHCP.  If DHCP is requested, it will also obtain the
          addresses of DNS servers, NTP servers, gateways, a Plan 9
          file server, and a Plan 9 authentication server.  If this is
          the first interface on the IP stack, the information will be
          written to /net/ndb in the form of an ndb(8) entry.

          Type may be ether, ppp, or gbe.  The gbe type is equivalent
          to ether except that it allows jumbo packets.  For ppp the
          device can be any byte stream device.

          The verb (default add) determines the action performed.  The
          verbs are:

          add  if the device is not bound to the IP stack, bind it.
               Add the given local address, mask, and remote address
               to the interface.  An interface may have multiple
               addresses.

          remove
               remove the address from the device interface.

          unbind
               unbind the device interface and all its addresses from
               the IP stack.

          The options are:

          x    use the IP stack mounted at netmtpt instead of at /net.

          g    the default gateway.

          d    use DHCP to determine any unspecified configuration
               parameters.

          r    by default, ipconfig exits after trying DHCP for 15

     Page 1                       Plan 9            (printed 12/26/24)

     IPCONFIG(8)                                           IPCONFIG(8)

               seconds with no answer.  This option directs ipconfig
               instead to fork a background process that keeps trying
               forever.

          h    the hostname to add to DHCP requests.  Some DHCP
               servers, such as the one used by COMCAST, will not
               respond unless a correct hostname is in the request.

          n    determine parameters but don't configure the interface.

          b    the baud rate to use on a serial line when configuring
               PPP.

          D    turn on debugging.

          G    use only generic DHCP options.  Without this option,
               ipconfig adds to requests a Vendor Class option with
               value plan9_$cputype and also requests vendor specific
               options 128 and 129 which we interpret as the Plan 9
               file server and auth server.  Replies to these options
               contain a list of IP addresses for possible file
               servers and auth servers.

          m    the maximum IP packet size to use on this interface.

          If DHCP is requested, a process is forked off to renew the
          lease before it runs out.  If the lease does run out, this
          process will remove any configured addresses from the inter-
          face.

          Rip runs the routing protocol RIP.  It listens for RIP pack-
          ets on connected networks and updates the kernel routing
          tables.  The options are:

          b    broadcasts routing information onto the networks.

          n    gathers routing information but doesn't write to the
               route table.  This is useful with -d to debug a net-
               work.

          x    use the IP stack mounted at netmtpt instead of at /net.

          d    turn on (voluminous) debugging.

     EXAMPLE
          Configure Ethernet 0 as the primary IP interface.  Get all
          addresses via DHCP.  Start up a connection server and DNS
          resolver for this IP stack.

               % bind -b '#l0' /net
               % bind -a '#I0' /net
               % ip/ipconfig

     Page 2                       Plan 9            (printed 12/26/24)

     IPCONFIG(8)                                           IPCONFIG(8)

               % ndb/cs
               % ndb/dns -r

          Add a second address to the stack.

               % ip/ipconfig ether /net/ether0 add 12.1.1.2 255.255.255.0

          At Lucent our primary IP stack is always to the company's
          internal firewall-protected network.  The following creates
          an external IP stack to directly access the outside Inter-
          net.  Note that the connection server uses a different set
          of ndb files.  This prevents us from confusing inside and
          outside name/address bindings.

               % bind -b '#l1' /net.alt
               % bind -b '#I1' /net.alt
               % ip/ipconfig -x /net.alt -g 204.178.31.1 ether /net.alt/ether1\
                    204.178.31.6 255.255.255.0
               % ndb/cs -x /net.alt -f /lib/ndb/external
               % ndb/dns -sx /net.alt -f /lib/ndb/external
               % aux/listen -d /rc/bin/service.alt /net.alt/tcp
               % aux/listen -d /rc/bin/service.alt /net.alt/il

     SOURCE
          /sys/src/cmd/ip/ipconfig.c
          /sys/src/cmd/ip/rip.c

     SEE ALSO
          ndb(6)

     Page 3                       Plan 9            (printed 12/26/24)