当前位置:网站首页>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 !
边栏推荐
- Lambda expression learning
- Word cover underline
- English Vocabulary - life scene memory method
- 动态规划(树形dp)
- Luogu deep foundation part 1 Introduction to language Chapter 2 sequential structure programming
- Project manager, can you draw prototypes? Does the project manager need to do product design?
- How to realize automatic playback of H5 video
- Delete subsequence < daily question >
- Tengine kernel parameters
- E. Best Pair
猜你喜欢

Lombok principle and the pit of ⽤ @data and @builder at the same time

Redis - redis in action - redis actual combat - actual combat Chapter 1 - SMS login function based on redis - redis + token shared session application - with code

Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022

The most detailed and comprehensive update content and all functions of guitar pro 8.0

电脑钉钉怎么调整声音

Fedora/REHL 安装 semanage

Solutions: word coverage restoration, longest serial number, Xiaoyu buys stationery, Xiaoyu's electricity bill

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

ISP学习(2)

Is the mode of education together - on campus + off campus reliable
随机推荐
P3500 [poi2010]tes intelligence test (two points & offline)
Guitar Pro 8.0最详细全面的更新内容及全部功能介绍
canal同步mysql数据变化到kafka(centos部署)
Can Flink SQL read multiple topics at the same time. How to write in with
Fedora/REHL 安装 semanage
Etcd database source code analysis -- etcdserver bootstrap initialization storage
cdc 能全量拉去oracle 表嘛
项目经理,你会画原型嘛?项目经理需要做产品设计了?
CADD course learning (8) -- virtual screening of Compound Library
Basic explanation of turtle module - draw curve
MIT CMS. 300 session 8 – immersion / immersion
Yyds dry goods inventory OSI & tcp/ip
Introduction of several RS485 isolated communication schemes
Easyrecovery reliable and toll free data recovery computer software
11. Intranet penetration and automatic refresh
When debugging after pycharm remote server is connected, trying to add breakpoint to file that does not exist: /data appears_ sda/d:/segmentation
Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps
Unity screen coordinates ugui coordinates world coordinates conversion between three coordinate systems
Dry goods collection | Vulkan game engine video tutorial
Redis - redis in action - redis actual combat - actual combat Chapter 1 - SMS login function based on redis - redis + token shared session application - with code