Ad Home

Lab eBGP iBGP sessions

Share:





R1

hostname RR2
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!      
interface Loopback1
 ip address 11.11.11.11 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.13.1 255.255.255.0
!
router bgp 1
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
! se publica la red
 network 11.11.11.0 mask 255.255.255.0
! Crea la sesion eBGP
 neighbor 3.3.3.3 remote-as 3
! No verifica el TTL 
 neighbor 3.3.3.3 disable-connected-check
 neighbor 3.3.3.3 update-source Loopback0
! Crea la sesion iBGP
 neighbor 192.168.12.2 remote-as 1
! redistribuye en iBGP y se pone el mismo como siguiente salto
 neighbor 192.168.12.2 next-hop-self
 no auto-summary
!
! Ruta para alcanazar la loopback en un SA remoto
ip route 3.3.3.3 255.255.255.255 192.168.13.3
!


R2

hostname RR2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!      
interface Loopback1
 ip address 22.22.22.22 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet1/0
 ip address 192.168.241.2 255.255.255.0
!
interface FastEthernet1/1
 ip address 192.168.242.2 255.255.255.0
!
router bgp 1
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 22.22.22.0 mask 255.255.255.0
 neighbor 4.4.4.4 remote-as 4
! No verifica el TTL 
 neighbor 4.4.4.4 disable-connected-check
 neighbor 4.4.4.4 update-source Loopback0
! sesion iBGP
 neighbor 192.168.12.1 remote-as 1
 neighbor 192.168.12.1 next-hop-self
! Crea sesion contar R3 pasando por R2 
 neighbor 192.168.13.3 remote-as 3
 neighbor 192.168.13.3 ebgp-multihop 2
 no auto-summary
!
! Rutas para alcanazar la loopback en un SA remoto
ip route 4.4.4.4 255.255.255.255 192.168.241.4
ip route 4.4.4.4 255.255.255.255 192.168.242.4
ip route 192.168.13.3 255.255.255.255 192.168.12.1
!
end


R3

hostname R3
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!      
interface Loopback1
 ip address 33.33.33.33 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.13.3 255.255.255.0
!
router bgp 3
 no synchronization
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 network 33.33.33.0 mask 255.255.255.0
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 disable-connected-check
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 192.168.12.2 remote-as 1
 neighbor 192.168.12.2 ebgp-multihop 2
 no auto-summary
!
end


R4

hostname RR2
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!      
interface Loopback1
 ip address 44.44.44.44 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 shutdown
!
interface FastEthernet1/0
 ip address 192.168.241.4 255.255.255.0
!
interface FastEthernet1/1
 ip address 192.168.242.4 255.255.255.0
!
router bgp 4
 no synchronization
 bgp log-neighbor-changes
 network 44.44.44.0 mask 255.255.255.0
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 disable-connected-check
 neighbor 2.2.2.2 update-source Loopback0
 no auto-summary
!
ip route 2.2.2.2 255.255.255.255 192.168.241.2
ip route 2.2.2.2 255.255.255.255 192.168.242.2
!
end


Pruebas

R4#ping 22.22.22.22 source lo 1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
Packet sent with a source address of 44.44.44.44
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/10/12 ms
R4#ping 11.11.11.11 source lo 1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds:
Packet sent with a source address of 44.44.44.44
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/24/52 ms
R4#ping 33.33.33.33 source lo 1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 33.33.33.33, timeout is 2 seconds:
Packet sent with a source address of 44.44.44.44
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/44/56 ms
R4#

Ad Home