This one has been bugging me for some time now. The network interface (as defined in Debian's /etc/network/interfaces file) fails to obtain an IP address from my router. However dhclient br0 does.
I'm using br0 since I run a Windows XP virtual machine. The network/interface changes are from a Debian howto on setting up the tap interface.
As near as I can tell, the /etc/init.d/networking script basically calls /sbin/ifup -a. ifup is a binary.
My /etc/network/interfaces file is:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet manual
auto br0
iface br0 inet dhcp
pre-up /usr/sbin/tunctl -u garydale -t tap0
pre-up ifconfig tap0 up
bridge_ports all tap0
post-down ifconfig tap0 down
post-down tunctl -d tap0
When I run /etc/init.d/networking start I get:
Configuring network interfaces...Set 'tap0' persistent and owned by uid 1000
Waiting for br0 to get ready (MAXWAIT is 32 seconds).
Internet Software Consortium DHCP Client
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.
Please contribute if you find this software useful.
For info, please visit
http://www.isc.org/dhcp-contrib.html
Usage: dhclient [-c] [-d] [-e] [-p <port>] [-lf lease-file]
[-pf pidfile] [interface]
exiting.
Failed to bring up br0.
done.
ifconfig shows:
br0 Link encap:Ethernet HWaddr 00:24:1d:14:d8:42
inet6 addr: 2002:63f3:ddfd:0:224:1dff:fe14:d842/64 Scope:Global
inet6 addr: fe80::224:1dff:fe14:d842/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:96 (96.0 B) TX bytes:546 (546.0 B)
eth0 Link encap:Ethernet HWaddr 00:24:1d:14:d8:42
inet6 addr: fe80::224:1dff:fe14:d842/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:660 (660.0 B) TX bytes:546 (546.0 B)
Interrupt:27
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:790 errors:0 dropped:0 overruns:0 frame:0
TX packets:790 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:48441 (47.3 KiB) TX bytes:48441 (47.3 KiB)
tap0 Link encap:Ethernet HWaddr ba:5d:22:12:a1:1c
inet6 addr: fe80::b85d:22ff:fe12:a11c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:8 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
At this point I can run dhclient br0 and get the networking to complete. The only thing that seemed to be missing was the IPv4 address anyway. This gives the following response to ifconfig:
br0 Link encap:Ethernet HWaddr 00:24:1d:14:d8:42
inet addr:192.168.1.17 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2002:63f3:ddfd:0:224:1dff:fe14:d842/64 Scope:Global
inet6 addr: fe80::224:1dff:fe14:d842/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:75239 (73.4 KiB) TX bytes:1543 (1.5 KiB)
eth0 Link encap:Ethernet HWaddr 00:24:1d:14:d8:42
inet6 addr: fe80::224:1dff:fe14:d842/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:334 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80695 (78.8 KiB) TX bytes:1543 (1.5 KiB)
Interrupt:27
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:790 errors:0 dropped:0 overruns:0 frame:0
TX packets:790 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:48441 (47.3 KiB) TX bytes:48441 (47.3 KiB)
tap0 Link encap:Ethernet HWaddr ba:5d:22:12:a1:1c
inet6 addr: fe80::b85d:22ff:fe12:a11c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:331 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
I suspect that the problem is with the interfaces file, but I'm not a networking guru so I can't see what the issue is. Any ideas?