VRRP的基本配置(以H3C模拟器为例)

VRRP的基本配置:

 VRRP的基本配置(以H3C模拟器为例)_第1张图片

S1:

sys

[H3C]sys S1

[S1]vlan 10

[S1-vlan10]port g1/0/1

[S1-vlan10]vlan 20

[S1-vlan20]port g1/0/2

[S1-vlan20]vlan 30

[S1-vlan30]port g1/0/3

[S1-vlan30]vlan 40

[S1-vlan40]port g1/0/4

[S1-vlan40]int range g1/0/5 to g1/0/6

[S1-if-range]port link-type trunk

[S1-if-range]port trunk permit vlan all

[S1-if-range]qu

S2:

[S2]vlan 10

[S2-vlan10]vlan 20

[S2-vlan20]vlan 30

[S2-vlan30]vlan 40

[S2-vlan40]int vlan 10

[S2-Vlan-interface10]ip ad 192.168.10.1 24

[S2-Vlan-interface10]vrrp vrid 10 virtual-ip 192.169.10.254

[S2-Vlan-interface10]vrrp vrid 10 priority 110

[S2-Vlan-interface10]vrrp vrid 10 preempt-mode delay 5

[S2-Vlan-interface10]int vlan 20

[S2-Vlan-interface20]ip ad 192.168.20.1 24

This subnet overlaps with another interface!

[S2-Vlan-interface20]vrrp vrid 10 virtual-ip 192.169.20.254

[S2-Vlan-interface20]vrrp vrid 10 priority 110

[S2-Vlan-interface20]vrrp vrid 10 preempt-mode delay 5

[S2-Vlan-interface20]int vlan 30

[S2-Vlan-interface30]ip ad 192.168.30.1 24

[S2-Vlan-interface30]vrrp vrid 10 virtual-ip 192.169.30.254

[S2-Vlan-interface30]vrrp vrid 10 priority 100

[S2-Vlan-interface30]vrrp vrid 10 preempt-mode delay 5

[S2-Vlan-interface30]int vlan 40

[S2-Vlan-interface40]ip ad 192.168.40.1 24

[S2-Vlan-interface40]vrrp vrid 10 virtual-ip 192.169.40.254

[S2-Vlan-interface40]vrrp vrid 10 priority 100

[S2-Vlan-interface40]vrrp vrid 10 preempt-mode delay 5

[S2-Vlan-interface40]qu

验证vrrp冗余网关是否配置成功

[S2]dis vrrp

IPv4 Virtual Router Information:

 Running mode      : Standard

 Total number of virtual routers : 4

 Interface          VRID  State        Running Adver   Auth     Virtual

                                       Pri     Timer   Type        IP

 ---------------------------------------------------------------------

 Vlan10             10    Initialize   110     100     None     192.169.10.254

 Vlan20             10    Initialize   110     100     None     192.169.20.254

 Vlan30             10    Initialize   100     100     None     192.169.30.254

 Vlan40             10    Initialize   100     100     None     192.169.40.254

S3:

sys

[H3C]sys S3

[S3]vlan 10

[S3-vlan10]vlan 20

[S3-vlan20]vlan 30

[S3-vlan30]vlan 40

[S3-vlan40]int vlan 10

[S3-Vlan-interface10]ip ad 192.168.10.2 24

[S3-Vlan-interface10]vrrp vrid 10 virtual-ip 192.169.10.254

[S3-Vlan-interface10]vrrp vrid 10 priority 100

[S3-Vlan-interface10]vrrp vrid 10 preempt-mode delay 5

[S3-Vlan-interface10]int vlan 20

[S3-Vlan-interface20]ip ad 192.168.20.2 24

[S3-Vlan-interface20]vrrp vrid 10 virtual-ip 192.169.20.254

[S3-Vlan-interface20]vrrp vrid 10 priority 100

[S3-Vlan-interface20]vrrp vrid 10 preempt-mode delay 5

[S3-Vlan-interface20]int vlan 30

[S3-Vlan-interface30]ip ad 192.168.30.2 24

[S3-Vlan-interface30]vrrp vrid 10 virtual-ip 192.169.30.254

[S3-Vlan-interface30]vrrp vrid 10 priority 110

[S3-Vlan-interface30]vrrp vrid 10 preempt-mode delay 5

[S3-Vlan-interface30]int vlan 40

[S3-Vlan-interface40]ip ad 192.168.40.2 24

[S3-Vlan-interface40]vrrp vrid 10 virtual-ip 192.169.40.254

[S3-Vlan-interface40]vrrp vrid 10 priority 110

[S3-Vlan-interface40]vrrp vrid 10 preempt-mode delay 5

[S3-Vlan-interface40]qu

[S3]dis vrrp

IPv4 Virtual Router Information:

 Running mode      : Standard

 Total number of virtual routers : 4

 Interface          VRID  State        Running Adver   Auth     Virtual

                                       Pri     Timer   Type        IP

 ---------------------------------------------------------------------

 Vlan10             10    Initialize   100     100     None     192.169.10.254

 Vlan20             10    Initialize   100     100     None     192.169.20.254

 Vlan30             10    Initialize   110     100     None     192.169.30.254

 Vlan40             10    Initialize   110     100     None     192.169.40.254

 

你可能感兴趣的:(网络通信)