网站建设经营服务合同seo1短视频网页入口营销
当用不同的方式为BGP注入路由时,起源代码将标识路由的来源。
(在BGP表中,Network为“i”,重分布是“?”)
实验拓扑如下:
R2上将来自IGP的路由10.3.3.3/32用network指令注入BGP;在R4上将来自IGP的路由10.3.3.3/32使用重分布的方式引入BGP。
完成实验拓扑的基础配置R1如下:
hostname R1
!
interface Loopback0ip address 10.1.0.1 255.255.255.0
!
interface Loopback1ip address 10.1.1.1 255.255.255.0
!
interface Ethernet0/0ip address 10.12.1.1 255.255.255.0no sh
!
router bgp 100bgp router-id 1.1.1.1network 10.1.0.0 mask 255.255.255.0network 10.1.1.0 mask 255.255.255.0aggregate-address 10.1.0.0 255.255.0.0 summary-onlyneighbor 10.12.1.2 remote-as 234
!
end
R2的配置如下:
hostname R2
!
interface Loopback1ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0ip address 10.12.1.2 255.255.255.0no sh
!
interface Ethernet0/1ip address 10.23.0.2 255.255.255.0no sh
!
router eigrp 10network 0.0.0.0passive-interface defaultno passive-interface Ethernet0/1
!
router bgp 234bgp router-id 2.2.2.2network 10.3.3.3 mask 255.255.255.255neighbor IBGP peer-groupneighbor IBGP remote-as 234neighbor IBGP update-source Loopback1neighbor IBGP next-hop-selfneighbor 3.3.3.3 peer-group IBGPneighbor 4.4.4.4 peer-group IBGPneighbor 10.12.1.1 remote-as 100
!
end
R3的配置如下:
hostname R3
!
interface Loopback0ip address 10.3.3.3 255.255.255.255
!
interface Loopback1ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0ip address 10.23.0.3 255.255.255.0no sh
!
interface Ethernet0/1ip address 10.34.0.3 255.255.255.0no sh
!
router eigrp 10network 0.0.0.0
!
router bgp 234bgp router-id 3.3.3.3neighbor IBGP peer-groupneighbor IBGP remote-as 234neighbor IBGP update-source Loopback1neighbor 2.2.2.2 peer-group IBGPneighbor 4.4.4.4 peer-group IBGP
!
end
R4的配置如下:
hostname R4
!
interface Loopback1ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0ip address 10.45.2.4 255.255.255.0no sh
!
interface Ethernet0/1ip address 10.34.0.4 255.255.255.0no sh
!
router eigrp 10network 0.0.0.0passive-interface Ethernet0/0
!
router bgp 234bgp router-id 4.4.4.4redistribute eigrp 10 route-map REDneighbor IBGP peer-groupneighbor IBGP remote-as 234neighbor IBGP update-source Loopback1neighbor IBGP next-hop-selfneighbor 2.2.2.2 peer-group IBGPneighbor 3.3.3.3 peer-group IBGPneighbor 10.45.2.5 remote-as 500
!
ip prefix-list RED seq 5 permit 10.3.3.3/32
!
route-map RED permit 10match ip address prefix-list RED
!
R5的配置如下:
hostname R5
!
interface Loopback2ip address 10.1.2.5 255.255.255.0
!
interface Loopback3ip address 10.1.3.5 255.255.255.0
!
interface Ethernet0/0ip address 10.45.2.5 255.255.255.0no sh
!
router bgp 500bgp router-id 5.5.5.5network 10.1.2.0 mask 255.255.255.0network 10.1.3.0 mask 255.255.255.0aggregate-address 10.1.0.0 255.255.0.0 summary-onlyneighbor 10.45.2.4 remote-as 234
!
end
在R3上查看网络10.3.3.3/32的BGP表和路由详细信息如下:
其他路由器的BGP表和路由查看略。
当通过起源代码做BGP选路决策时,可以看到IGP的“i”是由于重分布的“?”的选路规则。
另外,在操作本AS的多宿主环境的BGP网络出站流量时,使用本地优先级控制更合适。(随后的实验将逐步演示。)