BGP实验

合集下载

BGP实验手册

BGP实验手册

实验十、BGP实验实验要求:1、掌握BGP的基本配置方法。

2、掌握如何查看BGP的各种配置信息。

3、掌握基于回环口的BGP的邻居关系建立的配置方法。

4、理解需要使用回环口为目的。

5、理解BGP同步功能的作用和配置。

6、掌握使用指向NULL0接口的静态路由的汇总配置方法。

7、掌握使用聚合属性的路由汇总配置方法。

实验拓扑:根据实验要求,实验拓扑如图10-1所示。

图10-1 BGP实验拓扑注:R1和R2属于自治系统65001,R3属于自治系统65002实验步骤:1、根据实验拓扑,对路由器各接口配置IP地址,使直连链路相互间可以进行通信。

2、在R1和R2上配置EIGRP,关闭自动汇总。

参考命令如下:R1(config)#router eigrp 50 50修改为自己学号后两位R1(config-router)#network 192.168.1.0R1(config-router)#network 1.0.0.0R1(config-router)#no auto-summaryR2(config)#router eigrp 50 50修改为自己学号后两位R2(config-router)#network 192.168.1.0R2(config-router)#network 2.0.0.0R2(config-router)#no auto-summary3、首先在R1和R2配置BGP协议,使用回环口创建邻居关系,参考命令如下:R1(config)#router bgp 65001 65001修改为65000+自己学号后两位R1(config-router)#neighbor 2.2.2.2 remote-as 65001 65001修改为65000+自己学号后两位R1(config-router)#network 1.1.1.1 mask 255.255.255.255R1(config-router)#network 172.16.0.0 mask 255.255.255.0R1(config-router)#network 172.16.1.0 mask 255.255.255.0R1(config-router)#network 172.16.2.0 mask 255.255.255.0R1(config-router)#network 172.16.3.0 mask 255.255.255.0R1(config-router)#network 192.168.1.0R2(config)#router bgp 65001 65001修改为65000+自己学号后两位R2(config-router)#neighbor 1.1.1.1 remote-as 65001 65001修改为65000+自己学号后两位R2(config-router)#network 2.2.2.2 mask 255.255.255.255R2(config-router)#network 192.168.1.0R2(config-router)#network 192.168.2.04、配置后在路由器R1中查看BGP邻居关系和汇总信息,参考命令如下:R1#show ip bgp neighborsR1#show ip bgp summary问题1:R1中邻居关系的状态是什么?5、查看路由器R1和R2的BGP的路由链路数据库信息,参考命令如下:R1#show ip bgp ipv4 unicast问题2:在数据库中是否有非直连链路信息?6、在路由器R1和R2中分别指定回环接口建立邻居关系,参考命令如下:R1(config)#router bgp 65001 65001修改为65000+自己学号后两位R1(config-router)#neighbor 2.2.2.2 update-source lo1 lo1为地址1.1.1.1的接口R2(config)#router bgp 65001 65001修改为65000+自己学号后两位R2(config-router)#neighbor 1.1.1.1 update-source lo0 lo0为地址2.2.2.2的接口问题3:再次查看R1的邻居关系,邻居关系状态为什么?问题4:在路由器R2中查看路由链路数据库,能否看到R1上面的路由?如果能看到的话这些路由是否为最佳路由?(提示:最佳路由提示符为“*>”)问题5:查看R2路由表,能否看到172.16.1.0路由?7、在路由器R1、R2中关闭同步功能R1(config)#router bgp 65001 65001修改为65000+自己学号后两位R1(config-router)#no synchronizationR2(config)#router bgp 65001 65001修改为65000+自己学号后两位R2(config-router)#no synchronization问题6:过一段时间查看路由器R2的路由表,是否能看到172.16.1.0的路由?8、在路由器R2和R3中配置不同自治系统的BGP路由,参考命令如下:R2(config)#router bgp 65001 65001修改为65000+自己学号后两位R2(config-router)#neighbor 3.3.3.3 remote-as 65002 65002修改为65001+自己学号后两位R2(config-router)#neighbor 3.3.3.3 update-source lo0 lo0为地址2.2.2.2的接口R2(config-router)#neighbor 3.3.3.3 ebgp-multihop 2R2(config)#ip route 3.3.3.3 255.255.255.255 192.168.2.3注:添加静态路由,使得R2能够访问3.3.3.3R3(config)#router bgp 65002 65002修改为65001+自己学号后两位R3(config-router)#neighbor 2.2.2.2 remote-as 65001 65001修改为65000+自己学号后两位R3(config-router)#neighbor 2.2.2.2 update-source lo1 lo1为3.3.3.3的接口R3(config-router)#neighbor 2.2.2.2 ebgp-multihop 2R3(config-router)#network 192.168.2.0R3(config-router)#network 192.168.3.0R3(config-router)#network 192.168.4.0R3(config-router)#network 192.168.5.0R3(config-router)#network 192.168.6.0R3(config-router)#network 192.168.7.0R3(config)#ip route 2.2.2.2 255.255.255.255 192.168.2.2注:添加静态路由,使得R2能够访问2.2.2.2问题7:查看路由器R3的路由表,能否得到全网的路由信息?问题8:查看路由器R1的路由器,能否得到全网的路由信息?9、在路由器R1中添加静态路由,使得能够访问3.3.3.3R1(config)#ip route 3.3.3.3 255.255.255.255 192.168.1.2问题9:过一段时间后再查看路由器R1的路由表,能否看到全网路由信息?10、通过路由汇总配置,有效的减少路由表的大小,提高路由效率。

实验BGP综合实验

实验BGP综合实验

