To establish multiple BGP sessions between two routers, you must specify the source interface for
•
establishing TCP connections to each peer on the local router. Otherwise, the local BGP router
might fail to establish a TCP connection to a peer when using the outbound interface of the best
route to the peer as the source interface.
To specify the source interface for TCP connections:
Step
1.
Enter system view.
2.
Enter BGP view or BGP-VPN
instance view.
3.
Specify the source interface
for establishing TCP
connections to a peer or
peer group.
Generating BGP routes
BGP can generate routes can be done in the following ways:
•
Advertise local networks.
Redistribute IGP routes.
•
Configuration prerequisites
Create and configure a routing policy. For more information, see "Configuring routing policies."
Injecting a local network
Perform this task to inject a network in the local routing table to the BGP routing table, so that BGP can
advertise the network to BGP peers. The origin attribute of BGP routes advertised in this way is IGP. You
can also use a routing policy to flexibly control route advertisement.
To inject a local network:
Step
1.
Enter system view.
2.
Enter BGP view or BGP-VPN
instance view.
Command
system-view
•
Enter BGP view:
bgp as-number
•
Enter BGP-VPN instance view:
a.
bgp as-number
b.
ipv4-family vpn-instance
vpn-instance-name
peer { group-name | ip-address }
connect-interface interface-type
interface-number
Command
system-view
•
Enter BGP view:
bgp as-number
•
Enter BGP-VPN instance view:
a.
bgp as-number
b.
ipv4-family vpn-instance
vpn-instance-name
185
Remarks
N/A
Use either method.
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.
Remarks
N/A
Use either method.