2030 Engineer
VLAN 응용 본문
PC 1과 PC 2는 서로 다른 네트워크(VLAN)에 있기 때문에 비록 같은 스위치에 연결되어 있더라도 직접 통신을 할 수 없고 오직 라우터를 통해서만 통신이 가능하다.
`스위치 구성 모드에서 이름과 Enable 패스워드를 세팅
Switch#configure terminal
Switch(config)#host
Switch(config)#hostname Cat2950
Cat2950(config)#enable password cisco
Cat2950(config)#^Z
Cat2950#
`스위치 관리를 위해 VLAN 1에 IP주소를 주고 디폴트 게이트웨이 세팅
Cat2950#configure terminal
Cat2950(config)#interface vlan 1
Cat2950(config-if)#ip address 10.10.10.2 255.255.255.0
Cat2950(config-if)#no shutdown
Cat2950(config-if)#exit
Cat2950(config)#ip default-gateway 10.10.10.1
Cat2950(config)#^Z
Cat2950#
`VTP 모드 세팅
Cat2950#configure terminal
Cat2950(config)#vtp mode transparent //트랜스패런트 모드로 성정
Cat2950(config)#vtp domain cisco
Cat2950(config)#^Z
`VLAN만들기 VLAN1이 디폴트로 만들어져 있으니 VLAN2 만들기
Cat2950#configure terminal
Cat2950(config)#vlan 2
Cat2950(config-vlan)#name CCNA
Cat2950(config-vlan)#^Z
Cat2950#
`트렁크 포트 세팅 : 그림에서 Fa0/1가 트렁크로 세팅되어야 함 / IEEE 802.1Q로 설정 필요
Cat2950#configure terminal
Cat2950(config)#interface fa0/1
Cat2950(config-if)#switchport mode trunk
Cat2950(config-if)#switchport trunk allowed vlan all
Cat2950(config-if)#^Z
Cat2950#
Catalyst 3550처럼 ISL방식과 IEEE 802.1Q 중 하나 골라야 하는 상황이면
Cat2950(config-if)#switchport trunk encapsulation dot1q 처럼 따로 설정 해줘야한다.
`포트를 VLAN에 배치
VLAN 1에 배치할 Fa0/3은 디폴트 VLAN에 속해 있기 때문에 따로 명령해줄 필요는 없다.
Fa0/5번 포트만 VLAN 2에 넣도록 해본다.
Cat2950#configure terminal
Cat2950(config)#interface fa0/5
Cat2950(config-if)#switchport access vlan 2
Cat2950(config-if)^Z
Cat2950#
'Network > CCNA' 카테고리의 다른 글
라우터 구성, 중요한 몇가지 모드, 라우터 내부 (0) | 2020.02.18 |
---|---|
라우터, 라우팅 프로토콜 (0) | 2020.02.18 |
VLAN의 구성 (0) | 2020.02.18 |
Vlan에서의 트렁킹과 VTP (0) | 2020.02.18 |
Vlan 이란? (0) | 2020.02.18 |