实验BGP综合实验实验物理拓扑图R1r1(config)#interface e1/0r1(config-if)#ip add 192.168.1.1 255.255.255.0r1(config-if)#no shutdownr1(config-if)#exitr1(config)#interface loopback 1r1(config-if)#ip add 1.1.1.1 255.255.255.0r1(config-if)#no shutdownr1(config-if)#exitr1(config)#interface loopback 2r1(config-if)#ip add 192.168.7.11 255.255.255.0r1(config-if)#no shutdownr1(config-if)#exitr1(config)#router ripr1(config-router)#net 192.168.1.0r1(config-router)#net 192.168.7.0r1(config-router)#net 1.1.1.0r1(config-router)#exitr1(config)#router bgp 100r1(config-router)#neighbor 2.2.2.2 remote-as 200 手动指上邻居r1(config-router)#neighbor 2.2.2.2 update-source loopback 1 以我的LOOPBACK 1 为原与2 .2..2.2 建立邻居关系r1(config-router)#neighbor 2.2.2.2 ebgp-multihop 2 EB与EB用回环口建立邻居所要经历的HOP数r1(config-router)#exitr1(config)#ip route 2.2.2.0 255.255.255.0 192.168.1.2r1(config)#router bgp 100r1(config-router)#net 192.168.1.0r1(config-router)#net 1.1.1.0r1(config-router)#net 192.168.7.0r1(config-router)#endR2r2(config)#interface e1/0r2(config-if)#ip add 192.168.1.2 255.255.255.0r2(config-if)#no shutdownr2(config-if)#exitr2(config)#interface e1/1r2(config-if)#ip add 192.168.2.1 255.255.255.0r2(config-if)#no shutdownr2(config-if)#exitr2(config)#interface loopback 1r2(config-if)#ip add 2.2.2.2 255.255.255.0r2(config-if)#no shutdownr2(config-if)#exitr2(config)#router eigrp 100r2(config-router)#net 2.2.2.0r2(config-router)#net 192.168.2.0r2(config-router)#exitr2(config)#router bgp 200r2(config-router)#neighbor 1.1.1.1 remote-as 100r2(config-router)#neighbor 1.1.1.1 update-source loopback 1r2(config-router)#neighbor 1.1.1.1 ebgp-multihop 2r2(config-router)#exitr2(config)#ip route 1.1.1.0 255.255.255.0 192.168.1.1r2(config)#router bgp 200r2(config-router)#neighbor 3.3.3.3 remote-as 200r2(config-router)#neighbor 3.3.3.3 update-source loopback 1r2(config-router)#neighbor 4.4.4.4 remote-as 200r2(config-router)#neighbor 4.4.4.4 update-source loopback 1r2(config-router)#net 192.168.1.0r2(config-router)#net 192.168.2.0r2(config-router)#net 2.2.2.0r2(config-router)#endr2#show ip r*Mar 1 00:19:29.135: %SYS-5-CONFIG_I: Configured from console by consoler2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static rouo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 [1/0] via 192.168.1.12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 2.2.2.0/24 is directly connected, Loopback1D 2.0.0.0/8 is a summary, 00:13:45, Null0D 3.0.0.0/8 [90/409600] via 192.168.2.2, 00:09:50, Ethernet1/1D 4.0.0.0/8 [90/435200] via 192.168.2.2, 00:07:28, Ethernet1/1B 192.168.4.0/24 [200/0] via 4.4.4.4, 00:00:38B 192.168.7.0/24 [20/0] via 1.1.1.1, 00:01:19C 192.168.1.0/24 is directly connected, Ethernet1/0C 192.168.2.0/24 is directly connected, Ethernet1/1D 192.168.3.0/24 [90/307200] via 192.168.2.2, 00:09:47, Ethernet1/1r2(config)#router bgp 200r2(config-router)#neighbor 3.3.3.3 next-hop-self 默认EB告诉IB路由条目是下一跳不会改变所以必须强制下一跳r2(config-router)#neighbor 4.4.4.4 next-hop-selfr2(config-router)#endr2#show ip route*Mar 1 00:21:54.807: %SYS-5-CONFIG_I: Configured from console by consoler2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static rouo - ODR, P - periodic downloaded static routeGateway of last resort is not setB 192.168.12.0/24 [200/0] via 4.4.4.4, 00:00:061.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 [1/0] via 192.168.1.12.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 2.2.2.0/24 is directly connected, Loopback1D 2.0.0.0/8 is a summary, 00:16:11, Null0D 3.0.0.0/8 [90/409600] via 192.168.2.2, 00:12:16, Ethernet1/1D 4.0.0.0/8 [90/435200] via 192.168.2.2, 00:09:54, Ethernet1/1B 192.168.4.0/24 [200/0] via 4.4.4.4, 00:03:04B 192.168.7.0/24 [20/0] via 1.1.1.1, 00:03:45C 192.168.1.0/24 is directly connected, Ethernet1/0C 192.168.2.0/24 is directly connected, Ethernet1/1D 192.168.3.0/24 [90/307200] via 192.168.2.2, 00:12:13, Ethernet1/1R3r3(config)#interface e1/1r3(config-if)#ip add 192.168.2.2 255.255.255.0r3(config-if)#no shutdownr3(config-if)#exitr3(config)#interface e1/0r3(config-if)#ip add 192.168.3.1 255.255.255.0r3(config-if)#no shutdownr3(config-if)#exitr3(config)#interface loopback 1r3(config-if)#ip add 3.3.3.3 255.255.255.0r3(config-if)#no shutdownr3(config-if)#exitr3(config)#router eigrp 100r3(config-router)#net 3.3.3.0r3(config-router)#net 192.168.2.0r3(config-router)#net 192.168.3.0r3(config-router)#exitr3(config)#router bgp 200r3(config-router)#neighbor 2.2.2.2 remote-as 200r3(config-router)#neighbor 2.2.2.2 update-source loopback 1r3(config-router)#neighbor 4.4.4.4 remote-as 200r3(config-router)#neighbor 4.4.4.4 update-source loopback 1r3(config-router)#net 192.168.2.0r3(config-router)#net 192.168.3.0r3(config-router)#net 3.3.3.0r3(config-router)#endr3#show ip route*Mar 1 00:19:36.211: %SYS-5-CONFIG_I: Configured from console by r3#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter aN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external typE1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-ia - IS-IS inter area, * - candidate default, U - per-usero - ODR, P - periodic downloaded static routeGateway of last resort is not setD 2.0.0.0/8 [90/409600] via 192.168.2.1, 00:09:58, Ethernet1/13.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 3.3.3.0/24 is directly connected, Loopback1D 3.0.0.0/8 is a summary, 00:10:00, Null0D 4.0.0.0/8 [90/409600] via 192.168.3.2, 00:07:36, Ethernet1/0B 192.168.4.0/24 [200/0] via 4.4.4.4, 00:00:46B 192.168.1.0/24 [200/0] via 2.2.2.2, 00:01:28C 192.168.2.0/24 is directly connected, Ethernet1/1C 192.168.3.0/24 is directly connected, Ethernet1/0r3#show ip bgpBGP table version is 7, local router ID is 3.3.3.3Status codes: s suppressed, d damped, h history, * valid, > best,r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path *>i192.168.1.0 2.2.2.2 0 100 0 i *> 192.168.2.0 0.0.0.0 0 32768 i* i 2.2.2.2 0 100 0 i* i192.168.3.0 4.4.4.4 0 100 0 i *> 0.0.0.0 0 32768 i *>i192.168.4.0 4.4.4.4 0 100 0 i* i192.168.7.0 1.1.1.1 0 100 0 100 i * i192.168.12.0 5.5.5.5 0 100 0 300 i r3#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter aN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external typE1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-ia - IS-IS inter area, * - candidate default, U - per-usero - ODR, P - periodic downloaded static routeGateway of last resort is not setD 2.0.0.0/8 [90/409600] via 192.168.2.1, 00:10:53, Ethernet1/13.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 3.3.3.0/24 is directly connected, Loopback1D 3.0.0.0/8 is a summary, 00:10:56, Null0D 4.0.0.0/8 [90/409600] via 192.168.3.2, 00:08:31, Ethernet1/0B 192.168.4.0/24 [200/0] via 4.4.4.4, 00:01:41B 192.168.7.0/24 [200/0] via 2.2.2.2, 00:00:13B 192.168.1.0/24 [200/0] via 2.2.2.2, 00:02:23C 192.168.2.0/24 is directly connected, Ethernet1/1C 192.168.3.0/24 is directly connected, Ethernet1/0r3#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter aN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external typE1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-ia - IS-IS inter area, * - candidate default, U - per-usero - ODR, P - periodic downloaded static routeGateway of last resort is not setB 192.168.12.0/24 [200/0] via 4.4.4.4, 00:00:09D 2.0.0.0/8 [90/409600] via 192.168.2.1, 00:12:10, Ethernet1/13.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 3.3.3.0/24 is directly connected, Loopback1D 3.0.0.0/8 is a summary, 00:12:12, Null0D 4.0.0.0/8 [90/409600] via 192.168.3.2, 00:09:48, Ethernet1/0B 192.168.4.0/24 [200/0] via 4.4.4.4, 00:02:58B 192.168.7.0/24 [200/0] via 2.2.2.2, 00:01:29B 192.168.1.0/24 [200/0] via 2.2.2.2, 00:03:40C 192.168.2.0/24 is directly connected, Ethernet1/1C 192.168.3.0/24 is directly connected, Ethernet1/0R4r4(config)#interface e1/0r4(config-if)#ip add 192.168.3.2 255.255.255.0r4(config-if)#no shutdownr4(config-if)#exitr4(config)#interface e1/1r4(config-if)#ip add 192.168.4.1 255.255.255.0r4(config-if)#no shutdownr4(config-if)#exitr4(config)#interface loopback 1r4(config-if)#ip add 4.4.4.4 255.255.255.0r4(config-if)#no shutdownr4(config-if)#exitr4(config)#router eigrp 100r4(config-router)#net 192.168.3.0r4(config-router)#net 4.4.4.0r4(config-router)#exitr4(config)#router bgp 200r4(config-router)#neighbor 3.3.3.3 remote-as 200r4(config-router)#neighbor 3.3.3.3 update-source loopback r4(config-router)#neighbor 2.2.2.2 remote-as 200r4(config-router)#neighbor 2.2.2.2 update-source loopback r4(config-router)#neighbor 5.5.5.5 remote-as 300r4(config-router)#neighbor 5.5.5.5 update-source loopback r4(config-router)#neighbor 5.5.5.5 ebgp-multihop 2r4(config-router)#exitr4(config)#ip route 5.5.5.0 255.255.255.0 192.168.4.2r4(config)#router bgp 200r4(config-router)#net 192.168.3.0r4(config-router)#net 192.168.4.0r4(config-router)#net 4.4.4.0r4(config-router)#endr4(config)#router bgp 200r4(config-router)#neighbor 3.3.3.3 next-hop-selfr4(config-router)#neighbor 2.2.2.2 next-hop-selfR5r5(config)#interface e1/1r5(config-if)#ip add 192.168.4.2 255.255.255.0r5(config-if)#no shutdownr5(config-if)#exitr5(config)#interface loopback 1r5(config-if)#ip add 5.5.5.5 255.255.255.0r5(config-if)#no shutdownr5(config-if)#exitr5(config)#interface loopback 2r5(config-if)#ip add 192.168.12.27 255.255.255.0r5(config-if)#no shutdownr5(config-if)#exitr5(config)#router ospf 1r5(config-router)#net 5.5.5.0 0.0.0.255 area 0r5(config-router)#net 192.168.4.0 0.0.0.255 area 0r5(config-router)#net 192.168.12.0 255.255.255.0 area 0r5(config-router)#exitr5(config)#ip route 4.4.4.0 255.255.255.0 192.168.4.1r5(config)#router bgp 300r5(config-router)#neighbor 4.4.4.4 remote-as 200r5(config-router)#neighbor 4.4.4.4 update-source loopback 1 r5(config-router)#neighbor 4.4.4.4 ebgp-multihop 2r5(config-router)#net 192.168.4.0r5(config-router)#net 192.168.12.0r5(config-router)#net 5.5.5.0。

