国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 網(wǎng)絡(luò)知識 > 路由器 > 路由器設(shè)置 > cisco思科 > cisco路由器怎么配置BGP

    cisco路由器怎么配置BGP

    時間: 權(quán)威724 分享

    cisco路由器怎么配置BGP

      思科cisco是全世界領(lǐng)先且頂尖的通訊廠商,他出產(chǎn)的路由器功能也是很出色的,那么你知道cisco路由器怎么配置BGP嗎?下面是學(xué)習(xí)啦小編整理的一些關(guān)于cisco路由器怎么配置BGP的相關(guān)資料,供你參考。

      cisco路由器配置BGP的案例如下:

      在RA上啟動BGP AS 100, 在RB,RC,RD上啟動BGP AS200;并在AS 200 中啟動OSPF。

      實驗要求:

      1 AB,BC,CD之間分別建立EBGP,IBGP,IBGP 鄰接關(guān)系。

      2 通過BGP宣告A,B,C上的3個虛擬接口。要求所有路由器都能通過 sh ip bgp 看到這些虛擬接口。(將RC設(shè)為路由反射器)

      3 要求所有路由器都有全部網(wǎng)絡(luò)的路由信息

      **************************************************************************************

      一 基本配置

      RA#sh run

      !

      !interface Loopback0

      ip address 1.1.1.1 255.255.255.0

      !

      interface Serial0

      ip address 192.1.1.1 255.255.255.0

      !

      router bgp 100

      no synchronization

      bgp log-neighbor-changes

      network 1.1.1.0 mask 255.255.255.0

      neighbor 192.1.1.2 remote-as 200

      no auto-summary

      !

      RB#sh run

      !

      interface Loopback0

      ip address 2.2.2.2 255.255.255.0

      !

      interface Ethernet0

      ip address 193.1.1.1 255.255.255.0

      !

      interface Serial0

      ip address 192.1.1.2 255.255.255.0

      clockrate 64000

      !

      router ospf 1 //在RB上啟動OSPF

      network 0.0.0.0 255.255.255.255 area 0 //宣告所有與RB相連的網(wǎng)絡(luò)

      !

      router bgp 200

      no synchronization

      network 2.2.2.0 mask 255.255.255.0

      neighbor 192.1.1.1 remote-as 100

      neighbor 193.1.1.2 remote-as 200

      no auto-summary

      !

      RC#sh run

      !

      interface Loopback0

      ip address 3.3.3.3 255.255.255.0

      !

      interface Ethernet0

      ip address 193.1.1.2 255.255.255.0

      !

      interface Serial0

      ip address 194.1.1.1 255.255.255.0

      clock rate 64000

      !

      router ospf 1

      log-adjacency-changes

      network 0.0.0.0 255.255.255.255 area 0 // 同RB

      !

      router bgp 200

      no synchronization

      bgp log-neighbor-changes

      network 3.3.3.0 mask 255.255.255.0

      neighbor 193.1.1.1 remote-as 200

      neighbor 194.1.1.2 remote-as 200

      no auto-summary

      !

      RD#sh run

      interface Serial0

      ip address 194.1.1.2 255.255.255.0

      !

      router ospf 1 //同RB

      log-adjacency-changes

      network 0.0.0.0 255.255.255.255 area 0

      !

      router bgp 200

      no synchronization

      bgp log-neighbor-changes

      neighbor 194.1.1.1 remote-as 200

      no auto-summary

      二 檢查BGP

      RA#sh ip bgp

      Network Next Hop Metric LocPrf Weight Path

      *> 1.1.1.0/24 0.0.0.0 0 32768 i

      *> 2.2.2.0/24 192.1.1.2 0 0 200 i

      *> 3.3.3.0/24 192.1.1.2 0 200 i

      可以看到RA已經(jīng)通過BGP學(xué)習(xí)到了各個虛擬接口,這兩條路由下一跳均為192.1.1.2。這里需指出當(dāng)AS邊界路由器通過EBGP轉(zhuǎn)發(fā)路由信息時,總是將這些路由信息的下一跳設(shè)定為自己。

      ***************************************************

      RB#sh ip bgp

      Network Next Hop Metric LocPrf Weight Path

      *> 1.1.1.0/24 192.1.1.1 0 0 100 i

      *> 2.2.2.0/24 0.0.0.0 0 32768 i

      *>i3.3.3.0/24 193.1.1.2 0 100 0 i

      可以看到RB也學(xué)習(xí)到了這些虛擬接口

      ***************************************************

      RC#sh ip bgp

      Network Next Hop Metric LocPrf Weight Path

      *>i1.1.1.0/24 192.1.1.1 0 100 0 100 i

      *>i2.2.2.0/24 193.1.1.1 0 100 0 i

      *> 3.3.3.0/24 0.0.0.0 0 32768 i

      RC也學(xué)習(xí)到了這些路由

      ****************************************************

      RD#sh ip bgp

      Network Next Hop Metric LocPrf Weight Path

      *>i3.3.3.0/24 194.1.1.1 0 100 0 i

      我們注意到這時RD并沒有學(xué)習(xí)到1.1.1.0/24和2.2.2.0/24兩個網(wǎng)段。這是因為在一個BGP域中,RC并不會將它通過RB學(xué)習(xí)到的路由轉(zhuǎn)發(fā)給RD。這是我們需要將RC配置成路由反射器。配置如下:

      RC(config)# router bgp 200

      RC(config)#neighbor 193.1.1.1 route-reflector-client

      RC(config)#neighbor 194.1.1.2 route-reflector-client

      這兩條命令是將RB和RD設(shè)為RC的路由反射器客戶端

      我們再次在RD上進(jìn)行驗證,之前用 clear ip bgp * 重啟BGP進(jìn)程,稍等一會兒在RD上進(jìn)行查看;

      RD#sh ip bgp

      Network Next Hop Metric LocPrf Weight Path

      *>i1.1.1.0/24 192.1.1.1 0 100 0 100 i

      *>i2.2.2.0/24 193.1.1.1 0 100 0 i

      *>i3.3.3.0/24 194.1.1.1 0 100 0 i

      這時RD已經(jīng)學(xué)習(xí)到了所有的虛擬接口,至此我們的路由反射器配置成功。下面我們將通過查看路由表來追蹤這些路由信息。在這之前我們再次進(jìn)入所有路由器的 BGP進(jìn)程,輸入: no synchronization 來取消BGP與IGP的同步關(guān)系,使得IGP能學(xué)到BGP中的路由信息,再次 clearip bgp * 和 clear ip route * 稍等片刻,等待BGP鄰接關(guān)系再次建立后,我們在RB,RC,RD 分別用 sh iproute 就都能得到完整的路由信息了。以RC為例;

      RC#sh ip route

      Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets

      B 1.1.1.0 [200/0] via 192.1.1.1, 02:08:19

      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

      O 2.2.2.2/32 [110/11] via 193.1.1.1, 02:08:58, Ethernet0

      B 2.2.2.0/24 [200/0] via 193.1.1.1, 02:08:43

      3.0.0.0/24 is subnetted, 1 subnets

      C 3.3.3.0 is directly connected, Loopback0

      C 193.1.1.0/24 is directly connected, Ethernet0

      O 192.1.1.0/24 [110/74] via 193.1.1.1, 02:08:58, Ethernet0

      C 194.1.1.0/24 is directly connected, Serial0

      到現(xiàn)在為止,所有路由器的BGP表都已經(jīng)完整,RB,RC,RD的IP路由表也已經(jīng)完整,現(xiàn)在我們來看RA的路由表。

      RA#sh ip route

      Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets

      C 1.1.1.0 is directly connected, Loopback0

      2.0.0.0/24 is subnetted, 1 subnets

      B 2.2.2.0 [20/0] via 192.1.1.2, 02:18:43

      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

      B 3.3.3.3/32 [20/11] via 192.1.1.2, 02:12:30

      B 3.3.3.0/24 [20/0] via 192.1.1.2, 02:18:43

      C 192.1.1.0/24 is directly connected, Serial0

      我們可以看到在RA的路由表中并沒有193.1.1.0/24和194.1.1.0/24這兩個網(wǎng)段的路由,這是因為這兩條路由是在AS200中通過OSPF發(fā)布的,因此R1當(dāng)然無法學(xué)到。我們需要在AS邊界路由器RB上將OSPF的路由信息重發(fā)布到BGP中;配置如下:

      RB(config)#router bgp 200

      RB(config)#redistribute ospf 1

      再次來到RA中,

      RA#sh ip route

      Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets

      C 1.1.1.0 is directly connected, Loopback0

      2.0.0.0/24 is subnetted, 1 subnets

      B 2.2.2.0 [20/0] via 192.1.1.2, 02:26:51

      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

      B 3.3.3.3/32 [20/11] via 192.1.1.2, 02:20:39

      B 3.3.3.0/24 [20/0] via 192.1.1.2, 02:26:51

      B 193.1.1.0/24 [20/0] via 192.1.1.2, 02:20:38

      C 192.1.1.0/24 is directly connected, Serial0

      B 194.1.1.0/24 [20/74] via 192.1.1.2, 02:20:38

      我們可以看到這兩條路由已經(jīng)被RA學(xué)習(xí)到了。

      看過文章“cisco路由器怎么配置BGP"的人還看了:

      1.思科路由器配置命令

      2.思科路由器怎么進(jìn)入 思科路由器怎么設(shè)置

      3.如何查看Cisco路由器的配置信息

      4.思科路由器配置特點詳細(xì)介紹

      5.思科Cisco路由器的基礎(chǔ)配置知識

      6.思科如何配置ACE

      7.cisco思科怎么配置無線AP

      8.思科路由器配置命令大全

    561971