Port-Priority 로드 분산

2023. 9. 21. 09:42네트워크

토폴로지

 

 

목표
포트 번호 forward 여부 [FWD] BLK
fa1/1 vlan10에 대해서 RP vlan20,30,40에 대해서 BLK
fa1/2 vlan20에 대해서 RP vlan10,30,40에 대해서 BLK
fa1/3 vlan30에 대해서 RP vlan10,20,40에 대해서 BLK
fa1/4 vlan40에 대해서 RP vlan10,20,30에 대해서 BLK
 

 

S1/2/3/4 설정
S1: 10.1.10.1/24 [gw 10.1.10.254]
conf t
int fa 0/0
no shut
ip add 10.1.10.1 255.255.255.0
mac 0001.0001.0001
exi
ip route 0.0.0.0 0.0.0.0 10.1.10.254
S2: 10.1.20.1/24 [gw 10.1.20.254]
conf t
int fa 0/0
no shut
ip add 10.1.20.1 255.255.255.0
mac 0002.0002.0002
exi
ip route 0.0.0.0 0.0.0.0 10.1.20.254
S3: 10.1.30.1/24 [gw 10.1.30.254]
conf t
int fa 0/0
no shut
ip add 10.1.30.1 255.255.255.0
mac 0003.0003.0003
exi
ip route 0.0.0.0 0.0.0.0 10.1.30.254
S4: 10.1.40.1/24 [gw 10.1.40.254]
conf t
int fa 0/0
no shut
ip add 10.1.40.1 255.255.255.0
mac 0004.0004.0004
exi
ip route 0.0.0.0 0.0.0.0 10.1.40.254

DSW에서 생성할 SVIdefault gw로 지정한다.

show ip int b, show cdp nei, show ip route로 설정사항을 확인하자.

 

 

ASW설정 [access, trunk]
ASW
vlan 10,20,30,40
exi
int fa 1/11
sw mo a
sw a v 10
exi
int fa 1/12
sw mo a
sw a v 20
exi
int fa 1/13
sw mo a
sw a v 30
exi
int fa 1/14
sw mo a
sw a v 40
exi
int rang fa 1/1 - 4
sw t e d
sw m t
exi


spanning-tree vlan 10 root secondary
spanning-tree vlan 20 root secondary
spanning-tree vlan 30 root secondary
spanning-tree vlan 40 root secondary

show vlan brief [show vlan-sw brief] / show int trunk / show cdp nei

show int status [connect, not connect, disable, err-disable]

show spanning-tree vlan 10 brief [20,30,40]

와 같은 명령어로 설정사항을 확인하자.

 

 

DSW routing = RIP
ip routing
vlan 10,20,30,40,50
exi
int vlan 10
no shut
ip add 10.1.10.254 255.255.255.0
exi
int vlan 20
no shut
ip add 10.1.20.254 255.255.255.0
exi
int vlan 30
no shut
ip add 10.1.30.254 255.255.255.0
exi
int vlan 40
no shut
ip add 10.1.40.254 255.255.255.0
exi
int vlan 50
no shut
ip add 10.1.50.250 255.255.255.0
exi
int fa 1/0
sw mo a
sw a v 50
exi


router rip
ver 2
no auto
net 10.0.0.0
tim ba 1 6 0 8
exi
 
 
DSW [trunk 보안설정] - root bridge가 되어야 함
int rang fa 1/1 - 4
sw t e d
sw m t
exi
spanning-tree vlan 10 root primary
spanning-tree vlan 20 root primary
spanning-tree vlan 30 root primary
spanning-tree vlan 40 root primary

show vlan brief [show vlan-sw brief] / show int trunk / show int status / show cdp nei

와 같은 명령어로 설정사항을 확인하자.

 
 
GW - NAT, RIP [default 경로 전송]
int fa 0/1
no shut
ip add 10.1.50.254 255.255.255.0
ip nat inside
exi
int fa 0/0
no shut
ip add 1.1.12.1 255.255.255.0
ip nat out
exi
access-list 1 permit 10.1.0.0 0.0.255.255
ip nat inside source list 1 int fa 0/0 over
ip route 8.8.8.0 255.255.255.0 1.1.12.2
router rip
ver 2
no auto
net 10.0.0.0
tim ba 1 6 0 8
default-information originate
 

 

