When two BGP routers that belong to different Autonomous System establish session, they effectively form an eBGP session. Here is an example of configuring eBGP session between R2 (AS 65100) and R8 (AS 65089).
R8 Configuration:
router bgp 65089 bgp router-id 10.8.8.8 bgp log-neighbor-changes neighbor 172.16.28.2 remote-as 65100
Now R2 Configuration:
router bgp 65100 bgp router-id 10.2.2.2 bgp log-neighbor-changes neighbor 172.16.28.8 remote-as 65089
Verification of the session.
R2#show ip bgp summary BGP router identifier 10.2.2.2, local AS number 65100 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.16.28.8 4 65089 5 5 1 0 0 00:01:29 0 R2#
All is good here.
More elaborate output:
R2#show ip bgp neighbor 172.16.28.8 BGP neighbor is 172.16.28.8, remote AS 65089, external link BGP version 4, remote router ID 10.8.8.8 BGP state = Established, up for 00:05:02 [snip] Local host: 172.16.28.2, Local port: 179 Foreign host: 172.16.28.8, Foreign port: 12099
In preparation to next lab I want to advertise a few prefixes on R8, so that R2 can learn them.
First, I am going to create a few loopback interfaces with IP addresses.
interface Loopback0 ip address 10.8.8.8 255.255.255.255 ! interface Loopback10 ip address 10.8.0.1 255.255.255.240 ! interface Loopback11 ip address 10.8.0.17 255.255.255.240 ! interface Loopback12 ip address 10.8.0.33 255.255.255.240 ! interface Loopback13 ip address 10.8.0.49 255.255.255.240 ! interface Loopback14 ip address 10.8.80.1 255.255.255.0 ! interface Loopback15 ip address 10.8.81.1 255.255.255.0 ! interface Loopback16 ip address 10.8.82.1 255.255.255.0 ! interface Loopback17 ip address 10.8.83.1 255.255.255.0 !
As for advertising networks in BGP, this protocol is unlike IGP protocols such as IS-IS, OSPF, EIGRP.
Those observations deserve a separate post.