In Solaris 10, IP Forwarding can be enabled or disabled using the routeadm & ifconfig commands as against the ndd commands in Solaris 9 and earlier. The advantage is the change dynamic and real-time and the change persist across reboot unlike the ndd command.
Enable/Disable IP Forwarding globally
To globally enable IP Forwarding in Solaris 10 use the routeadm command as follows:
In IPv4
solaris10# routeadm -e ipv4-forwarding
In IPv6
solaris10# routeadm -e ipv6-forwarding
The switches “-e” enables IP Forwarding.
To disable IP Forwarding
In IPv4
solaris10# routeadm -d ipv4-forwarding
In IPv6
solaris10# routeadm -d ipv6-forwarding
The switches “-d” enables IP Forwarding.
After the change run the following command for the changes to take effect.
solaris10# routeadm -u
Enable/Disable IP Forwarding per interface
To enable IP Forwarding on a specific interface (say bge0) using the ifconfig command
In IPv4
solaris10# ifconfig bge0 router
In IPv6
solaris10# ifconfig bge0 inet6 router
To disable IP Forwarding for an interface (say bge0)
In IPv4
solaris10# ifconfig bge0 -router
In IPv6
solaris10# ifconfig bge0 inet6 -router
No comments:
Post a Comment