The routing protocol between a PE and a CE can be EBGP, static route, or IGP. You can choose any of them as required in the configuration process.
Context
The Hub-PE and the Hub-CE can exchange routes in the following ways.
Procedure
- Configuring EBGP between the Hub-PE and Hub-CE
In this way, EBGP, IGP, or static routes can be adopted between the Spoke-PE and the Spoke-CE.
To set up the EBGP peer between the Hub-PE and the Hub-CE and between the Spoke-PE and Spoke-CE, perform the following steps on the Hub-PE:
- Access the system view.
system-view
- Access the BGP view.
bgp { as-number-plain | as-number-dot }
- Access the BGP VPN instance IPv4 address family view.
ipv4-family vpn-instance vpn-instance-name
- Allow the routing loop
peer ip-address allow-as-loop [ number ] [ global-as [ vpn-as ] ]
Here the default value of number is 1, which means the route with the AS repeated once can be sent.
- Configuring IGP between the Hub-PE and Hub-CE
In this way, instead of BGP, IGP or static routes are adopted between the Spoke-PE and the Spoke-CE.
- Configuring static routes between the Hub-PE and the Hub-CE
In this way, EBGP, IGP, or static routes can be adopted between the Spoke-PE and the Spoke-CE.
If the Hub-CE uses the default route to access the Hub-PE, to advertise the default route to all the Spoke-PEs, perform the following steps
on the Hub-PE:
- Access the system view.
system-view
- Configure a static route for the VPN instance.
ip route-static vpn-instance vpn-source-name 0.0.0.0 0.0.0.0 nexthop-address [ preference preference | tag tag ]* [ description text ]
Here, vpn-source-name refers to the VPN-out. nexthop-address is the IP address of the Hub-CE interface that is connected to the PE interface bound with the VPN-out.
- Access the BGP view.
bgp { as-number-plain | as-number-dot }
- Access the BGP VPN instance IPv4 address family view.
ipv4-family vpn-instance vpn-instance-name
vpn-instance-name refers to the
VPN-out.
- Advertise the default route to all the Spoke-PEs through MP-BGP.
network 0.0.0.0 0