To add a static route to a single IP address use
route add ipaddr gwaddr
Where ipaddr is the target IP address and gwaddr is the IP through which the communication should route.
To add a static route to a whole network use
route add -net ipaddr gwaddr
Note : It is better to do this via smitty tcpip as smit also adds the route to the ODM and therefore it doesn’t disappear when the server is rebooted.
Of course, you could always use the chdev command with inet0 too, the general syntax for a network route is:
chdev -l inet0 -a route=net,-hopcount,0,-netmask,[netmask],if,[if],,,,-static,[destination network ip],[local gateway]
Check routes added with:
lsattr -El inet0
You must log in to post a comment.