티스토리 뷰
1. 스위치에서는 Native vlan을 10번으로 잡고 라우터의 주인터페이스를 Native vlan으로 이용한다.
[SW1]
conf t
vlan 10
exit
vlan 20
exit
int f1/1
switchport mode access
switchport access vlan 10
exit
int f1/2
switchport mode access
switchport access vlan 20
exit
int f1/9
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport mode trunk
exit
[R1]
conf t
int f0/0
no sh
ip add 192.168.10.254 255.255.255.0
exit
int f0/0.20
ip add 192.168.20.254 255.255.255.0
encapsulation dot1q 20
[PC1]
conf t
no ip routing
ip default-gateway 192.168.10.254
int f0/0
no sh
ip add 192.168.10.1 255.255.255.0
exit
PC2]
conf t
no ip routing
ip default-gateway 192.168.20.254
int f0/0
no sh
ip add 192.168.20.2 255.255.255.0
exit
----------------------------------------------------------------
2. 라우터의 서브인터페이스 중 하나를 Native vlan으로 이용
[R1]
int f0/0
no ip add
exit
int f0/0.10
encapsulation dot1q 10 native
ip add 192.168.10.254 255.255.255.0
exit
do wr
[SW1]
int f1/9
switchport trunk native vlan 10
switchport mode trunk
----------------------------------------------------------------
3. 모든 서브 vlan에 각각 태그를 달고 통신한다.
[R1]
conf t
int f0/0.10
no encapsulation dot1q 10 native
encapsulation dot1q 10
ip add 192.168.10.254 255.255.255.0
exit
int f0/0.20
encapsulation dot1q 20
ip add 192.168.20.254 255.255.255.0
exit
do wr
[SW1]
conf t
int f1/9
no switchport trunk native vlan 10
----------------------------------------------------------------
SVI (가상(논리) 스위치 인터페이스)
[SW1]
conf t
vlan 12
name VLAN12
exit
int f1/1
switchport mode access
switchport access vlan 12
exit
int lo0
ip add 192.168.1.1 255.255.255.0
exit
int vlan 12
ip add 192.168.12.1 255.255.255.0
exit
ip route 192.168.2.0 255.255.255.0 vlan12 192.168.12.2
ip route 192.168.3.0 255.255.255.0 vlan12 192.168.12.2
ip route 192.168.23.0 255.255.255.0 vlan12 192.168.12.2
------------>축약
ip route 192.168.0.0 255.255.224.0 vlan12 192.168.12.2
[SW2]
conf t
vlan 12
name VLAN12
exit
vlan 23
name VLAN23
exit
int f1/2
switchport mode access
switchport access vlan 12
exit
int f1/3
switchport mode access
switchport access vlan 23
exit
int lo0
ip add 192.168.2.2 255.255.255.0
exit
int vlan 12
ip add 192.168.12.2 255.255.255.0
exit
int vlan 23
ip add 192.168.23.2 255.255.255.0
exit
ip route 192.168.1.0 255.255.255.0 vlan12 192.168.12.1
ip route 192.168.3.0 255.255.255.0 vlan23 192.168.23.3
[SW3]
conf t
vlan 23
name VLAN23
exit
int f1/3
switchport mode access
switchport access vlan 23
exit
int lo0
ip add 192.168.3.3 255.255.255.0
exit
int vlan 23
ip add 192.168.23.3 255.255.255.0
exit
ip route 192.168.1.0 255.255.255.0 vlan23 192.168.23.2
ip route 192.168.2.0 255.255.255.0 vlan23 192.168.23.2
ip route 192.168.12.0 255.255.255.0 vlan23 192.168.23.2
------------>축약
ip route 192.168.0.0 255.255.240.0 vlan23 192.168.23.2
-------------------------------------------------------------------------------
'네트워크 > LAB실습 및 이론' 카테고리의 다른 글
[개념정리]인터넷 주소 및 캡슐화, 인터넷 프로토콜, 라우터 (0) | 2023.02.27 |
---|---|
[개념정리] OSI-7Layer, TCP/IP-4Layer (0) | 2023.02.27 |
[keduit]VLAN + Frame-relay switch -2023/02/24 (0) | 2023.02.24 |
[keduit]line형Mesh(ptop ptomul multomul) -2023/02/21 (0) | 2023.02.21 |
[keduit]ppp프로토콜, lmi-프레임릴레이 -2023/02/17,20 (0) | 2023.02.21 |