BGP Labs
iBGP
R1
interface Ethernet1
no switchport
ip address 192.168.12.1/24
interface Loopback0
ip address 1.1.1.1/24
!
ip routing
!
router bgp 1
neighbor 192.168.12.2 remote-as 2
network 1.1.1.0/24
R2
interface Ethernet1
no switchport
ip address 192.168.12.2/24
!
interface Ethernet2
no switchport
ip address 192.168.23.2/24
!
router bgp 2
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 update-source Loopback0
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 ebgp-multihop
neighbor 192.168.12.1 remote-as 1
!
router ospf 1
network 2.2.2.0/24 area 0.0.0.0
network 192.168.23.0/24 area 0.0.0.0
R3
interface Ethernet1
no switchport
ip address 192.168.23.3/24
!
interface Ethernet2
no switchport
ip address 192.168.34.3/24
!
interface Loopback0
ip address 3.3.3.3/24
!
ip routing
!
router bgp 2
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 next-hop-self
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 update-source Loopback0
!
router ospf 1
network 3.3.3.0/24 area 0.0.0.0
network 192.168.23.0/24 area 0.0.0.0
network 192.168.34.0/24 area 0.0.0.0
R4
interface Ethernet1
no switchport
ip address 192.168.34.4/24
!
interface Ethernet2
no switchport
ip address 192.168.45.4/24
!
interface Loopback0
ip address 4.4.4.4/24
ip routing
!
router bgp 2
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 next-hop-self
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 ebgp-multihop
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 update-source Loopback0
neighbor 192.168.45.5 remote-as 3
!
router ospf 1
network 4.4.4.0/24 area 0.0.0.0
network 192.168.34.0/24 area 0.0.0.0
R5
interface Ethernet2
no switchport
ip address 192.168.45.5/24
!
interface Loopback0
ip address 5.5.5.5/24
!
ip routing
!
router bgp 3
neighbor 192.168.45.4 remote-as 2
network 5.5.5.0/24