C H A P T E R  18

Configuring Virtual Router Redundancy Protocol

This chapter describes how to configure the Virtual Router Redundancy Protocol (VRRP).

When an end station is statically configured with the address of the router that will handle its routed traffic, a single point of failure is introduced into the network. If the router goes down, the end station is unable to communicate. Since static configuration is a convenient way to assign router addresses, Virtual Router Redundancy Protocol (VRRP) was developed to provide a backup mechanism.

VRRP eliminates the single point of failure associated with static default routes by enabling a backup router to take over from a “master” router without affecting the end stations using the route. The end stations will use a “virtual” IP address that will be recognized by the backup router if the master router fails. Participating routers use an election protocol to determine which router is the master router at any given time. A given port may appear as more than one virtual router to the network, also, more than one port on a Sun Netra CP3240 switch may be configured as a virtual router. Either a physical port or a routed VLAN may participate.

This chapter contains the following topics:


Configuring VRRP via CLI

The following example shows how to configure the Sun Netra CP3240 switch to support VRRP. Router 1 will be the default master router for the virtual route, and Router 2 will be the backup router.

FIGURE 18-1 VRRP Example Network Configuration


Example 1: Configuring VRRP on FASTPATH as a Master Router

Enable routing for the switch. IP forwarding is then enabled by default.


CODE EXAMPLE 18-1 Enabling Routing for the Switch
config 
  ip routing 
exit

Configure the IP addresses and subnet masks for the port that will participate in the protocol.


CODE EXAMPLE 18-2 Configuring IP Addresses and Subnet Masks
config 
  interface 0/2
  routing 
  ip address 192.150.2.1 255.255.255.0
exit

Enable VRRP for the switch.


CODE EXAMPLE 18-3 Enabling VRRP for the Switch
config 
  ip vrrp
exit

Assign virtual router IDs to the port that will participate in the protocol.


CODE EXAMPLE 18-4 Assinging a Virtual Router to the Port
config 
  interface 0/2
  ip vrrp 20 

Specify the IP address that the virtual router function will recognize. Note that the virtual IP address on port 1/0/2 is the same as the port’s actual IP address, therefore this router will always be the VRRP master when it is active. And the priority default is 255.


CODE EXAMPLE 18-5 Specifying IP Address for Virtual Router
  ip vrrp 20 ip 192.150.2.1

Enable VRRP on the port.


CODE EXAMPLE 18-6 Enabling VRRP on the Port
 ip vrrp 20 mode
exit

Example 2: Configuring VRRP on FASTPATH as a Backup Router

Enable routing for the switch. IP forwarding is then enabled by default.


CODE EXAMPLE 18-7 Enabling Routing for the Switch
config 
  ip routing 
exit

Configure the IP addresses and subnet masks for the port that will participate in the protocol.


CODE EXAMPLE 18-8 Configuring IP Addresses and Subnet Masks
config 
  interface 0/4
  routing 
  ip address 192.150.4.1 255.255.255.0
exit

Enable VRRP for the switch.


CODE EXAMPLE 18-9 Enabling VRRP for the Switch
config 
  ip vrrp 20
exit

Assign virtual router IDs to the port that will participate in the protocol.


CODE EXAMPLE 18-10 Assigning a Virtual Router to the Port
config 
  interface 0/4
  ip vrrp 20 

Specify the IP address that the virtual router function will recognize. Since the virtual IP address on port 1/0/4 is the same as Router 1’s port 1/0/2 actual IP address, this router will always be the VRRP backup when Router 1 is active.


CODE EXAMPLE 18-11 Specifying the IP Address for the Virtual Router
  ip vrrp 20 ip 192.150.2.1

Set the priority for the port. The default priority is 100.


CODE EXAMPLE 18-12 Setting Port Priority
  ip vrrp 20 priority 254

Enable VRRP on the port.


CODE EXAMPLE 18-13 Enabling VRRP on the Port
 ip vrrp 20 mode
 exit


Configuring VRRP via Web Interface

Use the following screens to perform the same configuration using the Graphical User Interface: