After route advertisement is configured on a DC gateway, other devices can obtain routes to the DC gateway, and the DC gateway can generate its own forwarding entries based on the received EVPN or BGP routes.
A route-policy that denies all routes is created.
Exit the route-policy view.
The BGP view is displayed.
Run ipv4-family vpn-instance vpn-instance-name
The BGP VPN instance IPv4 address family view is displayed.
Run ipv6-family vpn-instance vpn-instance-name
The BGP VPN instance IPv6 address family view is displayed.
A VPN BGP peer relationship is established.
A source interface and source address are specified for the setup of a TCP connection with the BGP peer.
A route-policy is applied to prevent the DC gateway from advertising VPN BGP routes to VNFs. This helps prevent routing loops.
Exit the BGP VPN instance IPv4/IPv6 address family view.
Exit the BGP view.
The system view is displayed.
The loopback interface view is displayed.
The loopback interface is bound to the L3VPN instance.
IPv6 is enabled on the interface. This step is mandatory if the interface requires an IPv6 address.
Run ip address ip-address { mask | mask-length }
An IPv4 address is configured for the interface.
Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
An IPv6 address is configured for the interface.
Exit the loopback interface view.
Run ip route-static vpn-instance vpn-instance-name 0.0.0.0 { 0.0.0.0 | 0 } { nexthop-address | interface-type interface-number [ nexthop-address ] } [ tag tag ]
A default VPN IPv4 static route is created.
Run ipv6 route-static vpn-instance vpn-instance-name :: 0 { nexthop-ipv6–address | interface-type interface-number [ nexthop-ipv6-address ] } [ tag tag ]
A default VPN IPv6 static route is created.
For details, see Routing Policy Configuration.
The VPN instance view is displayed.
Run ipv4-family
The VPN instance IPv4 address family view is displayed.
Run ipv6-family
The VPN instance IPv6 address family view is displayed.
The L3VPN instance is associated with an export route-policy that is used to filter routes to be advertised by the current L3VPN instance to the EVPN instance. Ensure that the L3VPN instance advertises only default VPN static routes, VPN loopback routes, and VPN UE routes to the EVPN instance, and the L3VPN instance changes the original next hop of VPN UE routes to the gateway address before advertising these routes.
Exit the VPN instance IPv4/IPv6 address family view.
Exit the VPN instance view.
The BGP view is displayed.
The BGP EVPN address family view is displayed.
A route-policy is applied to each DC gateway, so that DC gateways do not advertise UE routes to each other.
Exit the BGP EVPN address family view.
Run ipv4-family vpn-instance vpn-instance-name
The BGP VPN instance IPv4 address family view is displayed.
Run ipv6-family vpn-instance vpn-instance-name
The BGP VPN instance IPv6 address family view is displayed.
VPN loopback routes are imported to the BGP VPN instance IPv4/IPv6 address family.
A default VPN static route is imported to the BGP VPN instance IPv4/IPv6 address family.
The VPN instance is enabled to advertise EVPN IP prefix routes.
Return to the BGP view.
Exit the BGP view.
The configuration is committed.