또한 현재의 구성도에서 IGP(OSPF)가 동작해야 하는 이유에 대해서도 확인 하세요 !!
-> neighbor 안 맺어짐
R2#sh ip bgp summary
R2#sh ip bgp summary
STEP1. R1,R2간에 EBGP를 설정합니다.
R1
interface lo0
ip add 1.1.1.1 255.255.255.255
interface e0/0
ip add 211.239.123.1 255.255.255.252
no shut
router bgp 1
network 1.1.1.1 mask 255.255.255.255
neighbor 211.239.123.2 remote-as 2
R2
interface lo0
ip add 1.1.1.2 255.255.255.255
interface e0/0
ip add 211.239.123.2 255.255.255.252
no shut
interface e0/1
ip add 10.1.23.2 255.255.255.0
no shutdown
router bgp 2
neighbor 211.239.123.1 remote-as 1
STEP2. R2,R3간에 IBGP를 설정합니다.
R2
neighbor 1.1.1.3 remote-as 2
neighbor 1.1.1.3 update-source loopback 0
neighbor 1.1.1.3 next-hop-self
neighbor 1.1.1.4 remote-as 2
neighbor 1.1.1.4 update-source loopback 0
neighbor 1.1.1.4 next-hop-self
R3
interface lo0
ip add 1.1.1.3 255.255.255.255
interface e0/0
ip add 10.1.34.3 255.255.255.0
no shut
interface e0/1
ip add 10.1.23.3 255.255.255.0
no shut
router bgp 2
neighbor 1.1.1.2 remote-as 2
neighbor 1.1.1.2 update-source loopback 0
neighbor 1.1.1.3 next-hop-self
STEP3. R3,R4간에 IBGP를 설정합니다.
R3
neighbor 1.1.1.4 remote-as 2
neighbor 1.1.1.4 update-source loopback 0
neighbor 1.1.1.4 next-hop-self
R4
interface lo0
ip add 1.1.1.4 255.255.255.255
interface e0/0
ip add 10.1.34.4 255.255.255.0
no sh
neighbor 1.1.1.2 remote-as 2
neighbor 1.1.1.2 update-source loopback 0
neighbor 1.1.1.2 next-hop-self
neighbor 1.1.1.3 remote-as 2
neighbor 1.1.1.3 update-source loopback 0
neighbor 1.1.1.3 next-hop-self
확인1. R2에서 show ip bgp summary로 3개의 BGP Neighbor를 확인합니다.
확인2. R3에서 show ip bgp summary로 2개의 BGP Neighbor를 확인합니다.
(현재 LAB06에 의해, R3은 1.1.1.1/32 경로가 Routing Table에 존재 해야 합니다.)
R4에서 1.1.1.1/32가 보이지 않는 이유를 확인 하고 해결 하세요.
R2는 EBGP로 부터 경로를 받았기 때문에, 아무런 문제없이, Routing Table에 올라감
R2는 EBGP로 부터 경로를 받았기 때문에, 아무런 문제없이, Routing Table에 올라감
R3은 1.1.1.1/32를 R2로 부터 받지만, Next-hop이 211.239.123.1이기 때문에 경로를 사용하지 못함 >> R2에서 R3으로 Next-hop-Self가 필요함
R2
neighbor 1.1.1.3 next-hop-self
R3
neighbor 1.1.1.2 next-hop-self
// R2, R3, R4에 모두 next-hop-self를 해주어야 한다.
R3은 R4에게 1.1.1.1/32 경로를 Split-horizon 때문에 주지 못함 >> R2,R4간에 IBGP Neighbor가 필요함 !!
확인1. "show ip bgp summary" or "show ip bgp neighbor"로 R4,R5간에 BGP Neighbor 성립확인
R4
router bgp 2
neighbor 59.5.100.6 remote-as 3
R5
router bgp 3
neighbor 59.5.100.5 remote-as 2
R5에서 Neighbor 확인
show ip bgp summary
(현재 LAB06에 의해, R4은 1.1.1.1/32 경로가 Routing Table에 존재 해야 합니다.)
R5
interface loopback 0
ip add 5.5.5.5 255.255.255.255
router bgp 3
network 5.5.5.5 mask 255.255.255.255
-> Next-hop 문제를 해결한 뒤 결과는 다음과 같다.
show ip route bgp
R1#ping 5.5.5.5 source 1.1.1.1 !!!!!
위의 구성도에서는 Full mesh로 Split-horizon을 해결하였다.
R2, R3, R4에서 config)#no router bgp 2
R2#show run | sec bgp
BGP Neighbor를 확인한다.
Next-hop 문제를 확인한다.
Split horizon 문제를 확인한다.
neighbor command로 neighbor를 설정합니다.
network command로 인터넷이 되야하는 대역을 광고합니다.
next-hop 문제 해결 >> next-hop-self
split-horizon 문제 해결 >> RR
IBGP경우 Loopback으로 Neighbor를 설정합니다.
router bgp X
neighbor 1.1.1.1 remote-as Y
neighbor 1.1.1.1 uddate-source loopback 0
neighbor 1.1.1.1 next-hop-self
neighbor 1.1.1.1 route-reflector-client
network 2.2.2.0 mask 255.255.255.0
#show ip bgp summary
#show ip bgp
#show ip route bgp
Customer1 : R4 AS1
Customer2 : R6 AS3
ISP : R2,R2,R3,R5 AS 2
Customer1은 BGP로 4.4.4.0/24를 광고합니다.
router bgp 1
network 4.4.4.0 mask 255.255.255.0
Customer2는 BGP로 6.6.6.0/24를 광고합니다.
router bgp 1
network 6.6.6.0 mask 255.255.255.0
AS2 (R2,R3,R4,R5)
*** 설정 ***
R4
interface loopback 0
ip add 4.4.4.4 255.255.255.0
interface e1/1
ip add 10.1.41.4 255.255.255.0
no shut
router bgp 1
neighbor 10.1.41.1 remote-as 2
network 4.4.4.0 mask 255.255.255.0
R1
interface loopback 0
ip add 1.1.1.1 255.255.255.0
ip ospf 1 area 0
interface e1/1
ip add 10.1.41.1 255.255.255.0
noshut
interface e1/0
ip add 10.1.12.1 255.255.255.0
ip ospf 1 area 0
no shut
interface e0/3
ip add 10.1.15.1 255.255.255.0
ip ospf 1 area 0
no shut
router bgp 2
neighbor 10.1.41.4 remote-as 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source lo 0
neighbor 2.2.2.2 next-hop-self
R2
interface loopback 0
ip add 2.2.2.2 255.255.255.0
ip ospf 1 area 0
interface e1/0
ip add 10.1.12.2 255.255.255.0
ip ospf 1 area 0
no shut
interface e1/1
ip add 10.1.23.2 255.255.255.0
ip ospf 1 area 0
no shut
router bgp 2
neighbor 1.1.1.1 remote-as 2
neighbor 1.1.1.1 update-source lo 0
neighbor 1.1.1.1 route-reflector-client
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source lo 0
neighbor 3.3.3.3 route-reflector-client
neighbor 5.5.5.5 remote-as 2
neighbor 5.5.5.5 update-source lo 0
neighbor 5.5.5.5 route-reflector-client
R5
interface loopback 0
ip add 5.5.5.5 255.255.255.0
ip ospf 1 area 0
interface e0/0
ip add 10.1.35.5 255.255.255.0
ip ospf 1 area 0
no shut
interface e0/3
ip add 10.1.15.5 255.255.255.0
ip ospf 1 area 0
no shut
router bgp 2
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source lo 0
neighbor 2.2.2.2 next-hop-self
R3
interface loopback 0
ip add 3.3.3.3 255.255.255.0
ip ospf 1 area 0
interface e1/1
ip add 10.1.23.3 255.255.255.0
ip ospf 1 area 0
no shut
interface e0/0
ip add 10.1.35.3 255.255.255.0
ip ospf 1 area 0
no shut
interface e1/3
ip add 10.1.36.3 255.255.255.0
no shut
router bgp 2
neighbor 10.1.36.6 remote-as 3
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source lo 0
neighbor 2.2.2.2 next-hop-self
R6
interface loopback 0
ip add 6.6.6.6 255.255.255.0
interface e1/3
ip add 10.1.36.6 255.255.255.0
no shut
router bgp 3
neighbor 10.1.36.3 remote-as 2
network 6.6.6.0 mask 255.255.255.0
SW3 (E0/0, E0/2, E0/1)에 VLAN 11을 할당합니다.
SW3
interface range e0/0, e0/2, e0/1
switchport mode access
switchport access vlan 11
show vlan
SW1 (E0/1)에 VLAN 11을 할당합니다.
SW1
interface e0/1
switchport mode access
switchport access vlan 11
SW2 (E0/2)에 VLAN 11을 할당합니다.
SW2
interface e0/2
switchport mode access
switchport access vlan 11
SW1, SW2 (E1/0, E1/1)은 Trunk 설정합니다.
SW1,SW2
inteface range e1/0, e1/1
switchport trunk encapsulation dot1q
switchport mode trunk
SW1, SW2 (E1/0, E1/1)은 Etherchannel로 설정합니다.
SW1,SW2
interface range e1/0, e1/1
channel-group 1 mode on
SW1, SW2, SW3, SW4에 RSTP로 설정합니다.
VLAN 11은 SW3의 E0/2이 Blocking되도록 설정합니다.
SW1,SW2,SW3,SW4
spanning-tree mode rapid-pvst
spanning-tree vlan 11 root primary
SW2
spanning-tree vlan 11 root secondary
SW1,SW2에 VLAN 11에 대한 HSRP를 구현합니다.
VLAN 11의 Active는 SW1이 되도록 설정합니다.
SW1
interface vlan 11
ip add 172.16.11.253 255.255.255.0
standby 11 ip 172.16.11.252
standby 11 priority 150
standby 11 preempt
SW2
interface vlan 11
ip add 172.16.11.254 255.255.255.0
standby 11 ip 172.16.11.252
standby 11 priority 100
PC1>ip 172.16.11.1 255.255.255.0 172.16.11.252
SW1,SW2
router ospf 1
network 172.16.11.0 0.0.0.255 area 0
passive-inteface vlan 11
R1,R2
router bgp 12
network 172.16.11.0 mask 255.255.255.0
PC1>ping 1.2.3.4 !!!!!
PC1>ping 8.8.8.8 !!!!!
VLAN12 대역에 대해서 설정하겠습니다.
SW4
interface range e0/0, e0/2, e0/1
switchport mode access
switchport access vlan 12
SW1
spanning-tree vlan 12 root secondary
interface e0/2
switchport mode access
switchport access vlan 12
interface vla 12
ip add 172.16.12.253 255.255.255.0
standby 12 ip 172.16.12.252
router ospf 1
network 172.16.12.0 0.0.0.255 area 0
passive-interface vlan 12
SW2
spanning-tree vlan 12 root primary
interface e0/1
switchport mode access
switchport access vlan 12
interface vla 12
ip add 172.16.12.254 255.255.255.0
standby 12 ip 172.16.12.252
standby 12 priority 150
standby 12 preempt
router ospf 1
network 172.16.12.0 0.0.0.255 area 0
passive-interface vlan 12
R1,R2
router bgp 12
network 172.16.12.0 mask 255.255.255.0