Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to set default entry in routing table?

Reply
Thread Tools Display Modes

how to set default entry in routing table?

 
 
kernel.lover
Guest
Posts: n/a

 
      03-15-2005, 11:59 AM
hello,
I have 2 questions in setting routing table
1)What should be the Ideal configuration for my RH9 linux machine with
2 network interfaces
eth0:10.0.0.100
eth1:192.168.1.100

2) I set my routing table as
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
172.16.1.0 10.0.2.100 255.255.255.0 UG 0 0
0 eth0
10.0.0.0 * 255.0.0.0 U 0 0
0 eth0
127.0.0.0 * 255.0.0.0 U 0 0
0 lo
default 192.168.1.100 0.0.0.0 UG 0 0
0 eth1

wheras 10.0.2.10 is another router made on RH9.
I want to know how to set default to 10.0.0.100 as main network
connecting 10.0.0.100 and 10.0.2.10 (Router1 and Router 2 resp.)?

regaerds,
cranium
 
Reply With Quote
 
 
 
 
Moe Trin
Guest
Posts: n/a

 
      03-15-2005, 10:40 PM
In article <(E-Mail Removed) >, kernel.lover
wrote:

> I have 2 questions in setting routing table
>1)What should be the Ideal configuration for my RH9 linux machine with
>2 network interfaces
>eth0:10.0.0.100
>eth1:192.168.1.100


Your question doesn't make sense. How the interfaces are configured depends
on what the networks look like.

>2) I set my routing table as
>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
>172.16.1.0 10.0.2.100 255.255.255.0 UG 0 0 0 eth0
>10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
>127.0.0.0 * 255.0.0.0 U 0 0 0 lo
>default 192.168.1.100 0.0.0.0 UG 0 0 0 eth1


OK, that looks acceptable, assuming the addresses are appropriate for the
networks and routers.

>wheras 10.0.2.10 is another router made on RH9.


Where does 10.0.2.10 lead?

>I want to know how to set default to 10.0.0.100 as main network


This part makes sense. Look in the following places:

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/sysconfig/network-scripts/route-eth0
/etc/sysconfig/network-scripts/route-eth1

In one of those files, you are setting 'GATEWAY' and 'GATEWAYDEV' or you
are setting a route using <mumble> as a gateway on eth<mumble>

>connecting 10.0.0.100 and 10.0.2.10 (Router1 and Router 2 resp.)?


This is not understandable. 10.0.0.100 is some host on your 10.0.0.0/8
network apparently on eth0, and 10.0.2.10 is some other host on the same
network. They should both be directly reachable through the eth0 basic
route

10.0.0.0 * 255.0.0.0 U 0 0 0 eth0

right there. Nothing special is needed. For further details, see the
"Linux Network Administrator's Guide" at http://tldp.org/guides.html.
Note that the 'network-guide' or it's successor the 'nag2' might be
installed on your system, perhaps in /usr/share/doc/.

Old guy
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two default gw in kernel routing table Binary Linux Networking 16 02-23-2007 04:17 PM
Why does my routing table only have 1 entry? laredotornado@zipmail.com Linux Networking 7 07-29-2006 09:06 AM
Routing table Matt Scoff Windows Networking 6 06-08-2006 02:19 AM
How to use second routing table? Martin Pauly Linux Networking 0 03-08-2005 04:54 PM
routing to multiple subnets in one entry /dev/rob0 Linux Networking 0 07-12-2003 11:04 PM



1 2 3 4 5 6 7 8 9 10 11