当前位置:网站首页>Configuration experiment of building virtual private network based on MPLS
Configuration experiment of building virtual private network based on MPLS
2022-07-28 04:59:00 【Network siege lion summary】
Catalog
One 、MPLS The architecture of virtual private network
MPLS Virtual private network mainly consists of CE、PE and P,3 Part of it is made up of :
- CE: User network edge router device , Connect directly to the service provider network ;
- PE: Service provider edge router device , With users CE Direct connection , be responsible for VPN Service access , Handle VPN-IPv4 route ;
- P: Service provider core router equipment , Responsible for fast forwarding data , Not with CE Direct connection .
Throughout MPLS VPN in ,P、PE Equipment needs support MPLS Basic functions of ,CE The device does not have to support MPLS.
MPLS Virtual private network has data isolation 、 Optimize the allocation of network resources 、 Automatically and quickly repair network faults and other functions , It has high availability and high reliability , The cost of implementation is also low .
Two 、 experiment
The topology

Topology Introduction
- R1、R2、R3 Jointly simulate an operator network ,R1 and R3 yes PE,R2 yes P.
- Router CE1 and CE2 Simulate two enterprise branch sites , adopt R1 Access to virtual private network .
- CE3 Simulate the enterprise headquarters site , adopt R3 Access to virtual private network .
- This experiment aims at CE1、CE2、CE3 Respectively adopted OSPF、 Static routing 、BGP Three routing protocols access PE.
Configuration ideas

Experimental configuration
R1:
sys
interface GigabitEthernet0/0/2
ip address 12.1.1.1 255.255.255.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
// To configure ospf route
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 12.1.1.0 0.0.0.255
// Turn on mpls and ldp function
mpls lsr-id 1.1.1.1
mpls
mpls ldp
interface GigabitEthernet0/0/2
mpls
mpls ldp
// establish VPN example , Different instances are used to access different branches CE
ip vpn-instance VPN1
route-distinguisher 100:1
vpn-target 100:1 export-extcommunity
vpn-target 100:3 import-extcommunity
ip vpn-instance VPN2
route-distinguisher 100:2
vpn-target 100:2 export-extcommunity
vpn-target 100:3 import-extcommunity
// Bind the instance to the interface
interface GigabitEthernet0/0/0
ip binding vpn-instance VPN1
ip address 10.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip binding vpn-instance VPN2
ip address 20.1.1.2 255.255.255.0
// adopt ospf Access CE1 Routing information for
ospf 2 vpn-instance VPN1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
// Access through static route CE2 Routing information for
ip route-static vpn-instance VPN2 20.20.20.20 255.255.255.255 20.1.1.1
// And R3 establish BGP neighbor , obtain R3 Routing information for
bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
ipv4 vpnv4
peer 3.3.3.3 en
// In the instance VPN1 Zhongba ospf2 Route introduction of bgp100
bgp 100
ipv4 vpn-instance VPN1
import-route ospf 2
// In the instance VPN2 Direct connection and static routing are introduced into bgp100
ipv4 vpn-instance VPN2
import-route direct
import-route static
// stay ospf2 Introduction in bgp route
ospf 2
import bgp
R2:
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 23.1.1.2 255.255.255.0
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
mpls lsr-id 2.2.2.2
mpls
mpls ldp
interface GigabitEthernet0/0/0
mpls
mpls ldp
interface GigabitEthernet0/0/1
mpls
mpls ldp
R3:
interface GigabitEthernet0/0/0
ip address 23.1.1.3 255.255.255.0
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
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.0 0.0.0.255
mpls lsr-id 3.3.3.3
mpls
mpls ldp
interface GigabitEthernet0/0/0
mpls
mpls ldp
// Create examples VPN3
ip vpn-instance VPN3
route-distinguisher 100:3
vpn-target 100:3 export-extcommunity
vpn-target 100:1 100:2 import-extcommunity
interface GigabitEthernet0/0/1
ip binding vpn-instance VPN3
ip address 30.1.1.2 255.255.255.0
// adopt bgp Access Agreement CE3
bgp 100
ipv4 vpn-instance VPN3
peer 30.1.1.1 as-number 200
// And R1 establish bgp neighbor , Get R1 Routing information for
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
ipv4 vpnv4
peer 1.1.1.1 en
CE1:
interface GigabitEthernet0/0/0
ip address 10.1.1.1 255.255.255.0
interface LoopBack0
ip address 10.10.10.10 255.255.255.255
ospf 1 router-id 10.10.10.10
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.10.10.10 0.0.0.0
CE2:
interface GigabitEthernet0/0/0
ip address 20.1.1.1 255.255.255.0
interface LoopBack0
ip address 20.20.20.20 255.255.255.255
ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
CE3:
interface GigabitEthernet0/0/0
ip address 30.1.1.1 255.255.255.0
interface LoopBack0
ip address 30.30.30.30 255.255.255.255
bgp 200
peer 30.1.1.2 as-number 100
network 30.30.30.30 255.255.255.255
Experimental verification
see CE1 The routing table for , You can see that the route to... Already exists in the routing table CE3 Routing information for .

see CE2 The routing table for , because CE2 The static default route is configured , So leading to CE3 All traffic is routed by default .

use CE2 test ping Site CE3 Of IP, It can communicate normally .

Catch CE2 Of ping package , You can see that there are two layers in the packet MPLS label .

- see CE3 The routing table for , There is already a path to CE1 and CE2 The routing .

- CE3 test pingCE1.

边栏推荐
- What is the reason why the easycvr national standard protocol access equipment is online but the channel is not online?
- HDU 3592 World Exhibition (differential constraint)
- Driving the powerful functions of EVM and xcm, how subwallet enables Boca and moonbeam
- POJ 2763 housewife wind (tree chain partition + edge weighting point weight)
- Angr (XI) - official document (Part2)
- Strlen introduction, and the difference between sizeof
- Redis类型
- [daily question 1] 735. Planetary collision
- Array or object, date operation
- Interview fraud: there are companies that make money from interviews
猜你喜欢
![[daily one] visual studio2015 installation in ancient times](/img/b1/066ed0b9e93b8f378c89ee974163e5.png)
[daily one] visual studio2015 installation in ancient times

动态sql和分页
![[函数文档] torch.histc 与 paddle.histogram 与 numpy.histogram](/img/ee/ea918f79dc659369fde5394b333226.png)
[函数文档] torch.histc 与 paddle.histogram 与 numpy.histogram

Program life | how to switch to software testing? (software testing learning roadmap attached)

驾驭EVM和XCM的强大功能,SubWallet如何赋能波卡和Moonbeam

Analysis of the reason why easycvr service can't be started and tips for dealing with easy disk space filling

Do you know several assertion methods commonly used by JMeter?

王爽汇编语言详细学习笔记三:寄存器(内存访问)

Special topic of APP performance design and Optimization - poor implementation affecting performance

Visual studio 2019 new OpenGL project does not need to reconfigure the environment
随机推荐
Look at the experience of n-year software testing summarized by people who came over the test
Can plastics comply with gb/t 2408 - Determination of flammability
np. unravel_ Index() finds the index value of an element (or group of elements) of the array after being pulled into one dimension. The corresponding index value in the original dimension (or specify
Geely AI interview question [Hangzhou multi tester] [Hangzhou multi tester _ Wang Sir]
Installing MySQL under Linux
Anaconda common instructions
What is the reason why the easycvr national standard protocol access equipment is online but the channel is not online?
Easycvr Video Square snapshot adding device channel offline reason display
Use animatedbuilder to separate components and animation, and realize dynamic reuse
Service object creation and use
Inspire domestic students to learn robot programming education for children
[idea] check out master invalid path problem
HDU 3078 network (lca+ sort)
吉利AI面试题【杭州多测师】【杭州多测师_王sir】
(克隆虚拟机步骤)
Win10 machine learning environment construction pycharm, anaconda, pytorch
Introduction to testcafe
RT based_ Distributed wireless temperature monitoring system of thread (I)
[Oracle] 083 wrong question set
MySQL(5)