Results 1 to 2 of 2
I am using RHEL WS. Can anyone tell me how to setup routing and dual ifaces on same NIC? I have an app with a db that looks for other ...
- 12-09-2006 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 1
routing for dual ifaces and IPs on same NIC
I am using RHEL WS. Can anyone tell me how to setup routing and dual ifaces on same NIC? I have an app with a db that looks for other related servers and infrastructure components via hardwired IPs in the app and database. The app and db must use iface eth0. My difficulty is that I must use an assigned IP from a completely different subnet and mask to network the host.
I want to configure the app and db to see eth0 as the primary iface and then route all external IP traffic via an alias IP and interface eth0:0 on the same NIC. How do I route all external traffic to have source address from eth0:0 via the 10.1.1.1 gateway? Assume i have:
eth0 as.. (app and db must use this as primary)
IP ADDRESS=192.168.1.21
NETMASK=255.255.255.0
and
eth0:0 as (I must use this for all external traffic)
IP ADDRESS=10.1.1.21
NETMASK=255.255.255.0
GATEWAY=10.1.1.1
Also need to use a multi-cast group address of 255.0.0.22
aea
- 12-10-2006 #2Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
If I understand you correctly you want to set up eth0 for your app but have eth0:0 for normal internet traffic.
From "man route":
When you are adding the route for the default gateway use the dev parameter as the last option.dev If force the route to be associated with the specified device
Change the gateway IP to whatever it should be and you should be set.Code:route add default gw 10.1.1.1 dev eth0:0
Let us know how you get on,
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.


Reply With Quote