Click to See Complete Forum and Search --> : 2 nics on ubuntu 5.10 box loses internet connection
jeisma
03-23-2006, 12:02 AM
hello!
im on a lan. i added a 2nd nic on my box. configured its ip address as static.
i can no longer access the internet. eth0 address is allowed internet access, eth1 (new one) address is not.
seems like browsing defaults to eth1?
how do i tell the browser to use eth0?
thanks!
je_fro
03-23-2006, 01:27 AM
the browser doesn't care about your nic's....all you need to set is your default gateway.
what does ifconfig and route -v say?
jeisma
03-23-2006, 02:27 AM
# /etc/network$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:0E:A6:66:92:09
inet addr:192.168.0.104 Bcast:192.168.0.255 Mask:255.255.254.0
inet6 addr: fe80::20e:a6ff:fe66:9209/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150572 errors:0 dropped:0 overruns:0 frame:0
TX packets:49525 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42146069 (40.1 MiB) TX bytes:5772173 (5.5 MiB)
Interrupt:20 Base address:0xb800
eth1 Link encap:Ethernet HWaddr 00:50:DA:8D:17:3E
inet addr:192.168.1.245 Bcast:192.168.1.255 Mask:255.255.254.0
inet6 addr: fe80::250:daff:fe8d:173e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55628 errors:0 dropped:0 overruns:6 frame:0
TX packets:27443 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:16172942 (15.4 MiB) TX bytes:2669975 (2.5 MiB)
Interrupt:22 Base address:0xb400
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:61050 errors:0 dropped:0 overruns:0 frame:0
TX packets:61050 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5542183 (5.2 MiB) TX bytes:5542183 (5.2 MiB)
/etc/network$ route -v
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.254.0 U 0 0 0 eth1
192.168.0.0 * 255.255.254.0 U 0 0 0 eth0
i dont put in gateway but i can connect to the internet if i only eth0. what could be missing in my config?
thanks!
copeja
03-23-2006, 03:23 AM
At the cli as root " route add default gw 192.168.1.245 eth0 " with out the quotes. then route -v You have eth0 & eth1 on different subnets .1 eth1 and .0 eth0 so it may not set the route but bash will give you an error if it won't work. you may have to get both eth0 and eth1 on the same subnet.