Sei sulla pagina 1di 2

Enabling and disabling IP forwarding in Solaris 10

March 5, 2008 by sun4u

In Soloaris 10 routeadm command and the ifconfig command can be used instead of the ndd command to set IP forwarding. The main advantages are

The settings are persistent across reboots. The new ifconfig router and router commands can be placed in the

/etc/hostname.interfaces files, along with other ifconfig commands that are run when the interface is initially configured. To enable # routeadm -e ipv4-forwarding # routeadm -e ipv6-forwarding To disable # routeadm -d ipv4-forwarding # routeadm -d ipv6-forwarding In the previous Solaris releases To enable # ndd -set /dev/ip ip_forwarding 1 # ndd -set /dev/ip ip6_forwarding 1 To disable # ndd -set /dev/ip ip_forwarding 0 # ndd -set /dev/ip ip6_forwarding 0 If you want to enable IP forwarding on a specific IPv4 interface or IPv6 interface. # ifconfig bge0 router # ifconfig bge0 inet6 router To disable # ifconfig bge0 -router # ifconfig bge0 inet6 -router To precede any routeadm settings to take effect on the running system, use the following command: # routeadm -u

Potrebbero piacerti anche