티스토리 뷰

Network/Cisco

Cisco Switch 기본셋팅

solarwind 2008. 6. 25. 20:17
반응형
>> 스위치 기본 관리를 위한 설정...
- Console / Telnet / HTTP (WebConsole)
- SVI (Switch Virtual Interface) - vlan1

! Hostname 할당
Switch(config)#hostname DSW11

! enable secret 암호 설정
DSW11(config)#enable secret cisco

! Line Console 관리 설정
DSW11(config)#line console 0
DSW11(config-line)#logging synchronous
DSW11(config-line)#exec-timeout 0 0

! Switch에 관리를 위한 vlan 1 interface에 IP 할당하기
DSW11(config)#int vlan 1
DSW11(config-if)#ip address 192.168.1.100 255.255.255.0
DSW11(config-if)#no shutdown
 
! Switch에서 외부와 통신이 필요한 경우 Default-Gateway 할당하기
DSW11(config)#ip default-gateway 192.168.1.254
 
! Name 해석을 위한 NameService 구성
DSW11(config)#ip domain-lookup
DSW11(config)#ip domain-name bcmsn.com
DSW11(config)#ip name-server 168.126.63.1
DSW11(config)#ip name-server 168.126.63.2

! Hostname을 사용한 이름 해석
DSW11(config)#no ip domain-lookup
DSW11(config)#ip host DSW11 192.168.1.100

! Telnet 접속 관리
DSW11(config)#line vty 0 4
DSW11(config-line)#login local
DSW11(config)#username netsec10 password netsec10
DSW11(config)#line vty 0 4
DSW11(config-line)#password netsec10
DSW11(config-line)#login
 
! Telnet 접속 제한 (Access-list 활용)
DSW11(config)#access-list 10 permit 192.168.1.0 0.0.0.255
DSW11(config)#line vty 0 4
DSW11(config-line)#access-class 10 in
 
! Switch 초기화
DSW11#erase startup-config
DSW11#clear vtp counter
DSW11#delete vlan.dat
DSW11#reload
 
! Config.text  (NVRAM Emulation 파일)
! vlan.dat (Vlan Database를 저장함.)

! Vlan 생성
DSW11(config)#vlan 10
DSW11(config-vlan)#name sales
 
! Vlan 삭제
DSW11(config)#no vlan 10
 
! Switch Port를 VLAN에 매팽하기 (Access-list 만들기)
DSW11(config)#int fa0/10
DSW11(config-if)#switchport mode access
DSW11(config-if)#switchport access vlan 10
 
! Switch Range를 이용한 다중포트 설정
DSW11(config)#int range fa0/10 - 15 , fa0/18 - 20
DSW11(config-if-range)#switchport mode access
DSW11(config-if-range)#switchport access vlan 10
 
! Trunk Link 설정
** Trunk는 Public Server / Switch Uplink / InterVlan Router/....
DSW11(config)#int fa0/24
DSW11(config-if)#speed 100
DSW11(config-if)#duplex full
DSW11(config-if)#switchport trunk encapsulation {dot1q|isl}
DSW11(config-if)#switchport mode trunk
DSW11(config-if)#switchport trunk allowed vlan all
 
! Trunk Link 정보 확인하기
DSW11#show interface trunk

! Spanning-tree Protocol (802.1d header)
- Root Bridge ID  lowest Bridge ID를 갖는 스위치
- Bridge ID (Sender) 802.1d 를 전달하는 스위치
- Cost   IEEE에 정한 10G: 2 , 1G:4 , 100M:19, 10M:100
- Port ID   STP를 전달하는 Port Priority + MAC
- Hello Time  2 Sec
- Ford Delay   15 Sec
- Max Age  20 Sec
 
! Root Bridge 선출?  (Switch Default Priority 는 32768이다.16진수는 0x8000 )
 1. Priority (16bit) + VLAN_ID / MAC Address
     vlan1 에 MAC Address 0050.BF1C.83DA를 갖는 스위치는
     0x8001.0050.BF1C.83DA = 32769.0050.BF1C.83DA
** 선출된 Root Bridge는 매 2초 마다 STP Protocol (802.1d)를 전달한다.
 
! Port 선출?
1. Lowest Cost
2. Lowest Sender Bridge ID
3. Lowest Port ID
** Port ID? Port Priority (8bit) + Port Number
STP가 Fa0/24 번포트를 통해 전달 되어 질 때 Port ID는 0x80.24  (128.24)
 
! Spanning-tree 정보 확인하기
DSW11#show spanning-tree
 
! Root Bridge Priority 변경하기
dsw21(config)#spanning-tree Priority ?
  <0-65535>  Set a Spanning Tree Priority
 
! Root Bridge VLAN Priority 변경하기
dsw21(config)#spanning-tree vlan 1 Priority ?
  <0-65535>  Set a Spanning Tree Priority
 
! Switch Port Priority 변경하기
dsw21(config-if)#spanning-tree vlan 1 port-priority ?
  <0-255>  Change an interface's spanning tree priority
 
! WebConsole (Http 서비스를 이용한 GUI 관리 인터페이스)
! WebConsole 기본구성
DSW11(config)#ip http Server  ! Web Server enable 설정
DSW11(config)#ip http Port 80
DSW11(config)#ip http authentication enable
DSW11(config)#ip http access-class 10 in
DSW11(config)#access-list 10 permit 192.168.1.0 0.0.0.255
 
>> Switch Http 서비스 설정
dsw21(config)#ip http ?
  access-class     Restrict access by access-class
  authentication   Set http authentication method
  path             Set base path for HTML
  port             HTTP port
  server           Enable HTTP server

>> VTP (VLAN Trunk Protocol)
VTP Mode>>
 - Server ; flash:vlan.dat 파일에 내용을 추가/삭제/수정 할 수 있고, 변경된 VLAN
   정보를 flash에 vlan.dat에 저장하고, 같은 VTP Domin에 있는 다른 스위치
   에 Replicate을 한다. (기본 모드)
 - Client ; 같은 VTP Domain에 Server로 부터 vlan.dat 정보를 복제 받아 VLAN을
   운영하는 모드, 클라이언트는 VLAN 정보를 추가/삭제/수정할 수 없고,
   VTP Server로 부터 전달된 VTP-Summary를 다른 스위치에게 전달한다.
 - Transparent ; VTP Domain에서 독립된 VLAN Database를 유지하는 모드
           다른 스위치와 VTP Domain정보를 동기화 하지않는다. 하지만
           VTP-Summary를 받으면 다른 스위치에게 전달은 한다.
 
설정 단계?
1. VTP Domain을 구성한다. 같은 이름을 사용하는 스위치간 VALN정보를 동기화 한다.
DSW11(config)#vtp domain bcmsn1
 
2. VTP Option을 설정한다. (Password)  - 모든 스위치에 Password가 동일해야함.
DSW11(config)#vtp password 123456
 
3. VTP Mode를 변경한다. (Client 설정시에 먼저 VTP Counter를 초기화 후에 Reload하면
   다른 VTP Server로 부터 새 VLAN정보를 할당 받는다.
DSW11#clear vtp counter
DSW11#conf t
DSW11(config)#vtp mode client
DSW11(config)#end
DSW11#reload
 
>> VTP 상태 모니터링
DSW11#show vtp status
DSW11#show vlan brief
DSW11#show flash
반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함