- Table of Contents
-
- 03-Security Configuration Guide
- 00-Preface
- 01-Security zone configuration
- 02-Security policy configuration
- 03-ASPF configuration
- 04-Session management
- 05-Object group configuration
- 06-Object policy configuration
- 07-IP source guard configuration
- 08-AAA configuration
- 09-User identification configuration
- 10-Password control configuration
- 11-Portal configuration
- 12-MAC authentication configuration
- 13-IPoE configuration
- 14-Public key management
- 15-PKI configuration
- 16-SSH configuration
- 17-SSL configuration
- 18-Connection limit configuration
- 19-Attack detection and prevention configuration
- 20-Server connection detection configuration
- 21-ARP attack protection configuration
- 22-ND attack defense configuration
- 23-uRPF configuration
- 24-IP-MAC binding configuration
- 25-IP reputation configuration
- 26-APR configuration
- 27-Keychain configuration
- 28-Crypto engine configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
23-uRPF configuration | 167.36 KB |
Contents
Restrictions and guidelines: uRPF configuration
Enabling uRPF for a security zone
Display and maintenance commands for uRPF
IPv6 uRPF application scenario
Restrictions and guidelines: IPv6 uRPF configuration
Enabling IPv6 uRPF for a security zone
Display and maintenance commands for IPv6 uRPF
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 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.
1. uRPF checks address validity:
¡ uRPF permits a packet with a multicast destination address.
¡ For a packet with an all-zero source address, uRPF permits the packet if it has a broadcast destination address. (A packet with source address 0.0.0.0 and destination address 255.255.255.255 might be a DHCP or BOOTP packet and cannot be discarded.) uRPF proceeds to step 7 if the packet has a non-broadcast destination address.
¡ uRPF proceeds to step 2 for other packets.
2. uRPF checks whether the source address matches a unicast route:
¡ If yes, uRPF proceeds to step 3.
¡ If no, uRPF proceeds to step 7. A non-unicast source address matches a non-unicast route.
3. uRPF checks whether the matching route is to the host itself:
¡ If yes, the output interface of the matching route is an InLoop interface. uRPF checks whether the receiving interface of the packet is an InLoop interface. If yes, it does not check the packet. If no, it proceeds to step 7.
¡ If no, uRPF proceeds to step 4.
4. 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, it proceeds to step 5. If no, it proceeds to step 7.
¡ If no, uRPF proceeds to step 5.
5. uRPF checks whether the receiving interface matches the output interface of the matching FIB entry:
¡ If yes, uRPF proceeds to step 6.
¡ If no, uRPF checks whether the check mode is loose. If yes, it proceeds to step 7. If no, it proceeds to step 6.
6. uRPF checks whether the link-check keyword is configured for link layer check:
¡ If no, the packet passes the check.
¡ 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, the packet passes the check. If no, uRPF proceeds to step 7.
7. 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.
For special packets or users, you can configure ACLs.
Restrictions and guidelines: uRPF configuration
Do not configure the allow-default-route keyword for loose uRPF check. Otherwise, uRPF might fail to work.
Do not use strict uRPF if ECMP routing is available in the network. Service packets that travel along ECMP routes cannot pass the strict uRPF check and will be dropped.
Enabling uRPF for a security zone
Restrictions and guidelines
uRPF enabled for a security zone takes effect on all interfaces in the security zone.
Procedure
1. Enter system view.
system-view
2. Enter security zone view.
security-zone name zone-name
3. Enable uRPF.
ip urpf { loose [ allow-default-route ] [ acl acl-number ] | strict [ allow-default-route ] [ acl acl-number ] [ link-check ] }
By default, uRPF is disabled.
Display and maintenance commands for uRPF
Execute display commands in any view.
Task |
Command |
Display uRPF configuration. |
display ip urpf [ security-zone zone-name ] [ chassis chassis-number slot slot-number ] |
Display uRPF statistics for a security zone. |
display ip urpf statistics security-zone zone-name [ chassis chassis-number slot slot-number ] |
Clear uRPF statistics for a security zone. |
reset ip urpf statistics security-zone zone-name |
Configuring IPv6 uRPF
About IPv6 uRPF
IPv6 Unicast Reverse Path Forwarding (uRPF) protects a network against source address spoofing attacks, such as DoS and DDoS attacks.
IPv6 uRPF application scenario
Attackers send packets with a forged source address to access a system that uses IPv6-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 4 Source address spoofing attack
As shown in Figure 4, an attacker on Device A sends the server (Device B) requests with a forged source IPv6 address 2000::1 at a high rate. Device B sends response packets to IPv6 address 2000::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.
IPv6 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, IPv6 uRPF considers it a spoofing attack and discards the packet.
IPv6 uRPF check modes
IPv6 uRPF supports strict and loose check modes.
Strict IPv6 uRPF check
To pass strict IPv6 uRPF check, the source address of a packet and the receiving interface must match the destination address and output interface of an IPv6 FIB entry. In some scenarios (for example, asymmetrical routing), strict IPv6 uRPF might discard valid packets.
Strict IPv6 uRPF is often deployed between a PE and a CE.
Loose IPv6 uRPF check
To pass loose IPv6 uRPF check, the source address of a packet must match the destination address of an IPv6 FIB entry. Loose IPv6 uRPF can avoid discarding valid packets, but might let go attack packets.
Loose IPv6 uRPF is often deployed between ISPs, especially in asymmetrical routing.
IPv6 uRPF extended functions
Using the default route in IPv6 uRPF check
When a default route exists, all packets that fail to match a specific IPv6 FIB entry match the default route during IPv6 uRPF check and thus are permitted to pass. If you allow using the default route (by using allow-default-route), IPv6 uRPF permits packets that only match the default route.
By default, IPv6 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 device. 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 IPv6 uRPF check exemption
To identify specific packets as valid packets, you can use an IPv6 ACL to match these packets. Even if the packets do not pass IPv6 uRPF check, they are still forwarded.
IPv6 uRPF operation
|
NOTE: The device does not perform IPv6 uRPF check on IPv6 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 5 shows how IPv6 uRPF works.
1. IPv6 uRPF checks whether the received packet carries a multicast destination address:
¡ If yes, IPv6 uRPF permits the packet.
¡ If no, IPv6 uRPF proceeds to step 2.
2. IPv6 uRPF checks whether the source address matches a unicast route:
¡ If yes, IPv6 uRPF proceeds to step 3.
¡ If no, IPv6 uRPF proceeds to step 6. A non-unicast source address matches a non-unicast route.
3. IPv6 uRPF checks whether the matching route is to the host itself:
¡ If yes, the output interface of the matching route is an InLoop interface. IPv6 uRPF checks whether the receiving interface of the packet is an InLoop interface. If yes, IPv6 uRPF permits the packet. If no, IPv6 uRPF proceeds to step 6. If the source address is a link-local address and is the receiving interface address, also proceeds to step 6.
¡ If no, IPv6 uRPF proceeds to step 4.
4. IPv6 uRPF checks whether the receiving interface matches the output interface of the matching FIB entry:
¡ If yes, IPv6 uRPF proceeds to step 5.
¡ If no, IPv6 uRPF checks whether the check mode is loose. If yes, it proceeds to step 5. If no, it proceeds to step 6.
5. IPv6 uRPF checks whether the matching route is a default route:
¡ If yes, IPv6 uRPF checks whether the allow-default-route keyword is configured to allow using the default route. If yes, the packet is forwarded. If no, IPv6 uRPF proceeds to step 6.
¡ If no, the packet is forwarded.
6. IPv6 uRPF checks whether the packet is permitted by the IPv6 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 6, strict IPv6 uRPF check is configured between an ISP network and a customer network. Loose IPv6 uRPF check is configured between ISPs.
For special packets or users, you can configure IPv6 ACLs.
Restrictions and guidelines: IPv6 uRPF configuration
Do not configure the allow-default-route keyword for loose IPv6 uRPF check. Otherwise, IPv6 uRPF might fail to work.
Do not use strict uRPF if ECMP routing is available in the network. Service packets that travel along ECMP routes cannot pass the strict uRPF check and will be dropped.
Enabling IPv6 uRPF for a security zone
Restrictions and guidelines
IPv6 uRPF enabled for a security zone takes effect on all interfaces in the security zone.
Procedure
1. Enter system view.
system-view
2. Enter security zone view.
security-zone name zone-name
3. Enable IPv6 uRPF.
ipv6 urpf { loose | strict } [ allow-default-route ] [ acl acl-number ]
By default, IPv6 uRPF is disabled.
Display and maintenance commands for IPv6 uRPF
Execute display commands in any view.
Task |
Command |
Display IPv6 uRPF configuration. |
display ipv6 urpf [ security-zone zone-name ] [ chassis chassis-number slot slot-number ] |
Display IPv6 uRPF statistics for a security zone. |
display ipv6 urpf statistics security-zone zone-name [ chassis chassis-number slot slot-number ] |
Clear IPv6 uRPF statistics for a security zone. |
reset ipv6 urpf statistics security-zone zone-name |