
321
Examples
# In BGP-VPNv4 subaddress family view, configure the device not to change the next hop of a route when
advertising it to EBGP peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpnv4
[Sysname-bgp-af-vpnv4] peer 1.1.1.1 next-hop-invariable
peer next-hop-local
Description
Use the
peer next-hop-local
command to configure the device to use the local address as the next hop of
a route when advertising it to a peer or peer group.
Use the
undo peer next-hop-local
command to remove the configuration.
Syntax
peer
{
group-name
|
ip-address
}
next-hop-local
undo peer
{
group-name
|
ip-address
}
next-hop-local
View
BGP-VPNv4 subaddress family view, BGP-L2VPN address family view, VPLS address family view
Default level
2: System level
Parameters
group-name
: Specifies the name of the peer group, which is a case-sensitive string of 1 to 47 characters.
ip-address
: Specifies the IP address of the peer.
Examples
# In BGP-VPNv4 subaddress family view, configure the device to use the local address as the next hop of
a route when advertising it to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpnv4
[Sysname-bgp-af-vpnv4] peer test next-hop-local
# In BGP-L2VPN address family view, configure the device to use the local address as the next hop of a
route when advertising it to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] l2vpn-family
[Sysname-bgp-af-l2vpn] peer test next-hop-local
# In VPLS address family view, configure the device to use the local address as the next hop of a route
when advertising it to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] vpls-family
[Sysname-bgp-af-vpls] peer test next-hop-local