6 This method may be used to define the IPv4 loopback interface.
9 ifconfig %iface% 127.0.0.1 up
10 route add -net 127.0.0.0 if ( mylinuxver() < mylinux(2,1,100) )
16 This method may be used to define ethernet interfaces with statically
17 allocated IPv4 addresses.
20 address address -- Address (dotted quad) *required*
21 netmask netmask -- Netmask (dotted quad) *required*
22 broadcast broadcast_address -- Broadcast address (dotted quad)
23 network network_address -- Network address (dotted quad) *required \
25 metric metric -- Routing metric for default gateway (integer)
26 gateway address -- Default gateway (dotted quad)
27 pointopoint address -- Address of other end point (dotted quad). \
28 Note the spelling of "point-to".
29 media type -- Medium type, driver dependent
30 hwaddress class address -- Hardware Address. /class/ is one of \
31 *ether*, *ax25*, *ARCnet* or *netrom*. \
32 /address/ is dependent on the above \
37 [[ ifconfig %iface% hw %hwaddress%]]
38 ifconfig %iface% %address% netmask %netmask% [[broadcast %broadcast%]] \
39 [[pointopoint %pointopoint%]] [[media %media%]] [[mtu %mtu%]] \
41 route add -net %network% \
42 if ( mylinuxver() < mylinux(2,1,100) )
43 [[ route add default gw %gateway% [[metric %metric%]] %iface% ]]
46 [[ route del default gw %gateway% [[metric %metric%]] %iface% ]]
50 This method may be used to define interfaces for which no configuration
51 is done by default. Such interfaces can be configured manually by
52 means of *up* and *down* commands or /etc/network/if-*.d scripts.
59 This method may be used to obtain an address via DHCP with any of
60 the tools: dhclient, pump, udhcpc, dhcpcd.
61 (They have been listed in their order of precedence.)
62 If you have a complicated DHCP setup you should
63 note that some of these clients use their own configuration files
64 and do not obtain their configuration information via *ifup*.
67 hostname hostname -- Hostname to be requested (pump, dhcpcd, udhcpc)
68 leasehours leastime -- Preferred lease time in hours (pump)
69 leasetime leasetime -- Preferred lease time in seconds (dhcpcd)
70 vendor vendor -- Vendor class identifier (dhcpcd)
71 client client_id -- Client identifier (dhcpcd, udhcpc)
72 hwaddress class address -- Hardware Address. /class/ is one of \
73 *ether*, *ax25*, *ARCnet* or *netrom*. \
74 /address/ is dependent on this choice.
77 [[ifconfig %iface% hw %hwaddress%]]
78 dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \
79 if (execable("/sbin/dhclient3"))
80 dhclient -e -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \
81 elsif (execable("/sbin/dhclient"))
82 pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \
83 elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100))
84 udhcpc -n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \
86 elsif (execable("/sbin/udhcpc") && mylinuxver() >= mylinux(2,2,0))
87 dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %clientid%]] \
88 [[-l %leasetime%]] %iface% \
89 elsif (execable("/sbin/dhcpcd"))
92 dhclient3 -r -pf /var/run/dhclient.%iface%.pid -lf /var/run/dhclient.%iface%.leases %iface% \
93 if (execable("/sbin/dhclient3"))
94 cat /var/run/dhclient.%iface%.pid | xargs -i kill -TERM {} \
95 elsif (execable("/sbin/dhclient"))
97 elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100))
98 cat /var/run/udhcpc.%iface%.pid | xargs -i kill -TERM {} \
99 elsif (execable("/sbin/udhcpc"))
101 elsif (execable("/sbin/dhcpcd"))
103 ifconfig %iface% down
106 This method may be used to obtain an address via bootp.
109 bootfile file -- Tell the server to use /file/ as the bootfile.
110 server address -- Use the IP address /address/ to communicate with \
112 hwaddr addr -- Use /addr/ as the hardware address instead of \
113 whatever it really is.
116 bootpc [[--bootfile %bootfile%]] --dev %iface% [[--server %server%]] \
117 [[--hwaddr %hwaddr%]] --returniffail --serverbcast
120 ifconfig down %iface%
123 This method uses pon/poff to configure a PPP interface. See those
124 commands for details.
126 provider name -- Use /name/ as the provider (from /etc/ppp/peers).
133 This method uses wvdial to configure a PPP interface. See that command
136 provider name -- Use /name/ as the provider (from /etc/ppp/peers).
138 /sbin/start-stop-daemon --start -x /usr/bin/wvdial \
139 -p /var/run/wvdial.%iface% -b -m -- [[ %provider% ]]
141 /sbin/start-stop-daemon --stop -x /usr/bin/wvdial \
142 -p /var/run/wvdial.%iface% -s 2