BGP实验:操纵BGP路径选择属性案例

BGP实验:操纵BGP路径选择属性案例

BGP实验之操纵BGP路径选择---local preference属性案例(配图+详细验证过程)作者:JACKSON 参考:CISCO中文社区感谢JACKSON 支持原创本地优先级(local pref)属性是分配给路由的一种优先级度量,用于和到同一目的地的其他路由相比较。

这是BGP路由处理中的第二优先属性(WEIGHT是第一优先属性)。

Local Pref 属性只在本AS内部有效,不会被传送到EBGP邻居上。

本地优先级越高,路由优先级越高。

以上案例中,我们通过对R3的配置,设置从R1学到的1.0.0.0的本地优先级(Localpref)设置为200,由于缺省的值为100,AS200中所有的路由器都会选择R3到达1.0.0.0。

//// r1 ////int f2/0ip ad 192.1.1.1 255.255.255.0int f3/0ip ad 193.1.1.1 255.255.255.0int lo0ip ad 1.1.1.1 255.255.255.0int lo1ip ad 2.2.2.2 255.255.255.0router bgp 100no synneighbor 192.1.1.2 remote-as 200 neighbor 193.1.1.3 remote-as 200 network 1.0.0.0network 1.0.0.0//// r2 ////int f2/0ip ad 192.1.1.2 255.255.255.0int f4/0ip ad 194.1.1.2 255.255.255.0router os 1netw 0.0.0.0 255.255.255.255 a 0 passive-interface f2/0router bgp 200no synneighbor 192.1.1.1 remote-as 100 neighbor 194.1.1.4 remote-as 200 neighbor 195.1.1.3 remote-as 200 neighbor 194.1.1.4 next-hop-self//// r3 ////int f3/0ip ad 193.1.1.3 255.255.255.0int f5/0ip ad 195.1.1.3 255.255.255.0router os 1netw 0.0.0.0 255.255.255.255 a 0passive-interface f3/0router bgp 200no synneighbor 193.1.1.1 remote-as 100neighbor 195.1.1.4 remote-as 200neighbor 195.1.1.4 next-hop-selfneighbor 194.1.1.2 remote-as 200neighbor 193.1.1.1 route-map localpref in access-list 1 permit 1.0.0.0 0.255.255.255route-map localpref permit 10match ip ad 1set local-pref 200route-map localpref permit 20set local-pref 100//// r4 ////int f4/0ip ad 194.1.1.4 255.255.255.0int f5/0ip ad 195.1.1.4 255.255.255.0int lo0ip ad 4.4.4.4 255.255.255.0router os 1netw 0.0.0.0 255.255.255.255 a 0router bgp 200no synneighbor 194.1.1.2 remote-as 200neighbor 195.1.1.3 remote-as 200netw 4.0.0.0验证://// r4 ////r4#sh ip bgpNetwork Next Hop Metric LocPrf Weight Path*>i1.0.0.0 195.1.1.3 0 200 0 100 i* i2.0.0.0 195.1.1.3 0 100 0 100 i*>i 194.1.1.2 0 100 0 100 i*> 4.0.0.0 0.0.0.0 0 32768 ir4#sh ip roB 1.0.0.0/8 [200/0] via 195.1.1.3, 00:02:20B 2.0.0.0/8 [200/0] via 194.1.1.2, 00:02:244.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback0O 193.1.1.0/24 [110/128] via 195.1.1.3, 00:04:35, Serial5/0 O 192.1.1.0/24 [110/128] via 194.1.1.2, 00:04:35, Serial4/0 C 195.1.1.0/24 is directly connected, Serial5/0C 194.1.1.0/24 is directly connected, Serial4/0r2#sh ip bgpNetwork Next Hop Metric LocPrf Weight Path*>i1.0.0.0 193.1.1.1 0 200 0 100 i* 192.1.1.1 0 0 100 i* i2.0.0.0 193.1.1.1 0 100 0 100 i*> 192.1.1.1 0 0 100 i*>i4.0.0.0 194.1.1.4 0 100 0 ir2#sh ip roB 1.0.0.0/8 [200/0] via 193.1.1.1, 00:06:00B 2.0.0.0/8 [20/0] via 192.1.1.1, 00:06:044.0.0.0/8 is variably subnetted, 2 subnets, 2 masksO 4.4.4.4/32 [110/65] via 194.1.1.4, 00:08:20, Serial4/0B 4.0.0.0/8 [200/0] via 194.1.1.4, 00:06:55O 193.1.1.0/24 [110/192] via 194.1.1.4, 00:08:20, Serial4/0 C 192.1.1.0/24 is directly connected, Serial2/0O 195.1.1.0/24 [110/128] via 194.1.1.4, 00:08:20, Serial4/0 C 194.1.1.0/24 is directly connected, Serial4/0。

