当前位置:网站首页>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 !
边栏推荐
- P2102 floor tile laying (DFS & greed)
- Sqlserver query results are not displayed in tabular form. How to modify them
- Redis 排查大 key 的4种方法,优化必备
- Easyrecovery靠谱不收费的数据恢复电脑软件
- Mysql database storage engine
- Selection sort
- ue5 小知识 FreezeRendering 查看视锥内渲染的物体
- English Vocabulary - life scene memory method
- 【HBZ分享】云数据库如何定位慢查询
- Certbot failed to update certificate solution
猜你喜欢
JVM garbage collector concept
Implementation of knowledge consolidation source code 1: epoll implementation of TCP server
How to realize automatic playback of H5 video
程序员在互联网行业的地位 | 每日趣闻
Lombok principle and the pit of ⽤ @data and @builder at the same time
Introduction of several RS485 isolated communication schemes
DMA use of stm32
Deep learning framework installation (tensorflow & pytorch & paddlepaddle)
Easyrecovery reliable and toll free data recovery computer software
canal同步mysql数据变化到kafka(centos部署)
随机推荐
hashlimit速率控制
How does computer nail adjust sound
VPP性能测试
项目经理,你会画原型嘛?项目经理需要做产品设计了?
Fedora/REHL 安装 semanage
Unity screen coordinates ugui coordinates world coordinates conversion between three coordinate systems
Redis 排查大 key 的4種方法,優化必備
After learning classes and objects, I wrote a date class
优秀PM必须经历这3层蜕变!
coreldraw2022新版本新功能介绍cdr2022
Is the mode of education together - on campus + off campus reliable
Supreme Court, judgment standard of divorce cases
RTP GB28181 文件测试工具
MySQL reported an error datetime (0) null
VNCTF2022 WriteUp
【HBZ分享】ArrayList的增删慢查询快的原因
[try to hack] John hash cracking tool
When debugging after pycharm remote server is connected, trying to add breakpoint to file that does not exist: /data appears_ sda/d:/segmentation
二叉树基本知识和例题
2328. 网格图中递增路径的数目(记忆化搜索)