BGP实验报告
- 格式:docx
- 大小:23.49 KB
- 文档页数:4
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(Border Gateway Protocol)是用于在互联网中交换路由信息的协议。
它是一种路径矢量协议,用于确定最佳路径,并且能够适应网络拓扑的变化。
在本次实验中,我们对BGP进行了实验,并对实验结果进行了总结和分析。
实验过程
在实验中,我们使用了模拟器来模拟网络环境,并配置了多个路由器和主机。
我们通过配置BGP协议来模拟网络中的路由器之间的路由信息交换。
我们还模拟了网络中的故障情况,以观察BGP协议对网络拓扑变化的适应能力。
实验结果
通过实验,我们观察到BGP协议在网络拓扑变化时能够快速地重新计算最佳路径,并更新路由表。
当网络中发生故障时,BGP能够及时地发现并通知其他路由器,从而保证了网络的稳定性和可靠性。
此外,我们还观察到BGP协议在处理大规模网络时的效率和性能表现良好。
总结与分析
通过本次实验,我们对BGP协议的工作原理和性能有了更深入的了解。
BGP作为互联网中最重要的路由协议之一,具有很强的稳定性和可靠性。
它能够适应网络拓扑的变化,并且能够处理大规模网络的路由信息交换。
因此,BGP协议在互联网中扮演着至关重要的角色。
结论
通过本次实验,我们对BGP协议有了更深入的了解,并且验证了其在网络中的
稳定性和可靠性。
BGP协议的高效性和性能表现使其成为互联网中不可或缺的一部分,对于构建稳定和可靠的互联网具有重要意义。
我们将继续深入研究BGP协议,并将其应用于实际网络中,以提高网络的稳定性和可靠性。
BGP的next-hop及路由聚合实验报告实验目的:1、配置next-hop-self让ISPB能学到sanjose1上192.168.32.1的路由条目。
2、配置BGP的路由聚合让ISPB能学到sanjose1上192.168.1.4的路由条目。
实验拓扑图:实验步骤:1、基本的线路连接配置、IBGP内部的标准OSPF配置并测试。
2、配置不同AS之间通信并测试。
3、配置next-hop-self让ISPB学到sanjose上的192.168.1.33路由条目。
4、配置BGP的路由聚合让ISPB能学到sanjose1上192.168.1.4的路由条目。
一、基本的线路连接配置、IBGP内部的标准OSPF配置并测试。
ispaenaconf tno ip domain-lookupip subnet-zeroenable password ciscohostname ispaint lo 0ip add 10.1.1.1 255.255.255.255int s0/0no shutclock rate 64000ip add 192.168.1.6 255.255.255.252int s0/1no shutclock rate 64000ip add 172.16.1.1 255.255.255.0endconf trouter ospf 1network 10.1.1.1 0.0.0.0 area 0 network 172.16.1.0 0.0.0.255 area 0 endibgpconf trouter bgp 200no auto-summaryno syncneighbor 10.2.2.2 remote-as 200 neighbor 10.2.2.2 update-source lo 0 endebgpconf trouter bgp 200no auto-summaryno syncneighbor 192.168.1.5 remote-as 100 network 172.16.1.0 mask 255.255.255.0 endsanjose 1enaconf tno ip domain-lookupip subnet-zeroenable password ciscohostname sanjose1int lo 0ip add 192.168.1.33 255.255.255.224 int s0/0no shutip add 192.168.1.5 255.255.255.252endebgpconf trouter bgp 100no auto-summaryno syncneighbor 192.168.1.6 remote-as 200network 192.168.1.32 mask 255.255.255.224network 192.168.1.4 mask 255.255.255.252endispbenaconf tno ip domain-lookupip subnet-zeroenable password ciscohostname ispbint lo 0ip add 10.2.2.2 255.255.255.252int s0/0no shutip add 172.16.1.2 255.255.255.0endconf trouter ospf 1network 10.2.2.2 0.0.0.0 area 0network 172.16.1.0 0.0.0.255 area 0endibgpconf trouter bgp 200no auto-summaryno syncneighbor 10.1.1.1 remote-as 200neighbor 10.1.1.1 update-source lo 0end测试ispa#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS interarea* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, Serial0/110.0.0.0/32 is subnetted, 2 subnetsO 10.2.2.2 [110/65] via 172.16.1.2, 00:00:38, Serial0/1C 10.1.1.1 is directly connected, Loopback0192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksB 192.168.1.32/27 [20/0] via 192.168.1.5, 00:00:09C 192.168.1.4/30 is directly connected, Serial0/0ispa#sanjose1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS interarea* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 1 subnetsB 172.16.1.0 [20/0] via 192.168.1.6, 00:00:01192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.1.32/27 is directly connected, Loopback0C 192.168.1.4/30 is directly connected, Serial0/0sanjose1#ispb#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS interarea* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, Serial0/110.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 10.2.2.0/30 is directly connected, Loopback0O 10.1.1.1/32 [110/65] via 172.16.1.1, 00:00:16, Serial0/1ispb#小结:通过基本配置、测试可以发现ISPA、sanjose1上发现了BGP的路由条目但ISPB不能发现sanjose1上的192.168. 1. 32路由条目,这是因为到达目标的下一跳不正确。
bgp实训报告总结BGP(Border Gateway Protocol)是一种用于在互联网中实现路由选择的协议。
本文旨在总结我所参与的BGP实训报告,通过对实训内容的详细描述和分析,展示实训过程中所获得的经验和成果。
二、实训内容1. 实训目标本次BGP实训的目标是学习和掌握BGP协议的基本原理、配置以及故障排查等技能,并通过实际操作加深对BGP协议的理解。
2. 实训环境在实训过程中,我们使用了模拟环境搭建了一个小型的互联网拓扑结构,其中包括了多个自治系统(AS),使用BGP协议实现了各个AS之间的路由选择。
3. 实训步骤实训中,我们按照以下步骤进行了BGP配置和故障排查:- 搭建拓扑结构并配置基本网络参数,确保物理连接正常。
- 配置BGP协议,包括自治系统编号、BGP对等体间的互联、路由策略等。
- 检查BGP邻居关系的建立情况,确保各个AS之间的BGP会话正常。
- 配置各个AS的路由策略,并进行路由表的更新与监控。
- 模拟故障情况,排查并修复BGP邻居关系中出现的问题。
- 总结实训经验并提出改进建议。
三、实训经验与成果在本次实训中,我们获得了以下经验和成果:1. 理解了BGP协议的工作原理,掌握了BGP的配置方法和命令。
2. 学会了如何搭建模拟环境进行BGP实验,在拓扑结构的搭建和配置方面取得了实质性的进展。
3. 掌握了BGP邻居关系的建立与维护技巧,能够及时发现和解决邻居关系中的问题。
4. 能够有效地进行路由策略的配置和路由表的管理,实现了基本的路由选择功能。
5. 在故障排查方面积累了一定经验,能够快速准确定位并解决BGP故障。
四、改进建议基于本次实训的经验和总结,我提出以下改进建议:1. 加强对BGP协议工作原理的学习和理解,为更深入的实验和应用打下基础。
2. 扩大拓扑结构规模,增加实验的复杂性,提升对BGP协议的应用能力。
3. 提供更多实际案例和故障模拟,让学员能够更好地应对复杂的BGP网络环境。
——————————————袁月BGP综合实验1拓扑图拓扑说明:如图,有R1-R5五台路由器R1,R3,R4的S0/0、S0/1、S0/2口通过FR连接,R1为hub,帧中继链路ip为10.10.134.0/24R1,R2的F1/0口通过以太网连接,链路ip为10.10.12.0/24R4,R5的s0/1口直连,网段10.10.45.0/24每台路由器的环回0口ip为x.x.x.x/32R1上有lo1-lo5,ip地址为192.168.1.1/24---192.168.5.1/24R5上有lo1-lo5,ip地址为172.16.1.1/24---172.16.5.1/24实验要求:1.配置底层:配置每台设备的接口ip,配置完成后确保直连可达每个路由器的环回口是X.X.X.X/322.配置IGP全网运行OSPF area0,仅宣告lo0口和链路ip进入ospf,NBMA区域任意处理3.建立BGP邻居BGP AS区域划分如图,按照如下规则建立对等关系.使用回环口建立邻居.R1 peer R2R2 peer R1,R3R3 peer R2,R4R4 peer R5R5 peer R44.BGP 路由宣告邻居建立完成后,将R1和R5的lo0口宣告进入BGP,使用network命令要求R1,R5使用适当的方式宣告各自的lo1-lo5宣告完成后要求每台设备的bgp转发表可见这些路由5.BGP路由控制要求做出适当控制,达成下列条件,具体方法不限1、使下列条目出现在R1的bgp表中*> 172.16.1.0/24 2.2.2.2 100 0 255 2 3 i*> 172.16.2.0/24 2.2.2.2 255 10 20 2 3 ? *> 172.16.3.0/24 2.2.2.2 0 2 3 i*> 172.16.4.0/24 2.2.2.2 255 2 3 i*> 172.16.5.0/24 2.2.2.2 100 0 255 2 3 i2、使下列条目出现在R5的bgp表中*> 192.168.0.0/21 0.0.0.0 100 32768 2 1 i *> 192.168.1.0 4.4.4.4 0 2 1 i *> 192.168.2.0 4.4.4.4 0 2 1 is> 192.168.3.0 4.4.4.4 0 2 1 is> 192.168.4.0 4.4.4.4 0 2 1 i *> 192.168.5.0 4.4.4.4 0 2 1 i3、完成后,R1,R5互相可PING通对方宣告的这些bgp路由实验效果:R1上查看BGP表R5上查看BGP表BGP综合实验2拓扑图实验要求如下:1 R1与R2为EBGP R2与R3、R4为EBGP R3与R4为IBGP R3与R4、R5为EBGP每台路由器都有X.X.X.XX/32作为router-id 全网底层跑EIGRP 1002 R3、R4学到R1上的bgp路由下一跳必须为AS100的,R5上学到的R1和R3的路由,优走R33 在R1和R5上的回环口分别是20.20.20.0/24和30.30.30.0/24,都重分布到BGP中,使其相互学到并互相连通!实验效果:R3和R4上查看BGP表R5上查看路由表R1和R5上的lo0互相ping通BGP综合实验3拓扑图实验要求如下:1 R4上有192.168.1.0/24、192.168.2.0/24、192.168.3.0/24、192.168.4.0/24和100.100.100.0/24网段,R5上有172.16.1.0/24、172.16.2.0/24、172.16.3.0/24、172.16.4.0/24和50.50.50.1/32网段2 R1为DR,R2和R3不参与DR选举每台路由器都有x.x.x.x/24做为router-id3 Ospf学到的是192.168汇总和172.16的汇总以及100.100的明细路由4 EIGRP不能学到192.168的路由,能学到100.100的路由5 R4为AS100R2为AS200R5为AS300R4只与R2建立EBGP,R5只与R2建立EBGP,R4能学到50.50.50.1/32的路由,且可达!。
BGP学习试验(一) (v1.0)版本说明目录一、拓扑及要求 (3)二、设备配置 (4)2.1 R1配置 (4)2.2 R2配置 (5)2.3 R3配置 (7)2.4 R4配置 (8)2.5 R5配置 (10)2.6 R6配置 (11)三、实验结果 (13)一、拓扑及要求拓扑见上图,左边为IGP的物理连接示意图,右边为BGP逻辑连接示意图。
1、全网IGP网段:5.5.0.0/16。
不允许使用确实路由。
帧中继FR为HUB-SPOKE结构,R4为HUB。
2、每个路由器上面都有环回口:lo0 1.1.1.1—6.6.6.6,通告进对应的IGP。
R2的环回口同时属于两个IGP协议:OSPF与EIGRP。
R5不运行任何除BGP之外的任何静态路由协议。
3、OSPF A0要求没有DR和BDR。
4、可以允许IGP之间重发布。
5、所有BGP的邻居关系使用环回口更新。
6、每个路由器都对应的环回口:11.11.11.11—66.66.66.66,并通告进BGP。
7、在AS 3内操作,R5使用R4作为下一跳到达11.11.11.0,R5使用R6到达22.22.22.0 。
8、R3优选R6到达R5的55.55.55.0。
9、要求R2看到11.11.11.0 的AS-PATH为“1 1”。
10、要求R2的22.22.22.22 在所有的设备上看到起源为“?”。
11、要求R3所发出的33.33.33.0 在AS 3 内具有locPRF per为200,metric为50。
12、R5的环回口55.55.55.55重发布进BGP,要求在AS 3 内操作,除了R5之外所有的路由器看到的起源是I 。
13、要求所有地址可达。
二、设备配置2.1 R1配置hostname r1no ip domain lookup!ip cefinterface Loopback0ip address 1.1.1.1 255.255.255.255!interface Loopback1ip address 11.11.11.11 255.255.255.255!!interface Serial1/1ip address 5.5.12.1 255.255.255.0serial restart-delay 0!!router eigrp 100network 1.1.1.1 0.0.0.0network 5.5.12.0 0.0.0.255no auto-summary!router bgp 1synchronizationbgp router-id 1.1.1.1bgp log-neighbor-changesnetwork 11.11.11.11 mask 255.255.255.255 neighbor 2.2.2.2 remote-as 2neighbor 2.2.2.2 ebgp-multihop 255 neighbor 2.2.2.2 update-source Loopback0 no auto-summary!ip classlessno ip http server!!access-list 11 permit 11.11.11.11!route-map as-path permit 10match ip address 11set as-path prepend 1 1!route-map as-path permit 20!2.2 R2配置hostname r2!no ip domain lookup!ip cef!interface Loopback0ip address 2.2.2.2 255.255.255.255ip ospf network point-to-point!interface Loopback1ip address 22.22.22.22 255.255.255.255!!interface Serial1/0ip address 5.5.12.2 255.255.255.0serial restart-delay 0!interface Serial1/1ip address 5.5.23.1 255.255.255.0serial restart-delay 0!interface Serial1/2ip address 5.5.24.1 255.255.255.0 encapsulation frame-relayip ospf network point-to-multipointip policy route-map 23serial restart-delay 0frame-relay map ip 5.5.24.2 204 broadcastno frame-relay inverse-arp!!router eigrp 100redistribute ospf 1 metric 1000 100 255 255 1500 network 2.2.2.2 0.0.0.0network 5.5.12.0 0.0.0.255network 5.5.23.0 0.0.0.255no auto-summaryrouter ospf 1router-id 2.2.2.2log-adjacency-changesredistribute eigrp 100 subnetsnetwork 2.2.2.2 0.0.0.0 area 0network 5.5.24.0 0.0.0.255 area 0!router bgp 2synchronizationbgp router-id 2.2.2.2bgp log-neighbor-changesnetwork 22.22.22.22 mask 255.255.255.255 neighbor 1.1.1.1 remote-as 1neighbor 1.1.1.1 ebgp-multihop 255 neighbor 1.1.1.1 update-source Loopback0 neighbor 1.1.1.1 route-map as-path in neighbor 1.1.1.1 route-map origin out neighbor 3.3.3.3 remote-as 3neighbor 3.3.3.3 ebgp-multihop 255 neighbor 3.3.3.3 update-source Loopback0 neighbor 3.3.3.3 route-map origin outno auto-summary!ip classlessno ip http server!!access-list 1 permit anyaccess-list 11 permit 11.11.11.11access-list 22 permit 22.22.22.22access-list 23 permit 1.1.1.1access-list 23 permit 2.2.2.2access-list 23 permit 3.3.3.3!route-map 23 permit 10match ip address 23set ip next-hop 5.5.24.3!route-map 23 permit 20!route-map origin permit 10match ip address 22set origin incompleteroute-map origin permit 20!route-map as-path permit 10match ip address 11set as-path prepend 1!route-map as-path permit 20line con 0exec-timeout 0 0stopbits 1line aux 0stopbits 1line vty 0 4login2.3 R3配置hostname r3!no ip domain lookup!ip cef!interface Loopback0ip address 3.3.3.3 255.255.255.255!interface Loopback1ip address 33.33.33.33 255.255.255.255 !interface Serial1/0ip address 5.5.23.2 255.255.255.0 serial restart-delay 0!!router eigrp 100network 3.3.3.3 0.0.0.0network 5.5.23.0 0.0.0.255no auto-summary!router bgp 3no synchronizationbgp router-id 3.3.3.3bgp log-neighbor-changesnetwork 33.33.33.33 mask 255.255.255.255 neighbor 2.2.2.2 remote-as 2neighbor 2.2.2.2 ebgp-multihop 255 neighbor 2.2.2.2 update-source Loopback0 neighbor 4.4.4.4 remote-as 3neighbor 4.4.4.4 update-source Loopback0 neighbor 4.4.4.4 next-hop-selfneighbor 4.4.4.4 route-map med33 out neighbor 6.6.6.6 remote-as 3neighbor 6.6.6.6 update-source Loopback0 neighbor 6.6.6.6 next-hop-selfneighbor 6.6.6.6 route-map med33 outno auto-summary!ip classlessno ip http server!!access-list 33 permit 33.33.33.33!route-map med33 permit 10match ip address 33set metric 50set local-preference 200!route-map med33 permit 20!!line con 0exec-timeout 0 02.4 R4配置hostname r4!no ip domain lookup!ip cefinterface Loopback0ip address 4.4.4.4 255.255.255.255ip ospf network point-to-point!interface Loopback1ip address 44.44.44.44 255.255.255.255!!interface Serial1/1ip address 5.5.45.1 255.255.255.0serial restart-delay 0!interface Serial1/2ip address 5.5.24.2 255.255.255.0 encapsulation frame-relayip ospf network point-to-multipointserial restart-delay 0frame-relay map ip 5.5.24.1 402 broadcast frame-relay map ip 5.5.24.3 406 broadcast no frame-relay inverse-arp!router ospf 1router-id 4.4.4.4log-adjacency-changesredistribute static subnetsnetwork 4.4.4.4 0.0.0.0 area 0network 5.5.24.0 0.0.0.255 area 0!router bgp 3no synchronizationbgp router-id 4.4.4.4bgp log-neighbor-changesnetwork 44.44.44.44 mask 255.255.255.255 redistribute ospf 1 route-map 23neighbor 3.3.3.3 remote-as 3neighbor 3.3.3.3 update-source Loopback0 neighbor 3.3.3.3 next-hop-selfneighbor 5.5.5.5 remote-as 4neighbor 5.5.5.5 ebgp-multihop 255 neighbor 5.5.5.5 update-source Loopback0 neighbor 5.5.5.5 route-map medr4 out neighbor 6.6.6.6 remote-as 3neighbor 6.6.6.6 update-source Loopback0 no auto-summary!ip classlessip route 5.5.5.5 255.255.255.255 5.5.45.2no ip http server!!access-list 22 permit 22.22.22.22 access-list 23 permit 1.1.1.1access-list 23 permit 2.2.2.2access-list 23 permit 3.3.3.3!route-map 23 permit 10match ip address 23!route-map medr4 permit 10match ip address 22set metric 50!route-map medr4 permit 20line con 0exec-timeout 0 0end2.5 R5配置hostname r5!no ip domain lookup!ip cef!interface Loopback0ip address 5.5.5.5 255.255.255.255!interface Loopback1ip address 55.55.55.55 255.255.255.255 !interface FastEthernet0/0ip address 5.5.56.2 255.255.255.0 duplex half!interface Serial1/0ip address 5.5.45.2 255.255.255.0 serial restart-delay 0!!router bgp 4no synchronizationbgp router-id 5.5.5.5bgp log-neighbor-changesnetwork 55.55.55.55 mask 255.255.255.255 neighbor 4.4.4.4 remote-as 3neighbor 4.4.4.4 ebgp-multihop 255 neighbor 4.4.4.4 update-source Loopback0 neighbor 6.6.6.6 remote-as 3neighbor 6.6.6.6 ebgp-multihop 255 neighbor 6.6.6.6 update-source Loopback0 no auto-summary!ip classlessip route 4.4.4.4 255.255.255.255 5.5.45.1ip route 6.6.6.6 255.255.255.255 5.5.56.1no ip http server!line con 0exec-timeout 0 0end2.6 R6配置hostname r6!boot-start-markerboot-end-marker!no aaa new-modelip subnet-zero!no ip domain lookup!ip cef!interface Loopback0ip address 6.6.6.6 255.255.255.255ip ospf network point-to-point!interface Loopback1ip address 66.66.66.66 255.255.255.255!interface FastEthernet0/0ip address 5.5.56.1 255.255.255.0duplex half!!interface Serial1/2ip address 5.5.24.3 255.255.255.0 encapsulation frame-relayip ospf network point-to-multipointserial restart-delay 0frame-relay map ip 5.5.24.2 604 broadcast !router ospf 1router-id 6.6.6.6log-adjacency-changesnetwork 5.5.24.0 0.0.0.255 area 0 network 6.6.6.6 0.0.0.0 area 0!router bgp 3no synchronizationbgp router-id 6.6.6.6bgp log-neighbor-changesnetwork 66.66.66.66 mask 255.255.255.255 neighbor 3.3.3.3 remote-as 3neighbor 3.3.3.3 update-source Loopback0 neighbor 3.3.3.3 next-hop-selfneighbor 3.3.3.3 route-map r355 out neighbor 4.4.4.4 remote-as 3neighbor 4.4.4.4 update-source Loopback0 neighbor 5.5.5.5 remote-as 4neighbor 5.5.5.5 ebgp-multihop 255 neighbor 5.5.5.5 update-source Loopback0 neighbor 5.5.5.5 route-map medr6 outno auto-summary!ip classlessip route 5.5.5.5 255.255.255.255 5.5.56.2no ip http server!!access-list 11 permit 11.11.11.11access-list 11 permit 1.1.1.1access-list 11 permit 2.2.2.2access-list 11 permit 3.3.3.3access-list 55 permit 55.55.55.55!route-map medr6 permit 10match ip address 11set metric 100!route-map medr6 permit 20!route-map r355 permit 10match ip address 55set local-preference 200!route-map r355 permit 20!line con 0exec-timeout 0 0三、实验结果上述试验包含了BGP大部分常用属性对选路影响。
网络工程综合实验实验报告课程名称网络工程综合实验实验名称_____ BGP和GRE实验_____学生学院自动化学院 ___专业班级__ 网络一班_________学号3108001217学生姓名_______ 李亮 _____指导教师________张钢 _______2011 年12 月一.实验目的1.掌握BGP路由协议的配置方法2.掌握GRE隧道协议的配置方法和应用场景3.掌握在复杂网络环境中的多协议配置和排错技巧二.实验原理和拓扑本实验的拓扑结构图如图2.1所示:图2.1 BGP & GRE的拓扑结构图三.实验内容说明和要求:A.S1、S2、S3为H3C的可配置交换机,请为每台交换机配置一个同网段的管理IP地址(172.16.254.*/24),并配置交换机的telnet远程登录。
三台交换机之间通过两条端口聚合的通道相连。
B.S S1和SS2为3COM的简单交换机,在本实验中作为HUB使用。
C.请取消所有交换机上的VLAN划分的配置。
D.为路由器配置telnet的远程登录。
E.本实验的配置目标有两个,第一是配置一个BGP的路由网络,外部BGP使用BGPv4,内部BGP使用OSPF作为路由协议。
第二个是配置R2和R3之间的GRE Tunnel,使R2和R3后面的两个子网能够通过这个通道连成一个虚拟的大子网。
F.把每台设备改名为图中的名字(如S1、S2、S3、R1、SS1等),以便识别。
R1和R7上不启动BGP协议,使用缺省路由指明出口为R2的串行口和R3的串行口。
G.R2、R3、R4、R5、R6上启动BGP协议。
H.请自行规划每一个网段和路由器上每个接口的地址和子网掩码。
I.在R2和R3上配置DHCP服务器,并且要求两个DHCP服务器的地址池不能设置为同一网段。
在R1/R7上设置DHCP中继,使R1/R7可以转发R2/R3的DHCP数据包给R1/R7的以太网口所连接的网段的主机。
J.在R2和R3之间开启一条GRE Tunnel,R2与R3后面的子网能够通过GRE Tunnel连成一个子网(能够相互访问)。
BGP同步实验与总结
一、BGP同步学习总结。
1、BGP同步打开后:从IBGP学到的路由默认不会用(不会加入路由表),直到从IGP也学到。
2、BGP同步打开后:在bgp同步打开的情况下,一个BGP路由器不会把那些通过ibgp邻居学到的bgp路由通告给自己的ebgp邻居;除非自己的igb路由表中存在这些路由,才可以向ebgp路由器通告。
3、BGP同步目的:防止一个AS(不是所有的路由器都运行bgp)内部出现路由黑洞,即向外部通告了一个本AS不可达的虚假的路由。
二、实验:
1、拓扑。
R2开启BGP同步后,10.1.1.0路由的变化。
2、配置。
2.1 变化一:关闭BGP同步。
2.2 R2开启BGP同步。
AS 3中的R3没有收到10.1.1.0的路由,在R2上写入一条默认路由:ip route 10.1.1.0 255.255.255.0 12.1.1.1
R3上的BGP路由:
R3上的10.1.1.0 加入ip 路由表:。
BGP实验(cisco)BGP 联邦○BGP 团体属性○BGP 团体cost (选路原则第0.5和第8.5条)○BGP 负载均衡(等价、非等价)○目录:AS200运行OSPF 保证全网可达,AS200中子AS 为65000、65001。
正常配置BGP :router bgp 100network 11.1.1.1 mask 255.255.255.255neighbor 12.1.1.2 remote-as 200R1:○使用子AS 号起进程:router bgp 65000配置子AS 属于那个大AS :bgp confederation identifier 200network 22.1.1.1 mask 255.255.255.255 neighbor 12.1.1.1 remote-as 100 neighbor 33.1.1.1 remote-as 65000 neighbor 33.1.1.1 update-source Loopback0 neighbor 33.1.1.1 next-hop-selfR2:○使用子AS 号起进程:router bgp 65000配置子AS 属于那个大AS :bgp confederation identifier 200配置联盟中相连AS 的AS 号:bgp confederation peers 65001network 33.1.1.1 mask 255.255.255.255 neighbor 22.1.1.1 remote-as 65000 neighbor 22.1.1.1 update-source Loopback0 neighbor 44.1.1.1 remote-as 65001使用环回口建立EBGP ,配置EBGP 多跳:neighbor 44.1.1.1 ebgp-multihop 255R3:○BGP联邦:BGP 实验(Cisco )2015年8月14日17:01neighbor 44.1.1.1 update-source Loopback0 使用子AS 号起进程:router bgp 65001配置子AS 属于那个大AS :bgp confederation identifier 200配置联盟中相连AS 的AS 号:bgp confederation peers 65000network 44.1.1.1 mask 255.255.255.255neighbor 33.1.1.1 remote-as 65000使用环回口建立EBGP ,配置EBGP 多跳:neighbor 33.1.1.1 ebgp-multihop 255neighbor 33.1.1.1 update-source Loopback0neighbor 33.1.1.1 next-hop-selfneighbor 45.1.1.5 remote-as 300R4:○正常配置BGP :router bgp 300network 55.1.1.1 mask 255.255.255.255neighbor 45.1.1.4 remote-as 200R5:○需求:R1将11.1.1.1打上100:1,R2将带100:1属性的路由增加200:2,R4将44.1.1.1打上200:2,R3将仅带有200:2属性的路由在传给R5时过滤掉。
BGP状态机实验报告
一、实验目的
通过BGP状态机实验,加深对协议状态机描述的理解,并掌握状态机的设计实验方法,同时也可加深对BGP路由协议的理解二、实验要求
根据系统的各种输入事件,进行BGP状态的变迁,并根据BGP 协议在适当情况下进行相应的处理。
三、状态转移情况
BGP状态机一共有6个状态,分别是
Idle,Connect,Active,OpenSent,OpenConfirm,Established
本实验要求处理的状态转移事件有
收到open消息:stud_bgp_FsmEventOpen
收到Keepalive消息:stud_bgp_FsmEventKeepAlive
收到Notification消息:stud_bgp_FsmEventNotification
收到Update消息:stud_bgp_FsmEventUpdate
TCP连接异常:stud_bgp_FsmEventTcpException,又细分为
BGP_TCP_CLOSE,BGP_TCP_FATAL_ERROR,
BGP_TCP_RETRANSMISSION_TIMEOUT三种子情况
计时器超时:stud_bgp_FsmEventTimerProcess,又细分为
BGP_CONNECTRETRY_TIMEOUT,BGP_HOLD_TIMEOUT,
BGP_KEEPALIVE_TIMEOUT三种子情况
BGP开始:stud_bgp_FsmEventStart
BGP结束:stud_bgp_FsmEventStop
收到连接结果:stud_bgp_FsmEventConnect
整理后的状态转移表如下
编程时,只要在事件处理函数中完成对应状态的变换即可
四、包的发送
1.open
将BGP消息头的标记全部置为1,表示不包含认证信息
●设置长度
●设置消息类型
●设置版本
●设置自治系统号
●设置保持时间
●设置BGP标志符
●调用bgp_FsmSendTcpData函数发送包
2.notification
●BGP消息头的标记全部置为1
●设置BGP消息头的长度
●设置BGP消息头的类型
●设置NOTIFICATION消息的错误编码
●设置NOTIFICATION消息的错误字码
●调用bgp_FsmSendTcpData函数发送包
3.keepalive
●BGP消息头的标记全部置为1
●设置BGP消息头的长度
●设置BGP消息头的类型
●调用TCP段发送函数bgp_FsmSendTcpData发送
五、遇到的问题
●包头的格式
marker要设置为全一,表示不包含认证信息。
但是在本实
验中似乎没影响。
实验指导书中的事件与试验接口函数的对应
有些函数函数名没有直接跟指导书上的函数名对应上,经过尝试才完成了函数名的对应。