Internet 장비 설정
int fa 0/0
no shut
ip add 1.1.12.2 255.255.255.0
exi
int lo 0
ip add 8.8.8.8 255.255.255.0
exi

 

 
 
확인
DSW
show ip int b
ping 10.1.50.254
show ip route rip
GW
show ip route rip
ping 8.8.8.8
S1
ping 10.1.10.254
S2
ping 10.1.20.254
S3
ping 10.1.30.254
S4
ping 10.1.40.254
ASW#show spanning-tree vlan 10 bri
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/1 128.42 128 19 FWD 0 8192 cc06.3660.0001 128.42
FastEthernet1/2 128.43 128 19 BLK 0 8192 cc06.3660.0001 128.43
FastEthernet1/3 128.44 128 19 BLK 0 8192 cc06.3660.0001 128.44
FastEthernet1/4 128.45 128 19 BLK 0 8192 cc06.3660.0001 128.45
ASW#show spanning-tree vlan 20 bri
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/1 128.42 128 19 FWD 0 8192 cc06.3660.0002 128.42
FastEthernet1/2 128.43 128 19 BLK 0 8192 cc06.3660.0002 128.43
FastEthernet1/3 128.44 128 19 BLK 0 8192 cc06.3660.0002 128.44
FastEthernet1/4 128.45 128 19 BLK 0 8192 cc06.3660.0002 128.45
FastEthernet1/12 128.53 128 19 FWD 19 16384 cc05.32ac.0002 128.53
ASW#show spanning-tree vlan 30 bri
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/1 128.42 128 19 FWD 0 8192 cc06.3660.0003 128.42
FastEthernet1/2 128.43 128 19 BLK 0 8192 cc06.3660.0003 128.43
FastEthernet1/3 128.44 128 19 BLK 0 8192 cc06.3660.0003 128.44
FastEthernet1/4 128.45 128 19 BLK 0 8192 cc06.3660.0003 128.45
ASW#show spanning-tree vlan 40 bri
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/1 128.42 128 19 FWD 0 8192 cc06.3660.0004 128.42
FastEthernet1/2 128.43 128 19 BLK 0 8192 cc06.3660.0004 128.43
FastEthernet1/3 128.44 128 19 BLK 0 8192 cc06.3660.0004 128.44
FastEthernet1/4 128.45 128 19 BLK 0 8192 cc06.3660.0004 128.45
DSW#show mac-address-table dynamic
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
0001.0001.0001 Dynamic 10 FastEthernet1/1
0002.0002.0002 Dynamic 20 FastEthernet1/1
0003.0003.0003 Dynamic 30 FastEthernet1/1
0004.0004.0004 Dynamic 40 FastEthernet1/1
 

 

vlan별 port-priority를 이용한 로드분산 실시

root bridge에서 설정 해야 함 [DSW]

int fa 1/1
spanning-tree vlan 10 port-priority 0


ASW fa 1/1 -> vlan10에 대한 RP
int fa 1/2
spanning-tree vlan 20 port-priority 0


ASW fa 1/2 -> vlan20에 대한 RP
int fa 1/3
spanning-tree vlan 30 port-priority 0


ASW fa 1/3 -> vlan30에 대한 RP
int fa 1/4
spanning-tree vlan 40 port-priority 0


ASW fa 1/4 -> vlan40에 대한 RP

 

 
 
blk port 확인 [non root bridge인 ASW에서 BLK 확인]
ASW#show spanning-tree vlan 10 bri
FastEthernet1/1 128.42 128 19 FWD 0 8192 cc06.3660.0001 0.42
ASW#show spanning-tree vlan 20 bri
FastEthernet1/2 128.42 128 19 FWD 0 8192 cc06.3660.0001 0.42
ASW#show spanning-tree vlan 30 bri
FastEthernet1/3 128.42 128 19 FWD 0 8192 cc06.3660.0001 0.42
ASW#show spanning-tree vlan 40 bri
FastEthernet1/4 128.42 128 19 FWD 0 8192 cc06.3660.0001 0.42

 

 
 
S1,2,3,4에서 8.8.8.8로 ping 실시하고 DSW에서 mac 학습 확인

 

 

'네트워크' 카테고리의 다른 글

MSTP  (0) 2023.09.21
BPDU filter  (0) 2023.09.21
STP  (0) 2023.09.20
RTP  (0) 2023.09.20
etherchannel, LACP, PAGP  (0) 2023.09.20