VLAN 간의 라우팅2

2023. 8. 30. 11:34네트워크

실습 토폴로지

토폴로지

 

 

기본 설정
vlan10 : S1 10.1.10.1/24
vlan20 : S2 10.1.20.1/24
vlan30 : S3 10.1.30.1/24
vlan40 : S4 10.1.40.1/24
vlan50 : S5 10.1.50.1/24
B1_GW-B3_GW
10.1.13.0/24
B1_GW-B2_GW
10.1.12.0/24
B1_GW-B3_GW
10.1.23.0/24
B1,2,3_GW : RIP
S1
int fa 0/0
no shut
ip add 10.1.10.1 255.255.255.0
exi

ip route 0.0.0.0 0.0.0.0 10.1.10.254
S2
int fa 0/0
no shut
ip add 10.1.20.1 255.255.255.0
exi

ip route 0.0.0.0 0.0.0.0 10.1.20.254
S3
int fa 0/0
no shut
ip add 10.1.30.1 255.255.255.0
exi

ip route 0.0.0.0 0.0.0.0 10.1.30.254
S4
int fa 0/0
no shut
ip add 10.1.40.1 255.255.255.0
exi

ip route 0.0.0.0 0.0.0.0 10.1.40.254
S5
int fa 0/0
no shut
ip add 10.1.50.1 255.255.255.0
exi

ip route 0.0.0.0 0.0.0.0 10.1.50.254
 
 
 
ASW 설정 [access port설정, trunk port설정]
B1ASW1F
vlan 10
exi
int fa 1/1
sw mo a
sw a v 10
exi
int fa 1/2
sw t e d
sw m t
B1ASW2F
vlan 20
exi
int fa 1/2
sw mo a
sw a v 20
exi
int fa 1/1
sw t e d
sw m t
B2ASW3F
vlan 30
exi
int fa 1/3
sw mo a
sw a v 30
exi
int fa 1/2
sw t e d
sw m t
B2ASW4F
vlan 40
exi
int fa 1/4
sw mo a
sw a v 40
exi
int fa 1/3
sw t e d
sw m t
B3ASW3F
vlan 50
exi
int fa 1/5
sw mo a
sw a v 50
exi
int fa 1/4
sw t e d
sw m t
show int status
show mac...
show vlan(-sw) brief
show int trunk
show cdp nei
 

 

DSW 설정 [trunk 설정]
B1DSW
vlan 10,20
exi
int rang fa 1/1 - 2 , fa 1/0
sw t e d
sw m t
exi
B2DSW
vlan 30,40
exi
int rang fa 1/2 - 3 , fa 1/0
sw t e d
sw m t
exi
B3DSW
vlan 50
exi
int rang fa 1/4 , fa 1/0
sw t e d
sw m t
exi
 
 
GW 설정
B1_GW
int fa 0/0
no shut
exi
int fa 0/0.1
en dot 10
ip add 10.1.10.254 255.255.255.0
exi
int fa 0/0.2
en dot 20
ip add 10.1.20.254 255.255.255.0
exi
int fa 1/0
no shut
ip add 10.1.12.1 255.255.255.0
exi
int fa 0/1
no shu
ip add 10.1.13.1 255.255.255.0
exi
router rip
ver 2
no auto
net 10.0.0.0
tim bas 1 6 0 8
exi
B2_GW
int fa 0/0
no shut
exi
int fa 0/0.1
en dot 30
ip add 10.1.30.254 255.255.255.0
exi
int fa 0/0.2
en dot 40
ip add 10.1.40.254 255.255.255.0
exi
int fa 1/0
no shut
ip add 10.1.12.2 255.255.255.0
exi
int fa 0/1
no shu
ip add 10.1.23.2 255.255.255.0
exi
router rip
ver 2
no auto
net 10.0.0.0
tim bas 1 6 0 8
exi
B3_GW
int fa 0/0
no shut
exi
int fa 0/0.1
en dot 50
ip add 10.1.50.254 255.255.255.0
exi


