BGP配置实验案例

合集下载

BGP实验:路由反射器配置(Route-Reflector)实例5页word文档

BGP实验:路由反射器配置(Route-Reflector)实例5页word文档

BGP实验:路由反射器配置(Route-Reflector)实例5页word文档BGP实验之路由反射器配置(Route-Reflector)实例实际案例(内配图+详细验证过程)为避免在AS内部的路由环路,BGP不会向内部BGP邻居通告它从其它内部BGP对等体中获得的路由。

上图中,R2会通告给R3所有它从R1学来的EBGP路由条目。

但是这些路由不会通告给R4,因为R3不会在R2和R4之间传递IBGP 路由。

为使R4得知这些路由,R2和R4之间就必须有一对IBGP连接。

这些对IBGP全互连的要求造成了对每个IBGP路由器定义邻居语句的需求。

在一个有100个路由器的AS中,这种情况要求定义100个邻居语句。

因此,这对扩展性造成了严重的问题。

为克服这个问题,BGP里定义了路由反射器的概念(RR),RR 是所有内部BGP(IBGP)会话的集中路由器或焦点。

与路由反射器对等的路由器称为路由反射器客户。

这些客户与路由反射器相匹配并交换路由信息。

路由反射器接着交换或者“反射”这一信息给所有客户,从而消除了对全互连环境的需要。

我们在此例中,把R3设置为路由反射器。

//// R1 ////int f0/0ip ad 192.1.1.1 255.255.255.0int lo0ip ad 1.1.1.1router bgp 200no synneighbor 192.1.1.2 remote-as 200 network 1.0.0.0//// R2 ////int f0/0ip ad 192.1.1.2 255.255.255.0int f0/1ip ad 193.1.1.2 255.255.255.0router bgp 200no synneighbor 192.1.1.1 remote-as 100 neighbor 193.1.1.3 remote-as 200 neighbor 193.1.1.3 next-hop-self//// R3 ////int f0/1ip ad 193.1.1.3 255.255.255.0int f0/0ip ad 194.1.1.3 255.255.255.0router bgp 200no synneighbor 193.1.1.2 remote-as 200 neighbor 193.1.1.2 route-reflector-client neighbor 194.1.1.4 remote-as 200 neighbor 194.1.1.4 route-reflector-client//// R4 ////int f0/0ip ad 194.1.1.4 255.255.255.0router bgp 200no synneighbor 194.1.1.3 remote-as 200验证:show ip bgpshow ip ro希望以上资料对你有所帮助,附励志名言3条:1、常自认为是福薄的人,任何不好的事情发生都合情合理,有这样平常心态,将会战胜很多困难。

bgp路由手工聚合相关参数配置实验

bgp路由手工聚合相关参数配置实验

bgp路由手工聚合相关参数配置实验SE课程中大家学习过BGP的路由聚合,在使用过程中,我们一般会使用BGP的手工聚合。

今天的技术帖我们就给大家介绍BGP的手工聚合后面添加的参数的使用。

一、拓扑图如下图所示:RT1通过物理接口与RT2形成EBGP对等体,RT2和RT3通过loopback接口形成IBGP对等体在RT2上配置路由聚合,聚合192.168.0.1/32和192.168.1.1/32的路由。

一、配置如下所示:1.BGP只发布聚合路由,不发布明细路由[RT2]bgp 200[RT2-bgp-default]address-family ipv4[RT2-bgp-default-ipv4]aggregate 192.168.0.0 23----默认配置路由聚合,发布给邻居路由器的聚合和明细路由都进行发布此时在RT3上查看BGP路由表,发现明细和聚合路由都有,如下图所示:这时可以在BGP上多添加一条命令,如下所示:[RT2-bgp-default]address-family ipv4[RT2-bgp-default-ipv4]aggregate 192.168.0.0 23 detail-suppressed----这样可以只发布聚合路由,抑制明细路由在RT3上查看BGP路由表,如下图所示:2.配置指定聚合路由中包含的路由的AS-PATH信息。

在配置BGP路由聚合时,因为明细路由是RT1发送的,所以RT1发给RT2的路由中as-path属性中有AS100,如下图所示:但是RT2发往RT3的路由中如果做了BGP的路由聚合,默认只包含当前路由器所在的AS号,所以此时RT3设备上学到的聚合路由AS-PATH列表内容为空,如下图所示:此时可以在给RT2上配置的聚合路由中添加as-set命令[RT2-bgp-default]address-family ipv4[RT2-bgp-default-ipv4]aggregate 192.168.0.0 23 detail-suppressed as-set配置成功之后如下图所示:下一期的BGP路由聚合技术帖,我们把聚合之后能够添加的其他参数进行介绍。

CCNP之BGP试验案例[优质文档]

CCNP之BGP试验案例[优质文档]

CCNP之BGP实验案例实验需求:1、每一台路由器都起一个/32的回环地址,用来建立BGP邻居关系2、大型企业内部起OSPF协议,ISP B内部也起OSPF协议,企业A分别和ISP B和ISP C建立BGP邻接关系,以用来透传互联网上的条目3、要求ISP C学到挂在ISP B的服务器条目尽可能少4、要求ISP C前往ISP B那些服务器是通过R3和R5之间的高带宽链路,为了充分利用带宽,要求ISP B访问ISP C上的服务器是走的R4和R6之间的低带宽链路,这些配置都需要在大型企业上完成5、要求ISP和企业之间建立的BGP邻接是安全的6、完成配置之后,确信网络中每一台设备都学到了服务器对应的BGP条目实验拓扑图:实验步骤:1、在大型企业A和ISP B内部起OSPF协议R2:R2(config)#router ospf 1R2(config-router)#net 2.2.2.2 0.0.0.0 a 0R2(config-router)#net 23.23.23.23 0.0.0.0 a 0R2(config-router)#net 24.24.24.24 0.0.0.0 a 0R3:R3(config)#router ospf 1R3(config-router)#net 3.3.3.3 0.0.0.0 a 0R3(config-router)#net 23.23.23.1 0.0.0.0 a 0R4:R4(config)#router ospf 1R4(config-router)#net 4.4.4.4 0.0.0.0 a 0R4(config-router)#net 24.24.24.1 0.0.0.0 a 0R5:R5(config)#router ospf 1R5(config-router)#net 5.5.5.5 0.0.0.0 a 0R5(config-router)#net 57.57.57.2 0.0.0.0 a 0R6:R6(config)#router ospf 1R6(config-router)#net 6.6.6.6 0.0.0.0 a 0R6(config-router)#net 67.67.67.2 0.0.0.0 a 0R7:R7(config)#router ospf 1R7(config-router)#net 7.7.7.7 0.0.0.0 a 0R7(config-router)#net 57.57.57.1 0.0.0.0 a 0R7(config-router)#net 67.67.67.1 0.0.0.0 a 02、全网启用BGP协议由于ebgp建立在TCP连接的基础上,所以需要配置静态路由。

华为BGP配置实例

华为BGP配置实例

h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn
*> 8.1.1.0/24
用peer connect-interface命令将Loopback接口配置为BGP连接的源接口。 Router C的Loopback接口路由可达。
# 配置Router B。
<RouterB> system-view [RouterB] bgp 65009 [RouterB-bgp] router-id 2.2.2.2 [RouterB-bgp] peer 3.3.3.3 as-number 65009
3.1.1.0/24的路由。
# 配置Router B。 [RouterB] bgp 65009 [RouterB-bgp] import-route direct # 显示Router A的BGP路由表。
[RouterA] display bgp routing-table
Total Number of Routes: 4 BGP Local router ID is 1.1.1.1 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? – incomplete Network *> 2.2.2.2/32 * 3.1.1.0/24 *> 8.1.1.0/24 *> 9.1.1.0/24 NextHop 3.1.1.1 3.1.1.1 0.0.0.0 3.1.1.1 0 0 0 0 MED LocPrf 0 0 0 0 PrefVal Path/Ogn 65009? 65009? i 65009?

实验三十四、BGP的配置

实验三十四、BGP的配置
七、 注意事项和排错
1. 通过使用网络命令或重发布,BGP 进程必须能知道路由 2. 被通告的路由必须在路由表中 3. IGBP 与 IGP 必须同步才能出现在路由表中
八、 配置序列
Router-B#sh run 正在收集配置...
当前配置: ! !version 1.3.2E service timestamps log date service timestamps debug date no service password-encryption ! hostname Router-B ! ip host a 192.168.1.1 ip host c 192.168.2.2 ! ! ! ! ! ! interface FastEthernet0/0
Distance: external 20 internal 200 local 200
Timers: keepalive 60, holdtime 180
1 network entries using 120 bytes of memory
1 path entries using 68 bytes of memory
九、 共同思考
1. 什么是自治系统? 2. BGP 协议的作用是什么? 3. 如何才能是 IGP 与 IBGP 同步?
十、 课后练习
将地址改为 10.0.0.0/24 这个网段重复以上实验
十一、 相关命令详解
router bgp
使用 router bgp 命令启动 BGP 进程或进入 BGP 配置模式,用 no router bgp 命令关闭 BGP 进 程: router bgp as-number no router bgp as-number
第九步:相关的查看命令

bgp组网实验简单配置

bgp组网实验简单配置

BGP邻居建立与路由发布实验拓扑图:实验配置:1.接口ip地址配置r1#show ip int briefInterface IP-Address OK? Method Status Protocol Serial0/0 10.10.13.1 YES manual up up Serial0/1 10.10.1.5 YES manual up up FastEthernet1/0 10.10.1.1 YES manual up up Loopback0 10.10.0.1 YES manual up upr2#show ip int briefInterface IP-Address OK? Method Status Protocol Serial0/0 10.20.24.1 YES manual up up Serial0/1 10.10.1.9 YES manual up up FastEthernet1/0 10.10.1.2 YES manual up up Loopback0 10.10.0.2 YES manual up upr3#show ip int briefInterface IP-Address OK? Method Status Protocol Serial0/0 10.10.13.2 YES manual up up FastEthernet1/0 10.30.34.1 YES manual up up Ethernet3/0 10.30.3.1 YES manual up up Loopback0 10.30.0.1 YES manual up upr4#show ip int briefInterface IP-Address OK? Method Status Protocol Serial0/0 10.20.24.2 YES manual up up FastEthernet1/0 10.30.34.2 YES manual up up Ethernet3/0 10.40.4.1 YES manual up up Loopback0 10.40.0.1 YES manual up upr5#show ip int briefInterface IP-Address OK? Method Status Protocol Serial0/0 10.10.1.6 YES manual up up FastEthernet1/0 10.10.1.13 YES manual up up Ethernet3/0 10.10.5.1 YES manual up up Loopback0 10.10.0.5 YES manual up upr6#show ip int briefInterface IP-Address OK? Method Status Protocol Serial0/0 10.10.1.10 YES manual up up FastEthernet1/0 10.10.1.14 YES manual up up Ethernet3/0 10.10.6.1 YES manual up up Loopback0 10.10.0.6 YES manual up up保证直连的连通性:r1#ping 10.10.13.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.10.13.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 8/22/40 msr1#ping 10.10.1.6Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.10.1.6, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 12/35/76 msr1#ping 10.10.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.10.1.2, timeout is 2 seconds:.!!!!Success rate is 80 percent (4/5), round-trip min/avg/max = 8/28/56 ms 2.IGP路由协议配置r1(config)#router ospf 1r1(config-router)#router-id 1.1.1.1r1(config-router)#net 10.10.1.0 0.0.0.255 area 0r1(config-router)#net 10.10.0.1 0.0.0.0 area 0r1(config-router)#net 10.10.13.1 0.0.0.3 area 0r1(config-router)#passive-interface s0/0//**配置被动接口,保护内部安全不被外部网络学习到自己自治系统的路由r1(config-router)#$ormation originate always metric 2000 metric-type 1//**下发缺省路由r2(config)#router ospf 1r2(config-router)#router-id 2.2.2.2r2(config-router)#net 10.10.0.2 0.0.0.0 area 0r2(config-router)#net 10.10.1.0 0.0.0.255 area 0r2(config-router)#redistribute connected metric 2000 metric-type 1 subnets//**重发布直连路由进ospf进程,让其他路由器学习到这条直连路由r2(config-router)#$ormation originate always metric 2000 metric-type 1//**同样也发布缺省路由,作为r1的备份r5(config)#router ospf 1r5(config-router)#net 10.10.0.5 0.0.0.0 area 0r5(config-router)#net 10.10.1.13 0.0.0.3 area 0r5(config-router)#net 10.10.1.6 0.0.0.3 area 0r5(config-router)#net 10.10.5.1 0.0.0.255 area 0r6(config)#router ospf 1r6(config-router)#router-id 6.6.6.6r6(config-router)#net 10.10.0.6 0.0.0.0 area 0r6(config-router)#net 10.10.1.14 0.0.0.3 area 0r6(config-router)#net 10.10.6.1 0.0.0.255 area 0r6(config-router)#net 10.10.1.10 0.0.0.3 area 0//**AS30和AS40里面只有一台路由器,无需运行IGP将自治系统内的接口配置成点对点类型且ospf cost值配置为100:r1(config)#int f1/0r1(config-if)#ip ospf net point-to-p //**接口配置成点对点,节省收敛时间r1(config-if)#ip ospf cost 100 //**链路cost值统一配成100r1(config)#int s0/1r1(config-if)#ip ospf net point-to-pr1(config-if)#ip ospf cost 100r2(config)#int f1/0r2(config-if)#ip ospf net point-to-pr2(config-if)#ip ospf cost 100r2(config)#int s0/1r2(config-if)#ip ospf net point-to-pr2(config-if)#ip ospf cost 100r5(config)#int s0/0r5(config-if)#ip ospf net point-to-pr5(config)#int f1/0r5(config-if)#ip ospf net point-to-pr5(config-if)#ip ospf cost 100r5(config-if)#int s0/0r5(config-if)#ip ospf cost 100r6(config)#int f1/0r6(config-if)#ip ospf net pr6(config-if)#ip ospf net point-to-pr6(config)#int s0/1r6(config-if)#ip ospf net point-to-pr6(config)#int f1/0r6(config-if)#ip ospf cost 100r6(config-if)#int s0/0r6(config-if)#ip ospf cost 100查看邻居关系的建立:r1#show ip ospf neiNeighbor ID Pri State Dead Time Address Interface2.2.2.2 0 FULL/ - 00:00:35 10.10.1.2 FastEthernet1/010.10.0.5 0 FULL/ - 00:00:32 10.10.1.6 Serial0/1r2#show ip ospf neiNeighbor ID Pri State Dead Time Address Interface1.1.1.1 0 FULL/ - 00:00:30 10.10.1.1 FastEthernet1/0 6.6.6.6 0 FULL/ - 00:00:34 10.10.1.10 Serial0/1r5#show ip ospf neiNeighbor ID Pri State Dead Time Address Interface6.6.6.6 0 FULL/ - 00:00:34 10.10.1.14 FastEthernet1/0 1.1.1.1 0 FULL/ - 00:00:36 10.10.1.5 Serial0/0r6#show ip ospf neiNeighbor ID Pri State Dead Time Address Interface 10.10.0.5 0 FULL/ - 00:00:33 10.10.1.13 FastEthernet1/0 2.2.2.2 0 FULL/ - 00:00:39 10.10.1.9 Serial0/0BGP邻居建立:r1(config)#router bgp 10 //**定义自治系统号为10r1(config-router)#no synchronization //**关同步r1(config-router)#no auto-summary //**关闭自动汇总r1(config-router)#neighbor 10.10.0.2 remote-as 10//**与自治系统为10的10.10.0.2建立邻居关系r1(config-router)#neighbor 10.10.0.2 update-source loopback 0//**使用loopback 0接口来建立邻居关系r1(config-router)#neighbor 10.10.13.2 remote-as 30//**与自治系统30的10.10.13.2建立邻居关系r2(config)#router bgp 10r2(config-router)#no synr2(config-router)#no aur2(config-router)#nei 10.10.0.1 remote-as 10r2(config-router)#neighbor 10.10.0.1 update-source loop 0r2(config-router)#nei 10.20.24.2 remote-as 40r3(config)#router bgp 30r3(config-router)#no synchronizationr3(config-router)#no aur3(config-router)#nei 10.10.13.1 remote-as 10r3(config-router)#nei 10.30.34.2 remote-as 40r4(config)#router bgp 40r4(config-router)#no synr4(config-router)#no aur4(config-router)#nei 10.20.24.1 remote-as 10r4(config-router)#nei 10.30.34.1 remote-as 30查看bgp邻居表:r1#show ip bgp sumBGP router identifier 10.10.0.1, local AS number 10BGP table version is 4, main routing table version 43 network entries using 351 bytes of memory5 path entries using 260 bytes of memory6/3 BGP path/bestpath attribute entries using 744 bytes of memory3 BGP AS-PATH entries using 72 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 1427 total bytes of memoryBGP activity 3/0 prefixes, 5/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.0.2 4 10 115 115 4 0 0 01:49:09 210.10.13.2 4 30 113 113 4 0 0 01:47:49 2r2#show ip bgp sumNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.0.1 4 10 115 115 7 0 0 01:49:43 210.20.24.2 4 40 116 114 7 0 0 01:47:12 2r3#show ip bgp sumNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.13.1 4 10 114 114 4 0 0 01:48:46 210.30.34.2 4 40 116 114 4 0 0 01:47:19 2r4#show ip bgp sumNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.20.24.1 4 10 115 117 6 0 0 01:48:23 210.30.34.1 4 30 115 117 6 0 0 01:48:08 2//** i表示network发布的igp//** e表示egp协议发布egp//** ?表示redistribute发布incompleteBGP路由发布(静态注入):r1(config)#ip route 10.10.0.0 255.255.0.0 null0 //**黑洞路由配置,当去往目标网段down 时,能够在本路由器上就丢包,不会在去往其他路由器而占用带宽r1(config)#router bgp 10r1(config-router)#network 10.10.0.0 mask 255.255.0.0 //**将10.10.0.0 网段手动静态注入BGP,使BGP能承载这些路由其他路由器也进行相应配置:r2(config)#ip route 10.10.0.0 255.255.0.0 null0r2(config)#router bgp 10r2(config-router)#net 10.10.0.0 mask 255.255.0.0r3(config)#ip route 10.30.0.0 255.255.0.0 null0r3(config)#router bgp 30r3(config-router)#net 10.30.0.0 mask 255.255.0.0r4(config)#ip route 10.40.0.0 255.255.0.0 null0r4(config)#router bgp 40r4(config-router)#net 10.40.0.0 mask 255.255.0.0查看bgp表和全局路由表:r1#show ip bgpBGP table version is 4, local router ID is 10.10.0.1Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path* i10.10.0.0/16 10.10.0.2 0 100 0 i*> 0.0.0.0 0 32768 i*> 10.30.0.0/16 10.10.13.2 0 0 30 i* 10.40.0.0/16 10.10.13.2 0 30 40 i*>i 10.20.24.2 0 100 0 40 i//**Bgp表只选择最佳路由,*表示存在这样一条链路但是没有选择其进路由表,原因是选10.10.13.2作为下一跳要经过30 和40两个自治系统,而如果选择10.20.24.2为下一跳只需经过40这一个自治系统,路由器会选择AS_path最短的路由r1#show ip route10.0.0.0/8 is variably subnetted, 15 subnets, 4 masksS 10.10.0.0/16 is directly connected, Null0C 10.10.1.0/30 is directly connected, FastEthernet1/0C 10.10.0.1/32 is directly connected, Loopback0O 10.10.0.2/32 [110/101] via 10.10.1.2, 01:02:20, FastEthernet1/0O 10.10.5.0/24 [110/110] via 10.10.1.6, 01:02:20, Serial0/1C 10.10.1.4/30 is directly connected, Serial0/1O 10.10.0.5/32 [110/101] via 10.10.1.6, 01:02:20, Serial0/1O E1 10.20.24.0/30 [110/2100] via 10.10.1.2, 01:02:20, FastEthernet1/0O 10.10.6.0/24 [110/210] via 10.10.1.6, 01:02:20, Serial0/1[110/210] via 10.10.1.2, 01:02:20, FastEthernet1/0O 10.10.0.6/32 [110/201] via 10.10.1.6, 01:02:20, Serial0/1[110/201] via 10.10.1.2, 01:02:20, FastEthernet1/0O 10.10.1.8/30 [110/200] via 10.10.1.2, 01:02:21, FastEthernet1/0C 10.10.13.0/30 is directly connected, Serial0/0O 10.10.1.12/30 [110/200] via 10.10.1.6, 01:02:21, Serial0/1B 10.30.0.0/16 [20/0] via 10.10.13.2, 01:55:17B 10.40.0.0/16 [200/0] via 10.20.24.2, 01:54:25//**两条bgp路由一条管理距离为20,为外部r3学习到的,一条管理距离为200为自己自治系统r2发的。

实验7-3:配置BGP路由汇总和测试BGP路径选择过程

实验7-3:配置BGP路由汇总和测试BGP路径选择过程

实验7-3:配置BGP路由汇总和测试BGP路径选择过程【实验目的】:在本次实验中,你使用BGP路由聚合优化BGP和观察BGP路径选择过程在完成本次实验之后,你需要完成下列任务:∙在BGP中配置地址汇总∙确定BGP使用的路径选择过程【实验拓扑】:注意:图中x为所在机架编号,y为路由器编号。

【实验帮助】:如果出现任何问题,可以向在值的辅导老师提出并请求提供帮助。

【命令列表】:【任务一】:配置BGP汇总和路径选择过程在这个任务中,你需要使用TELNET连接到远程实验设备完成实验。

实验过程:第一步:在边界路由器PxR1,PxR2,使用aggregate address命令和summary-only参数聚合您的实验路由器网络10.x.0.0/16到核心自治系统。

在这个聚合路由中,你不需要包括PxR3和PxR4的环回接口。

第二步:Telnet到核心路由器BBR1或者BBR2上,并查看路由表。

这里是否有你的聚合地址出现?从核心路由器上Ping 10.x.3.3和10.x.4.4测试他们之间的连接性。

第三步:在边界路由器上,使用show ip bgp命令显示BGP表。

你使用了aggregate-address和summary-only选项,你有看到你的实验子网详细路由是被抑制的?测试到达自治系统64997(AS 64997是新加入的第三个路由器连接在网络核心)中的网络10.97.97.0最佳路径。

这个网络的下一跳是什么呢?你的显示应该与下列类似:第四步:基于BGP的路径选择过程,为什么那条路由被选择?【实验验证】:成功完成整个实验,你需要完成下列任务:∙你在BGP路由发布中聚合你的实验网络∙你有确定你的BGP路由器使用的BGP路径选择过程。

bgp综合实例

bgp综合实例

下面是一个BGP 综合实例,其中涉及到路由聚合、静态路由的再分配等BGP 功能的实际应用。

R4 和R1 建立EBGP,R1 和R2 建立IBGP,R2 和R5 建立多跳EBGP。

其中,假设R4 中存在图中右上角标注的四条静态路由。

在R4 的配置中,仅聚合通告192.16.0.0/16 网段,并且通过路由图禁止通过BGP 对外通告170.16.10.0/24 网段。

R2 与R5 之间通过R3 建立EBGP 多跳关系,此时在配置BGP 之前需要保证该两台路由器建立邻居的地址能够互通。

R4 的配置:ZXR10_R4(config)#router bgp 2ZXR10_R4(config-router)#redistribute staticZXR10_R4(config-router)#neighbor 172.16.20.2 remote-as 1ZXR10_R4(config-router)#aggregate-address 192.16.0.0 255.255.0.0 count 0 as-set summary-onlyZXR10_R4(config-router)#neighbor 172.16.20.2 route-map torouter1 out ZXR10_R4(config-router)#exitZXR10_R4(config)#ip access-list standard 1ZXR10_R4(config-std-acl)#permit 172.16.10.0 0.0.0.255ZXR10_R4(config-std-acl)#exitZXR10_R4(config)#route-map torouter1 deny 10ZXR10_R4(config-route-map)#match ip address 1ZXR10_R4(config)#route-map torouter1 permit 20R1 的配置:ZXR10_R1(config)#router bgp 1ZXR10_R1(config-router)#no synchronizationZXR10_R1(config-router)#neighbor 172.16.1.2 remote-as 1ZXR10_R1(config-router)#neighbor 172.16.1.2 next-hop-selfZXR10_R1(config-router)#neighbor 172.16.20.1 remote-as 2R2 的配置:ZXR10_R2(config)#ip route 183.16.0.0 255.255.0.0 fei_1/4ZXR10_R2(config)#router bgp 1ZXR10_R2(config-router)#neighbor 172.16.1.1 remote-as 1ZXR10_R2(config-router)#neighbor 172.16.1.1 next-hop-selfZXR10_R2(config-router)#neighbor 183.16.20.2 remote-as 3ZXR10_R2(config-router)#neighbor 183.16.20.2 ebgp-multihop ttl 2 ZXR10_R2(config-router)#neighbor 183.16.20.2 route-map torouter5 in ZXR10_R2(config-router)#exitZXR10_R2(config)#ip access-list standard 1ZXR10_R2(config-std-acl)#permit 155.16.10.0 0.0.0.255ZXR10_R2(config-std-acl)#exitZXR10_R2(config)#route-map torouter5 deny 10ZXR10_R2(config-route-map)#match ip address 1ZXR10_R2(config)#route-map torouter5 permit 20R5 的配置:ZXR10_R5(config)#ip route 173.16.0.0 255.255.0.0 gei_1/1ZXR10_R5(config)#router bgp 3ZXR10_R5(config-router)#neighbor 173.16.20.2 remote-as 1ZXR10_R5(config-router)#neighbor 173.16.20.2 ebgp-multihop ttl 2。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

BGP配置实验案例
BGP(边界网关协议)是一个用于在互联网中交换路由信息的协议。

在本篇文章中,我们将探讨一个BGP配置实验案例,其中包括两个自治系统(AS)之间的BGP邻居关系的建立和路由的传递。

这个实验案例可以帮助读者更好地理解BGP协议的工作原理和配置步骤。

在这个实验案例中,我们有两个自治系统:AS1和AS2、AS1拥有IP 地址段192.168.0.0/24,AS2拥有IP地址段10.0.0.0/24、我们的目标是在两个自治系统之间建立BGP邻居关系,并实现路由的传递。

首先,我们需要在两个自治系统中配置BGP路由器。

在AS1中,我们选择一个路由器作为BGP路由器,并配置其Loopback接口的IP地址为192.168.0.1、在AS2中,选择另一个路由器作为BGP路由器,并配置其Loopback接口的IP地址为10.0.0.1、这些Loopback接口的IP地址将用作BGP邻居之间的通信地址。

接下来,我们开始配置BGP邻居关系。

在AS1中,我们需要告诉BGP 路由器与AS2的BGP路由器建立邻居关系。

假设AS2的BGP路由器的IP 地址为10.0.0.2,我们将在AS1的BGP路由器上执行以下命令:```
```
同样地,在AS2的BGP路由器上,我们需要告诉其与AS1的BGP路由器建立邻居关系。

假设AS1的BGP路由器的IP地址为192.168.0.1,我们将在AS2的BGP路由器上执行以下命令:
```
```
配置完BGP邻居关系后,我们可以开始传递路由信息。

在AS1中,我们希望将本地的IP地址段192.168.0.0/24传输给AS2、我们需要在AS1的BGP路由器上执行以下命令:
```
network 192.168.0.0 mask 255.255.255.0
```
这些命令告诉AS1的BGP路由器将地址段192.168.0.0/24传输给BGP邻居。

同样地,在AS2中,我们希望将本地的IP地址段10.0.0.0/24传输给AS1、我们需要在AS2的BGP路由器上执行以下命令:
```
network 10.0.0.0 mask 255.255.255.0
```
这些命令告诉AS2的BGP路由器将地址段10.0.0.0/24传输给BGP邻居。

经过配置后,AS1和AS2之间的BGP邻居关系就建立起来了,并且路由信息也开始传递。

此时,当AS1中的路由器收到一个发送给AS2的数据包时,它会使用BGP路由表中的信息将数据包转发给AS2、类似地,当AS2中的路由器收到一个发送给AS1的数据包时,它也会使用BGP路由表中的信息将数据包转发给AS1
通过这个实验案例,读者可以更好地理解BGP协议的工作原理和配置步骤。

BGP的配置涉及到自治系统之间的连通性和路由的传递,而这个实验案例提供了一个简单而完整的示例来演示这些概念。

希望这篇文章能够对读者有所帮助!。

相关文档
最新文档