Kayan Haber Alanı
Başlangıç / Huawei / Huawei ve Cisco router cihazları arasında BGP

Huawei ve Cisco router cihazları arasında BGP

Huawei cihazını isimlendirelim ve ip addressini oluşturalım.
system-view
Enter 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>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname cisco-R2
cisco-R2(config)#interface gigabitEthernet 0/0
cisco-R2(config-if)#ip address 192.168.1.2 255.255.255.0
cisco-R2(config-if)#no sh
cisco-R2(config-if)#interface loopback0
cisco-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 200
cisco-R2(config-router)#no synchronization
cisco-R2(config-router)#bgp log-neighbor-changes
cisco-R2(config-router)#network 2.2.2.2 mask 255.255.255.255
cisco-R2(config-router)#neighbor 1.1.1.1 remote-as 100
cisco-R2(config-router)#neighbor 1.1.1.1 ebgp-multihop 2
cisco-R2(config-router)#neighbor 1.1.1.1 update-source loopback 0
cisco-R2(config-router)#no auto-summary
Konfigürasyonu oluşturduktan sonra BGPyi kontrol edelim.
display bgp peer
BGP local router ID : 192.168.1.1
Local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2.2.2.2 4 200 10 7 0 00:04:44 Established 1
cisco-R2#sh ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status 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, ? – incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network 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.
display bgp routing-table
BGP Local router ID is 192.168.1.1
Status codes: * – valid, > – best, d – damped,
h – history, i – internal, s – suppressed, S – Stale
Origin : i – IGP, e – EGP, ? – incomplete
Total Number of Routes: 2
Network 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 bgp
Codes: L – local, C – connected, S – static, 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
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP

  • – replicated route, % – next hop override
    Gateway of last resort is not set
    10.0.0.0/32 is subnetted, 1 subnets
    B 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 peer
BGP local router ID : 192.168.1.1
Local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2.2.2.2 4 200 130 117 0 01:54:36 Established 1
cisco-R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 3, main routing table version 3
2 network entries using 296 bytes of memory
2 path entries using 128 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 720 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.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.
display current-configuration
#
sysname huawei-R1
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.0
#
interface LoopBack10
ip address 10.10.10.10 255.255.255.255
#
bgp 100
peer 2.2.2.2 as-number 200
peer 2.2.2.2 ebgp-max-hop 2
peer 2.2.2.2 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 10.10.10.10 255.255.255.255
peer 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 Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface GigabitEthernet0/0
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
router bgp 200
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 2.2.2.2 mask 255.255.255.255
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Loopback0
!
ip route 1.1.1.1 255.255.255.255 192.168.1.1
!
end
Arama
Search for:
Bağlantılar
CLIGURU
HUAWEI Enterprise Support
Huawei Network Simülatörü (eNSP)

Hakkında: Cem Kemal Erbaş

Kontrol Ediliyor

Next Generation Firewall (NGFW) Huawei

Next Generation Firewall (NGFW) üzerinden geçen trafiği, Application identification, User identification ve Content identification temellerine …

Bir cevap yazın