int fa 1/0
no shut
ip add 10.1.23.3 255.255.255.0
exi
int fa 0/1
no shu
ip add 10.1.13.3 255.255.255.0
exi


router rip
ver 2
no auto
net 10.0.0.0
tim bas 1 6 0 8
exi
 
B1_GW#show ip route rip
10.0.0.0/24 is subnetted, 8 subnets
R 10.1.30.0 [120/1] via 10.1.12.2, 00:00:00, FastEthernet1/0
R 10.1.23.0 [120/1] via 10.1.13.3, 00:00:00, FastEthernet0/1 <-- 주경로
                    [120/1] via 10.1.12.2, 00:00:00, FastEthernet1/0 <-- 백업 + 1
R 10.1.40.0 [120/1] via 10.1.12.2, 00:00:00, FastEthernet1/0
R 10.1.50.0 [120/1] via 10.1.13.3, 00:00:00, FastEthernet0/1
B2_GW#show ip route rip
10.0.0.0/24 is subnetted, 8 subnets
R 10.1.10.0 [120/1] via 10.1.12.1, 00:00:01, FastEthernet1/0
R 10.1.13.0 [120/1] via 10.1.23.3, 00:00:01, FastEthernet0/1 <-- 주경로
                    [120/1] via 10.1.12.1, 00:00:01, FastEthernet1/0 <-- 백업 + 1
R 10.1.20.0 [120/1] via 10.1.12.1, 00:00:01, FastEthernet1/0
R 10.1.50.0 [120/1] via 10.1.23.3, 00:00:01, FastEthernet0/1
B3_GW#show ip route rip
10.0.0.0/24 is subnetted, 8 subnets
R 10.1.10.0 [120/1] via 10.1.13.1, 00:00:00, FastEthernet0/1
R 10.1.12.0 [120/1] via 10.1.23.2, 00:00:01, FastEthernet1/0 <-- 주경로
                    [120/1] via 10.1.13.1, 00:00:00, FastEthernet0/1 <-- 백업 + 1
R 10.1.30.0 [120/1] via 10.1.23.2, 00:00:01, FastEthernet1/0
R 10.1.20.0 [120/1] via 10.1.13.1, 00:00:00, FastEthernet0/1
R 10.1.40.0 [120/1] via 10.1.23.2, 00:00:01, FastEthernet1/0

 

 
offset-list로 주경로, 백업경로 만들기
B1_GW#show ip route rip
R 10.1.23.0 [120/1] via 10.1.13.3, 00:00:00, FastEthernet0/1 <-- 주경로
[120/1] via 10.1.12.2, 00:00:00, FastEthernet1/0 <-- 백업 + 1
access-list 1 permit 10.1.23.0 0.0.0.255
router rip
offset-list 1 in 2 fa 1/0
B1_GW#show ip route rip
10.0.0.0/24 is subnetted, 8 subnets
R 10.1.30.0 [120/1] via 10.1.12.2, 00:00:00, FastEthernet1/0
R 10.1.23.0 [120/1] via 10.1.13.3, 00:00:00, FastEthernet0/1
R 10.1.40.0 [120/1] via 10.1.12.2, 00:00:00, FastEthernet1/0
R 10.1.50.0 [120/1] via 10.1.13.3, 00:00:00, FastEthernet0/1
B2_GW#show ip route rip
R 10.1.13.0 [120/1] via 10.1.23.3, 00:00:01, FastEthernet0/1 <-- 주경로
[120/1] via 10.1.12.1, 00:00:01, FastEthernet1/0 <-- 백업 + 1
access-list 1 permit 10.1.13.0 0.0.0.255
router rip
offset-list 1 in 2 fa 1/0
B2_GW#show ip route rip
10.0.0.0/24 is subnetted, 8 subnets
R 10.1.10.0 [120/1] via 10.1.12.1, 00:00:00, FastEthernet1/0
R 10.1.13.0 [120/1] via 10.1.23.3, 00:00:00, FastEthernet0/1
R 10.1.20.0 [120/1] via 10.1.12.1, 00:00:00, FastEthernet1/0
R 10.1.50.0 [120/1] via 10.1.23.3, 00:00:00, FastEthernet0/1
B3_GW#show ip route rip
R 10.1.12.0 [120/1] via 10.1.23.2, 00:00:01, FastEthernet1/0 <-- 주경로
[120/1] via 10.1.13.1, 00:00:00, FastEthernet0/1 <-- 백업 + 1
access-list 1 permit 10.1.12.0 0.0.0.255
router rip
offset-list 1 in 2 fa 0/1
B3_GW#show ip route rip
10.0.0.0/24 is subnetted, 8 subnets
R 10.1.10.0 [120/1] via 10.1.13.1, 00:00:00, FastEthernet0/1
R 10.1.12.0 [120/1] via 10.1.23.2, 00:00:00, FastEthernet1/0
R 10.1.30.0 [120/1] via 10.1.23.2, 00:00:00, FastEthernet1/0
R 10.1.20.0 [120/1] via 10.1.13.1, 00:00:00, FastEthernet0/1
R 10.1.40.0 [120/1] via 10.1.23.2, 00:00:00, FastEthernet1/0
 

 

