思科HSRP和Port-channel配置

如下图示: 

实验目标:建立核心交换机vlan 39,并且执行HSRP,两交换机用聚合接口连线。PC1能与PC2互通。

Coresw1:
vlan database
   vlan 39
   exit
config t
hostname coresw1
port-channel load-balance dst-mac
int vlan39 ip add 10.39.39.251 255.255.255.0 ip helper-address 10.39.39.39 //指定DHCP服务器 standby 39 ip 10.39.39.254 //VLAN39网关 standby 39 priority 150 //优先级越高越抢占为主网关 standby 39 preempt //抢占 exit int f1/0 //接PC1接口 switchport access vlan 39 duplex full speed 100 no sh exit interface Port-channel1 switchport mode trunk no sh exit int range f0/14 - 15 //两核心交换机连接聚合口 switchport mode trunk duplex full speed 100 channnel-group 1 mode on no sh exit

 

Coresw2:
vlan database
   vlan 39
   exit
config t
hostname coresw2
port-channel load-balance dst-mac
int vlan39 ip add 10.39.39.252 255.255.255.0 ip helper-address 10.39.39.39 //指定DHCP服务器 standby 39 ip 10.39.39.254 //VLAN39网关 standby 39 priority 130 //优先级越高越抢占为主网关 standby 39 preempt //抢占 exit int f1/0 //接PC2接口 switchport access vlan 39 duplex full speed 100 no sh exit interface Port-channel1 switchport mode trunk no sh exit int range f0/14 - 15 //两核心交换机连接聚合口 switchport mode trunk duplex full speed 100 channnel-group 1 mode on no sh exit

coresw1#show standby bri
coresw1#show standby brief 
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP     
Vl39        39  150  P Active   local           10.39.39.252    10.39.39.254

coresw2#show standby brief 
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP     
Vl39        39  130  P Standby  10.39.39.251    local           10.39.39.254 

Checking for duplicate address...
PC1 : 10.39.39.1 255.255.255.0 gateway 10.39.39.254
PC1> ping 10.39.39.2
84 bytes from 10.39.39.2 icmp_seq=1 ttl=64 time=0.235 ms
84 bytes from 10.39.39.2 icmp_seq=2 ttl=64 time=0.302 ms
84 bytes from 10.39.39.2 icmp_seq=3 ttl=64 time=0.330 ms
84 bytes from 10.39.39.2 icmp_seq=4 ttl=64 time=0.332 ms
84 bytes from 10.39.39.2 icmp_seq=5 ttl=64 time=0.328 ms

Checking for duplicate address...
PC2 : 10.39.39.2 255.255.255.0 gateway 10.39.39.254
PC2> ping 10.39.39.1
84 bytes from 10.39.39.1 icmp_seq=1 ttl=64 time=0.312 ms
84 bytes from 10.39.39.1 icmp_seq=2 ttl=64 time=0.406 ms
84 bytes from 10.39.39.1 icmp_seq=3 ttl=64 time=0.281 ms
84 bytes from 10.39.39.1 icmp_seq=4 ttl=64 time=0.318 ms
84 bytes from 10.39.39.1 icmp_seq=5 ttl=64 time=0.201 ms

转载于:https://www.cnblogs.com/vincent-liang/p/6417658.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值