当前位置:网站首页>华为设备配置OSPF伪连接
华为设备配置OSPF伪连接
2022-06-12 14:11:00 【Tony_long7483】

- 在CE1、AR6、CE2上配置普通OSPF,发布各接口的网段地址
[CE1-GigabitEthernet0/0/0]ip add 10.1.1.4 24
[CE1-GigabitEthernet0/0/1]ip add 40.1.1.4 24
[CE1]ospf 1
[CE1-ospf-1]area 0
[CE1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.255
[AR6-GigabitEthernet0/0/1]ip add 40.1.1.6 24
[AR6-GigabitEthernet0/0/2]ip add 50.1.1.6 24
[AR6]ospf 1
[AR6-ospf-1]area 0
[AR6-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.255
[AR6-ospf-1-area-0.0.0.0]network 50.1.1.0 0.0.0.255
[CE2-GigabitEthernet0/0/0]ip add 10.2.1.5 24
[CE2-GigabitEthernet0/0/1]ip add 50.1.1.5 24
[CE2]ospf 1
[CE2-ospf-1]area 0
[CE2-ospf-1-area-0.0.0.0]network 10.2.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0]network 50.1.1.0 0.0.0.255 - 在PE、P上配置骨干网的基本BGP/MPLS IP VPN,包括:配置骨干网的IGP;配置骨干网的MPLS和LDP;在PE之间建立MP-IBGP对等体关系
[PE1-LoopBack1]ip add 1.1.1.1 32
[PE1-LoopBack10]ip add 5.5.5.5 32
[PE1-GigabitEthernet0/0/0]ip add 20.1.1.1 24
[PE1]mpls lsr-id 1.1.1.1
[PE1]mpls
[PE1]mpls ldp
[PE1-GigabitEthernet0/0/0]mpls
[PE1-GigabitEthernet0/0/0]mpls ldp
[PE1]ospf 1 router-id 1.1.1.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
[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
[P-LoopBack1]ip add 2.2.2.2 32
[P]mpls lsr-id 2.2.2.2
[P]mpls
[P]mpls ldp
[P-GigabitEthernet0/0/0]ip add 20.1.1.2 24
[P-GigabitEthernet0/0/0]mpls
[P-GigabitEthernet0/0/0]mpls ldp
[P-GigabitEthernet0/0/1]ip add 30.1.1.2 24
[P-GigabitEthernet0/0/1]mpls
[P-GigabitEthernet0/0/1]mpls ldp
[P]ospf 1 router-id 2.2.2.2
[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 30.1.1.0 0.0.0.255
[P-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-LoopBack10]ip add 6.6.6.6 32
[PE2]mpls lsr-id 3.3.3.3
[PE2]mpls
[PE2]mpls ldp
[PE2-GigabitEthernet0/0/0]ip add 30.1.1.3 24
[PE2-GigabitEthernet0/0/0]mpls
[PE2-GigabitEthernet0/0/0]mpls ldp
[PE2]ospf 1 router-id 3.3.3.3
[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
[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 - 配置PE与CE的连接:PE与CE间运行OSPF
[PE1]ip vpn-instance vpn1
[PE1-vpn-instance-vpn1]ipv4-family
[PE1-vpn-instance-vpn1-af-ipv4]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
[PE1]ospf 100 router-id 5.5.5.5 vpn-instance vpn1
[PE1-ospf-100]domain-id 10
[PE1-ospf-100]import-route bgp
[PE1-ospf-100]area 0
[PE1-ospf-100-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[PE1]bgp 100
[PE1-bgp]ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1]import-route direct
[PE1-bgp-vpn1]import-route ospf 100
[PE2]ip vpn-instance vpn1
[PE2-vpn-instance-vpn1]ipv4-family
[PE2-vpn-instance-vpn1-af-ipv4]route-distinguisher 100:2
[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
[PE2]ospf 100 router-id 6.6.6.6 vpn-instance vpn1
[PE2-ospf-100]import-route direct
[PE2-ospf-100]import-route bgp
[PE2-ospf-100]domain-id 10
[PE2-ospf-100]area 0
[PE2-ospf-100-area-0.0.0.0]network 10.2.1.0 0.0.0.255
[PE2]bgp 100
[PE2-bgp]ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1]import-route direct
[PE2-bgp-vpn1]import-route ospf 100
看到去往对端CE的路由是通过用户网络的OSPF路由,不是通过骨干网的BGP路由
4. 配置伪连接
[CE1-GigabitEthernet0/0/1]ospf cost 10
[CE2-GigabitEthernet0/0/1]ospf cost 10
[PE1]int LoopBack 10
[PE1-LoopBack10]ip binding vpn-instance vpn1
[PE1-LoopBack10]ip add 5.5.5.5 32
[PE1]ospf 100
[PE1-ospf-100]area 0
[PE1-ospf-100-area-0.0.0.0]sham-link 5.5.5.5 6.6.6.6 cost 1
[PE2]int LoopBack 10
[PE2-LoopBack10]ip binding vpn-instance vpn1
[PE2-LoopBack10]ip add 6.6.6.6 32
[PE2]ospf 100
[PE2-ospf-100]area 0
[PE2-ospf-100-area-0.0.0.0]sham-link 6.6.6.6 5.5.5.5 cost 1
5. 检查配置
看到去往对端CE的路由变成了通过骨干网的BGP路由,并且有去往sham-link目的地址的路由
看到去往对端CE的OSPF路由开销变为3,下一跳为接入PE的g0/0/1接口,即,去往对端的VPN流量将通过骨干网转发

可以看到对端CE的路由是作为区域内(Intra Area)路由学到的
边栏推荐
- Greed issues - Egypt scores
- How to realize the bidding strategy that pays more attention to transformation in the company's operation Google sem
- Player actual combat 23 decoding thread
- Program analysis and Optimization - 6 loop optimization
- 拆改广告机---业余解压
- Player actual combat 22 to solve the problems of flower screen and Caton
- SystemC learning materials
- Leetcode 2185. 统计包含给定前缀的字符串
- Redis核心配置和高级数据类型
- CUDA error: CUBLAS_ STATUS_ NOT_ INITIALIZED when calling `cublasCreate(handle)`
猜你喜欢

Why do Chinese programmers change jobs?

Lua callinfo structure, stkid structure resolution

注重点击,追求更多用户进入网站,可以选择什么出价策略?

程序分析与优化 - 6 循环优化

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

How to use Android studio to create an Alibaba cloud Internet of things app

2022版Redis数据删除策略

After reading the question, you will point to offer 16 Integer power of numeric value

什么是自动出价?它的优势是什么?

Analysis of two-dimensional array passing as function parameter (C language)
随机推荐
Tool notes - common custom tool classes (regular, random, etc.)
Alibaba cloud development board haas510 submission device attributes
Design of PLC intelligent slave station based on PROFIBUS DP protocol
Knowledge of wireless card driver
Visual studio common shortcuts
atomic and exclusive operation
Use of pytorch (to be supplemented)
阿里云开发板HaaS510连接物联网平台--HaaS征文
Des File Encryptor based on MFC framework
高考回憶錄
Alibaba Cloud Development Board haas510 submission Device Properties
3. Hidden processes under the ring
Socket model of punctual atom stm32f429 core board
Alicloud development board vscode development environment setup
English learning plan
Now you must know the pointer
Player practice 20 unpacking thread
SystemC:SC_ Thread and SC_ METHOD
PostgreSQL14安装使用教程
How test engineers transform test and open