交换机双工速率匹配
交换机若是双工出现问题,可能会出现很严重的丢包现象;若是速率不同,就直接无法正常通信。那么出现这种情况该怎么配置?
实验拓扑
使用两台交换机直连,每台下面再连接一台VPC
。地址规划如下:
名称 | IP地址 |
---|---|
PC1 | 192.168.10.10/24 |
PC2 | 192.168.10.20/24 |
配置方法
接口模式下配置
speed
以及duplex
。
SW1#configure terminal
SW1(config)#interface fastEthernet 1/0
SW1(config-if)#speed ?
10 Force 10 Mbps operation
100 Force 100 Mbps operation
auto Enable AUTO speed configuration
SW1(config-if)#duplex ?
auto Enable AUTO duplex configuration
full Force full duplex operation
half Force half-duplex operation
配置过程
SW1
SW1
关闭路由功能
SW1#configure terminal
SW1(config)#no ip routing
- 配置全双工,接口速率为100。
SW1(config)#interface fastEthernet 1/0
SW1(config-if)#speed 100
SW1(config-if)#duplex full
- 查询配置,
show interfaces fastEthernet 1/0
,第七行。
SW1(config-if)#end
SW1#show interfaces fastEthernet 1/0
FastEthernet1/0 is up, line protocol is up
Hardware is Fast Ethernet, address is c201.2c14.f100 (bia c201.2c14.f100)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:04, 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
0 packets input, 0 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 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
SW2
SW2
配置与SW1
相同,以下为简写配置过程。
SW2#conf t
SW2(config)#no ip routing
SW2(config)#int f1/0
SW2(config-if)#spe 100
SW2(config-if)#du f
SW2(config-if)#do show int f1/0
FastEthernet1/0 is up, line protocol is up
Hardware is Fast Ethernet, address is c202.5d60.f100 (bia c202.5d60.f100)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:01, 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
0 packets input, 0 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 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
PING 测试
配置 IP 地址
PC1> ip 192.168.10.10 255.255.255.0
Checking for duplicate address...
PC1 : 192.168.10.10 255.255.255.0
PC2> ip 192.168.10.20
Checking for duplicate address...
PC1 : 192.168.10.20 255.255.255.0
PING
PC1> ping 192.168.10.20
84 bytes from 192.168.10.20 icmp_seq=1 ttl=64 time=1.884 ms
84 bytes from 192.168.10.20 icmp_seq=2 ttl=64 time=1.838 ms
84 bytes from 192.168.10.20 icmp_seq=3 ttl=64 time=0.947 ms
84 bytes from 192.168.10.20 icmp_seq=4 ttl=64 time=1.835 ms
84 bytes from 192.168.10.20 icmp_seq=5 ttl=64 time=0.846 ms
PC2> ping 192.168.10.10
84 bytes from 192.168.10.10 icmp_seq=1 ttl=64 time=0.922 ms
84 bytes from 192.168.10.10 icmp_seq=2 ttl=64 time=0.954 ms
84 bytes from 192.168.10.10 icmp_seq=3 ttl=64 time=1.846 ms
84 bytes from 192.168.10.10 icmp_seq=4 ttl=64 time=1.846 ms
84 bytes from 192.168.10.10 icmp_seq=5 ttl=64 time=0.995 ms
最后
交换机之间双工速率匹配如上,下一篇关于静态路由实验。