16-Security Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C S5580X-EI[HI] & S5580S-EI Switch Series Configuration Guides-R1330Pxx-6W10016-Security Configuration Guide
15-uRPF configuration
Title Size Download
15-uRPF configuration 116.30 KB

Configuring uRPF

About uRPF

Unicast Reverse Path Forwarding (uRPF) protects a network against source address spoofing attacks, such as DoS and DDoS attacks.

uRPF application scenario

Attackers send packets with a forged source address to access a system that uses IPv4-based authentication, in the name of authorized users or even the administrator. Even if the attackers or other hosts cannot receive any response packets, the attacks are still disruptive to the attacked target.

Figure 1 Source address spoofing attack

As shown in Figure 1, an attacker on Device A sends the server (Device B) requests with a forged source IP address 2.2.2.1 at a high rate. Device B sends response packets to IP address 2.2.2.1 (Device C). Consequently, both Device B and Device C are attacked. If the administrator disconnects Device C by mistake, the network service is interrupted.

Attackers can also send packets with different forged source addresses or attack multiple servers simultaneously to block connections or even break down the network.

uRPF can prevent these source address spoofing attacks. It checks whether an interface that receives a packet is the output interface of the FIB entry that matches the source address of the packet. If not, uRPF considers it a spoofing attack and discards the packet.

uRPF check modes

uRPF supports strict and loose modes.

Strict uRPF check

To pass strict uRPF check, the source address of a packet and the receiving interface must match the destination address and output interface of a FIB entry. In some scenarios (for example, asymmetrical routing), strict uRPF might discard valid packets.

Strict uRPF is often deployed between a PE and a CE.

Loose uRPF check

To pass loose uRPF check, the source address of a packet must match the destination address of a FIB entry. Loose uRPF can avoid discarding valid packets, but might let go attack packets.

Loose uRPF is often deployed between ISPs, especially in asymmetrical routing.

uRPF extended functions

Link layer check

Strict uRPF check can further perform link layer check on a packet. It uses the next hop address in the matching FIB entry to look up the ARP table for a matching entry. If the source MAC address of the packet matches the MAC address in the matching ARP entry, the packet passes strict uRPF check. Link layer check is applicable to ISP devices where a Layer 3 Ethernet interface connects a large number of PCs.

Loose uRPF does not support link layer check.

Using the default route in uRPF check

When a default route exists, all packets that fail to match a specific FIB entry match the default route during uRPF check and thus are permitted to pass. To avoid this situation, you can disable uRPF from using any default route to discard such packets. If you allow using the default route (set by using allow-default-route), uRPF permits packets that only match the default route.

By default, uRPF discards packets that can only match a default route.

Typically, you do not need to configure the allow-default-route keyword on a PE device because it has no default route pointing to the CE. If you enable uRPF on a CE interface and the CE interface has a default route pointing to the PE, specify the allow-default-route keyword. If you enable uRPF on a security zone where the CE interface resides and the security zone has a default route pointing to the PE, specify the allow-default-route keyword.

Using an ACL for uRPF check exemption

To identify specific packets as valid packets, you can use an ACL to match these packets. Even if the packets do not pass uRPF check, they are still forwarded.

uRPF operation

 

NOTE:

The device does not perform uRPF check on multicast packets. The following flow chart is applicable only to routers that use software-based forwarding. Whether the flow chart is supported on switches and high-end routers that use chip-based forwarding, see the product specifications.

Figure 2 shows how uRPF works.

Figure 2 uRPF work flow

1.     uRPF checks whether the received packet carries a multicast destination address:

¡     If yes, uRPF permits the packet.

¡     If no, uRPF proceeds to step 2.

2.     uRPF checks whether the uRPF check mode is loose:

¡     If yes, uRPF performs FIB lookup based on the source IP address and then proceeds to step 3.

¡     If no, uRPF performs FIB lookup based on the source IP address and the receiving interface and then proceeds to step 3.

3.     uRPF checks whether the source IP address is an all-zero address:

¡     If yes, uRPF checks whether the destination address of the packet is a broadcast address.

-     If yes, uRPF permits the packet.

-     If no, uRPF proceeds to step 8.

¡     If no, uRPF proceeds to step 4.

4.     uRPF checks whether the source address matches a unicast route:

¡     If yes, uRPF proceeds to step 5.

¡     If no, uRPF proceeds to step 8.

5.     uRPF checks whether the matching route is to the host itself (whether the output interface of the matching route is an InLoop interface):

¡     If yes, uRPF checks whether the receiving interface of the packet is an InLoop interface.

-     If yes, uRPF permits the packet.

-     If no, uRPF proceeds to step 8.

¡     If no, uRPF proceeds to step 6.

6.     uRPF checks whether the matching route is a default route:

¡     If yes, uRPF checks whether the allow-default-route keyword is configured to allow using the default route.

-     If yes, uPRF proceeds to step 7.

-     If no, uPRF proceeds to step 8.

¡     If no, uRPF proceeds to step 7.

7.     uRPF checks whether the link-check keyword is configured for link layer check:

¡     If no, uRPF permits the packet.

¡     If yes, uRPF uses the next-hop address of the FIB entry to look up the ARP table for a matching entry. Then it checks whether the MAC address of the matching ARP entry is identical with the source MAC address of the packet.

-     If yes, uRPF permits the packet.

-     If no, uRPF proceeds to step 8.

8.     uRPF checks whether the packet is permitted by the ACL:

¡     If yes, the packet is forwarded (such a packet is displayed in the uRPF information as a "suppressed drop").

¡     If no, the packet is discarded.

Network application

As shown in Figure 3, strict uRPF check is configured between an ISP network and a customer network. Loose uRPF check is configured between ISPs.

Figure 3 Network diagram

Enabling uRPF globally

Restrictions and guidelines

Global uRPF takes effect on all interfaces of the device.

Procedure

1.     Enter system view.

system-view

2.     Enable uRPF globally.

ip urpf { loose [ allow-default-route ] [ acl acl-number ] | strict [ allow-default-route ] [ acl acl-number ] [ link-check ] }

By default, uRPF is disabled.

Verifying and maintaining uRPF

To display uRPF configuration, execute the following command in any view:

display ip urpf [ slot slot-number ]

 

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网