Bu lab da cisco router ile huawei router arasında BGP konfigürasyonunun nasıl olduğunu gösterecegim.
Huawei cihazını isimlendirelim ve ip addressini oluşturalım.
<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei]sysname huawei-R1[huawei-R1]interface GigabitEthernet 0/0/0[huawei-R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24[huawei-R1-GigabitEthernet0/0/0]interface loopback0[huawei-R1-LoopBack0]ip address 1.1.1.1 24[huawei-R1-LoopBack0]interface loopback10[huawei-R1-LoopBack10]ip address 10.10.10.10 32 |
Cisco cihazını isimlendirelim ve ip addressini oluşturalım.
Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname cisco-R2cisco-R2(config)#interface gigabitEthernet 0/0cisco-R2(config-if)#ip address 192.168.1.2 255.255.255.0cisco-R2(config-if)#no shcisco-R2(config-if)#interface loopback0cisco-R2(config-if)#ip address 2.2.2.2 255.255.255.0 |
Cihazların haberleşebilmeleri için static route yazalım.
[huawei-R1]ip route-static 2.2.2.2 255.255.255.255 192.168.1.2 |
cisco-R2(config)#ip route 1.1.1.1 255.255.255.255 192.168.1.1 |
Fiziksel cihazlarımızın ip addresslerini kullanarak dogrudan BGP bağlantılarımızı kuralım.
[huawei-R1]bgp 100[huawei-R1-bgp]peer 2.2.2.2 as-number 200[huawei-R1-bgp]peer 2.2.2.2 ebgp-max-hop 2[huawei-R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0[huawei-R1-bgp]network 10.10.10.10 32 |
cisco-R2(config)#router bgp 200cisco-R2(config-router)#no synchronizationcisco-R2(config-router)#bgp log-neighbor-changescisco-R2(config-router)#network 2.2.2.2 mask 255.255.255.255cisco-R2(config-router)#neighbor 1.1.1.1 remote-as 100cisco-R2(config-router)#neighbor 1.1.1.1 ebgp-multihop 2cisco-R2(config-router)#neighbor 1.1.1.1 update-source loopback 0cisco-R2(config-router)#no auto-summary |
Konfigürasyonu oluşturduktan sonra BGPyi kontrol edelim.
<huawei-R1>display bgp peerBGP local router ID : 192.168.1.1Local AS number : 100Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv2.2.2.2 4 200 10 7 0 00:04:44 Established 1 |
cisco-R2#sh ip bgpBGP table version is 3, local router ID is 2.2.2.2Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,x best-external, a additional-path, c RIB-compressed,Origin codes: i – IGP, e – EGP, ? – incompleteRPKI validation codes: V valid, I invalid, N Not foundNetwork Next Hop Metric LocPrf Weight Path*> 1.1.1.1/32 192.168.1.1 0 32768 i*> 10.10.10.10/32 1.1.1.1 0 0 100 i |
İki cihazımızdada BGP komşulukları kurulmuş durumdadır.
AS-PATH özelliğini görebilmek için cihazların BGP route tablolarına bakalım.
<huawei-R1>display bgp routing-tableBGP Local router ID is 192.168.1.1Status codes: * – valid, > – best, d – damped,h – history, i – internal, s – suppressed, S – StaleOrigin : i – IGP, e – EGP, ? – incompleteTotal Number of Routes: 2Network NextHop MED LocPrf PrefVal Path/Ogn*> 1.1.1.1/32 2.2.2.2 0 0 200i*> 10.10.10.10/32 0.0.0.0 0 0 i |
cisco-R2#sh ip route bgpCodes: L – local, 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 route, H – NHRP, l – LISP+ – replicated route, % – next hop overrideGateway of last resort is not set10.0.0.0/32 is subnetted, 1 subnetsB 10.10.10.10 [20/0] via 1.1.1.1, 00:08:12 |
Bgp bilgilerini görüntülemek için aşağıdaki komutları kullanalım.
[huawei-R1]display bgp peerBGP local router ID : 192.168.1.1Local AS number : 100Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv2.2.2.2 4 200 130 117 0 01:54:36 Established 1 |
cisco-R2#sh ip bgp summaryBGP router identifier 2.2.2.2, local AS number 200BGP table version is 3, main routing table version 32 network entries using 296 bytes of memory2 path entries using 128 bytes of memory2/2 BGP path/bestpath attribute entries using 272 bytes of memory1 BGP AS-PATH entries using 24 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 720 total bytes of memoryBGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd1.1.1.1 4 100 13 16 3 0 0 00:10:39 1 |
Son olarak cihazlarımızın ekran çıktılarına bakalım.
<huawei-R1>display current-configuration#sysname huawei-R1#interface GigabitEthernet0/0/0ip address 192.168.1.1 255.255.255.0#interface LoopBack0ip address 1.1.1.1 255.255.255.0#interface LoopBack10ip address 10.10.10.10 255.255.255.255#bgp 100peer 2.2.2.2 as-number 200peer 2.2.2.2 ebgp-max-hop 2peer 2.2.2.2 connect-interface LoopBack0#ipv4-family unicastundo synchronizationnetwork 10.10.10.10 255.255.255.255peer 2.2.2.2 enable#ip route-static 2.2.2.2 255.255.255.255 192.168.1.2#return |
cisco-R2# show running-config!hostname cisco-R2!interface Loopback0ip address 2.2.2.2 255.255.255.0!interface GigabitEthernet0/0ip address 192.168.1.2 255.255.255.0duplex autospeed auto!router bgp 200bgp log-neighbor-changesnetwork 1.1.1.1 mask 255.255.255.255network 2.2.2.2 mask 255.255.255.255neighbor 1.1.1.1 remote-as 100neighbor 1.1.1.1 ebgp-multihop 2neighbor 1.1.1.1 update-source Loopback0!ip route 1.1.1.1 255.255.255.255 192.168.1.1!end |
Hiç yorum yok:
Yorum Gönder