Posts Tagged “internet”

Situation:

  • 64-bit Ubuntu Intrepid 8.10
  • 2 x NIC
  • Both configured via DHCP
  • eth0 goes to a LAN (10.5.5.0/24)
  • eth1 goes to the Internet.

Problem:

  • When both NICs are up I can’t get to the Internet.
  • The issue is that both DHCP clients were requesting default gateway info and so I had two default gateway entries in my routing table.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.59.3.0 * 255.255.255.0 U 0 0 0 eth1
10.5.5.0 * 255.255.255.0 U 0 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 vnet0
link-local * 255.255.0.0 U 1000 0 0 eth0
default 10.59.3.1 0.0.0.0 UG 100 0 0 eth1
default 10.5.5.1 0.0.0.0 UG 100 0 0 eth0

Solution:

  • Modify the /etc/dhcp3/dhclients.conf file.
  • Add an interface section for each NIC and don’t request a router for the LAN-side.

interface “eth0″ {
request subnet-mask, broadcast-address, time-offset, domain-name-servers,
domain-name, domain-search, host-name, interface-mtu;
}

interface “eth1″ {
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu;
}

note: I am also using my own DNS server so I don’t request one from eth1.

Comments Comments

Powered by Web Design Company Plugins