当前位置:网站首页>Use VRRP technology to realize gateway equipment redundancy, with detailed configuration experiments
Use VRRP technology to realize gateway equipment redundancy, with detailed configuration experiments
2022-07-26 03:20:00 【Network siege lion summary】
List of articles
Preface
In the enterprise network, layer-3 switches or routers are generally used as gateway devices , The gateway device is connected with an exit router or firewall to access the external network , If the gateway device in the enterprise fails , As a result, the terminal equipment of the intranet cannot access the public network . To avoid this happening ,VRRP( Virtual router redundancy protocol ) Technology can realize redundant backup of gateway equipment , Even if one gateway device goes down , The other can also forward traffic , Ensure that the intranet terminal can access the Internet normally .
One 、VRRP The principle of Technology
Because a network card can only be configured with one gateway address , So the two gateway devices jointly create one ip Address , When one of the devices goes down , Another device can also continue to maintain this virtual ip, Realize the redundant backup effect of gateway equipment .
Two 、VRRP Experiment and configuration
1、 The topology

2、 Introduction to experimental topology
- PC1 It is the terminal equipment of the intranet .LSW3 It's the access switch .
- LSW1 and LSW2 It's a gateway device , Used to realize gateway redundancy .LSW1 Of GE0/0/1 Oral ip The address is 192.168.1.252/24,LSW2 Of GE0/0/1 Oral IP The address is 192.168.1.253/24, They use VRRP Technology jointly virtualizes a gateway address 192.168.1.254/24.
- Above the gateway device is an exit router .
- Router AR3 Simulate operator network , The loopback port simulates an address in the public network .
3、 Experimental configuration
VRRP Configuration command
| command | remarks |
|---|---|
| vrrp vrid 10 virtual-ip 192.168.1.254 | Configure under this port VRRP, And set the virtual address to 192.168.1.254 |
| vrrp vrid 10 priority 200 | Set the primary routing priority of this port to 200, The default priority is 100 |
| vrrp vrid 10 track interface g0/0/2 reduced 150 | When an uplink port failure is detected , Automatically reduce priority 150, Make the standby port the primary port |
| display vrrp | Show vrrp Configuration result |
Device configuration
LSW3:
vlan 10
int e0/0/2
port link-type trunk
port trunk allow-pass vlan 10 // Allow labeling VLAN10 The data frame passes through
int e0/0/3
port link-type trunk
port trunk allow-pass vlan 10 // Allow labeling VLAN10 The data frame passes through
int e0/0/1
port link-type access
port de v 10
LSW1:
vlan 10
int vlanif 10 // establish vlanif Interface
ip add 192.168.1.252 24
int g0/0/1
port link-type trunk
port trunk allow-pass v 10
int vlanif 10
vrrp vrid 10 virtual-ip 192.168.1.254 // Configure under this port VRRP, And set the virtual address to 192.168.1.254
vrrp vrid 10 priority 200 // Set the primary routing priority of this port to 200, The default priority is 100
// When an uplink port failure is detected , Automatically reduce priority 150, Make the standby port the primary port
vrrp vrid 10 track interface g0/0/2 reduced 150
vlan 20
int vlanif 20
ip add 172.16.2.2 24
int g0/0/2
port link-type access
p d v 20
// Configure dynamic routing protocol in the intranet OSPF, Ensure intranet communication
ospf 1 router-id 2.2.2.2
area 0
network 172.16.2.0 0.0.0.255
network 192.168.1.0 0.0.0.255
ip route-s 0.0.0.0 0 172.16.2.1 // Configure the default route with static route
LSW2:
vlan 10
int vlanif 10
ip add 192.168.1.253 24
int g0/0/1
port link-type trunk
port trunk allow-pass v 10
int vlanif 10
vrrp vrid 10 virtual-ip 192.168.1.254 // Configure under this port VRRP, And set the virtual address to 192.168.1.254
vlan 20
int vlanif 20
ip add 172.16.1.2 24
int g0/0/2
port link-type access
p d v 20
// Configure dynamic routing protocol in the intranet OSPF, Ensure intranet communication
ospf 1 router-id 1.1.1.1
area 0
network 172.16.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
ip route-s 0.0.0.0 0 172.16.1.1 // Configure the default route with static route
Exit router :
int g0/0/0
ip add 172.16.2.1 24
int g0/0/1
ip add 172.16.1.1 24
int g0/0/2
ip add 100.1.1.2 24
// To configure easy ip, Convert the packet source address of the intranet accessing the public network into the public network address of the interface
acl number 2000
rule 5 permit
int g0/0/2
nat outbound 2000
ip route-s 0.0.0.0 0 100.1.1.1
// Configure dynamic routing protocol in the intranet OSPF, Ensure intranet communication , Two gateway devices ,OSPF It can also play the role of equipment redundancy
ospf 1 router-id 3.3.3.3
area 0
network 172.16.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
Operator router :
int g0/0/0
ip add 100.1.1.1 24
int loo0
ip add 3.3.3.3 32
3、 ... and 、 experimental result
- Use command
display vrrpYou can see vrrp The state of the interface , You can see that in the picture LSW1 yes Master Main equipment , fictitious ip yes 192.168.1.254, Priority is 200.

