API Guide
Core 1 同时配置了 OSPF 和 BGP。Core 1 具有与 Core 2 的 OSPF 邻居邻接,并且 BGP 与 BR 邻居邻接。iBGPtoOSPF 前缀列表已配
置并应用于路由映射。match ip address prefix-list iBGPtoOSPF 命令将处理 iBGP 学习的路由。
ip prefix-list iBGPtoOSPF seq 15 permit 192.168.100.0/24
route-map iBGPtoOSPF permit 20
match ip address prefix-list iBGPtoOSPF
!
interface ethernet1/1/1
no shutdown
no switchport
ip address 10.10.30.2/24
ip router ospf 10 area 0.0.0.0
!
interface ethernet1/1/2
no shutdown
no switchport
ip address 10.10.9.2/24
!
router ospf 10
router-id 2.2.2.2
redistribute bgp 20 route-map iBGPtoOSPF
!
router bgp 20
neighbor 10.10.9.1
remote-as 20
address-family ipv4 unicast
allowas-in 1
Core 2 上的配置
Core 2 已配置 OSPF,其与 Core 1 形成邻居邻接。
interface ethernet1/1/1
no shutdown
no switchport
ip address 10.10.30.3/24
ip router ospf 10 area 0.0.0.0
no shutdown
!
!
router ospf 10
router-id 3.3.3.3
示例 IPv6 配置
以下示例拓扑具有两个交换机 Core 1 和 Core 2,它们分别相互连接,并使用 OSPF 共享路由。边界路由器 BR 连接到 Core 1 并使用
BGP 共享路由。Core 1 将通过 iBGP 学习的路由重新分配到 OSPF 并与其他路由器共享。此网络使用 IPv6 寻址。
BR 上的配置
BR 配置了 BGP,这将形成 BGP 邻居与 Core 1 的邻接关系。
interface Loopback0
ipv6 address 2020::1/64
!
interface ethernet1/1/1
no switchport
ip address 2030::1/64
!
!
address-family ipv6 unicast
router bgp 20
neighbor 2030::2 remote-as 20
Core 1 上的配置
Core 1 同时配置了 OSPF 和 BGP。Core 1 具有与 Core 2 的 OSPF 邻居邻接,并且 BGP 与 BR 邻居邻接。iBGPtoOSPF 前缀列表已配
置并应用于路由映射。match ip address prefix-list iBGPtoOSPF 命令将处理 iBGP 学习的路由。
ip prefix-list iBGPtoOSPF seq 15 permit 2020::1/64
route-map iBGPtoOSPF permit 20
match ip address prefix-list iBGPtoOSPF
第 3 层 565