13.2.3 Configuring BGP4 Peering
- Points to note
-
To configure a peer, first set the address and AS number on the remote side using the neighbor remote-as command, and then set other information about the peer.
Command examples
-
(config)# router bgp 65531
Apply BGP4/BGP4+ to the routing protocol. Specify the AS number (65531) of the autonomous system to which the local router belongs for the parameter.
-
(config-router)# bgp router-id 192.168.1.100
Sets the identifier of the local router (192.168.1.100).
-
(config-router)# neighbor 172.16.2.2 remote-as 65532
Configures an external peer (remote peer address:172.16.2.2; AS number: 65532).
-
(config-router)# neighbor 10.2.2.2 remote-as 65533
Configures an external peer (remote peer address:10.2.2.2; AS number: 65533).
-
(config-router)# neighbor 10.2.2.2 ebgp-multihop
Disallows use of the interface address of the directly connected interface as the peering address.
-
(config-router)# neighbor 10.2.2.2 update-source loopback 0
Sets the device address as the peering address of the local router.
-
(config-router)# neighbor 192.168.2.2 remote-as 65531
Configures an internal peer (remote peer address: 192.168.2.2).
-
(config-router)# neighbor 10.1.2.2 remote-as 65531
Configures an internal peer (remote peer address: 10.1.2.2).
-
(config-router)# neighbor 10.1.2.2 update-source loopback 0
Sets the device address as the peering address of the local router.