-   Linux - Networking (
-   -   How do I config static routes? (

mikezang 10-31-2005 10:18 AM

How do I config static routes?
I config my static route using route add command, but I want to let it work when boot, I want to know if the config file is /etc/sysconfig/static-routes in FC4, as I couldn't find that file, does this mean have create this file?

nistelrooy 10-31-2005 10:58 AM

Re: How do I config static routes?

Take a look at the /etc/sysconfig/network-scripts/route-* files.

To get these files to work, simply create a file named route-<dev> in the /etc/sysconfig/network-scripts/ directory. Replace <dev> with your device name (eth0 for example)

This file should contain one line like the following : via


mikezang 10-31-2005 11:08 AM

Thanks a lot.
I config it with GNOME network tool, then I open that file like you said, but I found the contents is different from what you said as below:

Can you tell me why?

nistelrooy 10-31-2005 11:16 AM

The difference is, you've configured statically assigned IP/gateway/netmask, in which all connections other than your ip address will be static-ly routed to your gateway for routing to process. (in other words, static routes are created automatically!)

Other than that, if you want to create your own home routing (that happens when you have many subnets). You may have to try the method above.

mikezang 10-31-2005 11:29 AM

Well, I will show you the detail for my home LAN, you can find it here
Now I can ping from to with route above, but I can't ping from to, can you tell me what I should add to route table on my pc or modem or route?

All times are GMT -5. The time now is 12:35 AM.