201
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enter BGP view.
bgp
as-number
N/A
3.
Specify the source interface
for establishing TCP
connections to a peer or peer
group.
peer
{
group-name
|
ip-address
}
connect-interface
interface-type
interface-number
By default, BGP uses the outbound
interface of the best route to the BGP
peer or peer group as the source
interface for establishing a TCP
connection to the peer or peer
group.
Allowing establishment of EBGP connection to an indirectly
connected peer or peer group
Direct physical links must be available between EBGP peers. If they are not, use the
peer
ebgp-max-hop
command to establish a TCP connection over multiple hops between two peers.
Do not configure the
peer ebgp-max-hop
command if the two EBGP peers are directly connected.
To allow establishment of EBGP connection to an indirectly connected peer or peer group:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enter BGP view.
bgp
as-number
N/A
3.
Allow the establishment of
EBGP connection to an
indirectly connected peer or
peer group.
peer
{
group-name
|
ip-address
}
ebgp-max-hop
[
hop-count
]
Optional.
Not allowed by default.
Controlling route generation
Different from IGP, BGP focuses on route generation and advertisement control and optimal route
selection.
Generating BGP routes can be done in the following ways:
•
Configure BGP to advertise local networks.
•
Configure BGP to redistribute routes from other routing protocols, including the default route.
Configuration prerequisites
BGP connections must be created.
Injecting a local network
In BGP view, you can inject a local network to allow BGP to advertise to BGP peers. The ORIGIN attribute
of routes advertised in this way is IGP. You can also reference a routing policy to flexibly control route
advertisement. The network to be injected must be available in the local IP routing table.
To inject a local network: