Enabling BGP to establish an EBGP session over multiple hops

To establish an EBGP connection, two routers must have a direct physical link. If no direct link is available, you must use the peer ebgp-max-hop command to enable BGP to establish an EBGP session over multiple hops and specify the maximum hops.

If directly connected EBGP peers use loopback interfaces to establish a BGP session, you do not need to configure the peer ebgp-max-hop command.

To enable BGP to establish an indirect EBGP session (IPv4):

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter BGP view or BGP-VPN instance view.

  • Enter BGP view:bgp as-number

  • Enter BGP-VPN instance view:

    1. bgp as-number

    2. ip vpn-instance vpn-instance-name

N/A

3. Enable BGP to establish an EBGP session to an indirectly-connected peer or peer group and specify the maximum hop count.

peer { group-name | ip-address } ebgp-max-hop [ hop-count ]

By default, BGP cannot establish an EBGP session to an indirectly-connected peer or peer group.

To enable BGP to establish an indirect EBGP session (IPv6):

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter BGP view or BGP-VPN instance view.

  • Enter BGP view:bgp as-number

  • Enter BGP-VPN instance view:

    1. bgp as-number

    2. ip vpn-instance vpn-instance-name

N/A

3. Enable BGP to establish an EBGP session to an indirectly-connected peer or peer group and specify the maximum hop count.

peer { group-name | ipv6-address } ebgp-max-hop [ hop-count ]

By default, BGP cannot establish an EBGP session to an indirectly-connected peer or peer group.