Configuring and Administering Network Components in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Enabling Packet Forwarding

On a network, a host can receive data packets that are destined for another host system. By enabling packet forwarding on the receiving local system, that system can forward the data packet to the destination host. This process is referred to as IP forwarding and is disabled by default in Oracle Solaris.

Packet forwarding is managed by a property that can be set on both IP interfaces and of the TCP/IP protocol. If you want to be selective about how packets are forwarded, you can enable packet forwarding on the IP interface. For example, you might have a system that has multiple NICs, where some NICs are connected to the external network, while other NICs are connected to a private network. You would therefore enable packet forwarding only on some of the interfaces, rather than on all of the interfaces.

You can also enable packet forwarding globally on the system by setting the property of the TCP/IP protocol. See Enabling Packet Forwarding Globally in Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.2 for more information.


Note -  The forwarding property of either IP interfaces or protocols is not mutually exclusive. You can set the property for the interface and the protocol at the same time. For example, you could enable packet forwarding globally on the protocol, and then customize packet forwarding for each IP interface on the system. Thus, although enabled globally, packet forwarding can still be selective for the system.

For example, you would enable packet forwarding on the IP interface as follows:

# ipadm set-ifprop -p forwarding=on -m protocol-version interface

where protocol-version is either IPv4 or IPv6. You must type the command separately for IPv4 and IPv6 packets.

The following example shows how you might enable only IPv4 packet forwarding on your system:

# ipadm show-ifprop -p forwarding net0
IFNAME   PROPERTY     PROTO   PERM   CURRENT   PERSISTENT   DEFAULT   POSSIBLE
net0     forwarding   ipv4    rw     off       off          off       on,off
net0     forwarding   ipv6    rw     off       --           off       on,off

# ipadm set-ifprop -p forwarding=on -m ipv4 net0
# ipadm show-ifprop net0
IFNAME   PROPERTY         PROTO  PERM  CURRENT  PERSISTENT  DEFAULT   POSSIBLE
...
net0     forwarding       ipv4   rw    on       on          off       on,off
...