keepalive是一种判断链路是否能够正常通信的探测机制,当接口启动这个探测机制时,设备从每个接口周期性(默认间隔10秒)地向外发送探测包(称作keepalive packet,尺寸很小),如果对端接口没有收到这些keepalive探测包或者虽然收到了但是数据包已被损坏,则一直将数据链路层的状态显示为“down”;如果对端能够正确地收到这些探测包,就认为线路通信正常。这时将数据链路层的状态显示为“up”。
如果关闭Keepalive探测机制(keepalive not set),接口实际上失去了判断数据链路层状态的依据,它既不发送也不接收keepalive信息,只要接口的物理层工作正常(例如Seria0/1 is up),数据链路层状态信息就显示为“line protocol is up”。因为没有经过实际的keepalive探测过程,这时的“up”状态信息并不表示数据链路层就一定工作正常。
-----------------config for 1st N5K--------------------------------
vlan 900
name VLAN-KeepAlive
exit
!
interface Vlan900
ip address 192.168.250.5/30
no shutdown
!
vpc domain 10
peer-keepalive destination 192.168.250.6 source 192.168.250.5 vrf default
exit
!
interface Ethernet1/33
description To-5020-RDC-132-Eth1/33-KeepAlive
switchport mode trunk
switchport trunk allowed vlan 900
no shut
exit
!
------------------config for 2nd N5K--------------------------------
vlan 900
name VLAN-KeepAlive
exit
!
interface Vlan900
ip address 192.168.250.6/30
no shutdown
!
vpc domain 10
peer-keepalive destination 192.168.250.5 source 192.168.250.6 vrf default
exit
!
interface Ethernet1/33
description To-5020-RDC-131-Eth1/33-KeepAlive
switchport mode trunk
switchport trunk allowed vlan 900
no shut
exit
!
|