当前位置:网站首页>MPLS experiment
MPLS experiment
2022-07-06 04:40:00 【AlexFFeng】
MPLS First test
Public address configuration :
R2:
GigabitEthernet0/0/1 23.1.1.1/24
LoopBack0 2.2.2.2/24
R3:
GigabitEthernet0/0/0 23.1.1.2/24
GigabitEthernet0/0/1 34.1.1.1/24
LoopBack0 3.3.3.3/24
R4:
GigabitEthernet0/0/0 34.1.1.2/24
GigabitEthernet0/0/2 47.1.1.1/24
LoopBack0 4.4.4.4/24
R7:
GigabitEthernet0/0/0 47.1.1.2/24
LoopBack0 192.168.4.2/24
Public network operation IGP agreement :
R2:
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 23.1.1.1 0.0.0.0
R3:
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 23.1.1.2 0.0.0.0
network 34.1.1.1 0.0.0.0
R4:
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 34.1.1.2 0.0.0.0
R7:
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 47.1.1.2 0.0.0.0
To configure MPLS – LDP:
R2:
[r2]mpls lsr-id 2.2.2.2 Must be defined first mpls Of router-id, For the real of the local device ip Address , And neighbors can reach , because
This address will be used to establish TCP conversation , A loopback address is recommended
[r2]mpls And open mpls agreement
[r2-mpls]mpls ldp Reactivate LDP agreement
[r2-mpls-ldp]q
After that, you need to open the protocol on the interface through which all tags pass
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]mpls First open MPLS
[r2-GigabitEthernet0/0/1]mpls ldp Reactivate LDP agreement
When the boot configuration is complete , Use between neighbors UDP Message multicast sending and receiving hello package ; Then based on hello In bag router-id address TCP The establishment of conversation ;
Empathy R3 Left and right interfaces and R4 All interfaces on the left need to be configured
R3:
mpls lsr-id 3.3.3.3
mpls
mpls ldp
int g0/0/0
mpls ldp
int g0/0/1
mpls ldp
R4:
mpls lsr-id 4.4.4.4
mpls
mpls ldp
int g0/0/0
mpls ldp
Now go to private network , But remember not to match first R2 Of g0/0/0 mouth , Because once configured , Shows the direct route , And it is in the routing table of the public network
R2 The current routing table is the public network routing table
To configure MPLS V:
R2:
ip vpn-instance a1
ipv4-family
route-distinguisher 1:1
vpn-target 1:1
Now enter R2 g0/0/0 Interface binds the interface to this space
[r2-vpn-instance-a1-af-ipv4]int g0/0/0
[r2-GigabitEthernet0/0/0]ip binding vpn-instance a1
[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24 Then add IP
Empathy R4:
ip vpn-instance a2
ipv4-family
route-distinguisher 1:1
vpn-target 1:1
int g0/0/1
ip binding vpn-instance a2
ip add 192.168.3.1 24
After configuration, I found that the interface type double UP Of , But there is no in the routing table
In a separate table
We use it R1pingR2 You can pass , however R2 but ping no R1 Why? ? because R1 To R2 After the flow comes, it goes directly to a1 Spatial , from a1 Space responds to you , But you take R2pingR1 when , It will look in its normal routing table , Obviously not, so it's impossible
When we use space to find, we can find
PE And PE To establish MP-BPG Neighborhood
Then we go to BGP To do it
R4BGP:
bgp 1
router-id 4.4.4.4
peer 2.2.2.2 as-number 1
peer 2.2.2.2 connect-interface LoopBack 0
ipv4-family vpnv4
peer 2.2.2.2 enable
R2BGP:
bgp 1
router-id 2.2.2.2
peer 4.4.4.4 as-number 1
peer 4.4.4.4 connect-interface LoopBack 0
ipv4-family vpnv4
peer 4.4.4.4 enable
This is called. BGPv4+ edition
CE End and PE End to end interactive routing
A1A2 Company static
R1 To 3.0 4.0 Static routing
[r1]ip route-static 192.168.3.0 24 192.168.2.2
[r1]ip route-static 192.168.4.0 24 192.168.2.2
R2 To 1.0 Segment routing :
Add
[r2]ip route-static vpn-instance a1 192.168.1.0 24 192.168.2.1
R2 Do republishing to space a1
[r2]bgp 1
[r2-bgp]ipv4-family vpn-instance a1
[r2-bgp-a1]import-route direct
[r2-bgp-a1]import-route static
see R4 Of BGP Spatial routing table : Learned
Empathy
R5 To 1.0 2.0 Static routing
ip route-static 192.168.1.0 24 192.168.3.1
ip route-static 192.168.2.0 24 192.168.3.1
R4 To 5.0 Segment routing :
Add
[r4]ip route-static vpn-instance a2 192.168.4.0 24 192.168.3.2
R4 Do republishing to space a2
[r4]bgp 1
[r4-bgp]ipv4-family vpn-instance a2
[r4-bgp-a2]import-route direct
[r4-bgp-a2]import-route static
see R2 Of BGP Spatial routing table : Learned
B1B2 Company news
Because it was turned on before MPLS, Activated LDP, So just configure MPLSVPN that will do
MPLS VPN Configuration of :
R2:
ip vpn-instance b1
ipv4-family
route-distinguisher 2:2
vpn-target 2:2
int g0/0/2
ip binding vpn-instance b1
ip add 192.168.2.2 24
R4:
ip vpn-instance b2
ipv4-family
route-distinguisher 2:2
vpn-target 2:2
int g4/0/0
ip binding vpn-instance b2
ip add 192.168.3.1 24
R6R7 Declare
R6 As a customer, just declare
R6 RIP:
rip 100
version 2
network 192.168.1.0
network 192.168.2.0
But not in R2 Upper opening rip Declare directly , Because this action is trying to announce on the public network , So go into space :
rip 100 vpn-instance b1
ver 2
network 192.168.2.0
R7 OSPF:
ospf 100 router-id 7.7.7.7
area 0.0.0.0
network 192.168.3.2 0.0.0.0
network 192.168.4.2 0.0.0.0
R4:
ospf 100 vpn-instance b2
area 0.0.0.0
network 192.168.3.1 0.0.0.0
see R4 Of b2 Spatial table ,R7 The loop back learned
Two way republication
Now you only need to do two-way republishing between two
R2:
rip Import bgp route
[r2]rip 100 vpn-instance b1
[r2-rip-100]import-route bgp
bgp Import rip route
[r2]bgp 1
[r2-bgp]ipv4-family vpn-instance b1
[r2-bgp-b1]import-route rip 100
R4:
ospf Import bgp route
[r4]ospf 100
[r4-ospf-100]import-route bgp
bgp Import ospf route
[r4]bgp 1
[r4-bgp]ipv4-family vpn-instance b2
[r4-bgp-b2]import-route ospf 100
R6 adopt RIP Learned these two routes
R7 adopt OSPF Learned these two routes
R6 Go to ping R7
R7ping through 234 The loopback of .
The experiment is finished !
边栏推荐
- Unity screen coordinates ugui coordinates world coordinates conversion between three coordinate systems
- Knowledge consolidation source code implementation 3: buffer ringbuffer
- VNCTF2022 WriteUp
- Yyds dry goods inventory OSI & tcp/ip
- NPM command -- install dependent packages -- Usage / explanation
- [detailed steps of FreeRTOS shift value for the first time]
- DMA use of stm32
- Bubble sort
- 力扣(LeetCode)186. 翻转字符串里的单词 II(2022.07.05)
- It is also a small summary in learning
猜你喜欢
解决“C2001:常量中有换行符“编译问题
Lombok principle and the pit of ⽤ @data and @builder at the same time
Selection of slow motion function
Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps
CADD course learning (8) -- virtual screening of Compound Library
Case of Jiecode empowerment: professional training, technical support, and multiple measures to promote graduates to build smart campus completion system
canal同步mysql数据变化到kafka(centos部署)
Guitar Pro 8.0最详细全面的更新内容及全部功能介绍
8. Static file
[Chongqing Guangdong education] engineering fluid mechanics reference materials of southwestjiaotonguniversity
随机推荐
[detailed steps of FreeRTOS shift value for the first time]
P2102 地砖铺设(dfs&贪心)
捷码赋能案例:专业培训、技术支撑,多措并举推动毕业生搭建智慧校园毕设系统
How do programmers teach their bosses to do things in one sentence? "I'm off duty first. You have to work harder."
Scala function advanced
Dry goods collection | Vulkan game engine video tutorial
【HBZ分享】ArrayList的增删慢查询快的原因
CADD课程学习(7)-- 模拟靶点和小分子相互作用 (柔性对接 AutoDock)
Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps
[network] channel attention network and spatial attention network
npm命令--安装依赖包--用法/详解
NPM command -- install dependent packages -- Usage / explanation
. Net interprocess communication
P2022 有趣的数(二分&数位dp)
MySQL reported an error datetime (0) null
RTP GB28181 文件测试工具
Easyrecovery reliable and toll free data recovery computer software
Solve the compilation problem of "c2001: line breaks in constants"
flink sql 能同时读多个topic吗。with里怎么写
The value of two date types is subtracted and converted to seconds