999精品在线视频,手机成人午夜在线视频,久久不卡国产精品无码,中日无码在线观看,成人av手机在线观看,日韩精品亚洲一区中文字幕,亚洲av无码人妻,四虎国产在线观看 ?

驗證BGP的AS間路由轉發及同步

2014-04-29 00:44:03吳剛
計算機時代 2014年3期

吳剛

摘 要: 邊界網關協議BGP適合在多個AS自治系統間交換路由信息,對運營管理系統的集成和協調起著重要作用,通常對配置多個AS之間的路由轉發及IBGP的路由同步存在諸多問題。通過搭建多自治系統的實驗環境,在BGP網絡中采用路由重發布、內部鄰居設定、指定IBGP的next-hop、啟用路由同步、路由匯總等方法,給出了針對所存在問題的解決方案并給予了論證。

關鍵詞: BGP; IBGP; 自治系統; 路由重發布; 路由同步

中圖分類號:TP393.2 文獻標志碼:A 文章編號:1006-8228(2014)03-14-03

0 引言

BGP協議適合在大的自治系統間交換路由信息,應用在這樣幾種環境:AS允許數據包穿過它到達其他AS;有到其他AS的多條連接;必須對進入和離開AS的數據流進行控制;典型的環境是ISP[1]。

BGP路由選擇的前提條件是:路由同步、無環路、下一跳可達(優化)。

BGP路由選擇判斷條件比較多,判斷優先順序依如下步驟:

⑴ 選擇最高的本地優先級;

⑵ 選擇本路由器始發的路由(next hop=0.0.0.0);

⑶ 選擇最短的AS路徑;

