Help with Default Gateway

Hi,

I have two interfaces on m AIX 5.3 box. One going to 192.168.1.x and it has a gateway of 192.168.1.1.

I configured the other gateway with 192.168.2.x and the default gateway as 192.168.2.1. But I can't get connectivity to the 192.168.2.1 network. Can someone help me out and let me know what's needed?

I've used smitty route and the chdev command but still not able to get connectivity to the 2.x network.

Some common problems:

Did you "up" the second gateway? "ifconfig ent1 up"

You did a "chdev", did you do it with a "-p"? If so it will only become active at the next boot time.

Does the second interface have connectivity at all? Check the lights besides the cable connector, they should be both green.

I hope this helps.

bakunin

Yes the second interface is up.
The command I used was "chdev -l inet0 -a route=0,<ip-addr-of-def-gw>"
All lights are green.

You should check to make sure you don't have 2 default gateways setup (netstat -rn). AIX will let you define 2 gateways as 'default' but it causes lots of goofy network problems.

HTH!

How can I ensure that the only communication to the 192.168.2.x network is via 192.168.2.x interface.

You define the gateway just don't make it a 'default' gateway.
I believe the command would be:
chdev -l inet0 -a route=192.168.2.0,192.168.2.1

I typically use 'smitty route' to guarantee it will be a persistent route after rebooting.

when configuring the second interface (that should not have a default gateway) use

smitty chinet

Another note: if you have two default gateways, they will both come back on a reboot even if you do a route delete. You must use

smitty route

to delete the second route to clean it out of the system completly.

Are you sure you configured the two adapters for the right networks (you don't have them backwards)? Is your netmask set properly on both adapters?

Edit: I edited the first command from smitty mktcpip to smitty chinet. Had a brain fart.

you dont need to a route for local addresses. To make sure if you 192.168.2/X is working, first make sure that you are using 255.255.255.0 mask . This means your system now treats 192.168.1/24 and 192.168.2/24 as two tcp/ip networks. Then issue a ping to a live address on 192.168.2/24 should give you a response. If it does not work, check cabling etc ....