华为NE40E路由器实验配置示例 | 配置非标签公网BGP路由迭代SR-MPLS BE隧道
Posted COCOgsta
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为NE40E路由器实验配置示例 | 配置非标签公网BGP路由迭代SR-MPLS BE隧道相关的知识,希望对你有一定的参考价值。
组网需求
当用户通过运营商网络访问互联网时,如果报文采用IP转发的话,则从用户到互联网路径上的运营商核心设备都需要学习到大量的互联网路由,这给运营商的核心设备带来了很大的负担,影响核心设备的性能。为了解决这个问题,可以在用户的接入设备上配置非标签公网BGP路由或者非标签公网静态路由迭代SR隧道功能,让用户通过隧道转发访问互联网,这样就能解决运营商的核心设备性能不足,压力过大或者不希望核心路由器承载业务等问题。
下面以图1为例,介绍配置非标签公网BGP路由迭代SR-MPLS BE隧道。
图1 非标签公网BGP路由迭代SR-MPLS BE隧道组网图
配置思路
-
骨干网上配置IS-IS实现PE之间的互通。
-
骨干网上使能MPLS,配置Segment Routing,建立SR LSP。
-
PE之间配置IBGP交换路由信息。
-
PE上使能非标签公网BGP路由迭代SR-MPLS BE隧道。
操作步骤
1. 配置接口的IP地址
# 配置PE1。
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] interface loopback 1
[*PE1-LoopBack1] ip address 1.1.1.9 32
[*PE1-LoopBack1] quit
[*PE1] interface gigabitethernet1/0/0
[*PE1-GigabitEthernet1/0/0] ip address 172.16.1.1 24
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] commit
# 配置P。
<HUAWEI> system-view
[~HUAWEI] sysname P
[*HUAWEI] commit
[~P] interface loopback 1
[*P-LoopBack1] ip address 2.2.2.9 32
[*P-LoopBack1] quit
[*P] interface gigabitethernet1/0/0
[*P-GigabitEthernet1/0/0] ip address 172.16.1.2 24
[*P-GigabitEthernet1/0/0] quit
[*P] interface gigabitethernet2/0/0
[*P-GigabitEthernet2/0/0] ip address 172.17.1.2 24
[*P-GigabitEthernet2/0/0] quit
[*P] commit
# 配置PE2。
<HUAWEI> system-view
[~HUAWEI] sysname PE2
[*HUAWEI] commit
[~PE2] interface loopback 1
[*PE2-LoopBack1] ip address 3.3.3.9 32
[*PE2-LoopBack1] quit
[*PE2] interface gigabitethernet1/0/0
[*PE2-GigabitEthernet1/0/0] ip address 172.17.1.1 24
[*PE2-GigabitEthernet1/0/0] quit
[*PE2] commit
2. 在骨干网上配置IGP协议,实现骨干网PE之间的互通。本例中以IS-IS为例进行说明
# 配置PE1。
[~PE1] isis 1
[*PE1-isis-1] is-level level-1
[*PE1-isis-1] network-entity 10.0000.0000.0001.00
[*PE1-isis-1] quit
[*PE1] interface loopback 1
[*PE1-LoopBack1] isis enable 1
[*PE1-LoopBack1] quit
[*PE1] interface gigabitethernet1/0/0
[*PE1-GigabitEthernet1/0/0] isis enable 1
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] commit
# 配置P。
[~P] isis 1
[*P-isis-1] is-level level-1
[*P-isis-1] network-entity 10.0000.0000.0002.00
[*P-isis-1] quit
[*P] interface loopback 1
[*P-LoopBack1] isis enable 1
[*P-LoopBack1] quit
[*P] interface gigabitethernet1/0/0
[*P-GigabitEthernet1/0/0] isis enable 1
[*P-GigabitEthernet1/0/0] quit
[*P] interface gigabitethernet2/0/0
[*P-GigabitEthernet2/0/0] isis enable 1
[*P-GigabitEthernet2/0/0] quit
[*P] commit
# 配置PE2。
[~PE2] isis 1
[*PE2-isis-1] is-level level-1
[*PE2-isis-1] network-entity 10.0000.0000.0003.00
[*PE2-isis-1] quit
[*PE2] interface loopback 1
[*PE2-LoopBack1] isis enable 1
[*PE2-LoopBack1] quit
[*PE2] interface gigabitethernet1/0/0
[*PE2-GigabitEthernet1/0/0] isis enable 1
[*PE2-GigabitEthernet1/0/0] quit
[*PE2] commit
3. (可选)在骨干网上配置MPLS基本能力
当接口下使能IS-IS功能后,接口自动使能MPLS能力,所以也可以忽略此步骤。
# 配置PE1。
[~PE1] mpls lsr-id 1.1.1.9
[*PE1] mpls
[*PE1-mpls] commit
[~PE1-mpls] quit
# 配置P。
[~P] mpls lsr-id 2.2.2.9
[*P] mpls
[*P-mpls] commit
[~P-mpls] quit
# 配置PE2。
[~PE2] mpls lsr-id 3.3.3.9
[*PE2] mpls
[*PE2-mpls] commit
[~PE2-mpls] quit
4. 在骨干网上配置Segment Routing
# 配置PE1。
[~PE1] segment-routing
[*PE1-segment-routing] tunnel-prefer segment-routing
[*PE1-segment-routing] quit
[*PE1] isis 1
[*PE1-isis-1] cost-style wide
[*PE1-isis-1] segment-routing mpls
[*PE1-isis-1] segment-routing global-block 160000 161000
[*PE1-isis-1] quit
[*PE1] interface loopback 1
[*PE1-LoopBack1] isis prefix-sid index 10
[*PE1-LoopBack1] quit
[*PE1] commit
# 配置P。
[~P] segment-routing
[*P-segment-routing] tunnel-prefer segment-routing
[*P-segment-routing] quit
[*P] isis 1
[*P-isis-1] cost-style wide
[*P-isis-1] segment-routing mpls
[*P-isis-1] segment-routing global-block 160000 161000
[*P-isis-1] quit
[*P] interface loopback 1
[*P-LoopBack1] isis prefix-sid index 20
[*P-LoopBack1] quit
[*P] commit
# 配置PE2。
[~PE2] segment-routing
[*PE2-segment-routing] tunnel-prefer segment-routing
[*PE2-segment-routing] quit
[*PE2] isis 1
[*PE2-isis-1] cost-style wide
[*PE2-isis-1] segment-routing mpls
[*PE2-isis-1] segment-routing global-block 160000 161000
[*PE2-isis-1] quit
[*PE2] interface loopback 1
[*PE2-LoopBack1] isis prefix-sid index 30
[*PE2-LoopBack1] quit
[*PE2] commit
5. 在PE之间建立IBGP对等体关系
# 配置PE1。
[~PE1] bgp 100
[*PE1-bgp] peer 3.3.3.9 as-number 100
[*PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
[*PE1-bgp] commit
[~PE1-bgp] quit
# 配置PE2。
[~PE2] bgp 100
[*PE2-bgp] peer 1.1.1.9 as-number 100
[*PE2-bgp] peer 1.1.1.9 connect-interface loopback 1
[*PE2-bgp] commit
[~PE2-bgp] quit
配置完成后,在PE设备上执行display bgp peer命令,可以看到PE之间的BGP对等体关系已建立,并达到Established状态。以PE1的显示为例。
[~PE1] display bgp peer
BGP local router ID : 1.1.1.9
Local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
3.3.3.9 4 100 2 6 0 00:00:12 Established 0
6. 在PE设备上使能非标签公网BGP路由迭代SR-MPLS BE隧道
# 配置PE1。
[~PE1] tunnel-policy p1
[*PE1-tunnel-policy-p1] tunnel select-seq sr-lsp load-balance-number 1
[*PE1-tunnel-policy-p1] quit
[*PE1] tunnel-selector s1 permit node 10
[*PE1-tunnel-selector] apply tunnel-policy p1
[*PE1-tunnel-selector] quit
[*PE1] bgp 100
[*PE1-bgp] unicast-route recursive-lookup tunnel tunnel-selector s1
[*PE1-bgp] commit
[~PE1-bgp] quit
# 配置PE2。
[~PE2] tunnel-policy p1
[*PE2-tunnel-policy-p1] tunnel select-seq sr-lsp load-balance-number 1
[*PE2-tunnel-policy-p1] quit
[*PE2] tunnel-selector s1 permit node 10
[*PE2-tunnel-selector] apply tunnel-policy p1
[*PE2-tunnel-selector] quit
[*PE2] bgp 100
[*PE2-bgp] unicast-route recursive-lookup tunnel tunnel-selector s1
[*PE2-bgp] commit
[~PE2-bgp] quit
以上是关于华为NE40E路由器实验配置示例 | 配置非标签公网BGP路由迭代SR-MPLS BE隧道的主要内容,如果未能解决你的问题,请参考以下文章
华为NE40E路由器实验配置示例 | 配置SR-MPLS BE隧道的TI-LFA FRR功能
华为NE40E路由器实验配置示例 | 配置EVdPdNd VPLS over SR-MPLS BE(BD EVdPdNd)
华为NE40E路由器实验配置示例 | 配置L3VdPdNd over OSPF SR-MPLS BE
华为NE40E路由器实验配置示例 | 配置L3VdPdNd over OSPF SR-MPLS BE