Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Configuring Stateful IPv6 Router Advertisement Guard

 

Stateful IPv6 Router Advertisement (RA) guard enables a switch to learn about the sources of RA messages for a certain period of time. During this period, during which the switch is known to be in the learning state, the information contained in received RA message attributes is stored and compared to the policy. At the end of the learning period, the switch has a record of which interfaces are attached to links with valid IPv6 routers. If there is no valid IPv6 router attached to an interface, the switch dynamically transitions the interface from the learning state into the blocking state. Subsequent RA messages received after the transition to blocking state are dropped. If there is a valid IPv6 router attached to the interface, the interface transitions to the forwarding state. In the forwarding state, RA messages that can be validated against the configured policy are forwarded.

You can override the dynamic state transitions by statically configuring the forwarding or blocking states on an interface. When you statically configure the state on an interface, the state can be changed only through configuration. For example, if you configure the forwarding state on an interface, the interface remains in the forwarding state until you configure a different state on that interface.

Before you can enable IPv6 RA guard on an interface or a VLAN, you must configure a policy. Stateful RA guard uses the policy to determine whether the RA messages received on an interface are from valid senders. You can configure the policy to either accept or discard RA messages that meet the predefined criteria. If the criteria for the policy includes source addresses or address prefixes, you must configure a list of the addresses before configuring the policy.

Enabling Stateful RA Guard on an Interface

You can enable stateful RA guard on an interface. You must first configure a policy, which is used to validate incoming RA messages during the learning period. After you apply an RA guard policy to an interface, you must enable RA guard on the corresponding VLAN.

To enable stateful RA guard on an interface:

  1. Apply a policy to an interface.
    [edit]

    user@switch# set forwarding-options access-security router-advertisement-guard interface interface-name policy policy-name
  2. Configure the stateful option on the interface:
    [edit forwarding-options access-security router-advertisement-guard interface interface-name policy policy-name]

    user@switch# set stateful
  3. Enable stateful RA guard on the corresponding VLAN:
    [edit]

    user@switch# set forwarding-options access-security router-advertisement-guard vlans vlan-name policy policy-name stateful

Enabling Stateful RA Guard on a VLAN

You can enable stateful RA guard on a per-VLAN basis or for all VLANs. You must first configure a policy, which used to validate incoming RA messages during the learning state.

To enable stateful RA guard on a specific VLAN:

  1. Apply a policy to a VLAN.
    [edit]

    user@switch# set forwarding-options access-security router-advertisement-guard vlans vlan-name policy policy-name
  2. Configure the stateful option on the VLAN:
    [edit forwarding-options access-security router-advertisement-guard vlans vlan-name policy policy-name]

    user@switch# set stateful

To enable stateful RA guard on all VLANs:

  1. Apply a policy to all VLANs.
    [edit]

    user@switch# set forwarding-options access-security router-advertisement-guard vlans all policy policy-name
    Note

    If a policy has been configured for a specific VLAN using the command set forwarding-options access-security router-advertisement-guard vlans vlan-name policy policy-name, that policy takes priority over the policy applied globally to all VLANs.

  2. Configure the stateful option on all VLANs:
    [edit forwarding-options access-security router-advertisement-guard vlans all policy policy-name]

    user@switch# set stateful

Configuring the Learning State on an Interface

When stateful RA guard is first enabled, the default state is off. An interface in the off state operates as if RA guard is not available. To transition an interface to the learning state, you must request learning on the interface. An interface in the learning state actively acquires information from the RA messages that it receives.

To configure stateful RA guard learning on an interface:

  1. Request learning on the interface.
    [edit]

    user@switch# request access-security router-advertisement-guard-learn interface interface-name
  2. Configure the learning period in seconds.
    [edit]

    user@switch# request access-security router-advertisement-guard-learn interface interface-name duration seconds
  3. Configure the action to take on ingress RA messages received during the learning period. To forward RA messages received during the learning period, configure forwarding on the interface.
    • To forward RA messages during the learning period:

      [edit]

      user@switch# request access-security router-advertisement-guard-learn interface interface-name duration seconds forward
    • To block RA messages during the learning period:

      [edit]

      user@switch# request access-security router-advertisement-guard-learn interface interface-name duration seconds block

Configuring the Forwarding State on an Interface

An interface in the forwarding state accepts ingress RA messages that can be validated against the configured policy and forwards them to their destination. An interface can dynamically transition to the forwarding state directly from the learning state, or the forwarding state can be statically configured on the interface.

  • To configure the forwarding state on an interface:
    [edit]

    user@switch# request access-security router-advertisement-guard-forward interface interface-name

Configuring the Blocking State on an Interface

An interface in the blocking state blocks ingress RA messages. An interface can dynamically transition to the blocking state directly from the learning state, or the blocking state can be statically configured on the interface. An interface that has been statically configured to be in the blocking state will remain in the blocking state until another state is configured on that interface.

  • To configure the blocking state on an interface:
    [edit]

    user@switch# request access-security router-advertisement-guard-block interface interface-name