Configure Unicast Reverse Path Forwarding on a VLAN

Before you begin

  • You must enable the urpf-mode boot flag.

    Note

    Note

    When you try to configure uRPF on an interface, that is, enable or change the urpf operating mode with the urpf-mode boot flag disabled, a consistency check error message is displayed: Unicast Reverse Path Forwarding configuration is not supported when urpf-mode boot flag is disabled.

  • You must log on to the VLAN Interface Configuration mode in CLI.
    Important

    Important

    You must assign a valid IP address to the selected port.

About this task

Use the Unicast Reverse Path Forwarding (uRPF) feature to reduce the problems that are caused by the introduction of malformed or forged (spoofed) IP source addresses into a network. When you enable uRPF, the switch performs a check to determine if the source IP address of the packet is verifiable. If the address is not verifiable, the system drops the packet.

uRPF runs in two modes:
  • strict mode

  • loose mode (exist-only mode)

Procedure

  1. Enter VLAN Interface Configuration mode:

    enable

    configure terminal

    interface vlan <1–4059>

  2. Set or change the urpf operating mode on a VLAN:

    For IPv4, enter: ip rvs-path-chk mode {strict|exist-only}

    For IPv6, enter: ipv6 rvs-path-chk mode {strict|exist-only}

  3. To verify the configuration on the VLAN, see View the IPv4 and IPv6 Interface Configuration on a VLAN.

Example

Example for IPv4:
Switch:1> enable
Switch:1# configure terminal
Switch:1(config)# interface vlan 2
Check whether the source IP address of the incoming packet exists in the FIB table:
Switch:1(config-if)#ip rvs-path-chk mode exist-only
Example for IPv6:
Switch:1> enable
Switch:1# configure terminal
Switch:1(config)# interface vlan 2
Check whether the source IP address of the incoming packet exists in the FIB table:
Switch:1(config-if)# ipv6 rvs-path-chk mode exist-only

Variable Definitions

The following table defines parameters for the ip rvs-path-chk mode and ipv6 rvs-path-chk mode commands.

Variable

Value

mode{strict|exist-only}

Specifies the mode for Unicast Reverse Path Forwarding (uRPF). In strict mode, uRPF checks whether the source IP address of the incoming packet exists in the FIB. If the incoming interface is not the best reverse path, the packet check fails and uRPF drops the packet. In exist-only mode, uRPF checks whether the source IP address of the incoming packet exists in the FIB. The packet is dropped only if the source address is not reachable via an interface on that router.