본문 바로가기

네트워크

[switch] IP 입력하기

반응형

 



 

< IP, Subnet 설정>

;Swich  interface는 하나이므로 vlan 1 IP를 입력한다.

Switch#show vlan

VLAN Name                             Status    Ports

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

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12

                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16

                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20

                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24

                                                Gig1/1, Gig1/2

1002 fddi-default                     active   

1003 token-ring-default               active   

1004 fddinet-default                  active   

1005 trnet-default                    active  

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

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

1    enet  100001     1500  -      -      -        -    -        0      0

1002 enet  101002     1500  -      -      -        -    -        0      0

1003 enet  101003     1500  -      -      -        -    -        0      0

1004 enet  101004     1500  -      -      -        -    -        0      0

1005 enet  101005     1500  -      -      -        -    -        0      0

Switch>

Switch>enable  

Switch#conf t 

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

Switch(config)#interface vlan 1

Switch(config-if)#ip address 190.190.180.100 255.255.255.0

Switch(config-if)#exit

Switch(config)#exit

%SYS-5-CONFIG_I: Configured from console by console

Switch#show interfaces vlan 1

Vlan1 is administratively down, line protocol is down

  Hardware is CPU Interface, address is 0090.2195.9942 (bia 0090.2195.9942)

  Internet address is 190.190.180.100/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#

 

<Default gateway 설정>

;게이트웨이는 일반 구성모드에서 설정한다.

Switch#

Switch#conf t

Switch(config)#ip default-gateway 190.190.180.1

Switch(config)#exit

 

<Speed & Duplex 설정>

;간혹 스위치 양쪽 모두(포트 속도와 Dulpex)  Auto로 되는 경우 서로 상대방 모드에 맞추려고 기다리다가 접속시 에러가 발생할 수도 있다.

Switch#

Switch#conf t

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#speed ?

  10    Force 10 Mbps operation

  100   Force 100 Mbps operation

  auto  Enable AUTO speed configuration

Switch(config-if)#speed 10

Switch(config-if)#duplex ?

  auto  Enable AUTO duplex configuration

  full  Force full duplex operation

  half  Force half-duplex operation

Switch(config-if)#duplex half

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Switch(config-if)#duplex half

Switch(config-if)#exit

Switch#show interfaces fastEthernet 0/1

FastEthernet0/1 is up, line protocol is up (connected)

  Hardware is Lance, address is 0060.5cc9.cd01 (bia 0060.5cc9.cd01)

  MTU 1500 bytes, BW 10000 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

  ARP type: ARPA, ARP Timeout 04:00:00

  Last input 00:00:08, output 00:00:05, 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

     956 packets input, 193351 bytes, 0 no buffer

     Received 956 broadcasts, 0 runts, 0 giants, 0 throttles

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort

     0 watchdog, 0 multicast, 0 pause input

     0 input packets with dribble condition detected

     2357 packets output, 263570 bytes, 0 underruns

     0 output errors, 0 collisions, 10 interface resets

     0 babbles, 0 late collision, 0 deferred

     0 lost carrier, 0 no carrier

     0 output buffer failures, 0 output buffers swapped out

Switch#

 

 

 

 

728x90
반응형