基于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

 

 

 

 

你可能感兴趣的:(职场,VLAN,休闲,HSRP)