⑷ 選擇最小的起源code (IGP

⑸ 選擇最小的MED;

⑹ 選擇從EBGP鄰居學到的路由;

⑺ 選擇到達BGP下一跳最短的路由(根據IGP路由選擇);

⑻ 選擇從EBGP鄰居學到最老的路由(oldest route:意為鄰居計時器的值更大);

⑼ 選擇最小的鄰居路由器Router ID;

⑽ 選擇最小的鄰居路由器IP地址(BGP neighbor配置那個地址)[1]。

1 實驗環境

用一個實驗環境來驗證BGP的配置、IBGP和IGP的同步、AS系統間的轉發及穿透,如圖1所示。

圖1 BGP系統拓撲

在圖1所示的實驗環境中,包含三個自治系統,其中AS65100含有R2、R3、R4三臺路由器,R2和R4創建IBGP鄰居關系,同時,這三臺路由器運行OSPF的IGP內部路由協議;為了便于路由匯總,減少AS之間的路由信息條目,AS65100內部規劃的網絡地址范圍可以匯總為60.100.0.0/16地址段。

R1和R2是兩個不同自治系統的邊界網關,建立EBGP鄰居關系;

R4和R5是兩個不同自治系統的邊界網關,建立EBGP鄰居關系。

2 設備配置命令序列及功能

2.1 R1配置

interface Loopback0

ip address 60.202.11.1 255.255.255.0

interface FastEthernet0/0

ip address 60.200.12.1 255.255.255.0

router bgp 65202

synchronization

network 60.202.11.0 mask 255.255.255.0

!!通告本系統中的網絡段,不通告AS外部連接網絡段

neighbor 60.200.12.2 remote-as 65100

no auto-summary[3]

2.2 R2配置

interface FastEthernet0/0

ip address 60.100.23.2 255.255.255.0

interface FastEthernet0/1

ip address 60.200.12.2 255.255.255.0

router ospf 1

!!AS65100系統內部使用OSPF路由協議

redistribute bgp 65100 metric 1000 subnets

!!為了使EBGP傳播的路由信息和IBGP保持同步,需要把EBGP路由再發布到OSPF路由信息中。

network 60.100.23.0 0.0.0.255 area 0

router bgp 65100

bgp log-neighbor-changes

neighbor 60.100.34.4 remote-as 65100

neighbor 60.200.12.1 remote-as 65202

neighbor 60.100.34.4 next-hop-self

!!IBGP保持路由條目的下一跳信息,IBGP鄰居收到的路由下一跳是不可達的外部AS網關,所以通告IBGP鄰居,EBGP的下一跳路由指向自己,這是可達的路由條目。

no auto-summary

synchronization

!!啟用同步功能,防止路由黑洞

network 60.100.0.0 mask 255.255.0.0

!!向外部AS系統通告一條匯總的網段

ip route 60.100.0.0 255.255.0.0 Null0

!!需要在IGP表中構造一條對應的匯總網段路由,不然就不能用network通告匯總路由[2]。

2.3 R3配置

interface FastEthernet0/0

ip address 60.100.34.3 255.255.255.0

interface FastEthernet0/1

ip address 60.100.23.3 255.255.255.0

router ospf 1

network 60.100.23.0 0.0.0.255 area 0

network 60.100.34.0 0.0.0.255 area 0

R3中不需要運行BGP協議建立網狀的IBGP鄰居關系,BGP協議運行在TCP協議中,可以通過IGP路由傳遞,只要本AS中的邊界網關互相建立IBGP鄰居關系就可。

2.4 R4配置

interface FastEthernet0/0

ip address 60.100.34.4 255.255.255.0

interface FastEthernet0/1

ip address 60.201.45.4 255.255.255.0

router ospf 1

log-adjacency-changes

redistribute bgp 65100 metric 1000 subnets

network 60.100.34.0 0.0.0.255 area 0

router bgp 65100

bgp log-neighbor-changes

neighbor 60.100.23.2 remote-as 65100

neighbor 60.201.45.5 remote-as 65203

neighbor 60.100.23.2 next-hop-self

no auto-summary

synchronization

network 60.100.0.0 mask 255.255.0.0

ip route 60.100.0.0 255.255.0.0 Null0

2.5 R5配置

interface Loopback0

ip address 60.203.55.5 255.255.255.0

interface FastEthernet0/0

ip address 60.201.45.5 255.255.255.0

router bgp 65203

synchronization

network 60.203.55.0 mask 255.255.255.0

neighbor 60.201.45.4 remote-as 65100

no auto-summary

3 實驗結果輸出信息

3.1 R4輸出信息

R4上顯示TCP連接:

R4#show tcp brief

TCB Local Address Foreign Address (state)

66702968 60.100.34.4.179 60.100.23.2.45640 ESTAB

675625E0 60.201.45.4.46746 60.201.45.5.179 ESTAB

標明BGP通過TCP的179端口建立了連接。

R4上顯示BGP鄰居信息:

R4#show ip bgp neighbor

BGP neighbor is 60.100.23.2, remote AS 65100, internal link

BGP version 4, remote router ID 60.200.12.2

BGP state=Established, up for 00:41:03

BGP neighbor is 60.201.45.5, remote AS 65203, external link

BGP version 4, remote router ID 60.203.55.5

BGP state=Established, up for 00:41:06

IBGP鄰居和EBGP鄰居都已經建立起來了。

顯示鄰居摘要信息:

R4#show ip bgp summary

BGP router identifier 60.201.45.4, local AS number 65100

BGP table version is 5, main routing table version 5

3 network entries using 360 bytes of memory

4 path entries using 208 bytes of memory

5/3 BGP path/bestpath attribute entries using 620 bytes of memory

2 BGP AS-PATH entries using 48 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

60.100.23.2 4 65100 51 51 5 0 0 00:45:05 2

60.201.45.5 4 65203 49 49 5 0 0 00:44:56 1

查看BGP表信息:

R4#show ip bgp

BGP table version is 5, local router ID is 60.201.45.4

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

* i60.100.0.0/16 60.100.23.2 0 100 0 i

*> 0.0.0.0 0 32768 i

r>i60.202.11.0/24 60.100.23.2 0 100 0 65202 i

*> 60.203.55.0/24 60.201.45.5 0 0 65203 i

r>i60.202.11.0/24這一項中,“r”表明選用了IGP的路由,BGP路由加入路由表失效,但是“>”表示是最優路由,仍然可以傳遞給外部EBGP。緊接著的“i”表示是IBGP傳遞過來的路由[4]。

R4#show ip route

60.0.0.0/8 is variably subnetted, 6 subnets, 2 masks

O 60.100.23.0/24 [110/20] via 60.100.34.3, 00:49:10,

FastEthernet0/0

S 60.100.0.0/16 is directly connected, Null0

C 60.100.34.0/24 is directly connected, FastEthernet0/0

B 60.203.55.0/24 [20/0] via 60.201.45.5, 00:48:29

C 60.201.45.0/24 is directly connected, FastEthernet0/1

O E2 60.202.11.0/24 [110/1000] via 60.100.34.3, 00:49:10,

FastEthernet0/0

R4#

3.2 R1輸出信息

R1#show ip bgp

Network Next Hop Metric LocPrf Weight Path

*>60.100.0.0/16 60.200.12.2 0 0 65100 i

*>60.202.11.0/24 0.0.0.0 0 32768 i

*>60.203.55.0/24 60.200.12.2 0 65100 65203 i

R1#show ip route

60.0.0.0/8 is variably subnetted, 4 subnets, 2 masks

B 60.100.0.0/16 [20/0] via 60.200.12.2, 01:01:53

B 60.203.55.0/24 [20/0] via 60.200.12.2, 01:00:25

C 60.200.12.0/24 is directly connected, FastEthernet0/0

C 60.202.11.0/24 is directly connected, Loopback0

R1#ping 60.203.55.5

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 60.203.55.5,

timeout is 2 seconds:

.....

Success rate is 0 percent (0/5)

缺省情況下,R1去ping AS65203的網段,是用物理接口地址60.200.12.1,而這個網段在另外兩個AS系統中是沒有路由條目的,也不必要去通告這條AS系統間的網段,所以是ping 不通的。

R1#ping 60.203.55.5 source 60.202.11.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 60.203.55.5,

timeout is 2 seconds:

Packet sent with a source address of 60.202.11.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max

=172/258/332 ms

根據source來指定的源地址是AS65202內部的網段,這是BGP對外通告的網段,在另外兩個AS是有BGP路由,可以順利ping通。

3.3 R2輸出信息

R2#show ip bgp

Network Next Hop Metric LocPrf Weight Path

* i60.100.0.0/16 60.100.34.4 0 100 0 i

*> 0.0.0.0 0 32768 i

*> 60.202.11.0/24 60.200.12.1 0 0 65202 i

r>i60.203.55.0/24 60.100.34.4 0 100 0 65203 i

可以獲取兩個EBGP的路由。

R2#show ip route

60.0.0.0/8 is variably subnetted, 6 subnets, 2 masks

C 60.100.23.0/24 is directly connected, FastEthernet0/0

S 60.100.0.0/16 is directly connected, Null0

O 60.100.34.0/24 [110/20] via 60.100.23.3, 01:02:29,

FastEthernet0/0

O E2 60.203.55.0/24 [110/1000] via 60.100.23.3,

01:01:36, FastEthernet0/0

C 60.200.12.0/24 is directly connected, FastEthernet0/1

B 60.202.11.0/24 [20/0] via 60.200.12.1, 01:03:04

R2#

3.4 R3輸出信息

R3#show ip route

60.0.0.0/8 is variably subnetted, 5 subnets, 2 masks

C 60.100.23.0/24 is directly connected, FastEthernet0/1

O E2 60.100.0.0/16 [110/1000] via 60.100.34.4, 01:04:22,

FastEthernet0/0

[110/1000] via 60.100.23.2, 01:04:22, FastEthernet0/1

C 60.100.34.0/24 is directly connected, FastEthernet0/0

O E2 60.203.55.0/24 [110/1000] via 60.100.34.4,

01:03:30, FastEthernet0/0

O E2 60.202.11.0/24 [110/1000] via 60.100.23.2,

01:04:22, FastEthernet0/1

R3#

3.5 R5輸出信息

R5#show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 60.100.0.0/16 60.201.45.4 0 0 65100 i

*> 60.202.11.0/24 60.201.45.4 0 65100 65202 i

*> 60.203.55.0/24 0.0.0.0 0 32768 i

可以正常獲得AS65202的路由信息,并加入到路由表中。

R5#show ip route

B 60.100.0.0/16 [20/0] via 60.201.45.4, 01:04:56

C 60.203.55.0/24 is directly connected, Loopback0

C 60.201.45.0/24 is directly connected, FastEthernet0/0

B 60.202.11.0/24 [20/0] via 60.201.45.4, 01:04:56

4 結束語

本文對BGP的多AS系統路由配置方案解決了如下問題:AS系統內的IGP和IBGP的同步;AS系統間的路由轉發;ping 通各AS內部網絡。因為BGP不同的自治系統可能分屬于不同的運營商,所以路由轉發需要控制過濾,不同的自治系統還需要認證。對于多種屬性靈活控制選路,以及BGP的路由黑洞解決辦法等技術還有待進一步研究論證。

參考文獻:

[1] 程慶梅.創建高級路由型互聯網[M].機械工業出版社,2012.

[2] 程慶梅.創建高級路由型互聯網實訓手冊[M].機械工業出版社,2012.

[3] 斯桃枝.路由協議與交換技術[M].清華大學出版社,2012.

[4] 龐玲.邊界路由器BGP協議的脆弱性[J].計算機系統應用,2013.22

(1):157-161

主站蜘蛛池模板: 国产精品女同一区三区五区| 国产精品欧美亚洲韩国日本不卡| 国产经典免费播放视频| 久久久亚洲色| 一级黄色欧美| 国产一级毛片在线| 欧美日韩午夜视频在线观看| 大香伊人久久| 中文字幕一区二区人妻电影| 久久亚洲国产一区二区| 91福利一区二区三区| 国产美女一级毛片| 香蕉eeww99国产精选播放| 高潮毛片免费观看| 色窝窝免费一区二区三区| 丝袜高跟美脚国产1区| 中文国产成人精品久久| av大片在线无码免费| 97超爽成人免费视频在线播放| 久久精品人妻中文系列| 一级一毛片a级毛片| 99这里只有精品在线| 日本爱爱精品一区二区| 操操操综合网| 91麻豆久久久| 亚洲啪啪网| 在线人成精品免费视频| 国产成人无码Av在线播放无广告| 国产黄色视频综合| 亚洲经典在线中文字幕| 亚洲欧美一区二区三区蜜芽| 91毛片网| www.日韩三级| 欧美视频在线不卡| 亚洲视屏在线观看| 午夜小视频在线| 无码福利日韩神码福利片| 国产精品亚洲综合久久小说| 无码AV日韩一二三区| 国产欧美日韩专区发布| a级毛片一区二区免费视频| 美女一区二区在线观看| 国产精品lululu在线观看| 国产农村妇女精品一二区| 999福利激情视频| 永久免费无码成人网站| 国产91久久久久久| 婷婷六月综合网| 国产精品九九视频| 波多野结衣无码中文字幕在线观看一区二区 | 首页亚洲国产丝袜长腿综合| 亚洲狠狠婷婷综合久久久久| 波多野结衣AV无码久久一区| 精品五夜婷香蕉国产线看观看| 免费av一区二区三区在线| 欧美啪啪精品| 99手机在线视频| 免费看美女自慰的网站| 久久亚洲精少妇毛片午夜无码| 91精品免费久久久| 天天综合亚洲| 91精品国产91久久久久久三级| 亚洲色图另类| 亚洲中字无码AV电影在线观看| 91国内外精品自在线播放| 亚洲最新在线| 麻豆精品在线视频| 精品一区二区无码av| 四虎亚洲精品| 国产精品久久久久婷婷五月| 亚洲无码视频喷水| 精品国产一二三区| 精品小视频在线观看| 国产好痛疼轻点好爽的视频| 韩日午夜在线资源一区二区| 国产情精品嫩草影院88av| 国产欧美日韩资源在线观看| 1769国产精品视频免费观看| 91精品免费久久久| 人妖无码第一页| 亚洲精品视频免费观看| 久久熟女AV|