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

Exit Print View

Updated: September 2014
 
 

Configuring the Virtual IP Address for Layer 2 and Layer 3 VRRP Routers

To configure the IP address for an L2 VRRP router, you must configure the virtual IP address of type vrrp over the VRRP VNIC that is associated with it.

To configure the virtual IP address for an L3 VRRP router, you must use an IP address of type vrrp on the same IP interface over which the L3 VRRP router is configured.


Note -  To configure an IPv6 address, you must have created the VRRP VNIC or the L3 VRRP router by specifying the address family of the router as inet6.

To configure a virtual IP address for a VRRP router, use the following syntax:


# ipadm create-addr [-t] -T vrrp [-a local=addr[/prefix-length]] \
 [-n router-name].... addr-obj | interface
–t

Specifies that the configured address is temporary and that the changes apply only to the active configuration.

–T vrrp

Specifies that the configured address is of the type vrrp.

–n router-name

The –n router-name option is optional for an L2 VRRP router because the VRRP router name can be derived from the VRRP VNIC interface on which the IP addresses are configured.

For more information, see the ipadm(1M) man page.


Note -  You can also configure virtual IP addresses by using the –a option with the vrrpadm command. For more information, see Creating a VRRP Router.
Example 4-3  Configuring Virtual IP Address for an L2 VRRP Router

You can use the vrrp type IP address to configure the virtual IP addresses for an L2 VRRP router. The following example shows how to create the virtual IP address for l2router1.

# ipadm create-ip vrrp_vnic1
# ipadm create-addr -T vrrp -n l2router1 -a 192.168.82.8/24 vrrp_vnic1/vaddr1

The following example shows how to create an IPv6 link-local vrrp IP address for V6vrrp_vnic1/vaddr1.

# ipadm create-ip V6vrrp_vnic1
# ipadm create-addr -T vrrp V6vrrp_vnic1/vaddr1

To configure the IPv6 link-local vrrp type IP address for an VRRP router, you do not need to specify the local address. An IPv6 link-local vrrp type IP address is created based on the VRID of the associated VRRP router.

Example 4-4  Configuring the Virtual IP Address for an L3 VRRP Router

The following example shows how to configure the virtual IP address for l3router1.

# ipadm create-ip ipmp0
# ipadm create-addr -T vrrp -n l3router1 -a 172.16.82.8/24 ipmp0/vaddr1

The following example shows how to configure an IPv6 link-local vrrp type IP address for the L3 VRRP router l3V6router1.

# ipadm create-ip ipmp1
# ipadm create-addr -T vrrp -n l3V6router1 ipmp1/vaddr0