IP : IP 版本 6 (IPv6)

再分布在BGP配置示例的OSPFv3路由

2016 年 10 月 27 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 8 月 22 日) | 反馈


目录


简介

本文提供再分布开放最短路径第一个版本3 (OSPFv3)路由示例给多协议BGP为IPv6。OSPFv3在OSPF第2版展开为了为路由前缀和更加大型的IPv6地址的IPv6提供支持。多协议 BGP 是一种增强型 BGP,可以为多个网络层协议地址系列(如 IPv6 地址系列)及 IP 多播路由传送路由信息。

先决条件

先决条件

尝试进行此配置之前,请确保满足以下要求:

硬件与软件版本

本文档不限于特定的软件和硬件版本。

在本文的配置根据Cisco 3700系列路由器用Cisco IOS�软件版本12.4 (15)T1。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

配置

在本例中,路由器R2和R3通过serial interfaces连接和配置与多协议BGP。使用OSPFv3,路由器R2和R3用他们的本地路由器R1和R4连通。环回地址在生成的网络路由器创建。路由器R2和R3,运行BGP和OSPFv3,使用redistribute命令为了再分布OSPFv3路由到BGP。所有路由器配置与IPv6地址。

注意: 有关本文档所用命令的详细信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

http://www.cisco.com/c/dam/en/us/support/docs/ip/ip-version-6-ipv6/113453-redis-ospfv3-bgp-01.gif

配置

本文档使用以下配置:

路由器 R1
!
version 12.4
!
hostname R1
!
ip cef
!
ipv6 unicast-routing

!--- Enables the forwarding of IPv6 packets.

!
interface Loopback0
 no ip address
 ipv6 address 2222::1/128
 ipv6 ospf 1 area 0

!--- Enables OSPFv3 on the interface and associates
!--- the interface loopback0 to area 0.

!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 1010:1:1:1::1/64
 ipv6 ospf 1 area 0

!--- Associates the Interface Fa0/0 to area 0.

!
ipv6 router ospf 1
 router-id 1.1.1.1

!--- Router R1 uses 1.1.1.1 as router ID.

 log-adjacency-changes
!
end

路由器 R2
!
version 12.4
!
hostname R2
!
ip cef
!
ipv6 unicast-routing
!
interface Loopback0
 no ip address
 ipv6 address 2010::1/128
 ipv6 ospf 1 area 1
!
interface Loopback1
 no ip address
 ipv6 address 2011::1/128
 ipv6 ospf 1 area 1
!
interface Loopback99
 no ip address
 ipv6 address 5050:55:55:55::55/128
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 1010:1:1:1::2/64
 ipv6 ospf 1 area 0
!
interface Serial0/0
 no ip address
 ipv6 address 3030:1:1:1::10/64
 clock rate 2000000
!
router bgp 65000
 bgp router-id 1.1.1.1
 no bgp default ipv4-unicast

!--- Without configuring "no bgp default ipv4-unicast" only 
!--- IPv4 will be advertised.

 bgp log-neighbor-changes
 neighbor 3030:1:1:1::11 remote-as 65000
 neighbor 3030:1:1:1::11 update-source Serial0/0
 !
 address-family ipv6
  neighbor 3030:1:1:1::11 activate
  network 5050:55:55:55::55/128
  redistribute connected
  redistribute ospf 1 match internal external 1 external 2

!--- This redistributes all OSPF routes into BGP.

  no synchronization
 exit-address-family
!
ipv6 router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
!
end

路由器 R3
!
version 12.4
!
hostname R3
!
ip cef
!
ipv6 unicast-routing
!
interface Loopback0
 no ip address
 ipv6 address 1111::1/128
 ipv6 ospf 1 area 1
!
interface Loopback1
 no ip address
 ipv6 address 1112::1/128
 ipv6 ospf 1 area 1
!
interface Loopback99
 no ip address
 ipv6 address 6060:66:66:66::66/128
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2020:1:1:1::2/64
 ipv6 ospf 1 area 0
!
interface Serial0/0
 no ip address
 ipv6 address 3030:1:1:1::11/64
 clock rate 2000000
!
router bgp 65000
 bgp router-id 2.2.2.2
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 3030:1:1:1::10 remote-as 65000
 neighbor 3030:1:1:1::10 update-source Serial0/0
 !
 address-family ipv6
  neighbor 3030:1:1:1::10 activate
  network 6060:66:66:66::66/128
  redistribute connected
  redistribute ospf 1 match internal external 1 external 2
  no synchronization
 exit-address-family
!
ipv6 router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
!
end

路由器R4
!
version 12.4
!
hostname R4
!
ip cef
!
ipv6 unicast-routing
!
interface Loopback0
 no ip address
 ipv6 address 3333::1/128
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2020:1:1:1::1/64
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 5.5.5.5
 log-adjacency-changes
!
end

验证

使用本部分可确认配置能否正常运行。

命令输出解释程序仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。

这些显示命令使用验证配置:

验证OSPFv3配置

为了验证OSPFv3适当地配置,请使用ospf命令的show ipv6 route在路由器R1和R4。

show ipv6 route ospf
在路由器 R1 中
R1#show ipv6 route ospf
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
OI  2010::1/128 [110/10]
     via FE80::C001:16FF:FEDC:0, FastEthernet0/0
OI  2011::1/128 [110/10]
     via FE80::C001:16FF:FEDC:0, FastEthernet0/0
在路由器R4中
R4#show ipv6 route ospf
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
OI  1111::1/128 [110/10]
     via FE80::C002:16FF:FEDC:0, FastEthernet0/0
OI  1112::1/128 [110/10]
     via FE80::C002:16FF:FEDC:0, FastEthernet0/0

验证BGP配置

为了验证OSPFv3路由是否再分布对BGP,请使用bgp命令的show ipv6 route在路由器R2和R3。

show ipv6 route bgp
在路由器 R2 中
R2#show ipv6 route bgp
IPv6 Routing Table - 14 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
B   1111::1/128 [200/0]
     via 3030:1:1:1::11
B   1112::1/128 [200/0]
     via 3030:1:1:1::11
B   2020:1:1:1::/64 [200/0]
     via 3030:1:1:1::11
B   3333::1/128 [200/10]
     via 3030:1:1:1::11

!--- The above routes are OSPFv3 routes
!--- that are redistributed in to BGP.

B   6060:66:66:66::66/128 [200/0]
     via 3030:1:1:1::11
在路由器 R3 中
R3#show ipv6 route bgp
IPv6 Routing Table - 14 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
B   1010:1:1:1::/64 [200/0]
     via 3030:1:1:1::10
B   2010::1/128 [200/0]
     via 3030:1:1:1::10
B   2011::1/128 [200/0]
     via 3030:1:1:1::10
B   2222::1/128 [200/10]
     via 3030:1:1:1::10

!--- The above routes are OSPFv3 routes
!--- that are redistributed in to BGP.

B   5050:55:55:55::55/128 [200/0]
     via 3030:1:1:1::10


相关信息


Document ID: 113453