Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
$ ipadm set-prop -p forwarding=off ipv4
$ svcadm enable route:default
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.
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.
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
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
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
Enable dynamic routing for the multihomed host.
$ svcadm enable route:default