BGP综合实验

BGP综合实验

要点总结:bgp的next-hop属性取值有三种情况1、bgp路由器把自己产生的路由发给ibgp对等体时,将下一跳属性设为自己与对端连接的接口的地址。

2、bgp路由器把自己收到的路由发给ebgp对等体时,把下一跳属性设置为自己与对端连接的接口的地址。

3、bgp路由器把从ebgp学到的路由发给ibgp对等体时,并不改变路由信息的属性。

如果配置了负载分担,则会修改下一跳属性。

BGP路由的Origin属性有以下三种:IGP---路由起源于同一AS域内,用show ip bgp时由I代表EGP---路由通过Exterior Gateway Protocol学得,EGP也是一种自治系统间通讯的路由协议,在BGP 出现前使用,已经被BGP取代。

用show ip bgp时由e代表。

Incomplete---路由起源未知或通过其他方式学得,用?表示实验拓扑1、验证AS-PATH属性启动RA/RB/RC/RF配置接口IP,按图示启动各路由器BGP的协议查看RA的路由表RA#show ip route1.0.0.0/32 is subnetted, 1 subnetsC 1.1.1.1 is directly connected, Loopback0C 200.1.0.0/24 is directly connected, FastEthernet0/0C 200.2.0.0/24 is directly connected, Serial1/0B 200.3.0.0/24 [200/0] via 200.2.0.2, 00:01:37C 192.168.1.0/24 is directly connected, Serial1/1B 192.168.2.0/24 [200/0] via 200.2.0.2, 00:01:37红色字第一条,RA到200.3.0.0网段的下一跳是RC,而不是用快速以太网链路连接的RB。

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基本实验

