LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-24-2008, 08:02 PM   #1
diggs
Member
 
Registered: Aug 2007
Distribution: whatever I'm told!
Posts: 31

Rep: Reputation: 15
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!
 
Old 06-24-2008, 08:24 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
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.
 
Old 06-24-2008, 08:53 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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?

Last edited by billymayday; 06-24-2008 at 08:56 PM.
 
Old 06-24-2008, 09:20 PM   #4
diggs
Member
 
Registered: Aug 2007
Distribution: whatever I'm told!
Posts: 31

Original Poster
Rep: Reputation: 15
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 07:08 PM
Setting up PXE via FC7 sscultima Fedora 3 06-29-2007 02:08 PM
Setting of multipath default routes!! vishamr2000 Linux - Networking 2 06-01-2006 01:12 AM
setting up routes - box with two nic cards josh_mcqueen Linux - Networking 2 07-21-2005 08:53 AM
Setting static routes on LAN cranium2004 Linux - Networking 3 01-06-2005 11:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration