ChorusOS 4.0 Network Administration Guide

route

When a system using IP receives a network data packet, it uses the routing table, managed using route(1M), to determine where to send the packet. A properly configured routing table helps the system:

IP forwarding allows the system to forward packets to other systems, such as the gateway. IP forwarding is enabled using the sysctl(1M) command as shown below.


Example 6-6 Routing with IP Forwarding

The following example sysadm.ini fragment uses route to configure the routing table to deliver packets addressed to the local system (129.157.197.88), and to forward other packets to the Ethernet:

#
# Enable IP forwarding (requires the sysctl.r actor)
#
arun /bin/sysctl -w IPCTL_FORWARDING=1
# arun /image/sys_bank/sysctl -w IPCTL_FORWARDING=1 # if built into system image

#
# Deliver packets addressed to the local system
#
route add -host 129.157.197.88 lo0

#
# Send other packets back out to the Ethernet
#
route add default -interface ifeth0

Note that the first route command is unnecessary if the ChorusOS system IP address is assigned dynamically.


route is also available as a stand-alone actor, /bin/route.r.