BGP基本实验RT1 sh runRT1(config)#do sh runBuilding configuration...interface Loopback0ip address 10.10.0.1 255.255.255.255!interface Serial0/0ip address 10.10.13.1 255.255.255.252serial restart-delay 0no dce-terminal-timing-enable!interface Serial0/1ip address 10.10.1.5 255.255.255.252serial restart-delay 0no dce-terminal-timing-enableinterface FastEthernet1/0ip address 10.10.1.1 255.255.255.252duplex autospeed auto!router ospf 1router-id 10.10.0.1log-adjacency-changespassive-interface Serial0/0network 10.10.0.1 0.0.0.0 area 0network 10.10.13.0 0.0.0.3 area 0network 10.10.0.0 0.0.255.255 area 0!router bgp 100no synchronizationbgp log-neighbor-changesnetwork 10.10.1.0 mask 255.255.255.252// RT2到10.30.3.1 网段要行成两条路径的话必须发布,因为不发布时,RT3-RT1-RT2这个路径的下一跳连通性都没有解决network 10.10.5.0 mask 255.255.255.0 //只发布10.10.5.0 网段..只在求业务网段能通neighbor 10.10.0.2 remote-as 100neighbor 10.10.0.2 update-source Loopback0 //指定回环接口为发起源接口neighbor 10.10.13.2 remote-as 200no auto-summaryendRT1#sh ip bgp sumBGP router identifier 10.10.0.1, local AS number 100BGP table version is 21, main routing table version 215 network entries using 585 bytes of memory7 path entries using 364 bytes of memory8/5 BGP path/bestpath attribute entries using 992 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 2013 total bytes of memoryBGP activity 6/1 prefixes, 16/9 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd10.10.0.2 4 100 170 175 21 0 0 00:49:31 310.10.13.2 4 200 165 169 21 0 0 02:32:13 2RT1#sh ip bgpBGP table version is 21, 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.1.0/30 10.10.0.2 0 100 0 i*> 0.0.0.0 0 32768 i// 0.0.0.0 表本地始发的,向BGP邻居通告时,将下一跳改变为自己*> 10.10.5.0/24 10.10.1.6 74 32768 ir>i10.10.6.0/24 10.10.1.10 74 100 0 i*> 10.30.3.0/24 10.10.13.2 0 0 200 i*>i10.40.4.0/24 10.20.24.2 0 100 0 300 i* 10.10.13.2 0 200 300 iRT1#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 10.10.1.2 to network 0.0.0.010.0.0.0/8 is variably subnetted, 14 subnets, 3 masksC 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/2] via 10.10.1.2, 00:49:41, FastEthernet1/0O 10.10.5.0/24 [110/74] via 10.10.1.6, 00:49:41, Serial0/1C 10.10.1.4/30 is directly connected, Serial0/1O 10.10.0.5/32 [110/65] via 10.10.1.6, 00:49:41, Serial0/1O 10.20.24.0/30 [110/65] via 10.10.1.2, 00:49:41, FastEthernet1/0O 10.10.6.0/24 [110/75] via 10.10.1.6, 00:49:41, Serial0/1[110/75] via 10.10.1.2, 00:49:41, FastEthernet1/0O 10.10.0.6/32 [110/66] via 10.10.1.6, 00:49:41, Serial0/1[110/66] via 10.10.1.2, 00:49:41, FastEthernet1/0O 10.10.1.8/30 [110/65] via 10.10.1.2, 00:49:41, FastEthernet1/0C 10.10.13.0/30 is directly connected, Serial0/0O 10.10.1.12/30 [110/65] via 10.10.1.6, 00:49:41, Serial0/1B 10.30.3.0/24 [20/0] via 10.10.13.2, 02:03:15B 10.40.4.0/24 [200/0] via 10.20.24.2, 00:49:41O*E2 0.0.0.0/0 [110/1] via 10.10.1.2, 00:29:18, FastEthernet1/0RT1#===================================================================== RT2 show runRT2(config-router)#RT2(config-router)#do sh runBuilding configuration...interface Loopback0ip address 10.10.0.2 255.255.255.255!interface Serial0/0ip address 10.20.24.1 255.255.255.252serial restart-delay 0no dce-terminal-timing-enable!interface Serial0/1ip address 10.10.1.9 255.255.255.252serial restart-delay 0no dce-terminal-timing-enable!!interface FastEthernet1/0ip address 10.10.1.2 255.255.255.252duplex autospeed auto!!router ospf 1router-id 10.10.0.2log-adjacency-changespassive-interface Serial0/0network 10.10.0.2 0.0.0.0 area 0network 10.10.0.0 0.0.255.255 area 0network 10.20.24.0 0.0.0.3 area 0default-information originate!router bgp 100no synchronizationbgp log-neighbor-changesnetwork 10.10.1.0 mask 255.255.255.252network 10.10.6.0 mask 255.255.255.0neighbor 10.10.0.1 remote-as 100neighbor 10.10.0.1 update-source Loopback0neighbor 10.20.24.2 remote-as 300no auto-summary!ip http serverip classless!endRT2#sh ip bgp summBGP router identifier 10.10.0.2, local AS number 100BGP table version is 36, main routing table version 365 network entries using 585 bytes of memory7 path entries using 364 bytes of memory8/5 BGP path/bestpath attribute entries using 992 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 2013 total bytes of memoryBGP activity 13/8 prefixes, 25/18 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd10.10.0.1 4 100 170 179 36 0 0 00:50:16 3 10.20.24.2 4 300 176 177 36 0 0 01:54:23 2RT2(config-router)#do sh ip bgpBGP table version is 36, local router ID is 10.10.0.2Status 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.1.0/30 10.10.0.1 0 100 0 i*> 0.0.0.0 0 32768 ir>i10.10.5.0/24 10.10.1.6 74 100 0 i*> 10.10.6.0/24 10.10.1.10 74 32768 i*>i10.30.3.0/24 10.10.13.2 0 100 0 200 i* 10.20.24.2 0 300 200 i// 两条路径>表示更优的*> 10.40.4.0/24 10.20.24.2 0 0 300 i//10.40.4.0 到RT2上的path路径只有一条?因为10.40.4.1到RT1有两条路径RT4-RT3-RT1,另一条RT4-RT2-RT1 .RT1通过比较,RT4-RT2-RT1比RT4-RT3-RT1要优,这是因为路径RT4-RT2-RT1是通过了AS30 再到AS10到达RT1的,而路径RT4-RT2-RT1只经过AS10就到达了RT1 ,,路由器发布通告时,只把最优的通告给其它IBGP,而当RT1要发通告时,RT1发现那最优路径是通过RT2学到的,基于水平分割RT2不会收到RT1的通告, 所以RT2只能从从10.20.24.2 这边收到通告,所以只有一条.RT2#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 10.20.24.2 to network 0.0.0.010.0.0.0/8 is variably subnetted, 14 subnets, 3 masksC 10.10.1.0/30 is directly connected, FastEthernet1/0O 10.10.0.1/32 [110/2] via 10.10.1.1, 00:50:32, FastEthernet1/0C 10.10.0.2/32 is directly connected, Loopback0O 10.10.5.0/24 [110/75] via 10.10.1.10, 00:50:32, Serial0/1[110/75] via 10.10.1.1, 00:50:32, FastEthernet1/0O 10.10.1.4/30 [110/65] via 10.10.1.1, 00:50:32, FastEthernet1/0O 10.10.0.5/32 [110/66] via 10.10.1.10, 00:50:32, Serial0/1[110/66] via 10.10.1.1, 00:50:32, FastEthernet1/0C 10.20.24.0/30 is directly connected, Serial0/0O 10.10.6.0/24 [110/74] via 10.10.1.10, 00:50:32, Serial0/1O 10.10.0.6/32 [110/65] via 10.10.1.10, 00:50:32, Serial0/1C 10.10.1.8/30 is directly connected, Serial0/1O 10.10.13.0/30 [110/65] via 10.10.1.1, 00:50:32, FastEthernet1/0O 10.10.1.12/30 [110/65] via 10.10.1.10, 00:50:32, Serial0/1B 10.30.3.0/24 [200/0] via 10.10.13.2, 00:50:27B 10.40.4.0/24 [20/0] via 10.20.24.2, 01:54:09S* 0.0.0.0/0 [1/0] via 10.20.24.2RT2#=====================================================================RT3 sh runRT3(config-if)#do sh runBuilding configuration...!interface Loopback0ip address 10.30.0.1 255.255.255.255!interface Serial0/0ip address 10.10.13.2 255.255.255.252serial restart-delay 0no dce-terminal-timing-enable!!interface FastEthernet1/0ip address 10.30.34.1 255.255.255.252duplex autospeed auto!interface Ethernet3/0ip address 10.30.3.1 255.255.255.0half-duplex!!router bgp 200no synchronizationbgp log-neighbor-changesnetwork 10.30.3.0 mask 255.255.255.0neighbor 10.10.13.1 remote-as 100neighbor 10.30.34.2 remote-as 300no auto-summary!!endRT3#sh ip*Mar 1 03:05:02.239: %SYS-5-CONFIG_I: Configured from console by consoleRT3#sh ip bgpBGP table version is 10, local router ID is 10.30.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* 10.10.1.0/30 10.30.34.2 0 300 100 i*> 10.10.13.1 0 0 100 i* 10.10.5.0/24 10.30.34.2 0 300 100 i*> 10.10.13.1 74 0 100 i* 10.10.6.0/24 10.30.34.2 0 300 100 i*> 10.10.13.1 0 100 i*> 10.30.3.0/24 0.0.0.0 0 32768 i* 10.40.4.0/24 10.10.13.1 0 100 300 i*> 10.30.34.2 0 0 300 iRT3#RT3#sh ip bgp sumBGP router identifier 10.30.0.1, local AS number 200BGP table version is 10, main routing table version 105 network entries using 585 bytes of memory9 path entries using 468 bytes of memory8/5 BGP path/bestpath attribute entries using 992 bytes of memory4 BGP AS-PATH entries using 96 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 2141 total bytes of memoryBGP activity 6/1 prefixes, 22/13 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd10.10.13.1 4 100 170 166 10 0 0 02:33:59 4 10.30.34.2 4 300 172 161 10 0 0 02:29:00 4RT3#RT3#RT3#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set10.0.0.0/8 is variably subnetted, 8 subnets, 3 masksB 10.10.1.0/30 [20/0] via 10.10.13.1, 01:58:56B 10.10.5.0/24 [20/74] via 10.10.13.1, 02:20:23B 10.10.6.0/24 [20/0] via 10.10.13.1, 00:51:26C 10.10.13.0/30 is directly connected, Serial0/0C 10.30.0.1/32 is directly connected, Loopback0C 10.30.3.0/24 is directly connected, Ethernet3/0B 10.40.4.0/24 [20/0] via 10.30.34.2, 02:18:22C 10.30.34.0/30 is directly connected, FastEthernet1/0RT3#============================================= RT4 sh runRT4(config-router)#do sh runBuilding configuration...Current configuration : 1506 bytes!!!interface Loopback0ip address 10.40.0.1 255.255.255.255!interface Serial0/0ip address 10.20.24.2 255.255.255.252serial restart-delay 0no dce-terminal-timing-enable!!interface FastEthernet1/0ip address 10.30.34.2 255.255.255.252duplex autospeed auto!interface Ethernet3/0ip address 10.40.4.1 255.255.255.0half-duplex!!router bgp 300no synchronizationbgp log-neighbor-changesnetwork 10.40.4.0 mask 255.255.255.0neighbor 10.20.24.1 remote-as 100neighbor 10.30.34.1 remote-as 200no auto-summary!endRT4(config-router)#RT4(config-router)#endRT4#sh ip*Mar 1 03:06:04.103: %SYS-5-CONFIG_I: Configured from console by console RT4#sh ip bgpBGP table version is 30, local router ID is 10.40.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*> 10.10.1.0/30 10.20.24.1 0 0 100 i* 10.30.34.1 0 200 100 i *> 10.10.5.0/24 10.20.24.1 0 100 i* 10.30.34.1 0 200 100 i *> 10.10.6.0/24 10.20.24.1 74 0 100 i* 10.30.34.1 0 200 100 i * 10.30.3.0/24 10.20.24.1 0 100 200 i *> 10.30.34.1 0 0 200 i *> 10.40.4.0/24 0.0.0.0 0 32768 iRT4#sh ip bgp sumBGP router identifier 10.40.0.1, local AS number 300BGP table version is 30, main routing table version 305 network entries using 585 bytes of memory9 path entries using 468 bytes of memory8/5 BGP path/bestpath attribute entries using 992 bytes of memory4 BGP AS-PATH entries using 96 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 2141 total bytes of memoryBGP activity 6/1 prefixes, 22/13 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd10.20.24.1 4 100 179 178 30 0 0 01:56:06 4 10.30.34.1 4 200 162 173 30 0 0 02:29:41 4RT4#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set10.0.0.0/8 is variably subnetted, 8 subnets, 3 masksB 10.10.1.0/30 [20/0] via 10.20.24.1, 00:52:40B 10.10.5.0/24 [20/0] via 10.20.24.1, 00:52:10C 10.20.24.0/30 is directly connected, Serial0/0B 10.10.6.0/24 [20/74] via 10.20.24.1, 00:52:10B 10.30.3.0/24 [20/0] via 10.30.34.1, 02:05:48C 10.40.0.1/32 is directly connected, Loopback0C 10.40.4.0/24 is directly connected, Ethernet3/0C 10.30.34.0/30 is directly connected, FastEthernet1/0RT4#=====================================================================RT1#clear ip bgp * //重新触发下*Mar 1 03:24:25.663: BGPNSF state: 10.10.0.2 went from nsf_not_active to nsf_not_active*Mar 1 03:24:25.663: BGP: 10.10.0.2 went from Established to Idle*Mar 1 03:24:25.663: %BGP-5-ADJCHANGE: neighbor 10.10.0.2 Down User resetRT1#RT1#RT1#RT1#RT1#*Mar 1 03:24:25.663: BGP: 10.10.0.2 closing*Mar 1 03:24:25.663: BGPNSF state: 10.10.13.2 went from nsf_not_active to nsf_not_active *Mar 1 03:24:25.667: BGP: 10.10.0.2 went from Idle to Active*Mar 1 03:24:25.679: BGP: 10.10.0.2 open active, local address 10.10.0.1*Mar 1 03:24:25.795: BGP: 10.10.0.2 open failed: Connection refused by remote host, open active delayed 180ms (850ms max, 87% jitter)*Mar 1 03:24:25.975: BGP: 10.10.0.2 open active, local address 10.10.0.1*Mar 1 03:24:26.031: BGP: 10.10.0.2 went from Active to OpenSent*Mar 1 03:24:26.031: BGP: 10.10.0.2 sending OPEN, version 4, my as: 100, holdtime 180 secondsRT1#*Mar 1 03:24:26.039: BGP: 10.10.0.2 send message type 1, length (incl. header) 45*Mar 1 03:24:26.287: BGPNSF state: 10.10.0.2 went from nsf_not_active to nsf_not_active*Mar 1 03:24:26.287: BGP: 10.10.0.2 went from OpenSent to Idle*Mar 1 03:24:26.287: BGP: 10.10.0.2 closing*Mar 1 03:24:26.287: BGPNSF state: 10.10.13.2 went from nsf_not_active to nsf_not_active *Mar 1 03:24:26.287: BGP: 10.10.0.2 went from Idle to Active*Mar 1 03:24:26.299: BGP: 10.10.0.2 open active delayed 28594ms (35000ms max, 28% jitter)RT1#shi*Mar 1 03:24:28.463: BGP: 10.10.0.2 passive open to 10.10.0.1*Mar 1 03:24:28.467: BGP: 10.10.0.2 went from Active to Idle*Mar 1 03:24:28.471: BGP: 10.10.0.2 went from Idle to Connect*Mar 1 03:24:28.487: BGP: 10.10.0.2 rcv message type 1, length (excl. header) 26*Mar 1 03:24:28.487: BGP: 10.10.0.2 rcv OPEN, version 4, holdtime 180 seconds*Mar 1 03:24:28.491: BGP: 10.10.0.2 went from Connect to OpenSent*Mar 1 03:24:28.491: BGP: 10.10.0.2 sending OPEN, version 4, my as: 100, holdtime 180 seconds*Mar 1 03:24:28.495: BGP: 10.10.0.2 rcv OPEN w/ OPTION parameter len: 16*Mar 1 03:24:28.495: BGP: 10.10.0.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 6*Mar 1 03:24:28.499: BGP: 10.10.0.2 OPEN has CAPABILITY code: 1, length 4*Mar 1 03:24:28.499: BGP: 10.10.0.2 OPEN has MP_EXT CAP for afi/safi: 1/1*Mar 1 03:24:28.503: BGP: 10.10.0.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2*Mar 1 03:24:28.503: BGP: 10.10.0.2 OPEN has CAPABILITYRT1#scode: 128, length 0*Mar 1 03:24:28.507: BGP: 10.10.0.2 OPEN has ROUTE-REFRESH capability(old) for all address-families*Mar 1 03:24:28.511: BGP: 10.10.0.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2*Mar 1 03:24:28.511: BGP: 10.10.0.2 OPEN has CAPABILITY code: 2, length 0*Mar 1 03:24:28.515: BGP: 10.10.0.2 OPEN has ROUTE-REFRESH capability(new) for all address-familiesBGP: 10.10.0.2 rcvd OPEN w/ remote AS 100*Mar 1 03:24:28.519: BGP: 10.10.0.2 went from OpenSent to OpenConfirm*Mar 1 03:24:28.519: BGP: 10.10.0.2 send message type 1, length (incl. header) 45*Mar 1 03:24:28.671: BGP: 10.10.0.2 went from OpenConfirm to Established*Mar 1 03:24:28.671: %BGP-5-ADJCHANGE: neighbor 10.10.0.2 UpRT1#sh ip bgpBGP table version is 1, 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, ? - incomplete..0。

BGP实验报告—20070305

BGP实验报告—20070305

BGP实验报告—计算机应用技术周昌盛 20070305 一、实验目标本实验中,将配置内部BGP(IBGP)以及EBGP,使用公司AS内部不同的路由器到ISP的冗余链路。

为了使IBGP对等体正确地交换路由选择信息,必须使用命令next-hop-self。

还要使用属性local-preference和med(多出口描述符),这确保了平缓的、不限量的流量使用T1链路发送去往ISP1的AS200的数据和接收从该AS来的数据。

只有当主T1链路失效时才使用流量受限的T1链路。

数据流通过流量受限的T1链路可以获得跟主T1链路相同的带宽,但费用就高得多,确保这条链路不在非必要时使用。

本实验的拓扑图如图1-1所示:图1-1 实验拓扑图二、实验设备由于实验条件限制,本实验中使用模拟器R1、R2、R3来模拟上述三台路由器三、实验背景本实验中将在路由器SanJose1和SanJose2与外部邻局AS200的ISP1运行BGP,在SanJose1和SanJose2之间运行IBGP。

最后,在公司的网络中运行EIGRP。

四、实验步骤步骤1配置路由器ISP1的接口:Router>enRouter#config tRouter<config>#hostname ISP1ISP1<config>#interface loopback0ISP1<config-if>#ip add 192.168.100.1 255.255.255.0ISP1<config-if>#no shutISP1<config-if>#interface f1/0ISP1<config-if>#ip add 192.168.1.1 255.255.255.252ISP1<config-if>#no shutISP1<config-if>#interface f0/0ISP1<config-if>#ip add 192.168.1.5 255.255.255.252ISP1<config-if>#no shutISP1<config-if>#end配置路由器SanJose1的接口:Router>enRouter#config tRouter<config>#hostname SanJose1SanJose1<config>#interface loopback0SanJose1<config-if>#ip add 172.16.64.1 255.255.255.0 SanJose1<config-if>#no shutSanJose1<config-if>#interface f1/0SanJose1<config-if>#ip add 192.168.1.6 255.255.255.252 SanJose1<config-if>#no shutSanJose1<config-if>#interface f0/0SanJose1<config-if>#ip add 172.16.1.1 255.255.255.0 SanJose1<config-if>#no shutSanJose1<config-if>#end配置路由器SanJose2的接口:Router>enRouter#config tRouter<config>#hostname SanJose1SanJose2<config>#interface loopback0SanJose2<config-if>#ip add 172.16.32.1 255.255.255.0 SanJose2<config-if>#no shutSanJose2<config-if>#interface f1/0SanJose2<config-if>#ip add 172.16.1.2 255.255.255.252 SanJose2<config-if>#no shutSanJose2<config-if>#interface f0/0SanJose2<config-if>#ip add 192.168.1.2 255.255.255.252 SanJose2<config-if>#no shutSanJose2<config-if>#end上述配置完成后,可以使用ping命令来测试直连路由之间的连通性。

雷光全BGP实验报告二

雷光全BGP实验报告二

一、实验名称
BGP同步
二、实验要求
分析BGP同步的好处,BGP同步的路由情况,以及在什么情况下使用同步。

三、实验拓扑
四、重要实验配置
Igp的配置:
RT1:
RT2:
RT3:
RT4:
BGP的配置RT1:
RT2:
RT5:
RT6:
五、实验现象
各设备的bpg表:
RT1:
RT2:
RT1路由表:
用ping命令进行全网互联的测试
在RT5上进行跟踪
六、实验分析
分析PC5(10.5.5.10)访问PC6(10.6.6.10)的过程
PC5:10.6.6.10与自己不在同一个网段,它将数据包发送给网关10.5.5.1(RT5)
RT5:查找路由表,发现:
RT1:查找路由表,发现:
RT3:查找路由表,发现:
RT4:查找路由表:发现:
一直到目标地址。

BGP同步,就是使IGP和BGP达到同步,如果没有达到同步的路由,将不会通告给邻居,也不会转发出去。

但是如果
开启同步的话,也有一点的危害,如果BGP的路由条目过多,发布到IGP的话,就会导致IGP路由器崩溃。

所以小心认真使用。

七、实验总结
通过本次实验,我掌握了BGP同步的概念,在什么情况下使用BGP同步,使用BGP同步的时候,要注意些什么,以及我们应该怎样去解决这种状况,显然BGP同步还是比较简单的。

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