라우팅 테이블에서 링크 정보에 해당되는 주소를 distribute-list로 제거하기
B1_GW#show ip route rip
R 10.1.23.0 [120/1] via 10.1.13.3, 00:00:00, FastEthernet0/1
access-list 2 deny 10.1.23.0 0.0.0.255
access-list 2 permit any
router rip
distribute-list 2 in
B1_GW#show ip route 10.1.23.0
% Subnet not in table
B2_GW#show ip route rip
R 10.1.13.0 [120/1] via 10.1.23.3, 00:00:00, FastEthernet0/1
access-list 2 deny 10.1.13.0 0.0.0.255
access-list 2 permit any
router rip
distribute-list 2 in
B2_GW#show ip route 10.1.13.0
% Subnet not in table
B3_GW#show ip route rip
R 10.1.12.0 [120/1] via 10.1.23.2, 00:00:00, FastEthernet1/0
access-list 2 deny 10.1.12.0 0.0.0.255
access-list 2 permit any
router rip
distribute-list 2 in
B3_GW#show ip route 10.1.12.0
% Subnet not in table
 
B1_GW
key chain B2
key 1
key-string cisco1
exi
key 2
key-string cisco2
exi
exi
key chain B3
key 1
key-string cisco1
exi
key 2
key-string cisco2
exi
exi
int fa 1/0
ip rip authentication key-chain B2
ip rip authentication mode md5
exi
int fa 0/1
ip rip authentication key-chain B3
ip rip authentication mode md5
B2_GW
key chain B1
key 1
key-string cisco1
exi
key 2
key-string cisco2
exi
exi
key chain B3
key 1
key-string cisco1
exi
key 2
key-string cisco2
exi
exi
int fa 1/0
ip rip authentication key-chain B1
ip rip authentication mode md5
exi
int fa 0/1
ip rip authentication key-chain B3
ip rip authentication mode md5
B3_GW
key chain B1
key 1
key-string cisco1
exi
key 2
key-string cisco2
exi
exi
key chain B2
key 1
key-string cisco1
exi
key 2
key-string cisco2
exi
exi
int fa 1/0
ip rip authentication key-chain B2
ip rip authentication mode md5
exi
int fa 0/1
ip rip authentication key-chain B1
ip rip authentication mode md5
정상 네이버 상태 확인
라우팅 테이블 확인
 
 

 

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

Proxy ARP  (0) 2023.09.19
BPDU guard  (0) 2023.08.31
VLAN 간의 라우팅1  (0) 2023.08.30
SVI  (0) 2023.08.29
VLAN  (0) 2023.08.29