LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Setting up Routes in FC7 (https://www.linuxquestions.org/questions/fedora-35/setting-up-routes-in-fc7-651411/)

diggs 06-24-2008 08:02 PM

Setting up Routes in FC7
 
Hi there, I felt that a new thread would be in order as my questions are no longer related to my original thread.

I am having a tough time setting up the routes on my FC7 box.
eth0: connects to internet
eth2 192.168.10.105
eth2:0 192.168.11.105
eth2:1 192.168.1.105

All DNS entries are correct. It's not an iptables issue as if I flush them I still have the same problems. I cannot ping or tracert or dig names, either.

Output of routes:
Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.1.0    *              255.255.255.0  U    0      0        0 eth2
192.168.11.0    *              255.255.255.0  U    0      0        0 eth2
192.168.10.0    *              255.255.255.0  U    0      0        0 eth2
2xx.xx.xx.0    *              255.255.255.0  U    0      0        0 eth0
169.254.0.0    *              255.255.0.0    U    0      0        0 eth2
default        192.168.10.1    0.0.0.0        UG    0      0        0 eth2

I do know that the gateway for eth0 should be 2xx.xx.xxx.254. I tried running 'system-config-network' but to no luck.

Thanks!

dkm999 06-24-2008 08:24 PM

There seems to be some confusion about the term gateway. Although you can specify that traffic for some network should be routed through a particular (non-obvious) interface, that is not the usual use of the term gateway. As in your case, you want all traffic whose route is otherwise indeterminate to be sent out to a default gateway. You can have only one of these per computer, and the address specified should be the address of the other end of the link to the Internet.

Just for organizational purposes, I put the declaration
Code:

GATEWAY=2xx.xxx.xxx.254
in the networks script for the ethernet interface that connects to the Internet, but you could put it into /etc/sysconfig/network instead.

billymayday 06-24-2008 08:53 PM

Quote:

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Welcome back diggs. Above is the output of route on one of my servers, maybe it will help.

Clearly I have 2 NICs, one is 192.168.0.2, and all traffic for addresses in the range 192.168.0.1-254 are routed through here (eth0). The other is 192.168.1.1, and all traffic in the range 192.168.1.1-254 gets routed through this one (eth1). Ignoreing the third entry, which as I understand it aids fault tolerance for dhcp, etc,any traffic not caught by the earlier routes gets routed through the default gatweway. Now my router/modem has an internal IP of 192.168.0.1, so I want any other traffic to route through that, hence the gateway address.

The attached link is a bit old, but look at chapter 4 - it gives a pretty good idea of what's going on.

http://linux-ip.net/html/

I think the routes you need are:

Code:

192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 eth2
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 eth2:0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 eth2:1
169.254.0.0 0.0.0.0 255.255.255.0 U 0 0 eth2
default 2??.???.???.??? 0.0.0.0 UG 0 0 0 eth0

on the assumption that 2??.???.???.??? is directly connected to the internet (so note the comments above).

Do you not have
an eth1?

diggs 06-24-2008 09:20 PM

Well I got it sorted, I ran 'setup' and then crammed the gateway as .254 into all of the interfaces and that worked. Good times!

Billy, may eth1 rest in peace. The NIC went kaput, I put a new one in and it assumed the role of eth2

Thanks for your help guys!


All times are GMT -5. The time now is 12:18 AM.