1、BGP基础之origin属性 [ 2007/1/24 2:45:18 | By: wangyang ] 一 试验说明: 在本实验中我们要分别建立IBGP邻居和EBGP邻居。然后研究一下BGP路由的origin属性。这个属性有3个值,分别为: 1 IGP:当使用 bgp network 命令或将IGP路由重分布进BGP中。在BGP路由表中起源于IGP的路由用“i”表示 2 EGP:通过BGP学习到的路由。在BGP路由表中起源于EGP的路由用“e”表示 3 incomplete:当路由重分布进BGP时,即无法确定路由的始发者时,在BGP路由表中用“?”表示 ――――
2、――――――――――――――――――――――――――――――――――― 二 基本配置: 1 配置底层联通 由于我的底层拓扑是帧中继,所以先要把帧中继配通。下面是配置 RTA interface Serial1/0 no ip address encapsulation frame-relay no frame-relay inverse-arp frame-relay lmi-type ansi interface Serial1/0.21 point-to-point ip address 150.10.30.1 255.255.0.0 frame-rel
3、ay interface-dlci 201 interface Serial1/0.23 point-to-point ip address 170.10.20.1 255.255.0.0 frame-relay interface-dlci 203 ――――――――――――――― RTB interface Loopback1 ip address 190.10.50.1 255.255.255.0 interface Serial1/0 ip address 175.10.40.2 255.255.0.0 encapsulation frame-
4、relay frame-relay map ip 175.10.40.1 401 broadcast no frame-relay inverse-arp frame-relay lmi-type ansi ―――――――――――――――――――― RTE interface Loopback1 ip address 170.10.0.1 255.255.255.0 interface Serial1/0 ip address 170.10.20.2 255.255.255.0 encapsulation frame-relay frame-relay ma
5、p ip 170.10.20.1 302 broadcast no frame-relay inverse-arp frame-relay lmi-type ansi 经测试底层已经联通。 ――――――――――――――――――――――――――――――――――― 2 配置IGP协议 要在AS 100中配置IGP协议,首先建立IGP的连通性,本实验我们选用EIGRP作为IGP协议,现在进行配置。 RTA RTA(config)#router eigrp 90 RTA(config-router)#no auto-summary RTA(config-router)#n
6、etwork 150.10.0.0 RTA(config-router)#passive-interface s1/0.23 RTC RTC(config)#router eigrp 90 RTC(config-router)#no auto-summary RTC(config-router)#network 150.10.0.0 RTC(config-router)#network 175.10.0.0 RTB RTB(config)#router eigrp 90 RTB(config-router)#no auto-summary RTB(config-rout
7、er)#net 175.10.0.0 RTB(config-router)#network 190.10.50.0 ―――――――――――――――――― RTA#sh ip route 170.10.0.0/24 is subnetted, 1 subnets C 170.10.20.0 is directly connected, Serial1/0.23 190.10.0.0/24 is subnetted, 1 subnets D 190.10.50.0 [90/2809856] via 150.10.30.2, 00:21:
8、34, Serial1/0.21 D 175.10.0.0/16 [90/2681856] via 150.10.30.2, 00:23:10, Serial1/0.21 C 150.10.0.0/16 is directly connected, Serial1/0.21 EIGRP路由已经可以正常学习到。 ――――――――――――――――――――――――――――――――――――――― 3 配置BGP RTA router bgp 100 no synchronization network 150.10.0.0 neighbor 170.10.20
9、2 remote-as 300 neighbor 175.10.40.2 remote-as 100 no auto-summary RTB router bgp 100 no synchronization network 190.10.50.0 mask 255.255.255.0 neighbor 150.10.30.1 remote-as 100 no auto-summary RTE router bgp 300 no synchronization network 170.10.0.0 mask 255.255.255.0 neighbo
10、r 170.10.20.1 remote-as 100 no auto-summary ――――――――――――――――――――――――――――――――――――― 4 配置静态路由 在RTA上配置一条静态路由,然后重分布到BGP中 RTA(config)#ip route 190.10.0.0 255.255.0.0 null 0 RTA(config)#router bgp 100 RTA(config-router)#redistribute static ―――――――――――――――――――――――――――――――――――――― 三 试验测试: 分别查看RTA
11、和 RTE的BGP路由表 RTA#sh ip bgp BGP table version is 5, local router ID is 170.10.20.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric
12、 LocPrf Weight Path *> 150.10.0.0 0.0.0.0 0 32768 i *> 170.10.0.0/24 170.10.20.2 0 0 300 i *> 190.10.0.0 0.0.0.0 0 32768 ? *>i190.10.50.0/24 175.10.40.2 0 100 0 i RTE#sh ip bgp BGP
13、table version is 5, local router ID is 170.10.0.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 150.10.0.0
14、 170.10.20.1 0 0 100 i *> 170.10.0.0/24 0.0.0.0 0 32768 i *> 190.10.0.0 170.10.20.1 0 0 100 ? *> 190.10.50.0/24 170.10.20.1 0 100 i 通过BGP路由表我们可以看到: RTA从AS300学习到了170.10.0.0 origin是IGP 从本AS中学习到了190.10.50.0 origin是IGP RTE从AS100学习到了150.10.0.0 origin是IGP 从AS100学习到了190.10.50.0 origin是IGP 从AS100学习到了 190.10.0.0 origin是? (路由重分布到BGP中)






