簡介
本文檔介紹如何在EIGRP和BGP之間配置相互重分發。
必要條件
需求
思科建議您瞭解以下主題:
-
增強型內部閘道路由通訊協定(EIGRP)
-
邊界閘道通訊協定(BGP)
採用元件
本檔案中的資訊是根據採用Cisco IOS®軟體版本15.0(1)的Cisco 7200系列路由器。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
慣例
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
設定
在本示例中,路由器R1和R2使用EIGRP相互通訊。路由器R2和R3使用eBGP。要將eBGP路由相互重分發到EIGRP,請使用 redistribute bgp
命令和EIGRP度量。同樣,若要將EIGRP路由重分發到BGP,請使用 redistribute eigrp AS number
指令。
網路圖表
此文件使用以下網路設定:
網路圖表
組態
本檔案會使用以下設定:
路由器R1 |
!
hostname R1
!
ip cef
!
!
interface Loopback0
ip address 10.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 10.30.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 10.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 10.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 10.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 10.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
|
驗證
使用本節內容,確認您的組態是否正常運作。
CLI Analyzer用於檢視 show
命令輸出。
注意:只有註冊的思科使用者才能訪問內部思科工具和資訊。
顯示命令
要檢驗EIGRP是否接收重分發的路由,請使用 show ip route eigrp
指令。
show ip route eigrp |
在路由器R1中 R1#show ip route eigrp
10.20.0.0/32 is subnetted, 1 subnets
D EX 10.20.20.20
[170/25625856] via 192.168.1.100, 01:00:33, FastEthernet0/0
10.22.0.0/32 is subnetted, 1 subnets
D EX 10.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路由是否在BGP中正確重分發,請使用 show ip route bgp
命令。
show ip route bgp |
在路由器R3中 R3#show ip route bgp
show ip route bgp
10.20.0.0/32 is subnetted, 1 subnets
B 10.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
10.30.0.0/32 is subnetted, 1 subnets
B 10.30.30.30 [20/409600] via 172.16.100.50, 00:59:06
!--- The output indicates that the EIGRP routes are !--- redistributed in BGP.
|
相關資訊