Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

routeadm

Status
Not open for further replies.

pzxkys

IS-IT--Management
Jul 18, 2000
24
US
We have a Solaris server with 2 NICs. Incoming traffic may originate from either NIC A or NIC B. We would like to force all outbound traffic through NIC B. Is there a Solaris solution? Routeadm? Thanks!
 
Are both NICs on the same subnet?

What is the output of netstat -rn?

Annihilannic.
 
I don't think what you are trying to do is exactly source routing, which I believe involves directing packets through certain gateways on your network that they may not normally visit, as opposed to simply deciding which local NIC the traffic will exit via.

My (limited) understanding is that all traffic destined for the respective subnets your NICs are connected to will go out through the appropriate NIC. Traffic for anywhere else will go to your default gateway; if your default gateway is on one of those two subnets then it will leave through the NIC attached to that subnet (unless you have any additional routing rules defined). Normally this default behaviour should be fine; why do you need to change it?

Annihilannic.
 
Long story on the reason. The short version : e-mail routing through network 143 to network 205 will be turned off soon. We'll need to route it through the nic on network 10 to network 205 ... but the 143 will continue to exist.
 
Assuming class C networks and your network 10 NIC to have the IP address 1.2.10.4, I think something like this should do it:

Code:
route add -net 1.2.205 1.2.10.4 255.255.255.0

Annihilannic.
 
You mean it actually worked? If so, that was a lucky shot! ;-)

Annihilannic.
 
I haven't been able to test it yet. It's on a production system. But, thank you for the suggestion!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top