Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just added a second NIC to my FC4 server. I am using the second ethernet card for a second IP address I have. My questions is for routing. Do I need two default routes?
Each card goes to a seperate router on the lan. My route table:
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
Does this look correct?
It seems to drop one of the default GW's periodically. Any suggestions would be greatly appreciated.
I changed the route to have one default. Now the second nic is unreachable from the outside. Here's a route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 192.168.0.1 255.255.255.0 UG 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
I have two routers, each one has port forwarding to port 80 from different IP Adresses from the net in this configuration only the 192.168.1.0 network us working.
The reason for the different ip's on port 80 is for different applications listenting on it. I have web servers on one and ssh server on the other.
Have all of your hosts Default Gw's point at the same router, normally the internet router. If one of your hosts has another network on it then the other hosts need to vbe able to route to it.
Either set the Default Gateway up to route between the two networks, or set the host with the second network up as a router then on the Default Gateway put a network specific route with the routing host as the next hop.
Any traffic from a host to the second network will be redirected to the routing host.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.