Configure Unicast Reverse Path Forwarding on a Port

Before you begin

  • You must enable the urpf-mode boot flag. See Enable 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 GigabitEthernet Interface Configuration mode in CLI.

About this task

You can 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 GigabitEthernet Interface Configuration mode:

    enable

    configure terminal

    interface GigabitEthernet {slot/port[/sub-port][-slot/port[/sub-port]][,...]}

    Note

    Note

    If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

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

    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 port, see View the IPv4 and IPv6 Interface Configuration on a Port.

Example

Check whether the source IP address of the incoming packet exists in the FIB table.

Example for IPv4:

Switch:1> enable
Switch:1# configure terminal
Switch:1(config)# interface GigabitEthernet 1/10
Switch:1(config-if)# ip rvs-path-chk mode strict

Example for IPv6:

Switch:1> enable
Switch:1# configure terminal
Switch:1(config)# interface GigabitEthernet 1/16
Switch:1(config-if)# ipv6 rvs-path-chk mode strict

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 any interface on that router.