LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   bond0 and eth0 both active after reboot (http://www.linuxquestions.org/questions/linux-networking-3/bond0-and-eth0-both-active-after-reboot-762148/)

wortmanb 10-15-2009 01:39 PM

bond0 and eth0 both active after reboot
 
I've been trying to configure a pair of NICs using bonding on my Ubuntu 904 box. After a reboot, here's what I'm seeing:

bret@marvin:~$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bond0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 bond0
bret@marvin:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 bond0
192.168.1.0 * 255.255.255.0 U 1 0 0 eth1
192.168.1.0 * 255.255.255.0 U 1 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 bond0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 100 0 0 bond0


My /etc/network/interfaces file looks like this:

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
address 192.168.1.199
gateway 192.168.1.1
netmask 255.255.255.0
slaves eth0 eth1
bond-mode 0
bond-miimon 100


#iface eth0 inet static
#address 192.168.1.199
#netmask 255.255.255.0
#gateway 192.168.1.1
#
#auto eth0
#
#iface eth1 inet static
#address 192.168.1.200
#netmask 255.255.255.0
#gateway 192.168.1.1
#
#auto eth1


And my /etc/modprobe.d/bonding looks like this:

alias bond0 bonding
options bonding mode=0 miimon=100


I've obviously got something that's starting my eht0 and eth1 interfaces separately, even though they know they're slaved:

bret@marvin:~$ ifconfig -a
bond0 Link encap:Ethernet HWaddr 00:1b:fc:25:02:a4
inet addr:192.168.1.199 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21b:fcff:fe25:2a4/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:839 errors:0 dropped:0 overruns:0 frame:0
TX packets:558 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:75492 (75.4 KB) TX bytes:104301 (104.3 KB)

eth0 Link encap:Ethernet HWaddr 00:1b:fc:25:02:a4
inet addr:192.168.1.233 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:434 errors:0 dropped:0 overruns:0 frame:0
TX packets:287 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37961 (37.9 KB) TX bytes:46709 (46.7 KB)
Interrupt:249 Base address:0x6000

eth1 Link encap:Ethernet HWaddr 00:1b:fc:25:02:a4
inet addr:192.168.1.225 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:405 errors:0 dropped:0 overruns:0 frame:0
TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37531 (37.5 KB) TX bytes:57592 (57.5 KB)
Interrupt:18 Base address:0x9400

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:534 errors:0 dropped:0 overruns:0 frame:0
TX packets:534 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:57656 (57.6 KB) TX bytes:57656 (57.6 KB)

pan0 Link encap:Ethernet HWaddr 56:5f:86:8f:af:1d
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)



What am I missing?

wortmanb 10-15-2009 02:04 PM

The original problem was an inability to access addresses through the default gateway that were external to my network. I solved that by deleting the default route for eth0. Is this configuration now correct?

wortmanb 10-20-2009 02:13 PM

Now what seems to be happening is that after a random period of time, NetworkManager will decide to activate or inactive something and I lose all network connectivity. I have to ifconfig down an interface, though sometimes this also causes NM to add another default route for that interface when I ifconfig up it.

Anyone?


All times are GMT -5. The time now is 06:56 PM.