General discussion

Locked

Edit route table

By Antsoair ·
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?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Edit route table

by bruno In reply to Edit route table

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
:-))

Collapse -

Edit route table

by Antsoair In reply to Edit route table

Poster rated this answer

Collapse -

Edit route table

by techpro In reply to Edit route table

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

Collapse -

Edit route table

by Antsoair In reply to Edit route table

Poster rated this answer

Collapse -

Edit route table

by Antsoair In reply to Edit route table

This question was closed by the author

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums