当前位置:网站首页>Layer 3 switching and VRRP
Layer 3 switching and VRRP
2022-07-28 07:07:00 【Peanut flavored peanuts】
Catalog
Two . Working principle of three-layer switching
Preface
Virtual routing redundancy protocol (Virtual Router Redundancy Protocol, abbreviation VRRP) By IETF A routing protocol is proposed to solve the single point of failure of static gateway in LAN ,1998 The official has been launched in RFC2338 Protocol standard .VRRP It is widely used in edge networks , It is designed to support specific situations IP Data traffic failure transfer will not cause confusion , Allow the host to use a single router , And maintaining the connectivity between routers even when the actual first hop router fails to use .
One . Three layer exchange
Three layer exchange : Layer 2 switching and layer 3 forwarding
Contains two information tables
Forwarding information table (FIB):FIB Similar to routing table , Contains the image of the forwarding information in the routing table . When the topology of the network changes , The routing table will be updated , and FIB Will also change .
Adjacency table : Every FIB entry , The adjacency relation table contains the corresponding number 2 Floor address .
Two . Working principle of three-layer switching

PC1 to pc2 Send unicast packets
Switch lookup FIB surface , Find the next hop address
Find the two-layer encapsulation information of the collar relationship corresponding to an address
Forward data
3、 ... and .vrrp The role of
Virtual router redundancy protocol (VRRP) It's a choice protocol , It can dynamically assign the responsibility of a virtual router to VRRP One of the routers . Control the virtual router IP Address of the VRRP A router is called a master router , It's responsible for forwarding packets to these virtual IP Address . Once the main router is not available , This selection process provides a dynamic fail over mechanism , This allows the virtual router to IP The address can be used as the default first hop router of the terminal host . Use VRRP The advantage is that it has higher availability of default path without configuring dynamic routing or route discovery protocol on each end host . VRRP The bag is enclosed in IP Send... In package .
Four .vrrp working process
1. VRRP The devices in the group elect Master.Master The device sends ARP message , Virtual MAC Address notification to the device or host to which it is connected .
2. Master Periodically, the device sends data to all Backup Device send VRRP Notification message .
3. If Master The device is out of order ,VRRP In the backup group Backup Equipment re elects new Master.
4. primary Master When the equipment fails to recover , If the equipment IP The address is larger than the preempted master, It will be decided to re elect master.
5、 ... and .vrrp To configure

SW1
undo t m
system-view
user-interface console 0
idle-timeout 0
q
vlan b 10 20
int e0/0/1
port link-type access
port default vlan 10
int e0/0/2
port link-type access
port default vlan 20
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
int g0/0/2
port link-type trunk
port trunk allow-pass vlan all
q
SW2
undo t m
system-view
user-interface console 0
idle-timeout 0
q
vlan b 10 20 30
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
q
int vlan 10
ip add 192.168.10.100 24
vrrp vrid 1 virtual-ip 192.168.10.1
vrrp vrid 1 preempt-mode timer delay 6
vrrp vrid 1 priority 105
vrrp vrid 1 track int g0/0/2
int vlan 20
ip add 192.168.20.100 24
vrrp vrid 2 virtual-ip 192.168.20.1
vrrp vrid 2 track int g0/0/2
int g0/0/2
port link-type access
port default vlan 30
int vlan 30
ip add 192.168.30.1 24
q
LSW3
undo t m
system-view
user-interface console 0
idle-timeout 0
q
vlan b 10 20 30
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
q
int vlan 10
ip add 192.168.10.110 24
vrrp vrid 1 virtual-ip 192.168.10.1
vrrp vrid 1 track int g0/0/2
int vlan 20
ip add 192.168.20.110 24
vrrp vrid 2 virtual-ip 192.168.20.1
vrrp vrid 2 preempt-mode timer delay 6
vrrp vrid 2 priority 105
vrrp vrid 2 track int g0/0/2
int g0/0/2
port link-type access
port default vlan 30
int vlan 30
ip add 192.168.40.1 24
q
R1
undo t m
system-view
user-interface console 0
idle-timeout 0
q
int g0/0/0
ip add 192.168.30.2 24
int g0/0/1
ip add 192.168.40.2 24
int lo0
ip add 30.0.0.1 24
q
ip route-static 192.168.10.0 24 192.168.30.1
ip route-static 192.168.10.0 24 192.168.40.1 preference 70
ip route-static 192.168.20.0 24 192.168.30.1
ip route-static 192.168.20.0 24 192.168.40.1 preference 70

Cut off the sw2, Check whether it is preempted by the backup route



summary
Three layer routing , One time routing , Forward many times
vrrp Realize one active and multiple standby , To solve a single point of failure
By identifying priorities and ip, The big ones will be called master
边栏推荐
- 360 compatibility issues
- [learning notes] coding ability
- Group management and permission management
- [learning notes] process creation
- 远程访问云服务器上Neo4j等服务的本地网址
- MOOC Weng Kai C language week 6: arrays and functions: 1. Arrays 2. Definition and use of functions 3. Parameters and variables of functions 4. Two dimensional arrays
- shell脚本——“三剑客”之awk命令
- Applets: WSX scripts
- shell---循环语句练习
- Forward and backward slash notes
猜你喜欢

Common models in software development

shell脚本——sort、uniq、tr、数组排序、cut、eval命令配置

Repair the faulty sector

JSON notes

Method of designing test cases

metasploit渗透ms7_010练习

Use powercli to create a custom esxi ISO image
![[learning records of erudite Valley] Super summary, attentive sharing | collection](/img/a3/4183a074a7cdc41fe7624624492280.png)
[learning records of erudite Valley] Super summary, attentive sharing | collection

DOM -- page rendering, style attribute operation, preloading and lazy loading, anti shake and throttling

MOOC Weng Kai C language fourth week: further judgment and circulation: 1. Logical types and operations 2. Judgment of cascading and nesting
随机推荐
多进程(多核运算)Multiprocessing
MOOC Weng Kai C language week 5: 1. cycle control 2. multiple cycles 3. cycle application
About gcc:multiple definition of
Applets: WSX scripts
shell脚本——“三剑客”之awk命令
Event_ Loop event loop mechanism
关于正则的教程
shell脚本——正则表达式
Result fill in the blank (dfs*c language)
Upload and download files from Ubuntu server
Bond mode configuration
Wechat applet custom compilation mode
Shell script - sort, uniq, TR, array sort, cut, Eval command configuration
New, let, VaR, const and temporary deadband. The difference between XML and JSON
Software testing (concept)
Neo4j running error occurred during initialization of VM incompatible minimum and maximum heap sizes spec
shell---sed语句练习
DOM operation cases
Asynchronous programming promise
MOOC翁恺 C语言 第三周:判断与循环:2.循环