vtp 구성
1. domain
2. version
3. pass
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vtp domain test // 도메인 설정
Changing VTP domain name from NULL to test
Switch(config)#vtp version 2 // 버전 설정
Switch(config)#vtp password cisco // 비밀번호 설정
Setting device VLAN database password to cisco
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10 // 번호 설정
Switch(config-vlan)#name CCNA // 이름 변경
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name CCNP
Switch(config-vlan)#^Z
show vlan // 설정 보여주는것
show spanning-tree //루트 보여주는것
witch#
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet 0/1
Switch(config-if)#switchport mode trunk // 0/1 포트를 트렁크 모드로 변경 (스위치 포트당 하나씩 설정), 연결된 스위치 양쪽다 설정
Switch(config)#vtp mode server //서버 모드
Device mode already VTP SERVER.
------------------------------------------------------
Switch(config)#vtp mode client // 클라이언트 모드
Setting device to VTP CLIENT mode.
Switch#
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet 0/3 // 포트번호
Switch(config-if)#switchport mode access // 포트연결
Switch(config-if)#switchport access vlan 10 // 포트에 10번으로 연결
Switch(config-if)#end
#spanning-tree vlan 1 priority 0 //100, 루트브릿지 변경
Per Vlan ST
CST - 스페닝 트리(STP)가 한개
PVST - 스페닝 트리(STP)가 따로따로
L2 스위치에 단 하나의 IP
Management IP(관리자용IP)
Switch(config)#interface vlan 20 // 속한 vlan
Switch(config-if)#ip address 192.168.20.100 255.255.255.0 // 속한 vlna의 게이트웨이 범위 안에 호스트 값 지정
Switch(config-if)#no shutdown
----------------------
먼저 기본설정 하면 필요없음
line vty 0?
password cisco
enable password ......
---------------------
PC 커맨드 창에서 입력방법 - Telnet 192.168.20.100 // ex
다른 VLAN 통신을 위해서
Router, Switch(L3)
inter-VLAN Routing
1. L3 SWitch
SVI(Switch Virtual interface) - 각 vlan에 게이트웨이 설정
802.1q ISL
switchport mode trunk
Switch(config-if)#switchport trunk encapsulation dot1q // L3모드에선 먼저 선언 한다음 트렁크
Switch(config-if)#switchport mode trunk
-------------------------------------------------------
L3 SWitch 게이트웨이 설정
Switch(config)#interface vlan 10
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#ip address 172.16.1.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 20
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)#ip address 172.16.2.245 255.255.255.0
Switch(config-if)#no shutdown
-----------------------------------------------
show ip route (라우팅 테이블 보는 명령)
-----------------------------------------------
Switch(config)#ip routing // 이 명령어를 쳐줘야 서로 통신이 됨.(L3 이상 스위치 장비에서)
---------------------------------------------------------------
Switch(config)#ip default-gateway 192.168.10.1 // L2 스위치 게이트웨이 설정, 수에 따라서 설정
브로드캐스트를 줄여서 효율적인 통신을 하기위해 vlan을 서로 연결 가능하게 함.
L3 - L3 연결선 ip 등록
switch(config-if)#interface fastethernet 0/1
switch(config-if)#no switchport
switch(config-if)#ip adress 1.1.1.2 255.255.255.255.0 // 서로 다른 연결선이라 호스트 가 달라도 된다
switch(config-if)#no shutdown
ip프로토콜 // 다른 L3 라우터랑 통신이 가능해진다.
---(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2// 왼
---(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.1// 오