mstp和vrrp配置实例
时间: 2023-10-04 18:12:22 浏览: 128
MSTP配置实例:
1. 配置MSTP实例:
[SW1] stp mode mstp
[SW1] stp region-name MSTP
[SW1] stp instance 1 vlan 10 20 30
[SW1] stp instance 2 vlan 40 50 60
2. 配置MSTP根桥:
[SW1] stp root primary
3. 配置MSTP端口:
[SW1] interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1] stp instance 1 priority 128
[SW1-GigabitEthernet0/0/1] stp instance 2 priority 64
VRRP配置实例:
1. 配置VRRP实例:
[SW1] interface Vlanif 10
[SW1-Vlanif10] vrrp vrid 1 virtual-ip 10.1.1.1
[SW1-Vlanif10] vrrp vrid 1 priority 100
[SW1-Vlanif10] vrrp vrid 1 preempt-mode
2. 配置VRRP备份路由器:
[SW2] interface Vlanif 10
[SW2-Vlanif10] vrrp vrid 1 virtual-ip 10.1.1.1
[SW2-Vlanif10] vrrp vrid 1 priority 90
OSPF配置实例:
1. 配置OSPF进程:
[SW1] ospf 1 router-id 1.1.1.1
2. 配置OSPF区域:
[SW1] interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1] ospf 1 area 0.0.0.1
3. 配置OSPF邻居:
[SW1] interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1] ospf 1 neighbor 2.2.2.2
4. 配置OSPF路由:
[SW1] ip route-static 10.1.1.0 255.255.255.0 192.168.1.2
[SW1] ospf 1
[SW1-ospf-1] import-route static
以上是三种协议的简单配置实例,具体配置需要根据实际情况进行调整。
阅读全文