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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a route through an specific network interface

Status
Not open for further replies.

dkopel

Technical User
Jun 24, 2003
2
0
0
AR
How can i create a route (with route add or a static route via smit) but make it through an specific network adapter?
Thanks!!
 
go to

smitty route .. select static route and there u can specify to an adapter...

also using

route add command u can do .. see man pages for route

but all these things will work only if adapters r on different subnet..


 
Hi dkopel

You can run the following command with root account.
To add static route addess


#route add <target_node_ipaddress><gateway_node_ipaddress>

To add to the netwrok: please use the following:
#route add -net <network_ipadress> <gateway_node_ipaddress>

To create default gateway ...please use the syntax as:
#route add 0 <target_node_ipaddress>



sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
 
You can do this provided your OS is aix5.1 and above.
#smitty route (look for the option)

network interface <name>

cheers


aixnag
IBM Certified Specialist - P-series AIX 5L Administration
IBM Certified Specialist - AIX V4 HACMP
 
If you have two NICs that are on the same network segment (i.e. en0 = 135.100.50.1 and en1 = 135.100.50.2) and you want trafic to the 135.100.x.x network to default through en1:

run an rmdev -dl on both en0 and en1

rmdev -dl en0
rmdev -dl en1

run config manager

cfgmgr

setup en1 FIRST

smitty tcpip (minium config on en1)

then setup en0 (prefferably via smitty inet)

smitty inet (change/config en0)

When you do a netstat -nr, you will find an entry that looks like this

135.100/16 135.100.50.2 en1

There may be a way to do this with the -interface switch for the route command, but I've yet to find this documented anywhere.
 
FYI.

Just because your netstat shows a network through a specific interface does not mean that ALL output will go through that one adapter. That would defeate the purpose of allowing users to enable 2 NIC cards on the same subnet w/ AIX 5.x.

ALL packets will be routed round-robin through BOTH NIC cards.

If you want to enable packets through a specific NIC card, you'll use the route commands shown above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top