当前位置:网站首页>MPLS knowledge points
MPLS knowledge points
2022-07-26 01:49:00 【I want to go to the calm oolong tea in the cabin】
multi-protocol-lable-switching( Multi protocol label switching technology )
Packet exchange —— Data consists of packets , after , It is continuously transmitted in each network node , Finally, we reach our goal .
The reason why packet switching forwarding efficiency is not high :
1. In the whole process of packet exchange , You need to query the routing table before viewing ARP Cache two tables to complete the forwarding process , Leading to low efficiency ;
2. Matching principle of routing table —— The longest matching principle causes the query efficiency of the routing table not to be too high
3. There is a recursive lookup process in the routing table
4.IP The head is a variable length head , Lead us to IP When the head is read, it needs to be processed by software , Unable to find fast based on hardware .
Label switching
Label switching is between two-layer and three-layer packaging , Add a label that has a mapping relationship with the routing entry , Then maintain a table that records the correspondence and forwarding interface , Bring tagged data to the device , Look at the label first , Then forward based on the maintained tag forwarding table , Instead of viewing the three-tier content . Because the label itself is short and fixed length , therefore , Its forwarding efficiency will be higher than that of packet switching .
But label exchange needs to label the packet first , Then you need to pop up the tag before reaching the target , therefore , Label switching improves the efficiency in the forwarding process , On the whole, compared with packet switching, the improvement is not obvious .
Changes in packet exchange
1. Process exchange (process switching)—— The earliest packet switching —— Every packet needs to check the routing table first , I'll see later ARP Cache the table to determine the content of the two-layer package .
2. Fast packet switching (fast switching)—— Stream based packet switching —— One time routing , Exchange many times
When a stream of data comes to the device , We only perform the routing process for the first packet , Route the results and packet characteristics ( Quintuples ) Record to cache . after , When other data in the data stream comes to the device, it will directly compare with the five tuples in the cache , identical , Then it will be forwarded directly according to the forwarding method without the routing process .
3. Cisco's express switching technology ——Cisco Express Forwarding —— abbreviation CEF technology . It is mainly to combine the routing table and ARP Pre read the contents of the cache table ( Is to recursively perform the recursive operation , Should check ARP Check the cache table in advance ), Then record the results in CEF In the table , and CEF The table supports hardware forwarding , therefore , It can greatly improve the forwarding efficiency of routing .
although CEF Technology is Cisco's proprietary technology , However, major manufacturers have also designed their own express exchange technology based on their ideas . Huawei devices are based on FIB( Forwarding information table ), This table supports hardware forwarding .
Although label switching cannot replace packet switching as the mainstream forwarding technology , however , Still exist and develop together with packet switching ,MPLS It is the product of the joint development of packet exchange and label exchange , Mainly because in some fields , Label exchange can be done better :
1. For resolution BGP The routing black hole of
2.MPLS VPN
3.MPLS TE( Flow engineering )—— Control the path of traffic forwarding .
A forwarding network consisting of all routers running label switching , We can see it as a MPLS The Internet , We call it MPLS Domain . We run these MPLS Your device is called LSR( Label switching router )
Based on the premise of label exchange : First of all, there must be a label , The label is for each LSR It is generated based on the routing entries in the local routing table . We will all have the same characteristics ( All packets matching the same routing entry ) The packet is called FEC—— Equivalent forwarding class . The same FEC You need to configure the same label .
Each station LSR Put your label and FEC The mapping information of is recorded in a local table , This table is called LIB( Label information table ).
after , Will and FIB Combine tables , Generate LFIB surface ( Label forwarding information table )
In the whole process ,LSR In addition to assigning labels to devices themselves , There are other things you need to know LSR The device is for the same FEC Assigned tags , therefore , Label switching and packet switching are also divided into two levels —— Control level 、 Data level
Packet exchange
Control level —— The data flow direction of the routing protocol , The purpose is to obtain the routing information of unknown network segments , Generate routing table .
Data level —— The device is based on the improved routing table (FIB) To forward specific data information , Its direction is exactly opposite to the flow of the control layer .
Label switching
Control level —— be based on FEC Assign tags , And get other LSR To the same FEC Assign tags , after , Record generation LIB surface , Then combine FIB Generate LFIB surface .—— This process can be done statically , It can also be done dynamically ——( repair )!!!!!!!!!!!!!!!
Data level —— The device is based on LFIB surface , Forward according to the tag .
Inbound LSR——MPLS The boundary of the domain , When a packet without a tag comes in LSR On , They need to push labels into packets .
transit LSR—— Complete the label replacement action LSR equipment .
Departure LSR—— It's also MPLS The boundary of the domain , Complete the pop-up action of the label .
The whole process , The flow path of data layer traffic is R1-R2-R3-R4, This path is called LSP( Label switching path ). It should be noted that ,LSP Is one-way , If you want data to go back and forth in two directions , You also need to build a R4-R3-R2-R1 The path of
Label——20 position —— 0-2 Of 20 Power —— We call the value range of tag number as tag space , Each station LSR The label space of the device is independent .
among :
0 - 15 —— Special tag value —— When we allocate, we cannot directly allocate , Because every special label has its special meaning
16 - 1023 —— Generally used for static LSP build
1024 - 2 Of 20 Power —— be applied to LDP And other dynamic label exchange protocols
EXP—— Occupy 3 position —— Do strategic use , It's usually 000, It can be understood as priority , High priority allows limited forwarding .
S—— Occupy 1 position —— At the bottom of the stack —— There is more than one label , You can play more than one , We call an ordered set of multiple tags Tag stack .
If there are multiple tags , You need to use this flag bit to identify . If it is the last tag , Then the position 1, If not , Then put 0.
TTL—— Time to live —— And the third floor TTL Have the same value , The main purpose is to prevent data packets from circulating wirelessly in the loop . The data comes to the inbound LSR when , Will put the third floor TTL Copy values into labels , stay MPLS After each forwarding in the domain ,TTL reduce 1, after , At exit LSR Pop up the label , Then put the label TTL The value is copied into the three-tier header .
Build static LSP:
1. Ensure routing conditions —— Static only requires the border device to have round-trip routing information
2. To configure LSR
Inbound LSR
1. to LSR To configure LSR-ID (32 Bit binary structure , This is the IP Address format to write , however , It can only be configured manually )
[r1]mpls lsr-id 1.1.1.1 #LSR-ID It is recommended to use the loopback interface IP Address
2. Activate MPLS
1. Global activation MPLS
[r1]mpls
2. Interface activation MPLS ( All need to participate MPLS All data receiving and sending interfaces need to be activated )
[r1-GigabitEthernet0/0/0]mp
3. Build static LSP
[r1]static-lsp ingress 1to4 destination 4.4.4.0 24 nexthop 12.0.0.2 out-label 1000
1. Next jump —— It must be the same as the next hop in the routing table
2.out-label ( Outbound label ) —— After the next hop device accepts it, it needs to judge which network segment the data reaches according to this tag .
Configure transit LSR:
[r2]static-lsp transit 1to4 incoming-interface GigabitEthernet 0/0/0 in-label 1000 nexthop 23.0.0.2 out-label 1001
1in-label — Inbound tag — The inbound tag must be the same as the battle tag configured in the previous hop
Configuration battle LSR:
[r4]static-lsp egress 1to4 incoming-interface GigabitEthernet 0/0/0 in-label 1002
[r1]display mpls static-lsp — View static LSP
Configure outbound LSR:
[r4]static-lsp egress 1to4 incoming-interface GigabitEthernet 0/0/0 in-label 1002
[r1]display mpls static-lsp # View static LSP
边栏推荐
- “蔚来杯“2022牛客暑期多校训练营2 H.[Take the Elevator] 维护线段
- leetcode/只出现一次的数字
- Ideal Path(UVA - 1599)
- ABC find 4-cycle (pigeon nest theorem)
- Overview of database stress testing methods
- When everything can be metauniverse, the development of metauniverse seems to have entered a new stage of development
- 快速创建题目文件夹
- Is it safe to open an account for stock speculation through the online account manager?
- Shell exercises
- Summary after reading "poor dad and rich dad"
猜你喜欢

There is no setter method in grpc list under flutter. How to use related attributes

What is a test case? How to design?

推荐⼀款超好⽤的UI⾃动化⼯具: UiAutomator2!

Fiddler5+ lightning simulator 4.0 settings for app packet capturing

网络之IP地址

Network layer 2 and layer 3 forwarding

The sales volume has won the championship repeatedly. Is the secret of Wuling's success only low price?

The detailed knowledge summary of MySQL can be collected

The SQL script generated by powerdispatcher model runs incorrectly

Go operation excel library excel use
随机推荐
How to do Taobao live broadcast and how to do the anchor to drain and sell products
Travel (split points and layers)
IDEA如何快速删除最近打开的项目
4QAM、16QAM 调制与解调仿真电路,观察并分析QAM星座图和误码率曲线【matlab代码】
How idea can quickly delete recently opened projects
D. Permutation restoration (greedy + double pointer)
"Weilai Cup" 2022 Niuke summer multi school training camp 2 k.[link with bracket sequence i] bracket sequence DP
Dataframe modifies the value of a row or column position
AutoCAD -- Method of calculating area
大佬们, flinksql datahub源表,源表有字段 timestamp 16位, 写入Ora
AUTOCAD——计算面积的方法
[unity] random generation of two-dimensional cave map
FFT用于估计插值后的图像重采样因子
SVN version control branch and merge function use
flink sql 如何配置打印insert实参日志呢
Protect syslog servers and devices
餐饮连锁门店重塑增长背后的数字化转型
How uxdb works on multiple processors
Recommend a super good UI automation tool: uiautomator2!
What is a test case? How to design?