1. 程式人生 > >HSRP熱備份路由相關

HSRP熱備份路由相關

hsrp

HSRP熱備份路由


如圖 做不同vlan的熱備份路由

PC1 vlan1 ; PC2 vlan2

SW1:

enable

configure terminal

hostname SW1

no ip domain lookup

vlan 2

vlan 3

exit

interface fastethernet 0/1

switchport mode access

switchport access vlan 2

interface fastethernet 0/2

switchport mode access

switchport access vlan 3

interface fastethernet 0/3

switchport mode trunk

interface fastethernet 0/4

switchport mode trunk

exit


spanning-tree vlan 1 root primary

spanning-tree vlan 2 root primary

spanning-tree vlan 3 root primary #指定冗余線路


以下省略了一些常規操作

SW2:

ip routing

interface vlan 2

ip address 192.168.1.2 255.255.255.0

standby 1 ip 192.168.1.100

standby 1 preempt

standby 1 priority 200 #默認100 越大優先級高 成為vlan 2主路由設備

interface vlan 3

ip address 192.168.2.2 255.255.255.0

standby 2 ip 192.168.2.100

standby 2 preempt

interface fastethernet 0/1

switchport trunk encapsulation dot1q

switchport mode trunk


SW3:

ip routing

interface vlan 2

ip address 192.168.1.3 255.255.255.0

standby 1 ip 192.168.1.100

standby 1 preempt

interface vlan 3

ip address 192.168.2.3 255.255.255.0

standby 2 ip 192.168.2.100

standby 2 preempt

standby 2 priority 200 #默認100 越大優先級高 成為vlan 3主路由設備

interface fastethernet 0/2

switchport trunk encapsulation dot1q

switchport mode trunk


擴展測試

SW2:

interface vlan 10

ip address 192.168.10.1 255.255.255.0

exit

ip route 192.168.100.0 255.255.255.0 192.168.100.2


R1

interface gig0/0

ip address 192.168.10.2 255.255.255.0

exit

interface loopback 0

ip address 192.168.100.1 255.255.255.0

exit

ip route 192.168.0.0 255.255.0.0 192.168.10.1


ping 測試


本文出自 “13393189” 博客,謝絕轉載!

HSRP熱備份路由相關