Discussion Locked

Edit route table

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have created a router using RedHat 7.0 for my home network. I was using linuxconf to create static route tables. I accidently typed in the wrong route and now I have two routes for my 192.168.0.0 network. I tried to delete the route using routedel 192.168.0.0 and received an error. I then tried route del 192.168.0.0 dev eth1 to delete the wrong entry. I still get an error. This computer does not have x windows installed since it is only a P90 with 32MB of ram.

How can I delete the incorrect route? Is there a file or files that I can manually edit?

5 replies

by bruno

Well try this:
#route del -net 192.168.0.0 netmask 255.255.0.0 dev eth1

or whatever that interface is...
if it still doesn't work try this:

#ifconfig eth1 down
#ifconfig eth1 up

and see if it works...
if it doesn't work either, trythis:

edit this file:
/etc/sysconfig/network-scripts/ifcfg-eth1 and write there the ip address and subnet mask you wish. Afterwards enter this command:

#/etc/init.d/network restart

and if this doesn't work try this:

#ifconfig eth1 192.168.0.1 netmask 255.255.0.0 down
#ifconfig eth0 192.168.0.1 netmask 255.255.0.0 up

and if this doesn't work mail me at bruno@home.ro
:-))

by techpro

use either
route del x.x.x.x
or the iproute2 package (you have to compile it)
ip route del x.x.x.x

most likely if you bring down the interface and back up it will reset the routes too

there's also the file
/etc/sysconfig/static-routes

which you can probably edit and reboot

This discussion is closed to new replies.