TASK0::setup basic cisco commands enable conf t ! !change username here ************** ! username ADMINR5 secret cisco ! !change hostname here ************* ! !hostname R5 ip name-server 8.8.8.8 no ip domain-lookup ip domain-name cisco.com enable secret cisco line console 0 login local exec-timeout 0 0 logging synchronous exit line vty 0 4 login local exec-timeout 10 0 transport input ssh exit service password-encryption ip ssh version 2 crypto key generate rsa 812 exit ---------------------------------------------- TASK1::setup interfaces R1:: conf t interface fa 0/0 ip address 56.0.0.1 255.255.255.252 no shut exit interface fa 0/1 ip address 65.0.0.1 255.255.255.252 no shut exit interface loopback 0 ip address 1.1.1.1 255.255.255.255 no shut exit end show ip int brief R2:: conf t interface fa 0/0 ip address 56.0.0.2 255.255.255.252 no shut exit interface fa 0/1 ip address 156.0.0.1 255.255.255.252 no shut exit interface loopback 0 ip address 2.2.2.2 255.255.255.255 no shut exit end show ip int brief R3:: conf t interface fa 0/0 ip address 165.0.0.1 255.255.255.252 no shut exit interface fa 0/1 ip address 65.0.0.2 255.255.255.252 no shut exit interface loopback 0 ip address 3.3.3.3 255.255.255.255 no shut exit end show ip int brief R4:: conf t interface fa 0/0 ip address 192.168.10.1 255.255.255.0 no shut exit interface fa 0/1 ip address 156.0.0.2 255.255.255.252 no shut exit interface loopback 0 ip address 4.4.4.4 255.255.255.255 no shut exit end show ip int brief R5:: conf t interface fa 0/0 ip address 165.0.0.2 255.255.255.252 no shut exit interface loopback 0 ip address 5.5.5.5 255.255.255.255 no shut exit end show ip int brief PC1:: ip 192.168.10.2 255.255.255.0 192.168.10.1 show ip ------------------------------------------- TASK2::setup ospf 56 area 0 Note:Lazy way to advertise all connected networks. R1:: conf t router ospf 56 router-id 1.1.1.1 network 0.0.0.0 255.255.255.255 area 0 exit end show ip protocol R2:: conf t router ospf 56 router-id 2.2.2.2 network 0.0.0.0 255.255.255.255 area 0 exit R3:: conf t router ospf 56 router-id 3.3.3.3 network 0.0.0.0 255.255.255.255 area 0 exit R4:: conf t router ospf 56 router-id 4.4.4.4 network 156.0.0.0 0.0.0.3 area 0 network 4.4.4.4 0.0.0.0 area 0 exit R5:: conf t router ospf 56 router-id 5.5.5.5 network 0.0.0.0 255.255.255.255 area 0 exit ---------------------------------------- TASK3::add BGP routing to R1-R5 R4:: conf t router bgp 65056 neighbor 2.2.2.2 remote-as 65050 ! !ebgp peering was expected to have a direct connection !you need update source because your using loopback networks. ! neighbor 2.2.2.2 update-source loopback 0 ! !if your using loopback you need a multihop ! neighbor 2.2.2.2 ebgp-multihop 2 exit end show ip bgp summary R2:: conf t router bgp 65050 neighbor 4.4.4.4 remote-as 65056 neighbor 4.4.4.4 update-source loopback 0 neighbor 4.4.4.4 ebgp-multihop 2 exit end show ip bgp summary NOTE: Advertise 192.168.10.0/24 from R4 R4:: conf t router bgp 65056 network 192.168.10.0 exit end show ip bgp !Verify on R2 #show ip bgp !From R2 create a bgp neighbor to R1 R2:: conf t router bgp 65050 neighbor 1.1.1.1 remote-as 65050 neighbor 1.1.1.1 update-source loopback 0 !don't use ebgp-multi because it's ibgp exit end show ip bgp show ip bgp summary R1::create a bgp neighbor from R1 to R2 and R3 conf t router bgp 65050 neighbor 2.2.2.2 remote-as 65050 neighbor 2.2.2.2 update-source loopback 0 neighbor 3.3.3.3 remote-as 65050 neighbor 3.3.3.3 update-source loopback 0 exit end show ip bgp summary show ip bgp Note: Verify if 192.168.10.0 networks was advertise from R1 Note: 192.168.10.0 was no best path and the next path is 4.4.4.4 it should be 2.2.2.2 R2:: conf t router bgp 65050 ! !make the 1.1.1.1 the next hop ! neighbor 1.1.1.1 next-hop-self exit end Note: Verify on R1 to make the "valid" and "best" make sure ospf 192.168.10.0 was not advertise. R3:: conf t router bgp 65050 neighbor 1.1.1.1 remote-as 65050 neighbor 1.1.1.1 update-source loopback 0 exit Note: check the bgp split horizon why the 192.168.10.0 network was not advertised. R1:: conf t router bgp 65050 neighbor 2.2.2.2 route-reflector-client neighbor 3.3.3.3 route-reflector-client Note: add neighbor for R5 from R3 R3:: conf t router bgp 65050 neighbor 5.5.5.5 remote-as 65065 neighbor 5.5.5.5 update-source loopback 0 neighbor 5.5.5.5 ebgp-multihop 2 exit R5:: conf t router bgp 65065 neighbor 3.3.3.3 remote-as 65050 neighbor 3.3.3.3 update-source loopback 0 neighbor 3.3.3.3 ebgp-multihop 2 exit end show ip bgp summary show ip bgp Note: Goto R3 to create a ebgp multi hop ------------------------- TEST:: ping PC1
TASK0::setup basic cisco commands
enable
conf t
!
!change username here **************
!
username ADMINR5 secret cisco
!
!change hostname here *************
!
!hostname R5
ip name-server 8.8.8.8
no ip domain-lookup
ip domain-name cisco.com
enable secret cisco
line console 0
login local
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
exec-timeout 10 0
transport input ssh
exit
service password-encryption
ip ssh version 2
crypto key generate rsa
812
exit
----------------------------------------------
TASK1::setup interfaces
R1::
conf t
interface fa 0/0
ip address 56.0.0.1 255.255.255.252
no shut
exit
interface fa 0/1
ip address 65.0.0.1 255.255.255.252
no shut
exit
interface loopback 0
ip address 1.1.1.1 255.255.255.255
no shut
exit
end
show ip int brief
R2::
conf t
interface fa 0/0
ip address 56.0.0.2 255.255.255.252
no shut
exit
interface fa 0/1
ip address 156.0.0.1 255.255.255.252
no shut
exit
interface loopback 0
ip address 2.2.2.2 255.255.255.255
no shut
exit
end
show ip int brief
R3::
conf t
interface fa 0/0
ip address 165.0.0.1 255.255.255.252
no shut
exit
interface fa 0/1
ip address 65.0.0.2 255.255.255.252
no shut
exit
interface loopback 0
ip address 3.3.3.3 255.255.255.255
no shut
exit
end
show ip int brief
R4::
conf t
interface fa 0/0
ip address 192.168.10.1 255.255.255.0
no shut
exit
interface fa 0/1
ip address 156.0.0.2 255.255.255.252
no shut
exit
interface loopback 0
ip address 4.4.4.4 255.255.255.255
no shut
exit
end
show ip int brief
R5::
conf t
interface fa 0/0
ip address 165.0.0.2 255.255.255.252
no shut
exit
interface loopback 0
ip address 5.5.5.5 255.255.255.255
no shut
exit
end
show ip int brief
PC1::
ip 192.168.10.2 255.255.255.0 192.168.10.1
show ip
-------------------------------------------
TASK2::setup ospf 56 area 0
Note:Lazy way to advertise all connected networks.
R1::
conf t
router ospf 56
router-id 1.1.1.1
network 0.0.0.0 255.255.255.255 area 0
exit
end
show ip protocol
R2::
conf t
router ospf 56
router-id 2.2.2.2
network 0.0.0.0 255.255.255.255 area 0
exit
R3::
conf t
router ospf 56
router-id 3.3.3.3
network 0.0.0.0 255.255.255.255 area 0
exit
R4::
conf t
router ospf 56
router-id 4.4.4.4
network 156.0.0.0 0.0.0.3 area 0
network 4.4.4.4 0.0.0.0 area 0
exit
R5::
conf t
router ospf 56
router-id 5.5.5.5
network 0.0.0.0 255.255.255.255 area 0
exit
----------------------------------------
TASK3::add BGP routing to R1-R5
R4::
conf t
router bgp 65056
neighbor 2.2.2.2 remote-as 65050
!
!ebgp peering was expected to have a direct connection
!you need update source because your using loopback networks.
!
neighbor 2.2.2.2 update-source loopback 0
!
!if your using loopback you need a multihop
!
neighbor 2.2.2.2 ebgp-multihop 2
exit
end
show ip bgp summary
R2::
conf t
router bgp 65050
neighbor 4.4.4.4 remote-as 65056
neighbor 4.4.4.4 update-source loopback 0
neighbor 4.4.4.4 ebgp-multihop 2
exit
end
show ip bgp summary
NOTE: Advertise 192.168.10.0/24 from R4
R4::
conf t
router bgp 65056
network 192.168.10.0
exit
end
show ip bgp
!Verify on R2 #show ip bgp
!From R2 create a bgp neighbor to R1
R2::
conf t
router bgp 65050
neighbor 1.1.1.1 remote-as 65050
neighbor 1.1.1.1 update-source loopback 0
!don't use ebgp-multi because it's ibgp
exit
end
show ip bgp
show ip bgp summary
R1::create a bgp neighbor from R1 to R2 and R3
conf t
router bgp 65050
neighbor 2.2.2.2 remote-as 65050
neighbor 2.2.2.2 update-source loopback 0
neighbor 3.3.3.3 remote-as 65050
neighbor 3.3.3.3 update-source loopback 0
exit
end
show ip bgp summary
show ip bgp
Note: Verify if 192.168.10.0 networks was advertise from R1
Note: 192.168.10.0 was no best path and the next path is 4.4.4.4 it should be 2.2.2.2
R2::
conf t
router bgp 65050
!
!make the 1.1.1.1 the next hop
!
neighbor 1.1.1.1 next-hop-self
exit
end
Note: Verify on R1 to make the "valid" and "best" make sure ospf 192.168.10.0 was not advertise.
R3::
conf t
router bgp 65050
neighbor 1.1.1.1 remote-as 65050
neighbor 1.1.1.1 update-source loopback 0
exit
Note: check the bgp split horizon why the 192.168.10.0 network was not advertised.
R1::
conf t
router bgp 65050
neighbor 2.2.2.2 route-reflector-client
neighbor 3.3.3.3 route-reflector-client
Note: add neighbor for R5 from R3
R3::
conf t
router bgp 65050
neighbor 5.5.5.5 remote-as 65065
neighbor 5.5.5.5 update-source loopback 0
neighbor 5.5.5.5 ebgp-multihop 2
exit
R5::
conf t
router bgp 65065
neighbor 3.3.3.3 remote-as 65050
neighbor 3.3.3.3 update-source loopback 0
neighbor 3.3.3.3 ebgp-multihop 2
exit
end
show ip bgp summary
show ip bgp
Note: Goto R3 to create a ebgp multi hop
-------------------------
TEST:: ping PC1