https://www.youtube.com/watch?v=gPcFzNvU5eo
김대리 다이어리
GNS3 Vlan 설정 실습
https://www.youtube.com/watch?v=gPcFzNvU5eo
위의 영상을 참고하여 아래 예제를 실행하면 실제 PING TEST까지 볼 수 있다.
PC1
IP : 10.10.10.10 /24
GW : 10.10.10.1
VLAN : 10
PC2
IP : 10.10.20.10 /24
GW : 10.10.20.1
VLAN : 20
ROUTER F0/0 - SW E0/0
SW E0/1 - PC1 E0
SW E0/2 - PC2 E0
이제 설정을 진행합니다.
스위치에서는
vlan database : vlan 구성모두로 들어갑니다.
vlan 10
vlan 20 을 통해 vlan ID 10, 20 을 등록합니다.
configure terminal 을 통해 config모드로 진입하고
interface fasEthernet0/0 : fastEthernet 0/0 인터페이스 구성으로 들어갑니다.
switchport mode trunk : 해당 인터페이스의 모드를 트렁크로 바꿉니다.
switchport trunk encaptulation dot1Q: 트렁킹 방식을 dot1Q(IEEE 802.1Q)로 설정합니다.
no shotdown : 해당 인터페이스를 활성화 합니다.
interface fastEthernet0/1
switchport acess vlan 10 : 해당 인터페이스를 vlan10에 배치합니다.
no shutdown
interface fastEthernet0/2
switchport acess vlan 20
no shutdown
다음은 라우터입니다
configure terminal
interface fastEthernet0/0
no shutdown ! 인터페이이스 활성화는 물리 인터페이스에서
interface FastEthernet 0/0.10 서브 인터페이스 입니다.
encapsultion dot1Q 10 : 해당 서브 인터페이스의 트렁킹 방식을 dot1Q로 놓고 VLAN은 10으로 설정합니다.
ip address 10.10.10.1 255.255.255.0 : 서브 인터페이스 별로 IP세팅
inteface fastEthernet 0/0.20
encapsultion dot1Q 20
ip address 10.10.20.1 255.255.255.0
마지막으로 pc설정
ip 10.10.20.10 /24 10.10.20.1
핑테스트 합니다.
pc-라우터
pc-pc