Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-31-2005, 09:18 AM
|
#1
|
LQ Newbie
Registered: Oct 2005
Location: Tokyo, Japan
Posts: 6
Rep:
|
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?
|
|
|
10-31-2005, 09:58 AM
|
#2
|
Member
Registered: Oct 2003
Location: Singapore
Distribution: debian
Posts: 162
Rep:
|
Re: How do I config static routes?
Hi
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 :
0.0.0.0/0 via 192.168.2.1
|
|
|
10-31-2005, 10:08 AM
|
#3
|
LQ Newbie
Registered: Oct 2005
Location: Tokyo, Japan
Posts: 6
Original Poster
Rep:
|
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:
GATEWAY0=192.168.1.1
NETMASK0=255.255.255.0
ADDRESS0=192.168.1.0
Can you tell me why?
|
|
|
10-31-2005, 10:16 AM
|
#4
|
Member
Registered: Oct 2003
Location: Singapore
Distribution: debian
Posts: 162
Rep:
|
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.
|
|
|
10-31-2005, 10:29 AM
|
#5
|
LQ Newbie
Registered: Oct 2005
Location: Tokyo, Japan
Posts: 6
Original Poster
Rep:
|
Well, I will show you the detail for my home LAN, you can find it here
Code:
http://www.geocities.jp/mikezang/pics/LanInZangLand.jpg
Now I can ping from 192.168.1.10 to 192.168.3.100 with route above, but I can't ping from 192.168.3.100 to 192.168.1.10, 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 07:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|