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