本文描述如何在增强型内部网关路由选择协议 (EIGRP) 和边界网关协议 (BGP) 之间配置双向再分配。
EIGRP 的基础知识
BGP 的基础知识
本文中的配置基于装有 Cisco IOS® 软件版本 15.0(1) 的 Cisco 7200 系列路由器。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
在本例中,路由器 R1 和 R2 使用 EIGRP 彼此通信。路由器 R2 和 R3 使用 eBGP。为了将 eBGP 路由双向分配到 EIGRP,请使用具有 EIGRP 指标的 redistribute bgp 命令。同样,为了将 EIGRP 路由再分配到 BGP,请使用 redistribute eigrp AS number 命令。
注意:使用命令查找工具(仅限注册客户)可查找有关本文档中使用的命令的详细信息。
本文档使用以下网络设置:
本文档使用以下配置:
路由器 R1 |
---|
! hostname R1 ! ip cef ! ! interface Loopback0 ip address 30.30.30.30 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.1.101 255.255.255.0 duplex auto speed auto ! router eigrp 100 network 30.0.0.0 network 192.168.1.0 no auto-summary ! end |
路由器 R2 |
---|
! hostname R2 ! ip cef ! ! interface Loopback0 ip address 10.10.10.10 255.255.255.255 ! interface Loopback1 ip address 20.20.20.20 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.1.100 255.255.255.0 duplex auto speed auto ! interface Serial0/0 ip address 172.16.100.50 255.255.255.0 serial restart-delay 0 clock rate 2000000 ! router eigrp 100 redistribute static redistribute bgp 1000 metric 100 1 255 1 1500 network 10.0.0.0 network 192.168.1.0 no auto-summary ! router bgp 1000 no synchronization bgp log-neighbor-changes network 20.20.20.20 mask 255.255.255.255 redistribute connected redistribute static redistribute eigrp 100 neighbor 172.16.100.51 remote-as 2000 neighbor 172.16.100.51 next-hop-self no auto-summary ! end |
路由器 R3 |
---|
! hostname R3 ! ip cef ! interface Loopback0 ip address 22.22.22.22 255.255.255.255 ! interface Serial0/0 ip address 172.16.100.51 255.255.255.0 serial restart-delay 0 clock rate 2000000 ! router bgp 2000 no synchronization bgp log-neighbor-changes network 22.22.22.22 mask 255.255.255.255 network 172.16.100.0 mask 255.255.255.0 neighbor 172.16.100.50 remote-as 1000 neighbor 172.16.100.50 default-originate default-information originate !--- Default route is configured! no auto-summary ! end |
使用本部分可确认配置能否正常运行。
命令输出解释程序(仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。
为了验证 EIGRP 接收再分配的路由,请使用 show ip route eigrp 命令。
show ip route eigrp |
---|
在路由器 R1 中 R1#show ip route eigrp 20.0.0.0/32 is subnetted, 1 subnets D EX 20.20.20.20 [170/25625856] via 192.168.1.100, 01:00:33, FastEthernet0/0 22.0.0.0/32 is subnetted, 1 subnets D EX 22.22.22.22 [170/25625856] via 192.168.1.100, 00:59:49, FastEthernet0/0 10.0.0.0/32 is subnetted, 1 subnets D 10.10.10.10 [90/409600] via 192.168.1.100, 00:55:17, FastEthernet0/0 D*EX 0.0.0.0/0 [170/25625856] via 192.168.1.100, 00:46:24, FastEthernet0/0 !--- Shows the default route from router R3. !--- EX indicates that the routes are EIGRP external routes. |
为了验证 EIGRP 路由在 BRP 中正确再分配,请在路由器 R3 中使用 show ip route eigrp 命令。
show ip route bgp |
---|
在路由器 R3 中 R3#show ip route bgp show ip route bgp 20.0.0.0/32 is subnetted, 1 subnets B 20.20.20.20 [20/0] via 172.16.100.50, 01:03:02 10.0.0.0/32 is subnetted, 1 subnets B 10.10.10.10 [20/0] via 172.16.100.50, 01:03:02 B 192.168.1.0/24 [20/0] via 172.16.100.50, 01:03:02 30.0.0.0/32 is subnetted, 1 subnets B 30.30.30.30 [20/409600] via 172.16.100.50, 00:59:06 !--- The output indicates that the EIGRP routes are !--- redistributed in BGP. |
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
02-May-2012 |
初始版本 |