Linux-admin Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: lance turner <latu@latu.net>
To: linux-admin@vger.kernel.org
Subject: Routing Problem
Date: Fri, 6 Jun 2003 21:17:43 -0400	[thread overview]
Message-ID: <p05200f02bb06e8f2a840@[192.168.1.111]> (raw)
In-Reply-To: <Pine.LNX.4.44.0306061322090.19327-100000@stat02.unl.edu>

I am having difficulty permanently adding a route to the routing table.

I used the following command to add a route:

route add -net default gw 192.168.1.3 dev eth0

This resulted in the following routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     *               255.255.255.0   U         0 0          0 eth0
127.0.0.0       *               255.0.0.0       U         0 0          0 lo
default         192.168.1.3     0.0.0.0         UG        0 0          0 eth0

But after restarting, the routing table changes to this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.1.254   0.0.0.0         UG    0      0        0 eth0

Which does not work. The server can not get to the gateway and thus to the internet.

I also checked the/ proc/net/route file, and it matches what is displayed by "route" and "netstat -r".

/proc/net/route before restart

Iface	Destination	Gateway 	Flags	RefCnt	Use	Metric	Mask		MTU	Window	IRTT                                                       
eth0	0001A8C0	00000000	0001	0	0	0	00FFFFFF	0	0	0                                                                               
lo	0000007F	00000000	0001	0	0	0	000000FF	0	0	0                                                                                 
eth0	00000000	0301A8C0	0003	0	0	0	00000000	0	0	0                                                                               

/proc/net/route after restart:

Iface	Destination	Gateway 	Flags	RefCnt	Use	Metric	Mask		MTU	Window	IRTT                                                       
eth0	0001A8C0	00000000	0001	0	0	0	00FFFFFF	0	0	0                                                                               
lo	0000007F	00000000	0001	0	0	0	000000FF	0	0	0                                                                                 
eth0	00000000	FE01A8C0	0003	0	0	0	00000000	0	0	0     

The following is the from the /etc/sysconfig/network-scripts/ifcfg-eth0 file:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.7
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

Obviously I'm doing something incorrect, but I'm not sure what. 

Any idea why the routing table is being modified at startup? What do I need to do to permanently set the routing table?

thanks,
lance turner
latu.net





  reply	other threads:[~2003-06-07  1:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-06 18:08 Editing File Associations in KDE Sadanapalli, Pradeep Kumar (MED, TCS)
2003-06-06 18:22 ` Rex Dieter
2003-06-07  1:17   ` lance turner [this message]
2003-06-07  2:27     ` Routing Problem terry white
2003-06-07  3:46     ` Joakim Ryden
2003-06-07  3:46     ` Joakim Ryden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='p05200f02bb06e8f2a840@[192.168.1.111]' \
    --to=latu@latu.net \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox