当前位置:网站首页>华为设备配置BGP AS号替换
华为设备配置BGP AS号替换
2022-06-12 14:11:00 【Tony_long7483】

- P、PE之间配置OSPF,实现骨干网的IP连通性
[PE1-LoopBack1]ip add 1.1.1.1 32
[PE1-GigabitEthernet0/0/0]ip add 20.1.1.1 24
[PE1]ospf 1
[PE1-ospf-1]area 0
[PE1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0]network 20.1.1.0 0.0.0.255
[PE2-LoopBack1]ip add 3.3.3.3 32
[PE2-GigabitEthernet0/0/0]ip add 30.1.1.3 24
[PE2]ospf 1
[PE2-ospf-1]area 0
[PE2-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.255
[P-LoopBack1]ip add 2.2.2.2 32
[P-GigabitEthernet0/0/0]ip add 20.1.1.2 24
[P-GigabitEthernet0/0/1]ip add 30.1.1.2 24
[P]ospf 1
[P-ospf-1]area 0
[P-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0]network 20.1.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.255 - PE、P上配置MPLS基本能力和MPLS LDP,建立MPLS LSP公网隧道,传输VPN数据
[PE1]mpls lsr-id 1.1.1.1
[PE1]mpls
[PE1]mpls ldp
[PE1-GigabitEthernet0/0/0]mpls
[PE1-GigabitEthernet0/0/0]mpls ldp
[PE2]mpls lsr-id 3.3.3.3
[PE2]mpls
[PE2]mpls ldp
[PE2-GigabitEthernet0/0/0]mpls
[PE2-GigabitEthernet0/0/0]mpls ldp
[P]mpls lsr-id 2.2.2.2
[P]mpls
[P]mpls ldp
[P-GigabitEthernet0/0/0]mpls
[P-GigabitEthernet0/0/0]mpls ldp
[P-GigabitEthernet0/0/1]mpls
[P-GigabitEthernet0/0/1]mpls ldp - PE之间建立MP-IBGP对等体关系,发布VPNv4路由
[PE1]bgp 100
[PE1-bgp]peer 3.3.3.3 as-number 100
[PE1-bgp]peer 3.3.3.3 connect-interface LoopBack 1
[PE1-bgp]ipv4-family vpnv4
[PE1-bgp-af-vpnv4]peer 3.3.3.3 enable
[PE2]bgp 100
[PE2-bgp]peer 1.1.1.1 as-number 100
[PE2-bgp]peer 1.1.1.1 connect-interface LoopBack 1
[PE2-bgp]ipv4-family vpnv4
[PE2-bgp-af-vpnv4]peer 1.1.1.1 enable - PE1和PE2上配置VPN实例,VPN-target属性均为1:1,以实现VPN间互通。同时,与CE相连的接口和相应的VPN实例绑定,以接入VPN用户
[PE1]ip vpn-instance vpn1
[PE1-vpn-instance-vpn1]route-distinguisher 100:1
[PE1-vpn-instance-vpn1-af-ipv4]vpn-target 1:1
[PE1-GigabitEthernet0/0/1]ip binding vpn-instance vpn1
[PE1-GigabitEthernet0/0/1]ip add 10.1.1.1 24
[PE2]ip vpn-instance vpn1
[PE2-vpn-instance-vpn1]route-distinguisher 200:1
[PE2-vpn-instance-vpn1-af-ipv4]vpn-target 1:1
[PE2-GigabitEthernet0/0/1]ip binding vpn-instance vpn1
[PE2-GigabitEthernet0/0/1]ip add 10.2.1.3 24 - PE和CE之间建立EBGP关系,将CE路由引入到PE中
[CE1-GigabitEthernet0/0/0]ip add 10.1.1.4 24
[CE1-GigabitEthernet0/0/1]ip add 192.168.1.4 24
[CE1]bgp 600
[CE1-bgp]peer 10.1.1.1 as-number 100
[CE1-bgp]import-route direct
[CE2-GigabitEthernet0/0/0]ip add 10.2.1.5 24
[CE2-GigabitEthernet0/0/1]ip add 192.168.2.5 24
[CE2]bgp 600
[CE2-bgp]peer 10.2.1.3 as-number 100
[CE2-bgp]import-route direct
[PE1]bgp 100
[PE1-bgp]ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1]peer 10.1.1.4 as-number 600
[PE1-bgp-vpn1]import-route direct
[PE2]bgp 100
[PE2-bgp]ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1]peer 10.2.1.5 as-number 600
[PE2-bgp-vpn1]import-route direct

看到CE2能够学到CE1接入PE1的接口所在网段(10.1.1.0/24)的路由,但没有到达CE1内部VPN(192.168.1.0/24)的路由。CE1上也存在同样的现象
看到PE的VPN实例中有到达对端CE内部VPN的路由
看到CE2没有接收192.168.1.0/24的路由
6. PE上配置BGP的AS号替换功能,以便能够接收AS号相同的路由,完成VPN路由的交换
[PE2]bgp 100
[PE2-bgp]ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1]peer 10.2.1.5 substitute-as

看到PE2向CE2发布的路由中,192.168.1.0/24的AS路径信息为“100 100”
[PE1]bgp 100
[PE1-bgp]ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1]peer 10.1.1.4 substitute-as
7. 验证配置

边栏推荐
- Redis核心配置和高级数据类型
- Notepad common settings
- 使用make方法创建slice切片的坑
- Conversion of player's actual 10 pixel format and size
- Introduction to database system (Fifth Edition) notes Chapter 1 Introduction
- 对于跨境电商,更侧重收入的出价策略 —Google SEM
- QA of some high frequency problems in oauth2 learning
- Binary tree traversal
- Analysis of two-dimensional array passing as function parameter (C language)
- 单总线温度传感器18B20数据上云(阿里云)
猜你喜欢

Tcp/ip network communication knowledge record

如果要打造品牌知名度,可以选择什么出价策略?

Dynamic search advertising intelligent search for matching keywords

Lua callinfo structure, stkid structure resolution

SystemC common errors

Notepad common settings

Llvm pass-- virtual function protection

TestEngine with ID ‘junit-vintage‘ failed to discover tests

C語言中主函數調用另外一個函數,匯編代碼理解

Shell脚本到底是什么高大上的技术吗?
随机推荐
Shell notes
Codeforces Round #798 (Div. 2)(A~D)
2000. reverse word prefix
C语言中主函数调用另外一个函数,汇编代码理解
Player actual combat 13 create qtopengl project to promote window control and reload qoopenglwedge
Use of pytorch (to be supplemented)
If you want to build brand awareness, what bidding strategy can you choose?
拆改广告机---业余解压
En langage C, la fonction principale appelle une autre fonction et assemble le Code pour comprendre
Program analysis and Optimization - 6 loop optimization
Alibaba Cloud Development Board haas510 submission Device Properties
Compile and install lamp architecture of WordPress and discuz for multi virtual hosts based on fastcgi mode
Chapter IV expression
Three common methods of C language array initialization ({0}, memset, for loop assignment) and their principles
Create a slice slice pit using the make method
How to brush leetcode
单总线温度传感器18B20数据上云(阿里云)
Player actual combat 21 audio and video synchronization
Ppt cannot be opened, always prompt how to fix it
Write policy of cache