Huawei BGP和OSPF双边界重分布
Posted networking
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Huawei BGP和OSPF双边界重分布相关的知识,希望对你有一定的参考价值。
网络拓扑:
PS:本例使用明细前缀列表双边界引入
S5700-LSW1
============================================================================
#
sysname S5700-LSW1
#
super password level 15 simple [email protected]
#
vlan batch 2 to 64
#
stp instance 10 root primary
stp instance 20 root primary
stp instance 30 root secondary
stp instance 40 root secondary
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name huawei
revision-level 2
instance 10 vlan 1 to 8
instance 20 vlan 9 to 16
instance 30 vlan 17 to 32
instance 40 vlan 33 to 64
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple ******
local-user admin privilege level 15
local-user admin service-type http
#
interface Vlanif1
ip address 10.158.1.251 255.255.255.0
vrrp vrid 1 virtual-ip 10.158.1.254
vrrp vrid 1 priority 110
vrrp vrid 1 preempt-mode timer delay 5
#
interface Vlanif2
ip address 10.158.2.251 255.255.255.0
vrrp vrid 2 virtual-ip 10.158.2.254
vrrp vrid 2 priority 110
vrrp vrid 2 preempt-mode timer delay 5
#
interface Vlanif3
ip address 10.158.3.251 255.255.255.0
vrrp vrid 3 virtual-ip 10.158.3.254
vrrp vrid 3 priority 110
vrrp vrid 3 preempt-mode timer delay 5
#
interface Vlanif4
ip address 10.158.4.251 255.255.255.0
vrrp vrid 4 virtual-ip 10.158.4.254
vrrp vrid 4 priority 110
vrrp vrid 4 preempt-mode timer delay 5
#
interface Vlanif5
ip address 10.158.5.251 255.255.255.0
vrrp vrid 5 virtual-ip 10.158.5.254
vrrp vrid 5 priority 110
vrrp vrid 5 preempt-mode timer delay 5
#
interface Vlanif6
ip address 10.158.6.251 255.255.255.0
vrrp vrid 6 virtual-ip 10.158.6.254
vrrp vrid 6 priority 110
vrrp vrid 6 preempt-mode timer delay 5
#
interface Vlanif7
ip address 10.158.7.251 255.255.255.0
vrrp vrid 7 virtual-ip 10.158.7.254
vrrp vrid 7 priority 110
vrrp vrid 7 preempt-mode timer delay 5
#
interface Vlanif8
ip address 10.158.8.251 255.255.255.0
vrrp vrid 8 virtual-ip 10.158.8.254
vrrp vrid 8 priority 110
vrrp vrid 8 preempt-mode timer delay 5
#
interface Vlanif9
ip address 10.133.1.251 255.255.255.0
vrrp vrid 9 virtual-ip 10.133.1.254
vrrp vrid 9 priority 110
vrrp vrid 9 preempt-mode timer delay 5
#
interface Vlanif10
ip address 10.133.2.251 255.255.255.0
vrrp vrid 10 virtual-ip 10.133.2.254
vrrp vrid 10 priority 110
vrrp vrid 10 preempt-mode timer delay 5
#
interface Vlanif11
ip address 10.133.3.251 255.255.255.0
vrrp vrid 11 virtual-ip 10.133.3.254
vrrp vrid 11 priority 110
vrrp vrid 11 preempt-mode timer delay 5
#
interface Vlanif12
ip address 10.133.4.251 255.255.255.0
vrrp vrid 12 virtual-ip 10.133.4.254
vrrp vrid 12 priority 110
vrrp vrid 12 preempt-mode timer delay 5
#
interface Vlanif13
ip address 10.133.5.251 255.255.255.0
vrrp vrid 13 virtual-ip 10.133.5.254
vrrp vrid 13 priority 110
vrrp vrid 13 preempt-mode timer delay 5
#
interface Vlanif14
ip address 10.133.6.251 255.255.255.0
vrrp vrid 14 virtual-ip 10.133.6.254
vrrp vrid 14 priority 110
vrrp vrid 14 preempt-mode timer delay 5
#
interface Vlanif15
ip address 10.133.7.251 255.255.255.0
vrrp vrid 15 virtual-ip 10.133.7.254
vrrp vrid 15 priority 110
vrrp vrid 15 preempt-mode timer delay 5
#
interface Vlanif16
ip address 10.133.8.251 255.255.255.0
vrrp vrid 16 virtual-ip 10.133.8.254
vrrp vrid 16 priority 110
vrrp vrid 16 preempt-mode timer delay 5
#
interface Vlanif17
ip address 10.79.1.251 255.255.255.0
vrrp vrid 17 virtual-ip 10.79.1.254
vrrp vrid 17 priority 110
vrrp vrid 17 preempt-mode timer delay 5
#
interface Vlanif18
ip address 10.79.2.251 255.255.255.0
vrrp vrid 18 virtual-ip 10.79.2.254
vrrp vrid 18 priority 110
vrrp vrid 18 preempt-mode timer delay 5
#
interface Vlanif19
ip address 10.79.3.251 255.255.255.0
#
interface Vlanif20
ip address 10.79.4.251 255.255.255.0
vrrp vrid 20 virtual-ip 10.79.4.254
vrrp vrid 20 priority 110
vrrp vrid 20 preempt-mode timer delay 5
#
interface Vlanif21
ip address 10.79.5.251 255.255.255.0
vrrp vrid 21 virtual-ip 10.79.5.254
vrrp vrid 21 priority 110
vrrp vrid 21 preempt-mode timer delay 5
#
interface Vlanif22
ip address 10.79.6.251 255.255.255.0
vrrp vrid 22 virtual-ip 10.79.6.254
vrrp vrid 22 priority 110
vrrp vrid 22 preempt-mode timer delay 5
#
interface Vlanif23
ip address 10.79.7.251 255.255.255.0
vrrp vrid 23 virtual-ip 10.79.7.254
vrrp vrid 23 priority 110
vrrp vrid 23 preempt-mode timer delay 5
#
interface Vlanif24
ip address 10.79.8.251 255.255.255.0
vrrp vrid 24 virtual-ip 10.79.8.254
vrrp vrid 24 priority 110
vrrp vrid 24 preempt-mode timer delay 5
#
interface Vlanif25
ip address 10.129.1.251 255.255.255.0
vrrp vrid 25 virtual-ip 10.129.1.254
vrrp vrid 25 preempt-mode timer delay 5
#
interface Vlanif26
ip address 10.129.2.251 255.255.255.0
vrrp vrid 26 virtual-ip 10.129.2.254
vrrp vrid 26 preempt-mode timer delay 5
#
interface Vlanif27
ip address 10.129.3.251 255.255.255.0
vrrp vrid 27 virtual-ip 10.129.3.254
vrrp vrid 27 preempt-mode timer delay 5
#
interface Vlanif28
ip address 10.129.4.251 255.255.255.0
vrrp vrid 28 virtual-ip 10.129.4.254
vrrp vrid 28 preempt-mode timer delay 5
#
interface Vlanif29
ip address 10.129.5.251 255.255.255.0
vrrp vrid 29 virtual-ip 10.129.5.254
vrrp vrid 29 preempt-mode timer delay 5
#
interface Vlanif30
ip address 10.129.6.251 255.255.255.0
vrrp vrid 30 virtual-ip 10.129.6.254
vrrp vrid 30 preempt-mode timer delay 5
#
interface Vlanif31
ip address 10.129.7.251 255.255.255.0
vrrp vrid 31 virtual-ip 10.129.7.254
vrrp vrid 31 preempt-mode timer delay 5
#
interface Vlanif32
ip address 10.129.8.251 255.255.255.0
vrrp vrid 32 virtual-ip 10.129.8.254
vrrp vrid 32 preempt-mode timer delay 5
#
interface Vlanif50
ip address 10.10.1.1 255.255.255.252
#
interface MEth0/0/1
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 2 to 4094
stp instance 30 cost 6000000
stp instance 40 cost 6000000
#
interface GigabitEthernet0/0/1
eth-trunk 10
#
interface GigabitEthernet0/0/2
eth-trunk 10
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 50
#
interface LoopBack0
ip address 10.185.1.1 255.255.255.255
#
ospf 100 router-id 10.185.1.1
silent-interface all
undo silent-interface Vlanif50
area 0.0.0.0
network 10.10.1.8 0.0.0.3
network 10.10.1.0 0.0.0.3
network 10.158.1.0 0.0.0.255
network 10.158.2.0 0.0.0.255
network 10.158.3.0 0.0.0.255
network 10.158.4.0 0.0.0.255
network 10.158.5.0 0.0.0.255
network 10.158.6.0 0.0.0.255
network 10.158.7.0 0.0.0.255
network 10.158.8.0 0.0.0.255
network 10.133.1.0 0.0.0.255
network 10.133.2.0 0.0.0.255
network 10.133.3.0 0.0.0.255
network 10.133.4.0 0.0.0.255
network 10.133.5.0 0.0.0.255
network 10.133.6.0 0.0.0.255
network 10.133.7.0 0.0.0.255
network 10.133.8.0 0.0.0.255
network 10.79.1.0 0.0.0.255
network 10.79.2.0 0.0.0.255
network 10.79.3.0 0.0.0.255
network 10.79.4.0 0.0.0.255
network 10.79.5.0 0.0.0.255
network 10.79.6.0 0.0.0.255
network 10.79.7.0 0.0.0.255
network 10.79.8.0 0.0.0.255
network 10.129.1.0 0.0.0.255
network 10.129.2.0 0.0.0.255
network 10.129.3.0 0.0.0.255
network 10.129.4.0 0.0.0.255
network 10.129.5.0 0.0.0.255
network 10.129.6.0 0.0.0.255
network 10.129.7.0 0.0.0.255
network 10.129.8.0 0.0.0.255
network 10.185.1.1 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
authentication-mode aaa
#
port-group link-type
#
return
S5700-LSW2
============================================================================
#
sysname S5700-LSW2
#
vlan batch 2 to 64
#
stp instance 10 root secondary
stp instance 20 root secondary
stp instance 30 root primary
stp instance 40 root primary
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name huawei
revision-level 2
instance 10 vlan 1 to 8
instance 20 vlan 9 to 16
instance 30 vlan 17 to 32
instance 40 vlan 33 to 64
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
ip address 10.158.1.252 255.255.255.0
vrrp vrid 1 virtual-ip 10.158.1.254
vrrp vrid 1 preempt-mode timer delay 5
#
interface Vlanif2
ip address 10.158.2.252 255.255.255.0
vrrp vrid 2 virtual-ip 10.158.2.254
vrrp vrid 2 preempt-mode timer delay 5
#
interface Vlanif3
ip address 10.158.3.252 255.255.255.0
vrrp vrid 3 virtual-ip 10.158.3.254
vrrp vrid 3 preempt-mode timer delay 5
#
interface Vlanif4
ip address 10.158.4.252 255.255.255.0
vrrp vrid 4 virtual-ip 10.158.4.254
vrrp vrid 4 preempt-mode timer delay 5
#
interface Vlanif5
ip address 10.158.5.252 255.255.255.0
vrrp vrid 5 virtual-ip 10.158.5.254
vrrp vrid 5 preempt-mode timer delay 5
#
interface Vlanif6
ip address 10.158.6.252 255.255.255.0
vrrp vrid 6 virtual-ip 10.158.6.254
vrrp vrid 6 preempt-mode timer delay 5
#
interface Vlanif7
ip address 10.158.7.252 255.255.255.0
vrrp vrid 7 virtual-ip 10.158.7.254
vrrp vrid 7 preempt-mode timer delay 5
#
interface Vlanif8
ip address 10.158.8.252 255.255.255.0
vrrp vrid 8 virtual-ip 10.158.8.254
vrrp vrid 8 preempt-mode timer delay 5
#
interface Vlanif9
ip address 10.133.1.252 255.255.255.0
vrrp vrid 9 virtual-ip 10.133.1.254
vrrp vrid 9 preempt-mode timer delay 5
#
interface Vlanif10
ip address 10.133.2.252 255.255.255.0
vrrp vrid 10 virtual-ip 10.133.2.254
vrrp vrid 10 preempt-mode timer delay 5
#
interface Vlanif11
ip address 10.133.3.252 255.255.255.0
vrrp vrid 11 virtual-ip 10.133.3.254
vrrp vrid 11 preempt-mode timer delay 5
#
interface Vlanif12
ip address 10.133.4.252 255.255.255.0
vrrp vrid 12 virtual-ip 10.133.4.254
vrrp vrid 12 preempt-mode timer delay 5
#
interface Vlanif13
ip address 10.133.5.252 255.255.255.0
vrrp vrid 13 virtual-ip 10.133.5.254
vrrp vrid 13 preempt-mode timer delay 5
#
interface Vlanif14
ip address 10.133.6.252 255.255.255.0
vrrp vrid 14 virtual-ip 10.133.6.254
vrrp vrid 14 preempt-mode timer delay 5
#
interface Vlanif15
ip address 10.133.7.252 255.255.255.0
vrrp vrid 15 virtual-ip 10.133.7.254
vrrp vrid 15 preempt-mode timer delay 5
#
interface Vlanif16
ip address 10.133.8.252 255.255.255.0
vrrp vrid 16 virtual-ip 10.133.8.254
vrrp vrid 16 preempt-mode timer delay 5
#
interface Vlanif17
ip address 10.79.1.252 255.255.255.0
vrrp vrid 17 virtual-ip 10.79.1.254
vrrp vrid 17 priority 110
vrrp vrid 17 preempt-mode timer delay 5
#
interface Vlanif18
ip address 10.79.2.252 255.255.255.0
vrrp vrid 18 virtual-ip 10.79.2.254
vrrp vrid 18 priority 110
vrrp vrid 18 preempt-mode timer delay 5
#
interface Vlanif19
ip address 10.79.3.252 255.255.255.0
#
interface Vlanif20
ip address 10.79.4.252 255.255.255.0
vrrp vrid 20 virtual-ip 10.79.4.254
vrrp vrid 20 priority 110
vrrp vrid 20 preempt-mode timer delay 5
#
interface Vlanif21
ip address 10.79.5.252 255.255.255.0
vrrp vrid 21 virtual-ip 10.79.5.254
vrrp vrid 21 priority 110
vrrp vrid 21 preempt-mode timer delay 5
#
interface Vlanif22
ip address 10.79.6.252 255.255.255.0
vrrp vrid 22 virtual-ip 10.79.6.254
vrrp vrid 22 priority 110
vrrp vrid 22 preempt-mode timer delay 5
#
interface Vlanif23
ip address 10.79.7.252 255.255.255.0
vrrp vrid 23 virtual-ip 10.79.7.254
vrrp vrid 23 priority 110
vrrp vrid 23 preempt-mode timer delay 5
#
interface Vlanif24
ip address 10.79.8.252 255.255.255.0
vrrp vrid 24 virtual-ip 10.79.8.254
vrrp vrid 24 priority 110
vrrp vrid 24 preempt-mode timer delay 5
#
interface Vlanif25
ip address 10.129.1.252 255.255.255.0
vrrp vrid 25 virtual-ip 10.129.1.254
vrrp vrid 25 priority 110
vrrp vrid 25 preempt-mode timer delay 5
#
interface Vlanif26
ip address 10.129.2.252 255.255.255.0
vrrp vrid 26 virtual-ip 10.129.2.254
vrrp vrid 26 priority 110
vrrp vrid 26 preempt-mode timer delay 5
#
interface Vlanif27
ip address 10.129.3.252 255.255.255.0
vrrp vrid 27 virtual-ip 10.129.3.254
vrrp vrid 27 priority 110
vrrp vrid 27 preempt-mode timer delay 5
#
interface Vlanif28
ip address 10.129.4.252 255.255.255.0
vrrp vrid 28 virtual-ip 10.129.4.254
vrrp vrid 28 priority 110
vrrp vrid 28 preempt-mode timer delay 5
#
interface Vlanif29
ip address 10.129.5.252 255.255.255.0
vrrp vrid 29 virtual-ip 10.129.5.254
vrrp vrid 29 priority 110
vrrp vrid 29 preempt-mode timer delay 5
#
interface Vlanif30
ip address 10.129.6.252 255.255.255.0
vrrp vrid 30 virtual-ip 10.129.6.254
vrrp vrid 30 priority 110
vrrp vrid 30 preempt-mode timer delay 5
#
interface Vlanif31
ip address 10.129.7.252 255.255.255.0
vrrp vrid 31 virtual-ip 10.129.7.254
vrrp vrid 31 priority 110
vrrp vrid 31 preempt-mode timer delay 5
#
interface Vlanif32
ip address 10.129.8.252 255.255.255.0
vrrp vrid 32 virtual-ip 10.129.8.254
vrrp vrid 32 priority 110
vrrp vrid 32 preempt-mode timer delay 5
#
interface Vlanif50
ip address 10.10.1.5 255.255.255.252
ospf network-type p2p
#
interface MEth0/0/1
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 2 to 4094
stp instance 10 cost 6000000
stp instance 20 cost 6000000
#
interface GigabitEthernet0/0/1
eth-trunk 10
#
interface GigabitEthernet0/0/2
eth-trunk 10
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 50
#
interface LoopBack0
ip address 10.185.1.2 255.255.255.255
#
ospf 100 router-id 10.185.1.2
silent-interface all
undo silent-interface Vlanif50
area 0.0.0.0
network 10.10.1.8 0.0.0.3
network 10.10.1.0 0.0.0.3
network 10.158.1.0 0.0.0.255
network 10.158.2.0 0.0.0.255
network 10.158.3.0 0.0.0.255
network 10.158.4.0 0.0.0.255
network 10.158.5.0 0.0.0.255
network 10.158.6.0 0.0.0.255
network 10.158.7.0 0.0.0.255
network 10.158.8.0 0.0.0.255
network 10.133.1.0 0.0.0.255
network 10.133.2.0 0.0.0.255
network 10.133.3.0 0.0.0.255
network 10.133.4.0 0.0.0.255
network 10.133.5.0 0.0.0.255
network 10.133.6.0 0.0.0.255
network 10.133.7.0 0.0.0.255
network 10.133.8.0 0.0.0.255
network 10.79.1.0 0.0.0.255
network 10.79.2.0 0.0.0.255
network 10.79.3.0 0.0.0.255
network 10.79.4.0 0.0.0.255
network 10.79.5.0 0.0.0.255
network 10.79.6.0 0.0.0.255
network 10.79.7.0 0.0.0.255
network 10.79.8.0 0.0.0.255
network 10.129.1.0 0.0.0.255
network 10.129.2.0 0.0.0.255
network 10.129.3.0 0.0.0.255
network 10.129.4.0 0.0.0.255
network 10.129.5.0 0.0.0.255
network 10.129.6.0 0.0.0.255
network 10.129.7.0 0.0.0.255
network 10.129.8.0 0.0.0.255
network 10.185.1.2 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
#
port-group link-type
#
return
S5700-LSW3
============================================================================
#
sysname S5700-LSW3
#
vlan batch 2 to 64
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name huawei
revision-level 2
instance 10 vlan 1 to 8
instance 20 vlan 9 to 16
instance 30 vlan 17 to 32
instance 40 vlan 33 to 64
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
AR3260-AR1
============================================================================
[V200R003C00]
#
sysname AR3260-AR1
#
board add 0/1 1GEC
board add 0/2 1GEC
board add 0/3 1GEC
board add 0/4 1GEC
board add 0/7 24GE
board add 0/8 24GE
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
bfd
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 10.10.1.9 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/1
ip address 10.10.1.2 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 10.201.1.1 255.255.255.252
#
interface LoopBack0
ip address 10.185.1.3 255.255.255.255
#
bfd 10 bind peer-ip 10.201.1.2 source-ip 10.201.1.1
#
bgp 65000
router-id 10.185.1.3
peer 10.185.1.4 as-number 65000
peer 10.185.1.4 connect-interface LoopBack0
peer 10.201.1.2 as-number 65001
peer 10.201.1.2 bfd enable
#
ipv4-family unicast
undo synchronization
import-route ospf 100 route-policy ospf-to-bgp
peer 10.185.1.4 enable
peer 10.185.1.4 next-hop-local
peer 10.201.1.2 enable
#
ospf 100 router-id 10.185.1.3
import-route bgp type 2 route-policy bgp-to-ospf
area 0.0.0.0
network 10.10.1.0 0.0.0.3
network 10.10.1.8 0.0.0.3
network 10.185.1.3 0.0.0.0
#
route-policy ospf-to-bgp permit node 10
if-match ip-prefix ospf-to-bgp
#
route-policy bgp-to-ospf permit node 10
if-match ip-prefix bgp-to-ospf
#
ip ip-prefix ospf-to-bgp index 10 permit 10.158.1.0 24
ip ip-prefix ospf-to-bgp index 20 permit 10.158.2.0 24
ip ip-prefix ospf-to-bgp index 30 permit 10.158.3.0 24
ip ip-prefix ospf-to-bgp index 40 permit 10.158.4.0 24
ip ip-prefix ospf-to-bgp index 50 permit 10.158.5.0 24
ip ip-prefix ospf-to-bgp index 60 permit 10.158.6.0 24
ip ip-prefix ospf-to-bgp index 70 permit 10.158.7.0 24
ip ip-prefix ospf-to-bgp index 80 permit 10.158.8.0 24
ip ip-prefix ospf-to-bgp index 90 permit 10.133.1.0 24
ip ip-prefix ospf-to-bgp index 100 permit 10.133.2.0 24
ip ip-prefix ospf-to-bgp index 110 permit 10.133.3.0 24
ip ip-prefix ospf-to-bgp index 120 permit 10.133.4.0 24
ip ip-prefix ospf-to-bgp index 130 permit 10.133.5.0 24
ip ip-prefix ospf-to-bgp index 140 permit 10.133.6.0 24
ip ip-prefix ospf-to-bgp index 150 permit 10.133.7.0 24
ip ip-prefix ospf-to-bgp index 160 permit 10.133.8.0 24
ip ip-prefix ospf-to-bgp index 170 permit 10.79.1.0 24
ip ip-prefix ospf-to-bgp index 180 permit 10.79.2.0 24
ip ip-prefix ospf-to-bgp index 190 permit 10.79.3.0 24
ip ip-prefix ospf-to-bgp index 200 permit 10.79.4.0 24
ip ip-prefix ospf-to-bgp index 210 permit 10.79.5.0 24
ip ip-prefix ospf-to-bgp index 220 permit 10.79.6.0 24
ip ip-prefix ospf-to-bgp index 230 permit 10.79.7.0 24
ip ip-prefix ospf-to-bgp index 240 permit 10.79.8.0 24
ip ip-prefix ospf-to-bgp index 250 permit 10.129.1.0 24
ip ip-prefix ospf-to-bgp index 260 permit 10.129.2.0 24
ip ip-prefix ospf-to-bgp index 270 permit 10.129.3.0 24
ip ip-prefix ospf-to-bgp index 280 permit 10.129.4.0 24
ip ip-prefix ospf-to-bgp index 290 permit 10.129.5.0 24
ip ip-prefix ospf-to-bgp index 300 permit 10.129.6.0 24
ip ip-prefix ospf-to-bgp index 310 permit 10.129.7.0 24
ip ip-prefix ospf-to-bgp index 320 permit 10.129.8.0 24
ip ip-prefix bgp-to-ospf index 10 permit 10.201.1.0 24
ip ip-prefix bgp-to-ospf index 20 permit 10.201.2.0 24
ip ip-prefix bgp-to-ospf index 30 permit 10.201.3.0 24
ip ip-prefix bgp-to-ospf index 40 permit 10.201.4.0 24
ip ip-prefix bgp-to-ospf index 50 permit 10.201.5.0 24
ip ip-prefix bgp-to-ospf index 60 permit 10.201.6.0 24
ip ip-prefix bgp-to-ospf index 70 permit 10.201.7.0 24
ip ip-prefix bgp-to-ospf index 80 permit 10.201.8.0 24
ip ip-prefix bgp-to-ospf index 90 permit 10.136.1.0 24
ip ip-prefix bgp-to-ospf index 100 permit 10.136.2.0 24
ip ip-prefix bgp-to-ospf index 110 permit 10.136.3.0 24
ip ip-prefix bgp-to-ospf index 120 permit 10.136.4.0 24
ip ip-prefix bgp-to-ospf index 130 permit 10.136.5.0 24
ip ip-prefix bgp-to-ospf index 140 permit 10.136.6.0 24
ip ip-prefix bgp-to-ospf index 150 permit 10.136.7.0 24
ip ip-prefix bgp-to-ospf index 160 permit 10.136.8.0 24
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR3260-AR2
============================================================================
[V200R003C00]
#
sysname AR3260-AR2
#
board add 0/1 1GEC
board add 0/2 1GEC
board add 0/3 1GEC
board add 0/4 1GEC
board add 0/7 24GE
board add 0/8 24GE
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
bfd
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 10.10.1.10 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/1
ip address 10.10.1.6 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/2
ip address 10.201.1.5 255.255.255.252
#
interface LoopBack0
ip address 10.185.1.4 255.255.255.255
#
bfd 10 bind peer-ip 10.201.1.6 source-ip 10.201.1.5
#
bgp 65000
router-id 10.185.1.4
peer 10.185.1.3 as-number 65000
peer 10.185.1.3 connect-interface LoopBack0
peer 10.201.1.6 as-number 65001
peer 10.201.1.6 bfd enable
#
ipv4-family unicast
undo synchronization
import-route ospf 100 route-policy ospf-to-bgp
peer 10.185.1.3 enable
peer 10.185.1.3 next-hop-local
peer 10.201.1.6 enable
#
ospf 100 router-id 10.185.1.4
import-route bgp type 2 route-policy bgp-to-ospf
area 0.0.0.0
network 10.10.1.4 0.0.0.3
network 10.10.1.8 0.0.0.3
network 10.185.1.4 0.0.0.0
#
route-policy ospf-to-bgp permit node 10
if-match ip-prefix ospf-to-bgp
#
route-policy bgp-to-ospf permit node 10
if-match ip-prefix bgp-to-ospf
#
ip ip-prefix ospf-to-bgp index 10 permit 10.158.1.0 24
ip ip-prefix ospf-to-bgp index 20 permit 10.158.2.0 24
ip ip-prefix ospf-to-bgp index 30 permit 10.158.3.0 24
ip ip-prefix ospf-to-bgp index 40 permit 10.158.4.0 24
ip ip-prefix ospf-to-bgp index 50 permit 10.158.5.0 24
ip ip-prefix ospf-to-bgp index 60 permit 10.158.6.0 24
ip ip-prefix ospf-to-bgp index 70 permit 10.158.7.0 24
ip ip-prefix ospf-to-bgp index 80 permit 10.158.8.0 24
ip ip-prefix ospf-to-bgp index 90 permit 10.133.1.0 24
ip ip-prefix ospf-to-bgp index 100 permit 10.133.2.0 24
ip ip-prefix ospf-to-bgp index 110 permit 10.133.3.0 24
ip ip-prefix ospf-to-bgp index 120 permit 10.133.4.0 24
ip ip-prefix ospf-to-bgp index 130 permit 10.133.5.0 24
ip ip-prefix ospf-to-bgp index 140 permit 10.133.6.0 24
ip ip-prefix ospf-to-bgp index 150 permit 10.133.7.0 24
ip ip-prefix ospf-to-bgp index 160 permit 10.133.8.0 24
ip ip-prefix ospf-to-bgp index 170 permit 10.79.1.0 24
ip ip-prefix ospf-to-bgp index 180 permit 10.79.2.0 24
ip ip-prefix ospf-to-bgp index 190 permit 10.79.3.0 24
ip ip-prefix ospf-to-bgp index 200 permit 10.79.4.0 24
ip ip-prefix ospf-to-bgp index 210 permit 10.79.5.0 24
ip ip-prefix ospf-to-bgp index 220 permit 10.79.6.0 24
ip ip-prefix ospf-to-bgp index 230 permit 10.79.7.0 24
ip ip-prefix ospf-to-bgp index 240 permit 10.79.8.0 24
ip ip-prefix ospf-to-bgp index 250 permit 10.129.1.0 24
ip ip-prefix ospf-to-bgp index 260 permit 10.129.2.0 24
ip ip-prefix ospf-to-bgp index 270 permit 10.129.3.0 24
ip ip-prefix ospf-to-bgp index 280 permit 10.129.4.0 24
ip ip-prefix ospf-to-bgp index 290 permit 10.129.5.0 24
ip ip-prefix ospf-to-bgp index 300 permit 10.129.6.0 24
ip ip-prefix ospf-to-bgp index 310 permit 10.129.7.0 24
ip ip-prefix ospf-to-bgp index 320 permit 10.129.8.0 24
ip ip-prefix bgp-to-ospf index 10 permit 10.201.1.0 24
ip ip-prefix bgp-to-ospf index 20 permit 10.201.2.0 24
ip ip-prefix bgp-to-ospf index 30 permit 10.201.3.0 24
ip ip-prefix bgp-to-ospf index 40 permit 10.201.4.0 24
ip ip-prefix bgp-to-ospf index 50 permit 10.201.5.0 24
ip ip-prefix bgp-to-ospf index 60 permit 10.201.6.0 24
ip ip-prefix bgp-to-ospf index 70 permit 10.201.7.0 24
ip ip-prefix bgp-to-ospf index 80 permit 10.201.8.0 24
ip ip-prefix bgp-to-ospf index 90 permit 10.136.1.0 24
ip ip-prefix bgp-to-ospf index 100 permit 10.136.2.0 24
ip ip-prefix bgp-to-ospf index 110 permit 10.136.3.0 24
ip ip-prefix bgp-to-ospf index 120 permit 10.136.4.0 24
ip ip-prefix bgp-to-ospf index 130 permit 10.136.5.0 24
ip ip-prefix bgp-to-ospf index 140 permit 10.136.6.0 24
ip ip-prefix bgp-to-ospf index 150 permit 10.136.7.0 24
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR3260-AR3
============================================================================
#
sysname AR3260-AR3
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
bfd
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 10.20.1.9 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.20.1.2 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 10.201.1.2 255.255.255.252
#
interface NULL0
#
interface LoopBack0
ip address 10.185.1.6 255.255.255.255
#
bfd 10 bind peer-ip 10.201.1.1 source-ip 10.201.1.2
#
bgp 65001
router-id 10.185.1.6
peer 10.185.1.7 as-number 65001
peer 10.185.1.7 connect-interface LoopBack0
peer 10.185.1.8 as-number 65001
peer 10.185.1.8 connect-interface LoopBack0
peer 10.201.1.1 as-number 65000
peer 10.201.1.1 bfd enable
#
ipv4-family unicast
undo synchronization
peer 10.185.1.7 enable
peer 10.185.1.7 next-hop-local
peer 10.185.1.8 enable
peer 10.185.1.8 next-hop-local
peer 10.201.1.1 enable
#
ospf 100 router-id 10.185.1.6
area 0.0.0.0
network 10.20.1.0 0.0.0.3
network 10.20.1.8 0.0.0.3
network 10.185.1.6 0.0.0.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR3260-AR4
============================================================================
[V200R003C00]
#
sysname AR3260-AR4
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
bfd
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 10.20.1.10 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 10.20.1.6 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 10.201.1.6 255.255.255.252
#
interface NULL0
#
interface LoopBack0
ip address 10.185.1.7 255.255.255.255
#
bfd 10 bind peer-ip 10.201.1.5 source-ip 10.201.1.6
#
bgp 65001
peer 10.185.1.6 as-number 65001
peer 10.185.1.6 connect-interface LoopBack0
peer 10.185.1.8 as-number 65001
peer 10.185.1.8 connect-interface LoopBack0
peer 10.201.1.5 as-number 65000
peer 10.201.1.5 bfd enable
#
ipv4-family unicast
undo synchronization
peer 10.185.1.6 enable
peer 10.185.1.6 next-hop-local
peer 10.185.1.8 enable
peer 10.185.1.8 next-hop-local
peer 10.201.1.5 enable
#
ospf 100 router-id 10.185.1.7
area 0.0.0.0
network 10.20.1.4 0.0.0.3
network 10.20.1.8 0.0.0.3
network 10.185.1.7 0.0.0.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
S5700-LSW4
============================================================================
#
sysname S5700-LSW4
#
vlan batch 2 to 16 100 200
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
ip address 10.201.1.254 255.255.255.0
#
interface Vlanif2
ip address 10.201.2.254 255.255.255.0
#
interface Vlanif3
ip address 10.201.3.254 255.255.255.0
#
interface Vlanif4
ip address 10.201.4.254 255.255.255.0
#
interface Vlanif5
ip address 10.201.5.254 255.255.255.0
#
interface Vlanif6
ip address 10.201.6.254 255.255.255.0
#
interface Vlanif7
ip address 10.201.7.254 255.255.255.0
#
interface Vlanif8
ip address 10.201.8.254 255.255.255.0
#
interface Vlanif9
ip address 10.136.1.254 255.255.255.0
#
interface Vlanif10
ip address 10.136.2.254 255.255.255.0
#
interface Vlanif11
ip address 10.136.3.254 255.255.255.0
#
interface Vlanif12
ip address 10.136.4.254 255.255.255.0
#
interface Vlanif13
ip address 10.136.5.254 255.255.255.0
#
interface Vlanif14
ip address 10.136.6.254 255.255.255.0
#
interface Vlanif15
ip address 10.136.7.254 255.255.255.0
#
interface Vlanif16
ip address 10.136.8.254 255.255.255.0
#
interface Vlanif100
ip address 10.20.1.1 255.255.255.252
#
interface Vlanif200
ip address 10.20.1.5 255.255.255.252
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 200
#
interface LoopBack0
ip address 10.185.1.8 255.255.255.255
#
bgp 65001
router-id 10.185.1.8
peer 10.185.1.6 as-number 65001
peer 10.185.1.6 connect-interface LoopBack0
peer 10.185.1.7 as-number 65001
peer 10.185.1.7 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 10.136.1.0 255.255.255.0
network 10.136.2.0 255.255.255.0
network 10.136.3.0 255.255.255.0
network 10.136.4.0 255.255.255.0
network 10.136.5.0 255.255.255.0
network 10.136.6.0 255.255.255.0
network 10.136.7.0 255.255.255.0
network 10.136.8.0 255.255.255.0
network 10.201.1.0 255.255.255.0
network 10.201.2.0 255.255.255.0
network 10.201.3.0 255.255.255.0
network 10.201.4.0 255.255.255.0
network 10.201.5.0 255.255.255.0
network 10.201.6.0 255.255.255.0
network 10.201.7.0 255.255.255.0
network 10.201.8.0 255.255.255.0
peer 10.185.1.6 enable
peer 10.185.1.7 enable
#
ospf 100 router-id 10.185.1.8
area 0.0.0.0
network 10.185.1.9 0.0.0.0
network 10.20.1.0 0.0.0.3
network 10.20.1.4 0.0.0.3
network 10.185.1.8 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
#
return
S5700-LSW5
============================================================================
#
sysname S3700-LSW5
#
vlan batch 2 to 16 100 200
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
在S5700-LSW1查看重分布进来OSPF100的AS65001的路由
============================================================================
<S5700-LSW1>display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 20 Routes : 20
OSPF routing table status : <Active>
Destinations : 20 Routes : 20
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.10.1.4/30 OSPF 10 3 D 10.10.1.2 Vlanif50
10.10.1.8/30 OSPF 10 2 D 10.10.1.2 Vlanif50
10.136.1.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.2.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.3.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.4.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.5.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.6.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.7.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.136.8.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.185.1.3/32 OSPF 10 1 D 10.10.1.2 Vlanif50
10.185.1.4/32 OSPF 10 2 D 10.10.1.2 Vlanif50
10.201.1.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.2.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.3.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.4.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.5.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.6.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.7.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
10.201.8.0/24 O_ASE 150 1 D 10.10.1.2 Vlanif50
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
在S5700-LSW4上看S5700-LSW1的OSPF100重分布进AS65001 学习来的BGP路由
============================================================================
<S5700-LSW4>display bgp routing-table peer 10.185.1.6 accepted-routes
BGP Local router ID is 10.185.1.8
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 32
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 10.79.1.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.2.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.3.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.4.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.5.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.6.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.7.0/24 10.185.1.6 2 100 0 65000?
*>i 10.79.8.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.1.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.2.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.3.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.4.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.5.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.6.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.7.0/24 10.185.1.6 2 100 0 65000?
*>i 10.129.8.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.1.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.2.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.3.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.4.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.5.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.6.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.7.0/24 10.185.1.6 2 100 0 65000?
*>i 10.133.8.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.1.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.2.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.3.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.4.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.5.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.6.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.7.0/24 10.185.1.6 2 100 0 65000?
*>i 10.158.8.0/24 10.185.1.6 2 100 0 65000?
<S5700-LSW4>
双边界路由重分布在网络改造项目中经常遇到,一般发生在新老网络协议变更的环节比较多,比如原网是IGP协议,由原IGP协议变更为BGP协议的环境中,此时一定要注意路由重分布的本质,即将一种路由协议的路由注入到另外的一种路由协议中,路由在重分布后会丢失原路由的一切属性。
以上是关于Huawei BGP和OSPF双边界重分布的主要内容,如果未能解决你的问题,请参考以下文章