Dual NIC Ubuntu 11.04 Server - cannot get out to Internet
I'm hoping someone can assist me with an issue I have with my dual NIC Ubuntu 11.04 server running on my home network. I've recently set this machine up but noticed an issue with Internet connectivity when running 'sudo apt-get update' - it basically fails to get out onto the Internet.
The machine actually has three NICs but only eth1 and eth2 are configured. Both are statically configured.
eth1 connects to a LAN port on a Netgear DGND3300v2 modem router. This NIC is assigned the IP 192.168.0.4 (the modem router is 192.168.0.1).
eth2 connects to a LAN port on a Netgear WNDR3400 router. This NIC is assigned the IP 192.168.1.2.
The config for the NICs in /etc/network/interfaces is as follows:
iface eth1 inet static
iface eth2 inet static
There is also a patch cable going between the router (WNDR3400) and the modem router (DGND3300v2). The router (WNDR3400) therefore picks up the IP 192.168.0.2 from the modem router (DGND3300v2).
I'm not a networking expert by any stretch of the imagination - hence this post - but I'm not sure where I'm going wrong.
If I take down both NICs with 'sudo ifdown ethX' where X is the NIC to take down, I can get out to the internet on eth2 if I bring it back up with 'sudo ifup eth2'. I can do the 'sudo apt-get update' without a hitch.
If I then take down eth2 ('sudo ifdown eth2') and bring up eth1 ('sudo ifup eth1') and then try 'sudo apt-get update' it basically just hangs and/or says there was an issue with communicating with the Ubuntu servers (I don't remember the exact message but essentially it cannot connect to the Internet).
If I bring both interfaces up, again I get the same issue as the above paragraph, despite the machine being able to get out to the Internet on eth2 if only this interface is enabled.
So, I'm pretty confused. I figure I must have to tell the machine which NIC is for going out to the big wide world on and which NIC is for accessing the LAN side but I don't know how to do this. I've consulted Google for this first before posting here but the answers were for different network setups to mine.
I have attached a .jpg of how my network is laid out if this helps in anyway. The machine with the issue is the one labelled E3510.
Can anyone tell me what is wrong with my setup or what I need to add to a configuration file (?) in order for me not to have to take down eth1 everytime I need to get out to the Internet on my server using 'wget' or when trying to run 'sudo apt-get update'?
One other point to note is that this machine is not always powered up - it is not used a 'pass through' for other machines - it is not intended to control any traffic going through the LAN. It is just a server in its own right currently. I have bigger plans for it once I get the network working on it as I would like.
There might well be additional information that is needed but I have put down what I think is enough at this stage. I can always post back with further information if this is needed.
I am currently at work at the moment so I would not be able to post back until this evening but I appreciate anyone pointing me in the right direction.
Thanks in advance
Last edited by garyjmellor; July 12th, 2011 at 09:49 AM.
Reason: Added additional information
Lenovo G550 2958 | X64 | Mobile Intel GM45 Express | NVIDIA GeForce G105M | 128GB Crucial RealSSD C300 | Intel Core 2 Extreme Processor (X9100) | Crucial 8GB SODIMM DDR3 | Intel PRO/Wireless 5100 AGN [Shiloh].