From mboxrd@z Thu Jan 1 00:00:00 1970 From: lance turner Subject: Routing Problem Date: Fri, 6 Jun 2003 21:17:43 -0400 Sender: linux-admin-owner@vger.kernel.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: In-Reply-To: List-Id: Content-Transfer-Encoding: 7bit To: linux-admin@vger.kernel.org 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