Configuring the Advertisement of IPv4 ARP Vlink Direct Routes
Applicable Environment
IP packets are forwarded through a specified physical interface, but cannot be forwarded through a VLANIF interface or a VBDIF interface. If packets reach a VLANIF interface or a VBDIF interface, the device obtains information about the Layer 3 interfaces using IPv4 ARP and generates relevant routing entries. The routes recorded by the routing entries are called IPv4 ARP Vlink direct routes.
Before IPv4 ARP Vlink direct routes are advertised, a route-policy can be configured to filter the advertised routes and only routes that match the route-policy can be advertised. In this manner, data traffic can be precisely controlled.
Pre-configuration Tasks
Before advertising IPv4 ARP Vlink direct routes on the public network, complete the following task:
Configuring parameters of a link layer protocol and assigning an IP address to each interface to ensure that the link layer protocol on the interfaces is Up
Procedure
- Run system-view
The system view is displayed.
- Run arp direct-route enable
Advertising IPv4 ARP Vlink direct routes is enabled.
By default, ARP Vlink direct routes are not advertised.
In EVN scenarios, to enable a VLANIF interface to advertise ARP Vlink direct routes, run the arp direct-route enable [ route-policy route-policy-name ] detect virtual-ip command in the VLANIF interface view. The VLANIF interface advertises ARP Vlink direct routes only when the corresponding ARP virtual IP address is obtained by ARP through probing based on learned ARP entries. If route-policy route-policy-name is specified in the command, only the ARP Vlink direct routes that match the route-policy are advertised.
In the scenarios that ARP Vlink direct routes have to be advertised to only certain VLAN or BD users, you can run the arp direct-route enable command, with the parameter route-policy route-policy-name specified. This configuration ensures that only filtered ARP Vlink direct routes are advertised, the scale of the routing table is controlled, and the security of other sites in the VLAN or BD is guaranteed.
In other scenarios, ARP Vlink direct routes can be advertised as long as the arp direct-route enable command is run.
After advertising IPv4 ARP Vlink direct routes is enabled, IPv4 ARP Vlink direct routes can be advertised only if they are imported to a dynamic routing protocol. Perform the following steps on the switch based on the type of the dynamic routing protocol:- If RIP is used, run the import-route direct [ cost cost | route-policy route-policy-name ] * command to import IPv4 ARP Vlink direct routes to RIP.
- If OSPF is used, run the import-route direct [ cost cost | route-policy route-policy-name | tag tag | type type ] * command to import IPv4 ARP Vlink direct routes to OSPF.
- If IS-IS is used, run the import-route direct [ cost-type { external | internal } | cost cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * command to import IPv4 ARP Vlink direct routes to IS-IS.
- If BGP is used, run the import-route direct [ med med | route-policy route-policy-name ] * command to import IPv4 ARP Vlink direct routes to BGP.
- (Optional) Run interface vlanif vlan-id interface vbdif bd-id
The VLANIF interface view is displayed.
The VBDIF interface view is displayed.
- (Optional) Run arp direct-route preference preference-value
A priority is configured for ARP Vlink direct routes.
By default, the priority of ARP Vlink direct routes on VLANIF interfaces is 255, and the priority of ARP Vlink direct routes on VBDIF interfaces is 0. To change the priority for ARP Vlink direct routes, run the arp direct-route preference command. ARP Vlink direct routes can be advertised through different routing protocols. If a device receives multiple ARP Vlink direct routes advertised through different routing protocols, you can run this command to modify the priority for route selection.
- (Optional) Run arp direct-route tag tag-value
A tag is configured for ARP Vlink direct routes.
By default, the tag of ARP Vlink direct routes is 0. To change the tag of ARP Vlink direct routes, run the arp direct-route tag command. In Figure 1-8, SwitchA and SwitchB are gateways and have the same IP address. After SwitchA and SwitchB learn the ARP entry of SwitchD, they generate an ARP Vlink direct route and advertise it as well as the route to the directly connected network segment (10.1.1.6/24). The ARP Vlink direct route cannot be advertised separately because it has the same tag as the route to the directly connected network segment. If the link between SwitchA and SwitchD fails, the ARP Vlink direct route is withdrawn, but the route to the directly connected network segment is not. As a result, Router is unaware of the failure of the link between SwitchA and SwitchD and is unable to switch traffic to the link between SwitchB and SwitchD in time, causing a traffic interruption. To address this problem, run the arp direct-route tag command to configure a tag for ARP Vlink direct routes and create a route-policy to match the tag so that SwitchA advertises the ARP Vlink direct route and suppresses the route to the directly connected network segment. In this case, if the link between SwitchA and SwitchD fails, SwitchA withdraws the ARP Vlink direct route because SwitchA fails to learn the ARP entry of SwitchD. Consequently, Router detects the failure of the link between SwitchA and SwitchD and switches traffic to the link between SwitchB and SwitchD immediately, which ensures normal traffic forwarding. - Run commit
The configuration is committed.
After advertising IPv4 ARP Vlink direct routes is enabled, IPv4 ARP Vlink direct routes can be advertised only if they are imported to a dynamic routing protocol.