LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-09-2006, 07:01 AM   #1
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Rep: Reputation: 15
Adding IP routes


How do I add routes to Fedora? I have a set of routes that I need to add but I'm not sure how to do that.
 
Old 11-09-2006, 09:52 AM   #2
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
#ip route add help

Sample route add commands:
Code:
ip route add 172.16.16.0/16 via 172.16.16.1
ip route add 172.16.16.0/16 dev eth0
or
ip route add 172.16.16.0/16 via 172.16.16.1 dev eth0
 
Old 12-04-2006, 10:04 AM   #3
LiamFromLeeds
Member
 
Registered: Dec 2006
Distribution: Arch
Posts: 44

Rep: Reputation: 15
I'm not a fedora expert but to make your route persistant after reboots I think you need to create files for each NIC in /etc/sysconfig/network-scripts,

For example,

Code:
bash-2.05$ cat /etc/sysconfig/network-scripts/route-eth0
172.16.16.0/16 via 172.16.16.1
bash-2.05$
 
Old 12-04-2006, 08:18 PM   #4
kgirrard
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
There are two ways to this under FC5. The method specified above and this one, which in the ifup-routes script is called the "new" way. The old way is more concise; the "new" way puts something like this in the route-ethn file(s):

GATEWAY0=10.206.210.18
NETMASK0=255.255.0.0
ADDRESS0=10.210.0.0

Each route needs three entries, destination, mask, and gateway.

YMMV
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding routes consty Linux - Networking 1 07-15-2006 04:39 AM
Adding static routes to fc1 router Tom123 Linux - Networking 1 08-20-2004 03:28 AM
routes himyuza *BSD 6 08-03-2004 10:41 AM
Adding Routes using Netlink Sockets mpls_linux Linux - Networking 0 05-22-2004 09:14 PM
I need some routes |Drakehash| Linux - Networking 1 06-07-2003 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration