bxm's IT Story
게이트웨이 이중화(Final) - MHSRP(90%) // MVRRP(10%) 본문
## MHSRP ##
1. SW2와 SW3는 클라이언트끼리의 망이라서 SVI가 필요하다(?). 선생님이 해주신 말씀인데 집가서 찾아보기.
2. 다 실행해보고, 반대로도 한번 코드 짜보기!
공통]
ena
conf t
no ip domain lookup
line c 0
logg sy
exec-timeout 0
exit
line vty 0 4
pass cisco
end
SW2]
conf t
vlan 10
exit
vlan 20
exit
SW3]
conf t
vlan 10
exit
vlan 20
exit
SW4]
no ip routing
conf t
vlan 10
exit
vlan 20
exit
## access port가 있으므로,
int f1/1
sw mo ac
sw ac vlan 10
exit
int f1/2
sw mo ac
sw ac vlan 20
## SW3<->SW4 // SW2<->SW4 사이에서 VLAN10과 20이 전부 다 다녀야 하므로,
## 3번과 4번 // 2번과 4번 사이에 Trunking이 되어야 한다.
SW2] - Trunking
int f1/2
sw tr enc dot
sw mo tr
SW3] - Trunking
int f1/3
sw tr enc dot
sw mo tr
SW4] - Trunking
int range f1/12 - 13
sw tr enc dot
sw mo tr
do wr
SW1]
conf t
int lo0
ip add 1.1.1.1 255.255.255.0
## 이제부터 라우터 역할을 하는 것임. SVI보다 간단함.
## SVI는 게이트웨이 정도의 역할임. 근데 일일이 들어가서 하면서 하는게 귀찮음.
## 라우터 간의 통신은 SVI 안쓰고 IP 입력하는게 더 효율적임.
## 지금까지 SVI 한것은 SVI 연습해보라고 한것임.
int f1/1
no switchport
ip add 1.1.12.1 255.255.255.0
exit
int f1/2
no switchport
ip add 1.1.23.1 255.255.255.0
exit
SW2]
int f1/1
no switchport
ip add 1.1.12.2 255.255.255.0
## 아랫쪽 게이트웨이
int vlan 10
ip address 1.1.10.252 255.255.255.0
int vlan 20
ip address 1.1.20.252 255.255.255.0
SW3]
int f1/2
no switchport
ip add 1.1.23.3 255.255.255.0
int vlan 10
ip add 1.1.10.253 255.255.255.0
int vlan 20
ip add 1.1.20.253 255.255.255.0
PC1]
no ip routing
## 가상 게이트웨이
ip default-gateway 1.1.10.100
int f0/0
no shut
ip add 1.1.10.1 255.255.255.0
exit
PC2]
conf t
no ip routing
ip default-gateway 1.1.20.100
int f0/0
no shutdown
ip add 1.1.20.2 255.255.255.0
SW1]
ip route 1.1.10.0 255.255.255.0 f1/1 1.1.12.2
ip route 1.1.20.0 255.255.255.0 f1/1 1.1.12.2
ip route 1.1.10.0 255.255.255.0 f1/2 1.1.23.3
ip route 1.1.20.0 255.255.255.0 f1/2 1.1.23.3
do wr
SW2]
ip route 0.0.0.0 0.0.0.0 f1/1 1.1.12.1
do wr
SW3]
ip route 0.0.0.0 0.0.0.0 f1/2 1.1.23.1
do wr
PC1]
ip default-gateway 1.1.10.252
end
ping 1.1.10.252
#성공
ping 1.1.1.1
#성공
아래 SW1로 가서 명령어로 ip 확인해보자.
PC2]
ip default-gateway 1.1.20.253
end
ping 1.1.1.1
#실패
ping 1.1.20.253
#성공
show ip int
##확인
ping 1.1.23.1
#성공
traceroute 1.1.1.1
Switch 3번으로 가보자.
문제 발견!!
SW3의 f1/2와 .3에게 IP를 주지 않았음.
PC1]
ip default-gateway 1.1.10.252
end
traceroute 1.1.1.1
## 1.1.10.252 쪽으로 왼쪽으로 가야함!
PC2]
ip default-gateway 1.1.20.253
end
traceroute 1.1.1.1
## 1.1.20.252 쪽으로 오른쪽으로 가야함!
최종 버전임. 안 될 수가 없음. 아래 PC1~PC2에서 ping 날려서 traceroute 해본 결과 아래의 결과(성공)이 뜨는 것을
확인 할 수 있음.
PC1]
PC2]
SW2]
## interface vlan 10과 20에 다시 가보기.
## SW2는 vlan 10의 액티브여야 하므로,
int vlan 10
standby 10 ip 1.1.10.100
standby 10 priority 110
standby 10 preempt delay minimum 5
standby 10 track f1/1 20
## 얘가 잘못되면 20 깎아라.
## SW2는 vlan 20의 스탠바이가 되어야 하므로,
int vlan 20
standby 20 ip 1.1.20.100
standby 20 preempt
SW3]
## SW3는 vlan 10의 스탠바이여야 하므로,
int vlan 10
standby 10 ip 1.1.10.100
standby 10 preempt
## SW2는 vlan 10의 액티브여야 하므로,
int vlan 20
standby 20 ip 1.1.20.100
standby 20 priority 110
standby 20 preempt delay minimum 5
standby 20 track f1/2 20
여기까지 저장된 파일
SW2]
show standby vlan 10
show standby vlan 20
PC1]
## 게이트웨이를 바꿔보자.
ip default-gateway 1.1.10.100
end
traceroute 1.1.1.1
## 왼쪽으로 돌아가야 한다.
PC2]
## 게이트웨이를 바꿔보자.
ip default-gateway 1.1.20.100
end
traceroute 1.1.1.1
## 오른쪽으로 돌아가야 한다.
이제 MVRRP와 VRRP 하는법도 알아야함!!!!
SW2]
## show run int vlan 10, 20 해서
## no 로 전부 다 지우는 연습해보기
show run int vlan 10
no standby 10 ip 1.1.10.100
no standby 10 priority 110
no standby 10 preempt delay minimum 5
no standby 10 track FastEthernet1/1 20
show run int vlan 20
no standby 20 ip 1.1.20.100
no standby 20 preempt
exit
SW3]
## show run int vlan 10, 20 해서
## no 로 전부 다 지우는 연습해보기
show run int vlan 20
no standby 20 ip 1.1.20.100
no standby 20 priority 110
no standby 20 preempt delay minimum 5
no standby 20 track FastEthernet1/2 20
show run int vlan 10
no standby 10 ip 1.1.10.100
no standby 10 preempt
exit
SW2]
track 1 interface f1/1 line-protocol
int vlan 10
vrrp 10 ip 1.1.10.100
vrrp 10 priority 110
vrrp 10 preempt delay minimum 5
vrrp 10 track 1
int vlan 20
vrrp 20 ip 1.1.20.100
vrrp 20 preempt
SW3]
track 1 interface f1/2 line-protocol
int vlan 10
vrrp 10 ip 1.1.10.100
vrrp 10 preempt
int vlan 20
vrrp 20 ip 1.1.20.100
vrrp 20 priority 110
vrrp 20 preempt delay minimum 5
vrrp 20 track 1
PC1]
traceroute 1.1.1.1
## 왼쪽으로 돌아감.
PC2]
traceroute 1.1.1.1
## 오른쪽으로 돌아감.
SW2]
int vlan 10
shut
PC1]
traceroute 1.1.1.1
## 이제 오른쪽으로 돌아가야함!!
253으로 돌아가는 것을 볼 수 있다.
SW3]
ping 1.1.1.1
SW1]
show ip route
VRRP는 동작이 시원찮음. 동작 잘 되게 한번 선생님이랑 다시 찾아보기.
SW2] - VRRP 20에 대해서 백업해보기.
int vlan 20
vrrp 20 priority 100
vrrp 20 preempt delay minimum 5
vrrp 20 track 1
do sh run int vlan 20
SW3]
int vlan 10
vrrp 10 priority 100
vrrp 10 preempt delay minimum 5
vrrp 10 track 1
end
int vlan 10
shut
int vlan 10
no shut
SW2]
int vlan 10
no shut
PC1]
traceroute 1.1.1.1
VRRP는 Cisco L3 스위치에서 잘 동작하지 않는 특징이 있다. 그래서 국제표준이 아님에도
거의 HSRP를 사용함!!!
현업에 가서 HSRP로 게이트웨이 이중화 하면 된다. 거의 99%는 HSRP를 사용함.
최종본.
'Network > Cisco (KEDU)' 카테고리의 다른 글
Dynamic Routing Protocol - RIP(2) (0) | 2021.06.15 |
---|---|
Dynamic Routing Protocol - RIP(1) (0) | 2021.06.14 |
Gateway 이중화(2) (0) | 2021.06.14 |
Gateway 이중화(1) - HSRP (0) | 2021.06.14 |
GNS3 코드 정리본 (0) | 2021.06.13 |