当前位置:网站首页>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 !
边栏推荐
猜你喜欢

Deep learning framework installation (tensorflow & pytorch & paddlepaddle)

Introduction to hashtable

canal同步mysql数据变化到kafka(centos部署)

电脑钉钉怎么调整声音

Mysql database storage engine

Unity screen coordinates ugui coordinates world coordinates conversion between three coordinate systems

ISP学习(2)

When debugging after pycharm remote server is connected, trying to add breakpoint to file that does not exist: /data appears_ sda/d:/segmentation

Distributed transaction solution

Embedded development program framework
随机推荐
拉格朗日插值法
Recommendation | recommendation of 9 psychotherapy books
Redis —— Redis In Action —— Redis 实战—— 实战篇一 —— 基于 Redis 的短信登录功能 —— Redis + Token 的共享 session 应用— 有代码
coreldraw2022新版本新功能介绍cdr2022
VNCTF2022 WriteUp
canal同步mysql数据变化到kafka(centos部署)
English Vocabulary - life scene memory method
我想问一下 按照现在mysql-cdc的设计,全量阶段,如果某一个chunk的binlog回填阶段,
What should the project manager do if there is something wrong with team collaboration?
How does vs change the project type?
newton interpolation
C. The Third Problem(找规律)
【Try to Hack】john哈希破解工具
CADD course learning (7) -- Simulation of target and small molecule interaction (flexible docking autodock)
[Yu Yue education] reference materials of complex variable function and integral transformation of Northwestern Polytechnic University
捷码赋能案例:专业培训、技术支撑,多措并举推动毕业生搭建智慧校园毕设系统
CertBot 更新证书失败解决
Fuzzy -- basic application method of AFL
Excellent PM must experience these three levels of transformation!
Knowledge consolidation source code implementation 3: buffer ringbuffer