Amiga Unix — 68040 · 68060

Manual pages › System administration commands (1M)

ifdown(1M)

bring network interfaces up or down

Package: amxbase, added for amigaux.

Also by this name: ifup(1M), System administration commands

ifup, ifdown - bring network interfaces up or down

ifup -a | interface ...
ifup -n [ interface ... ]
ifdown -a | interface ...

ifup sets up each interface the way its line in /etc/inet/interfaces says (see interfaces(4)); with -a, every interface the installed network drivers find. The boot runs ifup -a from /etc/init.d/inetinit.

For each interface, ifup reads its station address with dlpi-mac(1M), chooses its line (the line with that address, then the line with its name, then the * line; with none, the interface is left down), links it under IP with slink if IP does not know it yet, and then follows the line's mode:

the address and mask are set with ifconfig.
/usr/sbin/dhcpc is asked for a lease and given ifup_dhcpwait seconds (from /etc/rc.conf; default 20). A lease that came in that time counts even while the DHCP client is still applying it, which on a slow machine can take longer than the wait. If no lease comes in that time, or no DHCP client is installed, the address on the line is used if it has one; otherwise the interface stays down, and the DHCP client keeps trying.
nothing is done.

A static address and a DHCP lease are applied by the same steps, each only when it is not already in place, so running ifup again changes nothing: the address; the default route, from the line's gw or the lease's router (the first interface to set one keeps it); the machine's name when the line says name (or the lease gives one under hostname dhcp); this host's line in /etc/inet/hosts, for the interface that holds the default route (else the first one up); and DNS. DNS is turned on whenever a name server is known: the dns lines' servers and the lease's are written to /etc/resolv.conf (name servers only), /usr/lib/libsocket.so becomes libsockdns.so, /etc/netconfig is taken from /etc/netconfig.DNS, and /etc/domain is emptied. The kernel's domain is cleared too, at every boot: with /etc/domain empty the boot leaves the kernel's default, rpcdomain, which the resolver would append to every lookup. ifup never turns DNS off: with no name server known it leaves all of these as they are, so a static line with no dns line after a lease keeps DNS on. While DNS is on, /etc/resolv.conf must stay: without it every name lookup waits on the resolver, and so does every telnet or ftp login. To go back to /etc/inet/hosts alone, run ln -f /usr/lib/libsockhost.so /usr/lib/libsocket.so (the library the system is installed with) and remove ,/usr/lib/resolv.so from the four lines of /etc/netconfig.

With -n, ifup only says, for each interface, which line applies and what it would do, and lists every mistake in /etc/inet/interfaces.

ifdown takes each interface down and removes the default route its line set. An interface that holds a DHCP lease is released through the DHCP client.

0 when every interface named is up, or off as configured; 1 otherwise.

/etc/inet/interfaces
how each interface is set up.
/etc/inet/link.d/*
the network drivers present, one line each.
/usr/lib/inet/ifup.subr
the steps ifup, ifdown and the DHCP client's hook share.
/usr/lib/inet/dhcpc-hook
what the DHCP client runs to apply a lease.
/var/adm/rclog/ifup
the output of the boot's ifup -a; each step is also in /var/adm/rc.log.

dlpi-mac(1M), interfaces(4), rc.conf(4)

ifdown leaves the interface linked under IP: slink on this release can only unlink every interface at once.

31 October 2026 amix-base