- LSW2 The state of is Backup Spare equipment , fictitious ip yes 192.168.1.254, Priority is the default 100.

- Use PC1ping The address of the public network , Discovery is through .

- When the main link is disconnected, simulate the main equipment downtime , After a period of time, the backup device will automatically forward traffic .


summary
Use VRRP Redundancy of gateway equipment , Avoid a single point of failure , Suitable for deployment in the enterprise network . Of course, it's not just gateways , Any important node ip Both devices can be used for redundancy , So as to increase the stability of the system .
边栏推荐
- QT笔记——临时的悬浮窗口
- URDF 语法详解
- 班级里有一群学生考试结果出来了,考了语文和数学两门,请筛选出总分是第一的同学
- Understand preloading and lazy loading, and learn slow animation
- 实现一个方法,找出数组中的第k大和第m大的数字相加之和
- LoRa无线网关如何快速实现端到云的传输
- TCP experimental verification
- els 消息循环
- 2022-07-21 第四小组 修身课 学习笔记(every day)
- Etcdv3 actual combat (III) -prevkv description and related operations
猜你喜欢

线性回归原理推导

How to install with USB flash disk?

LeetCode·每日一题·919.完全二叉树插入器·层次遍历·BFS

Completion report of communication software development and Application

ES6 set and map

Digital commerce cloud DMS dealer management system solution: DMS system realizes business Omni channel and sales data collection

STM——EXTI外部中断学习笔记

Installation and operation of orb-slam2 under ROS
![[noip2001 popularization group] packing problem](/img/b7/1310b3e68d0ee016465fc069315af6.png)
[noip2001 popularization group] packing problem

实现一个方法,找出数组中的第k大和第m大的数字相加之和
随机推荐
称霸薪酬榜!什么行业大有“钱”途?
Swin Transformer【Backbone】
2022-07-21 第四小组 修身课 学习笔记(every day)
Leetcode · 83 biweekly match · 6128. best poker hand · simulation
UE4 how to render statically? 5 steps to generate static rendering
经典面试问题——OOP语言的三大特征
QT notes - temporary floating window
Canvas - ECG design and how to clean the canvas
CMD CPM command summary
Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
Pit trodden when copying list: shallow copy and deep copy
Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
Cloud native guide what is cloud native infrastructure
What is the difference between heap memory and stack memory?
Opencv saves pictures in the specified format
Use eventlog analyzer for log forensics analysis
How to install with USB flash disk?
Functions and usage of snownlp Library
How to reinstall win7 system?
[noip2001 popularization group] packing problem