LinuxQuestions.org
Review your favorite Linux distribution.
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 04-29-2009, 08:01 AM   #1
gbwien
Member
 
Registered: Jul 2008
Posts: 33

Rep: Reputation: 0
route-eth - Adding a static route


Hi

I would like to add a static route, however I do not understand what is meant by the Address setting below

GATEWAY2=10.241.58.62
NETMASK2=255.255.255.224
ADDRESS2=10.241.57.32


Does this mean any addresses beginning with 10.241.57.32 are routed over the gateway 10.241.58.62 an address range

Thanks,

Graham
 
Old 04-29-2009, 05:33 PM   #2
joeseph0404
LQ Newbie
 
Registered: Apr 2009
Location: St. Louis, MO
Distribution: Ubuntu of any kind :)
Posts: 17

Rep: Reputation: 1
What version of linux are you using? Ubuntu? CentOS?

This will help me determine the configuration files that you are currently using.

In a debian-based environment, there is the configuration file /etc/network/interfaces.

In this case, we would typically use the following syntax:

Code:
auto eth0
   iface eth0 inet static
   address 192.168.0.100
        up route add default gw 192.168.0.1
This would specify that for eth0 the default gateway is 192.168.0.1. This would be a permanent route.

Hope this helps!!
 
Old 04-30-2009, 04:57 AM   #3
gbwien
Member
 
Registered: Jul 2008
Posts: 33

Original Poster
Rep: Reputation: 0
Redhat AS 4 address field - route-eth

Hi,

I'm using Redhat AS 4 update 4 and I think I understand the reasoning behind static routes. However what I do not fully understand is the ADDRESS field.

For example the address field below, which is also reflected in netstat output. Does this mean that addresses higher than 10.241.57.32 are routed over the gateway 10.241.58.62

THANKS

Graham

route-eth1

GATEWAY2=10.241.58.62
NETMASK2=255.255.255.224
ADDRESS2=10.241.57.32



netstat -r output

[root@smstct1 network-scripts]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.241.62.176 0.0.0.0 255.255.255.240 U 0 0 0 eth5
10.241.62.160 0.0.0.0 255.255.255.240 U 0 0 0 eth9
10.241.56.64 10.241.58.62 255.255.255.224 UG 0 0 0 eth1
10.241.58.0 0.0.0.0 255.255.255.224 U 0 0 0 eth0
10.241.58.32 0.0.0.0 255.255.255.224 U 0 0 0 eth1
10.241.57.0 10.241.58.30 255.255.255.224 UG 0 0 0 eth0
10.241.57.32 10.241.58.62 255.255.255.224 UG 0 0 0 eth1
10.241.56.0 10.241.58.30 255.255.255.192 UG 0 0 0 eth0
10.236.177.0 0.0.0.0 255.255.255.128 U 0 0 0 bond1
10.10.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
192.168.126.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth7
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth5
0.0.0.0 10.236.177.65 0.0.0.0 UG 0 0 0 bond1
 
Old 04-30-2009, 01:11 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
@gbwien: read this post, and review the article and instructions there.

Setting up a multi-homed RHEL server with the method you're attempting does not work properly. (Been there.)
 
Old 02-22-2012, 07:12 AM   #5
wsmwk
LQ Newbie
 
Registered: Feb 2012
Location: Pennsylvania
Distribution: centos 6
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by gbwien View Post
Hi

I would like to add a static route, however I do not understand what is meant by the Address setting below

GATEWAY2=10.241.58.62
NETMASK2=255.255.255.224
ADDRESS2=10.241.57.32


Does this mean any addresses beginning with 10.241.57.32 are routed over the gateway 10.241.58.62 an address range

Thanks,

Graham
Graham, how did you resolve your networking problem?
 
Old 02-24-2012, 06:15 AM   #6
omgs
Member
 
Registered: Dec 2010
Posts: 64

Rep: Reputation: 6
The background of that is to build a static route, where in the case above it had the same effect as typing
Code:
route add -net 10.241.57.32 netmask 255.255.255.224 gw 10.241.58.62
That depends on the specific distro, so if you have already found that info, and following the examples it doesn't work, put here the details of what you need, what you've done and what you get, and we'll try to help you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 05:34 AM
Need help to route traffic properly with 2 eth cards mchan Linux - Networking 1 03-20-2005 08:55 PM
bypass local prerouting route for external eth interface? tblack Linux - Networking 1 09-27-2004 04:47 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 03:11 PM
Adding static route in Mandrake 9.2 bloke Linux - Networking 1 02-23-2004 08:38 AM


All times are GMT -5. The time now is 12:27 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration