IPCONFIG(8) IPCONFIG(8)
NAME
ipconfig, rip, linklocal - Internet configuration and
routing
SYNOPSIS
ip/ipconfig [-6DGNOPdnprtuXy] [-U duid] [-b baud] [-c ctl]
[-g gateway] [-h host] [-i ipnet] [-m mtu] [-o dhcp-opt]
[-s dnsserver] [-f dbfile] [-x netmtpt] [ type [ device ]]
[verb] [ local [ mask [ remote [ file-server [ auth ]]]]]
ip/rip [-bdr] [-x netmtpt]
ip/linklocal [ -t gwipv4 ] mac ...
DESCRIPTION
Ipconfig binds a device interface to a mounted IP stack
(default /net) and configures the interface with a local
address and optionally a mask, a remote address, a file
server and an authentication server address. If no device
is specified, the first ether device on the mounted IP stack
is used. 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.
Information from DHCP and IPv6 router advertisements is
written to /net/ndb in the form of an ndb(8) entry unless
the P flag has been specified.
Type may be ether, gbe, ppp, pkt, null, or loopback. The
gbe type is equivalent to ether except that it allows jumbo
packets (up to ~9KB). The pkt interface passes all IP pack-
ets to and from a user program. For ppp the device can be
any byte stream device.
The verb (default add) determines the action performed. The
usual 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.
del delete the address from the device interface.
unbind
unbind the device interface and all its addresses from
the IP stack.
The IPv6-specific verbs, which take different arguments,
are:
add6 prefix pfx-len onlink auto validlt preflt
Page 1 Plan 9 (printed 11/17/25)
IPCONFIG(8) IPCONFIG(8)
sets the named IPv6 parameters; see ip(3) for more
detail.
ra6 [ keyword value ] ...
sets IPv6 router advertisement parameter keyword's
value. See ip(3) for more detail. Setting recvra non-
zero also forks a process to receive and process router
advertisements. Setting sendra non-zero also enables
IP routing on the interface, forks a process to send
router advertisements, and if no recvra process is run-
ning, forks one.
The options are:
6 if adding an address (the default action), add the IPv6
link-local address.
b the baud rate to use on a serial line when configuring
PPP.
c write the control string ctl to the ethernet device con-
trol file before starting to configure it. May be
repeated to specify multiple control writes.
d use DHCP to determine any unspecified configuration
parameters. For the ra6 verb with non-zero recvra, this
enables DHCPv6 address configuration.
D turn on debugging.
g the default gateway.
G use only generic DHCP and RA options. Without this
option, ipconfig adds to requests a Vendor Class option
with value plan9_$cputype and also requests vendor spe-
cific 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.
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.
i when writing /net/ndb configuration, create an ipnet=
tuple with the value of ipnet and the gathered network
attributes.
m the maximum IP packet size to use on this interface.
n determine parameters but don't configure the interface.
Page 2 Plan 9 (printed 11/17/25)
IPCONFIG(8) IPCONFIG(8)
N look in dbfile (default /lib/ndb/local) for the IP param-
eters for the specified local IP address or if local is
omitted and the device is an ethernet then all IP parame-
ters associated with the MAC address. IPv6 addresses are
added only if a IPv6 link-local address exists on the
interface or the 6 flag has been given to automatically
configure one.
O addresses specified on the command line override those
obtained via DHCP. A command line address of 0 implies
no override.
p write configuration information to /net/ndb.
P do not write configuration information to /net/ndb.
r by default, ipconfig exits after trying DHCP for 15 sec-
onds with no answer. This option directs ipconfig
instead to fork a background process that keeps trying
forever.
s add dnsserver to the /net/ndb configuration.
t enable source address translation on the interface and
default route. (only useful for IPv4).
U specify the DHCPv6 client identifier. When omitted, the
MAC address is used to generate a link-layer based duid
(DUID-LL). Note that the -d flag must also be given to
enable DHCPv6.
u disable IPv6 duplicate discovery detection, which deletes
any existing ARP table entry for one of our IPv6
addresses before adding new ones.
f use the ndb database file dbfile.
x use the IP stack mounted at netmtpt instead of at /net.
X don't fork a process to keep the DHCP lease alive.
y When adding an address, ARP proxy the new network on
other interfaces.
o adds dhcp-opt to the list of paramters requested of the
DHCP server. The result will appear in /net/ndb should
this be the first interface. The known options are:
arptimeout, baddr, bflen, bootfile, clientid, cookie,
discovermask, discoverrouter, dns, dom, dumpfile,
etherencap, extpath, finger, homeagent, impress, ipaddr,
ipforward, ipgw, ipmask, irc, lease, log, lpr,
Page 3 Plan 9 (printed 11/17/25)
IPCONFIG(8) IPCONFIG(8)
maxdatagram, maxmsg, message, mtu, name, netbiosdds, net-
biosns, netbiosscope, netbiostype, ni, nisdomain, nis-
plus, nisplusdomain, nntp, nonlocal, ntp, overload,
params, pathplateau, pathtimeout, policyfilter, pop3,
rebindingtime, renewaltime, rl, rootpath, rs, serverid,
smtp, st, staticroutes, stdar, subnetslocal, supplymask,
swap, sys, tcpka, tcpkag, tcpttl, tftp, time, timeoff,
trailerencap, ttl, type, vendorclass, www, xdispmanager,
xfont
The options ipmask, ipgw, dns, sys, and ntp are always
requested.
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 delete 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 network.
x use the IP stack mounted at netmtpt instead of at /net.
d turn on (voluminous) debugging.
Linklocal prints the IPv6 link-local address corresponding
to the given mac address. Given -t, linklocal instead
prints the 6to4 EUI-64-based IPv6 address corresponding to
mac and 6to4 gateway gwipv4.
EXAMPLES
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
% 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
Page 4 Plan 9 (printed 11/17/25)
IPCONFIG(8) IPCONFIG(8)
At Bell Labs, our primary IP stack is always to the
company's internal firewall-protected network. The follow-
ing creates an external IP stack to directly access the out-
side Internet. Note that the connection server uses a dif-
ferent 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
Configure the IPv6 link-local address automatically and lis-
ten for router announcements.
ip/ipconfig -6
ip/ipconfig ra6 recvra 1
Configure loopback interface for localhost addresses.
ip/ipconfig loopback /dev/null 127.1 /128
ip/ipconfig loopback /dev/null ::1 /128
Configure null interface for discarding packets.
ip/ipconfig null /dev/mordor 8.8.8.8 /128
FILES
/sys/log/ipconfig
SOURCE
/sys/src/cmd/ip/ipconfig
/sys/src/cmd/ip/rip.c
/sys/src/cmd/ip/linklocal.c
SEE ALSO
ether(3), ip(3), loopback(3), ndb(6), 6in4(8), dhcpd(8),
ppp(8)
/lib/rfc/rfc2373 for IPv6's modified EUI-64
Page 5 Plan 9 (printed 11/17/25)