【交换机】设置交换机端口速率和传输模式(全/半双工)

在这里插入图片描述
实验目的

改变交换机端口的传输模式(全/半双工)和端口的传输速率。

实验开始

现在有一台PC连接在2960交换机的Fa0/1接口上,我们首先进入交换机的特权模式查看Fa0/1端口的状态信息。

Switch>en
Switch#show int f0/1

查看到的Fa0/1端口的状态信息如下

FastEthernet0/1 is up, line protocol is up (connected)
  Hardware is Lance, address is 00d0.d37c.e201 (bia 00d0.d37c.e201)
 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
  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

在第7行可以看到Full-duplex, 100Mb/s,这表明该接口的传输模式为全双工模式,端口的传输速率为100Mb/s。如果说我们现在需要将该端口的传输模式设置为半双工模式,将端口的传输速率设置为10Mb/s,可以这样设置。

Switch#configure terminal
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#duplex half          //设置为半双工
Switch(config-if)#speed 10            //设置传输速率为10Mb/s

设置好了之后回到特权模式下再查看一下Fa0/1端口的状态信息

Switch>en
Switch#show int f0/1

现在看到的端口状态信息如下

FastEthernet0/1 is up, line protocol is up (connected)
  Hardware is Lance, address is 00d0.d37c.e201 (bia 00d0.d37c.e201)
 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

可以看到现在端口的传输速率已经被设置为半双工,速率也被降低到10Mb/s了。实验目的完成。

刚刚开始接触网络互联,也是刚开始写博文,如果有写的不好的地方还请见谅。如果您发现了这篇博文中的错误,可以留言让我知道,互相学习,互相交流。


版权声明:本文为cheems404原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。