Switch Control: Difference between revisions

From JCWiki
Jump to navigation Jump to search
Line 96: Line 96:


For all ports:
For all ports:
<pre>switch-p1#show interfaces
<pre>
switch-p1> en
switch-p1#show interfaces
VLAN1 is up, line protocol is down
VLAN1 is up, line protocol is down
   Hardware is CPU Interface, address is 0050.d1d8.94c0 (bia 0050.d1d8.94c0)
   Hardware is CPU Interface, address is 0050.d1d8.94c0 (bia 0050.d1d8.94c0)

Revision as of 16:49, 10 January 2013

Finding which IPs are on a port

Controlling port speed

Shutting down a port

Quick commands:

enable
configure terminal
interface fastEthernet 0/17
shutdown
exit
exit

Turn back on:

enable
configure terminal
interface fastEthernet 0/17
no shutdown
exit
exit

Sample output:

switch-p1>enable
switch-p1#show interfaces fastEthernet 0/17
FastEthernet0/17 is down, line protocol is down
  Hardware is Fast Ethernet, address is 0050.d1d8.94d1 (bia 0050.d1d8.94d1)
  MTU 1500 bytes, BW 0 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Duplex setting unknown, Unknown Speed, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1 packets input, 64 bytes, 0 no buffer
     Received 0 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 input packets with dribble condition detected
     1 packets output, 64 bytes, 0 underruns
     0 output errors, 0 collisions, 1 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-p1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch-p1(config)#interface fastEthernet 0/17
switch-p1(config-if)#shutdown
%LINK-5-CHANGED: Interface FastEthernet0/17, changed state to administratively down
switch-p1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface FastEthernet0/17, changed state to up
%LINK-3-UPDOWN: Interface FastEthernet0/17, changed state to down
switch-p1(config-if)#exit
switch-p1(config)#exit
switch-p1#

Show port stats

For one port:

switch-p1> en
switch-p1#show int FastEthernet0/7
FastEthernet0/7 is up, line protocol is up
  Hardware is Fast Ethernet, address is 0050.d1d8.94c7 (bia 0050.d1d8.94c7)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 00:00:02, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 9000 bits/sec, 20 packets/sec
     137101258 packets input, 2869037621 bytes, 0 no buffer
     Received 326 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 26 ignored, 0 abort
     0 watchdog, 0 multicast
     0 input packets with dribble condition detected
     330219386 packets output, 3304714878 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out

For all ports:

switch-p1> en
switch-p1#show interfaces
VLAN1 is up, line protocol is down
  Hardware is CPU Interface, address is 0050.d1d8.94c0 (bia 0050.d1d8.94c0)
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:10, output 00:00:10, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     137465 packets input, 10297233 bytes, 0 no buffer
     Received 89751 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 302 ignored, 0 abort
     0 input packets with dribble condition detected
     52396 packets output, 6878747 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
VLAN3 is up, line protocol is up
  Hardware is CPU Interface, address is 0050.d1d8.94c0 (bia 0050.d1d8.94c0)
  Internet address is 10.1.4.5/24
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
  Encapsulation ARPA
  ARP type: ARPA, ARP Timeout 04:00:00
FastEthernet0/1 is up, line protocol is up
  Hardware is Fast Ethernet, address is 0050.d1d8.94c1 (bia 0050.d1d8.94c1)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 3/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:37, output 00:00:53, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 4593000 bits/sec, 762 packets/sec
  5 minute output rate 1240000 bits/sec, 689 packets/sec
     260548696 packets input, 2531757155 bytes, 0 no buffer
     Received 22173 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 333 ignored, 0 abort
     0 watchdog, 2942 multicast
     0 input packets with dribble condition detected
     241281983 packets output, 3622221090 bytes, 0 underruns
     0 output errors, 0 collisions, 15 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
FastEthernet0/2 is up, line protocol is up
  Hardware is Fast Ethernet, address is 0050.d1d8.94c2 (bia 0050.d1d8.94c2)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive not set
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 00:00:54, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 146000 bits/sec, 108 packets/sec
  5 minute output rate 98000 bits/sec, 114 packets/sec
     22830604 packets input, 905395220 bytes, 0 no buffer
     Received 9845 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 10 ignored, 0 abort
     0 watchdog, 3 multicast
     0 input packets with dribble condition detected
     23910838 packets output, 3702256298 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
 --More--