본문 바로가기

CCNA 기초

CCNA 기초 - Switch 기본설정


Switch의 기본 설정에 대해서 알아보자.


------------------------------------------------------------------------------------------------------------------

1) Switch 기본 정보 확인

Switch>en

Switch#sh version    - 시스코 Switch 장비의 정보를 볼 수 있다.

Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba
Image text-base: 0x80010000, data-base: 0x80562000

ROM: Bootstrap program is is C2950 boot loader

Switch uptime is 44 seconds
System returned to ROM by power-on

Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
Processor board ID FHK0610Z0WC
Last reset from system-reset
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)

32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 000D.BD49.47D9
Motherboard assembly number: 73-5781-09
Power supply part number: 34-0965-01
Motherboard serial number: FOC061004SZ
Power supply serial number: DAB0609127D
Model revision number: C0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FHK0610Z0WC
Configuration register is 0xF

Switch#


Switch#show vlan      - 시스코 Switch 장비의 vlan 정보를 볼 수 있다.


Switch#

 

------------------------------------------------------------------------------------------------------------------


- 참고 : 장치 연결 및 해제시

실제 장비  

00:22:05: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down

00:22:06: %LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down

Switch#

00:22:16: %LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to up

00:22:18: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to up


Packet Tracer

%LINK-5-CHANGED: Interface FastEthernet0/18, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/18, changed state to down
Switch#
%LINK-5-CHANGED: Interface FastEthernet0/18, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/18, changed state to up

 

------------------------------------------------------------------------------------------------------------------



2) L2 Switch에서 IP주소 설정하기
- 실제적으로  L2 장비에서는 IP등록이 불가능
- 하지만 vlan (가상 lan)을 이용해 등록가능


Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface vlan1
Switch(config-if)#ip address 10.5.5.11 255.255.255.0
Switch(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console

3) L2 Switch에서 디폴트 게이트웨이 설정하기

- Packet 전송을 위해 등록

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip default-gateway 10.5.5.3
Switch(config)#end
%SYS-5-CONFIG_I: Configured from console by console

설정 확인

Switch#show interfaces vlan 1   - gateway 정보는 나오지 않음
Vlan1 is administratively down, line protocol is down
  Hardware is CPU Interface, address is 000d.bd49.47d9 (bia 000d.bd49.47d9)
  Internet address is 10.5.5.11/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 21:40:21, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1682 packets input, 530955 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     563859 packets output, 0 bytes, 0 underruns
     0 output errors, 23 interface resets
     0 output buffer failures, 0 output buffers swapped out
Switch#show run
!
interface Vlan1
 ip address 10.5.5.11 255.255.255.0
 shutdown
!
ip default-gateway 10.5.5.3
!
Switch#

------------------------------------------------------------------------------------------------------------------

4) L2 Switch에서 듀플렉싱 모드 설정하기

Duplex 모드
- Half Duplex : 단방향 통신
- Full Duplex : 양방향 통신
- Auto Duplex


Switch#show interfaces fa 0/1
FastEthernet0/1 is down, line protocol is down (disabled)
  Hardware is Lance, address is 0000.0c2b.1701 (bia 0000.0c2b.1701)
  MTU 1500 bytes, BW 100000 Kbit, DLY 1000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s
  input flow-control is off, output flow-control is off

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface fa0/1
Switch(config-if)#duplex half / full / auto
Switch(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#show interfaces fa 0/1
FastEthernet0/1 is down, line protocol is down (disabled)
  Hardware is Lance, address is 0000.0c2b.1701 (bia 0000.0c2b.1701)
  MTU 1500 bytes, BW 100000 Kbit, DLY 1000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Half-duplex, 10Mb/s
  input flow-control is off, output flow-control is off

Switch#

------------------------------------------------------------------------------------------------------------------

5) MAC address table 확인

Switch#show mac-address-table
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
 ----       -----------        --------      -----
- 처음  Switch를 작동시켰을 경우 등록된 MAC address table에 아무것도 나타나지 않는다.
- 하지만 좋은 장비일 수록 처음부터 많은 MAC address table이 등록되어 있어 vlan을 이용할 때 좋다.
 

Switch 에 PC(IP가 등록된)를 연결한 다음 MAC address table을 확인하는 경우



Switch#show mac-address-table
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
 ----       -----------        --------      -----
   1    000a.41b4.7e46    DYNAMIC     Fa0/1
- Switch에 장비를 연결시킬 때마다 MAC address table에 기록이 남는다.

Switch#

------------------------------------------------------------------------------------------------------------------

6) 설정저장
Switch#copy running-config startup-config

설정확인
Switch#show flash:
Directory of flash:/

    1  -rw-     3058048          <no date>  c2950-i6q4l2-mz.121-22.EA4.bin

64016384 bytes total (60958336 bytes free)

Switch#more flash:?
flash:c2950-i6q4l2-mz.121-22.EA4.bin