Need help with network routing please
CaffeineMe
Cedar Rapids, IA
Recently built a Ubuntu Server (12.04). Server has two NIC's:
Onboard 10/100 NIC, that I want to use to communicate to the internet only (eth1)
Intel gigabit NIC, that I want to use for internal LAN communication only (eth0)
Trouble is, I can't seem to get the /etc/network/interfaces file configured just right to make it happen. When I try to use the config. below, I can still communicate over the LAN, but can't get out to internet. Any ideas on what I need to change to make it happen?
-----------
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface is the onboard NIC, used for internet connection
auto eth1
iface eth1 inet static
address 192.168.1.121
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.0.255
# The primary network interface is the Intel, PCI NIC used for LAN traffic only
auto eth0
iface eth0 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
-----------------
When I change "static" back to "dhcp" and reboot, all is well. Any ideas????? Thanks!
Onboard 10/100 NIC, that I want to use to communicate to the internet only (eth1)
Intel gigabit NIC, that I want to use for internal LAN communication only (eth0)
Trouble is, I can't seem to get the /etc/network/interfaces file configured just right to make it happen. When I try to use the config. below, I can still communicate over the LAN, but can't get out to internet. Any ideas on what I need to change to make it happen?
-----------
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface is the onboard NIC, used for internet connection
auto eth1
iface eth1 inet static
address 192.168.1.121
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.0.255
# The primary network interface is the Intel, PCI NIC used for LAN traffic only
auto eth0
iface eth0 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
-----------------
When I change "static" back to "dhcp" and reboot, all is well. Any ideas????? Thanks!
0
Comments
When you set to DHCP, you're letting your ISP set the IP of eth1. Try setting only the eth1 set of setup lines to dhcp and see what happens.
Switch for internal network ---> Intel interface and onboard NIC ---> external IP device (cable modem, DSL device)
Does that sound right? Or are you trying to plug in both to a switch but only have the intel do internal traffic?
I am somewhat confused by his setup as to particulars of network coding. Looks like he might have a gateway router...
CaffeinMe, can you tell us what the cables for eth1 and eth0 are hooked to physically???
John.
ETH0 -- switch --router--DSL
ETH1 --router --DSL
Goal is to send ETH0 traffic thru the switch alone, never touching the router unless necessary, and not communicating with internet. ETH1 would never send traffic thru the switch, and would not communicate with the LAN (unless it routes thru ETH0).
Hope this makes sense. Thanks!
Possibly relevant links for perusal:
http://ubuntuforums.org/showthread.php?t=1802563
http://www.techienote.com/2012/04/how-to-configure-network-ubuntu-12-04.html
I think it's a switch...it's a no-name device that I bought out of the scrap heap 8+ years ago for $15 and has never caused me a bit of trouble. Could be a hub for all I know. I'd have to Google the make/model to figure out precisely what it is. I'll check your links as well.
PirateNinja: I'll look at my router settings. It's a Cisco (model number not avail. at the moment), but I do know it's running DD-WRT.
Here's a question: IF I wire ETH1 directly into the router, is routing smart enough on it's own to send external traffic through ETH1, and use ETH0 for all LAN traffic? In other words, can I wire this, ignore changing the interfaces file (and over-complicating the issue!) and have it "just happen"?
The question to me is, do you want everything connected to the switch to be LAN only? Or do you only want select devices, including the server's eth1, to be LAN only?
http://www.dd-wrt.com/wiki/index.php/VLAN_Detached_Networks_(Separate_Networks_With_Internet)
Essentially that makes it so you can assign different "gateways" to each port on the router.
So port 0 could be 192.168.1.1
port 1 could be 192.168.2.1
etc
However, that doesn't block out the Internet it just creates separate networks. So there is probably another step to using vlans where you could disable the WAN route to 192.168.2.1 but keep it enabled on 192.168.1.1.
we make it really simple. You setup access restrictions on the router and deny access to a certain IP address, ie that of the 10/100 nic on the server.
Then keep both nics on the same subnet and vlan, so they have say 192.168.1.2 and 192.168.1.3 but only .3 can access the Internet.
I'm not sure what your end goal is here, so you have some flexibility.
I believe you have this idea that you'll make lan traffic faster if you aren't sharing it with internet traffic. Technically maybe - but if all that traffic is going through your router unless your router has a huge backplane you aren't achieving anything.
If you want to later mirror, your routing makes more sense, but a mirror is not a pure server only. A mirror downloads to sync, then plays server to feed what it has synced.