ChorusOS 5.0 System Administrator's 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:

The route command in this version is also IPv6 enabled, to manually manipulate the network routing tables.

IPv4 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 in Example 13-6.


Example 13-6 Routing with IPv4 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 actor)
# sysctl -w net.inet.ip_forwarding=1
# /image/sys_bank/sysctl -w net.inet.ip_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, route.