Go to main content

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

Exit Print View

Updated: November 2020
 
 

How to Create a Multihomed Host

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 each additional network interface that was not configured as part of the installation process.

    See How to Configure an IPv4 Interface in Configuring and Managing Network Components in Oracle Solaris 11.4.

  2. If multiple interfaces connect to the same subnet, configure those interfaces into an IPMP group.

    See Chapter 3, Administering IPMP in Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.4.

  3. Ensure that packet forwarding is disabled.
    $ ipadm set-prop -p forwarding=off ipv4
    
  4. Enable dynamic routing for the multihomed host.
    $ svcadm enable route:default
Example 7  Configuring a Multihomed Host

The following example shows how to configure a multihomed host, as illustrated in the figure in IPv4 Autonomous System Topology in Planning for Network Deployment in Oracle Solaris 11.4. In this example, the system has the host name hostc. This host has two interfaces, which are connected to two different networks.

  1. Display the status of the system's interfaces.

    $ dladm show-link
    LINK     CLASS     MTU     STATE   BRIDGE   OVER
    net0     phys      1500    up      --       --
    net1     phys      1500    up      --       --
    
    $ ipadm show-addr
    ADDROBJ        TYPE     STATE        ADDR
    lo0/v4         static   ok           127.0.0.1/8
    net0/v4        static   ok           192.0.2.3/27
    

    The dladm show-link command shows that hostc has two datalinks. However, only net0 has been configured with an IP address. To configure hostc as a multihomed host, you must configure net1 with an IP address on another subnet, for example, the 192.0.2.32/27 network.

  2. Ensure that the underlying physical NIC of net1 is physically connected to the network.

    $ ipadm create-ip net1
    $ ipadm create-addr -a 192.0.2.35/27 net1
    
    $ ipadm show-addr
    ADDROBJ        TYPE     STATE        ADDR
    lo0/v4         static   ok           127.0.0.1/8
    net0/v4        static   ok           192.0.2.3/27
    net1/v4        static   ok           192.0.2.35/27
  3. Add the net1 interface to the /etc/hosts file.

    $ vi /etc/inet/hosts
    127.0.0.1           localhost
    192.0.2.3/27        hostc    #primary network interface for host3
    192.0.2.35/27       hostc-2  #second interface
  4. Turn off packet forwarding if this service is running on the hostc.

    $ ipadm set-prop -p forwarding=off ipv4
    $ ipadm show-prop -p forwarding ipv4
    PROTO PROPERTY              PERM CURRENT      PERSISTENT   DEFAULT      POSSIBLE
    ipv4  forwarding            rw   off          --           off          on,off
  5. Enable dynamic routing for the multihomed host.

    $ svcadm enable route:default