티스토리 뷰

728x90
반응형

VLAN이란?


스위치의 각 포트를 서로 다른 네트워크로 구분할 수 있게 해주는 기능이다.


VLAN의 포트는 Access / Trunk 두가지이다.


액세스란?


액세스란 하나의 Port에 하나의 vlan을 사용할 경우 설정을 한다.



이번 예제는 Access Port (Untagged Port)를 실습해보겠다.


[예제] Vlan 설정 해보기.



[Step 1] VLAN 생성하기.


Switch>enable

Switch#configure terminal  

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vlan 10

Switch(config-vlan)#?

VLAN configuration commands:

exit Apply changes, bump revision number, and exit mode

name Ascii name of the VLAN

no Negate a command or set its defaults

remote-span Add the Remote Switched Port Analyzer (RSPAN) feature to the VLAN

Switch(config-vlan)#name A

Switch(config-vlan)#exit

Switch(config)#

- 설명은 이와 같다. 

- vlan 10을 생성한 후 vlan 10에 대한 별칭을 설정하였다.



Router# show vlan

- 설정 확인 해본다.


[Step 2] VLAN access mode 할당해주기.


- switchport access vlan XX 할당하는 명령어는 이것이다.



- 위 사진과 같은 방식으로 vlan을 각각 인터페이스에 설정하면 된다.


Switch#configure terminal  

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#interface FastEthernet 0/1   

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit


- 위와 같이 설정을 한다.

  • 참고로 한번에 소속시키는 명령어는 interface range FastEthernet 0/1-X 이다.


Router# show vlan

- 설정 확인 해본다.



interface FastEthernet 0/1, interface FastEthernet 0/2 포트는 vlan 10번(A)에 소속되어 있고,

interface FastEthernet 0/10, interface FastEthernet 0/11 포트는 vlan 20번(B)에 소속 되어있다. 


[Step 3] 테스트 해보기.


- PC0 에서 PC2번으로 ping을 보냈을 때 위 사진과 같이 안보내지는 것을 알수 있다.



- PC0 에서 같은 vlan 10에 소속 된 PC1 에게는 ping이 잘 전송되는것을 알 수 있다.


vlan 설정 완료.pkt


728x90
반응형
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today