交换机调试:查看IP冲突的设备MAC地址及所在端口

一、故障现象:无法访问外网
二、排查方法:自上向下

                   1.ping www.baidu.com 无法ping通百度

                   2.ping 223.5.5.5   无法ping通阿里云DNS

                   3.ping 192.168.1.1 ping本机网关  可以ping通,但存在丢包现象

                   观察水晶头线序、重作水晶头、更换网线,丢包现象依然存在。

 根据上述现象,考虑导致该类故障的原因为:1.网络环路,2.IP冲突

多年工作经验得出IP冲突的概率很大。接下来,通过交换机查找IP冲突的设备MAC地址及所在端口了。

三、具体操作:

      1.通过console线接到交换机上。
      2.打开CRT软件

          输入:arp ip-config-detect enable      开启IP冲突检测功能

        稍等一会儿.......

         输入 display arp ip-config track   查看当前冲突的两个MAC地址

      复制Old MAC地址 

       display arp | include f8e4-3b7d-5ed6    

这样我们就能通过查看ARP命令得到这个MAC地址接在交换机哪个接口。 

上述命令同理可查任意IP地址所在交换机端口位置及设备MAC地址,

解决IP地址冲突的完美方法--DHCP SNOOPING 使用的方法是采用DHCP方式为用户分配IP,然后限定这些用户只能使用动态IP的方式,如果改成静态IP的方式则不能连接上网络;也就是使用了DHCP SNOOPING功能。 例子: version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption service compress-config ! hostname C4-2_4506 ! enable password xxxxxxx! clock timezone GMT 8 ip subnet-zero no ip domain-lookup ! ip dhcp snooping vlan 180-181 // 对哪些VLAN 进行限制 ip dhcp snooping ip arp inspection vlan 180-181 ip arp inspection validate src-mac dst-mac ip errdisable recovery cause udld errdisable recovery cause bpduguard errdisable recovery cause security-violation errdisable recovery cause channel-misconfig errdisable recovery cause pagp-flap errdisable recovery cause dtp-flap errdisable recovery cause link-flap errdisable recovery cause l2ptguard errdisable recovery cause psecure-violation errdisable recovery cause gbic-invalid errdisable recovery cause dhcp-rate-limit errdisable recovery cause unicast-flood errdisable recovery cause vmps errdisable recovery cause arp-inspection errdisable recovery interval 30 spanning-tree extend system-id ! ! interface GigabitEthernet2/1 // 对该端口接入的用户进行限制,可以下联交换机 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/2 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/3 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/4 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 --More-- 编者注:对不需要明确地址的所有人的时候是一个很好的解决办法。另外,可以查看www.cisco.com的 IP Source Guard Similar to DHCP snooping, this feature is enabled on a DHCP snooping untrusted Layer 2 port. Initially, all IP traffic on the port is blocked except for DHCP packets that are captured by the DHCP snooping process. When a client receives a valid IP address from the DHCP server, or when a static IP source binding is configured by the user, a per-port and VLAN Access Control List (PACL) is installed on the port. This process restricts the client IP traffic to those source IP addresses configured in the binding; any IP traffic with a source IP address other than that in the IP source binding will be filtered out. This filtering limits a host's ability to attack the network by claiming neighbor host's IP address.
华三交换机的各项命令目  录 1 VLAN配置命令... 1-1 1.1 VLAN配置命令.. 1-1 1.1.1 description. 1-1 1.1.2 display interface vlan-interface. 1-2 1.1.3 display vlan. 1-3 1.1.4 interface vlan-interface. 1-5 1.1.5 ip address. 1-5 1.1.6 name. 1-6 1.1.7 reset counters interface vlan-interface. 1-7 1.1.8 shutdown. 1-7 1.1.9 vlan. 1-8 1.2 基于端口的VLAN配置命令.. 1-9 1.2.1 display port 1-9 1.2.2 port 1-10 1.2.3 port access vlan. 1-10 1.2.4 port hybrid pvid. 1-11 1.2.5 port hybrid vlan. 1-12 1.2.6 port link-type. 1-14 1.2.7 port trunk permit vlan. 1-15 1.2.8 port trunk pvid. 1-16 1.3 基于MAC的VLAN配置命令.. 1-17 1.3.1 display mac-vlan. 1-17 1.3.2 display mac-vlan interface. 1-18 1.3.3 mac-vlan enable. 1-19 1.3.4 mac-vlan mac-address. 1-19 1.3.5 mac-vlan trigger enable. 1-20 1.3.6 port pvid disable. 1-20 1.3.7 vlan precedence. 1-21 1.4 基于协议的VLAN配置命令.. 1-22 1.4.1 display protocol-vlan interface. 1-22 1.4.2 display protocol-vlan vlan. 1-22 1.4.3 port hybrid protocol-vlan. 1-23 1.4.4 protocol-vlan. 1-25 1.5 基于IP子网的VLAN配置命令.. 1-26 1.5.1 display ip-subnet-vlan interface. 1-26 1.5.2 display ip-subnet-vlan vlan. 1-27 1.5.3 ip-subnet-vlan. 1-28 1.5.4 port hybrid ip-subnet-vlan. 1-29 2 Isolate-user-VLAN配置命令... 2-1 2.1 Isolate-user-VLAN配置命令.. 2-1 2.1.1 display isolate-user-vlan. 2-1 2.1.2 isolate-user-vlan. 2-2 2.1.3 isolate-user-vlan enable. 2-3 2.1.4 isolated-vlan enable. 2-4 2.1.5 port isolate-user-vlan. 2-5 3 Voice VLAN配置命令... 3-1 3.1 Voice VLAN配置命令.. 3-1 3.1.1 display voice vlan oui 3-1 3.1.2 display voice vlan state. 3-2 3.1.3 voice vlan aging. 3-3 3.1.4 voice vlan enable. 3-3 3.1.5 voice vlan mac-address. 3-4 3.1.6 voice vlan mode auto. 3-5 3.1.7 voice vlan qos. 3-5 3.1.8 voice vlan qos trust 3-6 3.1.9 voice vlan security enable. 3-7
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值