Go to main content

Configuring an Oracle® Solaris 11.4 System as a Router or a Load Balancer

Exit Print View

Updated: November 2020
 
 

Enabling Routing for Single-Interface Systems

In static routing, the host must rely upon the services of a default router for routing information. Thus, enabling dynamic routing that uses a routing protocol is the easiest way to manage routing on a system.

Sites with multiple routers and networks typically administer their network topology as a single routing domain or an autonomous system (AS). The procedures and examples in this section are based on the figure used in Example 1, Configuring a System as a Router. In that figure, an AS is divided into three local networks: 203.0.113.0, 198.51.100.0, and 192.0.2.0. The network has both routers and client systems. The types of routers that are on a network include the following: border routers, default routers, and packet-forwarding routers. The types of client systems on a network include both multihomed systems and single-interface systems. For more details about each of these components, see IPv4 Autonomous System Topology in Planning for Network Deployment in Oracle Solaris 11.4.

How to Enable Dynamic Routing on a Single-Interface System

Before You Begin

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. Configure one of the system's IP interfaces with an IP address for the network to which the system belongs.

    For instructions, see How to Configure an IPv4 Interface in Configuring and Managing Network Components in Oracle Solaris 11.4.

  2. Delete all of the persistently defined routes from the system.

    You perform this step because the presence of any statically defined default routes prevents the enabling of dynamic routing during a system boot.

    1. Determine all of the persistently defined default routes as follows:
      $ route -p show
    2. Delete each of the persistently defined routes.
      $ route -p delete -net default -gateway ip-address
  3. Ensure that packet forwarding is disabled.
    $ ipadm set-prop -p forwarding=off ipv4
  4. Enable routing on the system.
    $ svcadm enable route:default

    When you start a routing protocol, the routing daemon /usr/sbin/in.routed automatically updates the routing table. This process is known as dynamic routing.

Example 6  Running Dynamic Routing on a Single-Interface System

The following example shows how to configure dynamic routing for hosta, which is a single-interface system on the network 192.0.2.0, as shown in the figure in Example 1, Configuring a System as a Router. The system uses Router 1 as its default router. The example assumes that you have already configured the system's IP interface.

First, you would log into hosta with the appropriate rights. Then, you would remove all of the persistently defined routes from the system.

$ route -p show
persistent: route add default 198.51.100.10

$ route -p delete default 198.51.100.10
delete net default: gateway 198.51.100.10
delete persistent net default: gateway 198.51.100.10

Then you would disable packet forwarding as well as enable routing on the system.

$ ipadm set-prop -p forwarding=off ipv4
$ svcadm enable route:default