LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-19-2015, 11:00 PM   #1
deboned
LQ Newbie
 
Registered: May 2015
Posts: 2

Rep: Reputation: Disabled
Routing Rhel 5.5 2 Nic with Gateway and without Gateway


Hi All,

I have server 2 nics with 2 IP

server 1

eth0 Link encap:Ethernet HWaddr 90:E2:BA:08:20:A0
inet addr:10.48.0.11 Bcast:10.48.0.127 Mask:255.255.255.128
inet6 addr: fe80::92e2:baff:fe08:20a0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76989344 errors:0 dropped:0 overruns:0 frame:0
TX packets:76396747 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9952512946 (9.2 GiB) TX bytes:11166834231 (10.3 GiB)

eth2 Link encap:Ethernet HWaddr 5C:F3:FC:B9:93:14
inet addr:10.239.2.2 Bcast:10.239.2.255 Mask:255.255.255.0
inet6 addr: fe80::5ef3:fcff:feb9:9314/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4782 errors:0 dropped:0 overruns:0 frame:0
TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:306048 (298.8 KiB) TX bytes:6352 (6.2 KiB)
Interrupt:169 Memory:92000000-92012800

server 2

eth0 Link encap:Ethernet HWaddr 90:E2:BA:08:1D:C4
inet addr:10.48.0.10 Bcast:10.48.0.127 Mask:255.255.255.128
inet6 addr: fe80::92e2:baff:fe08:1dc4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25187365545 errors:0 dropped:0 overruns:0 frame:0
TX packets:19980253197 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8135265471067 (7.3 TiB) TX bytes:3994567509304 (3.6 TiB)

eth2 Link encap:Ethernet HWaddr 5C:F3:FC:B9:92:2C
inet addr:192.168.100.4 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:169 Memory:92000000-92012800


Kernel IP routing table

i would like to route all traffics for 10.239.2.x to eth2,
also i cannot ping both linux box when using the 10.239.2.x ip
 
Old 05-21-2015, 10:32 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
On server 1 the 10.239.2.x traffic should automatically route over eth2 since it is on that network. However it appears you want the 198.x traffic from server 2 to go to this server on 10.239.2.x so you'd need to setup a route for 198.x on server 1.

On server 2 you have the opposite so you'd have to setup a route to send 10.239.2.x over the 198.x network configured for eth2 there.

Is there a reason you didn't just put eth2 in 10.239.2.x on server 2?

Have a look at "man route".

Also you can set routes permanently by creating files in /etc/sysconfig/network-scripts called route-eth2.
 
Old 06-02-2015, 07:17 AM   #3
deboned
LQ Newbie
 
Registered: May 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the reply,

i changed both server to have a ip like so, both servers are using on both eth1 10.0.110.x with gateway 10.0.110.x
while eth2 are using 10.239.2.x without a gateway,

as the route for 10.239.2.1 and 2 is a dedicated network for metadata , and 10.0.110.1 and 2 is for the domain network,

still cant ping 10.239.2.2 when using 10.239.2.1,

when configuring said ip on windows both 10.239.2.x and 10.0.110.x can ping each other.

worst case if i cant resolve this is provide a gateway for the 10.239.2.x
 
  


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
Multiple gateway routing!! shiva2011 Linux - Networking 1 09-30-2011 09:20 AM
Per Interface Gateway Routing Jelloir Linux - Networking 2 11-17-2008 11:12 PM
Routing through a gateway Tom Douglas Linux - Networking 7 10-25-2008 10:30 AM
Routing or Gateway Problem Peter_APIIT Linux - Networking 24 01-26-2008 05:37 AM
vpn routing without the gateway karen.pertierra Linux - Networking 1 03-18-2007 06:39 AM

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

All times are GMT -5. The time now is 02:09 PM.

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