基於VLAN的HSRP配置練習

 

 

R6爲交換機,R4屬於vlan2,R5屬於vlan3,R4,R5模擬成PC。

R1的其配置如下:

 interface Loopback0

 ip address 1.1.1.1 255.255.255.0     

interface FastEthernet0/0

 ip address 12.1.1.1 255.255.255.0   

interface FastEthernet0/1

 ip address 13.1.1.1 255.255.255.0

router eigrp 1

 network 1.0.0.0

 network 12.0.0.0

 network 13.0.0.0

R2的配置如下:

interface FastEthernet0/0

 ip address 12.1.1.2 255.255.255.0      

interface FastEthernet0/1

 no ip address

interface FastEthernet0/1.2//配置子接口爲vlan 2

 encapsulation dot1Q 2

 ip address 192.168.1.1 255.255.255.0

 standby 1 ip 192.168.1.10//配置虛擬地址

 standby 1 priority 200

 standby 1 preempt//配置先佔權

 standby 1 track 1 decrement 120//如果接口f0/0down掉的話, 這個子接口的優先級就會前去120

interface FastEthernet0/1.3

 encapsulation dot1Q 3

 ip address 192.168.2.1 255.255.255.0

 standby 2 ip 192.168.2.10

 standby 2 preempt      

router eigrp 1

 network 12.0.0.0

 network 192.168.1.0

 network 192.168.2.0

 R3的配置如下:

interface FastEthernet0/0

 no ip address   

interface FastEthernet0/0.2

 encapsulation dot1Q 2

 ip address 192.168.1.2 255.255.255.0

 standby 1 ip 192.168.1.10

 standby 1 preempt      

interface FastEthernet0/0.3

 encapsulation dot1Q 3

 ip address 192.168.2.2 255.255.255.0

 standby 2 ip 192.168.2.10

 standby 2 priority 200

 standby 2 preempt

 standby 2 track 1 decrement 120       

interface FastEthernet0/1

 ip address 13.1.1.3 255.255.255.0       

router eigrp 1

 network 13.0.0.0

 network 192.168.1.0

 network 192.168.2.0

交換機R6的配置如下:

interface FastEthernet0/0

 switchport mode trunk

interface FastEthernet0/1

 switchport mode trunk     

interface FastEthernet0/2

 switchport access vlan 2        

interface FastEthernet0/3

 switchport access vlan 3

R5的配置如下:

ip add 192.168.1.3 255.255.255.0

no ip routing

ip default-gateway 192.168.1.10

R6的配置如下:

ip add 192.168.2.3 255.255.255.0

no ip routing

ip default-gateway 192.168.2.20

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章