Senin, 24 Desember 2018

BGP Autonomous System


Apa sih Autonomous System itu ? Autonomous System adalah sebuah network controller yang menjadikan beberapa network menjadi 1 administrative domain yang sama. Dengan adanya Autonomous System ini sangat memudahkan dalam segi routing domain administration dan policy configuration. policy configuration sangat penting untuk memungkinkan BGP untuk lebih efisien lagi dalam melakukan proces routing ke destination network nya.

Routing protocol lain seperti OSPF, EIGRP, RIP, ataupun IS-IS akan melakukan pertukaran routing information dengan BGP melalui redistribute. Berbeda dengan BGP, BGP akan melakukan pertukaran routing information melalui BGP peering sesion. Untuk peering yang masih dalam 1 Autonomous System yang sama di sebut iBGP (internal-BGP), dan untuk berbada Autonomous System di sebut eBGP (external-BGP).

BGP Autonomous System Number Formats

Pada january 2009, autonomous system number yang biasa di sebut AS Number di alokasikan kepada setiap companies menggunakan 2-Byte AS Number dari range 1 sampai 65535 (RFC 4271). Untuk menambah penggunaan nya AS number, Internet Assigned Number Authority atau yang biasa kenal dengan IANA meng alokasikan kembali 4-Byte AS number dari range 65536 sampai 4294967295.

Cisco mempunyai 2 cara menggunakan AS number :

ASPlain

ASplain merupakan decimal value pada AS Number, baik itu dalam 2-Byte AS number maupun 4-Byte AS number. By default cisco akan menggunakan ASplain format dalam show command ataupun reguler expression. Untuk configuration , show command, dan reguler expression format :
  • 2-Byte 1 - 65535
  • 4-Byte 65536 - 4294967295
Example
ASPlain(config)#router bgp 65001
Untuk verifikasi nya kita coba check peering session nya.
R1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 4, main routing table version 4
3 network entries using 432 bytes of memory
4 path entries using 320 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 1048 total bytes of memory
BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4        65002       6       6        4    0    0 00:01:01        2
Dari hasil verifikasi diatas bisa dilihat "local AS number 65001" yang berarti BGP ini menggunakan ASPlain method dalam penggunaan AS numbernya.

Lalu mari kita coba verifikasi route apa saja yang di dapat menggunakan reguler expression.
R1#show ip bgp regexp ^65002$
BGP table version is 4, local router ID is 1.1.1.1
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
 *>  2.2.2.2/32       12.12.12.2               0             0 65002 i
 *   12.12.12.0/24    12.12.12.2               0             0 65002 i
ASdot

Dalam ASdot ini 2-Byte AS number tetap dalam decimal value sama seperti ASplain. Yang berbeda ada pada 4-Byte AS number. dimana dia akan menggunakan dot notation, contoh nya 1.169031 AS number ini merupakan dot notation dari 234567 dalam decimal number nya. ketika menggunakan reguler expression pada ASdot format, kita harus menambahkan special character di reguler expression. Kita harus menambahkan backslash (\) untuk memastikan reguler expression tersebut tidak salah.  Untuk configuration , show command, dan reguler expression format :
  • 2-Byte 1 - 65535
  • 4-Byte 1.0 - 65535.65535
Example
ASdot1(config)#router bgp 1.1 
Kita coba verifikasi peering session nya.
ASdot1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 65537
BGP table version is 4, main routing table version 4
3 network entries using 432 bytes of memory
4 path entries using 320 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 1048 total bytes of memory
BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4        65538       9       9        4    0    0 00:04:30        2
" local AS number 65537 " loh, kok AS format nya menggunakan ASPlain ?
sesuai penjelasan sebelum nya By default cisco menggunakan ASPlain format. Lalu bagaimana cara nya jika kita ingin menggunakan format ASdot ?
Gampang kita cukup mengganti default output format dari ASPlain menjadi ASdot.

ASdot1(config)#router bgp 1.1
ASdot1(config-router)#bgp asnotation dot

Coba kita verifikasi BGP peering session nya.
ASdot1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1.1
BGP table version is 4, main routing table version 4
3 network entries using 432 bytes of memory
4 path entries using 320 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 1048 total bytes of memory
BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4          1.2      11      11        4    0    0 00:05:32        2
Dari hasil verifikasi di atas sudah terlihat AS number yang di gunakan sudah menggunakan format ASdot.

Untuk penggunaan reguler expression pada ASdot format ini memiliki perbedaan pada ASPlain format, seperti penjelasan sebelumnya kita harus menambahkan backslash (\) di antara notation as tersebut, hal ini untuk memastikan regexp yang kita gunakan itu benar.
ASdot1#show ip bgp regexp ^1\.2$
BGP table version is 4, local router ID is 1.1.1.1
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
 *>  2.2.2.2/32       12.12.12.2               0             0 1.2 i
 *   12.12.12.0/24    12.12.12.2               0             0 1.2 i
Reserved and Private Autonomous System Numbers

Sama seperti IPv4, AS number juga ada Public dan Private nya, untuk 2-Byte private AS number ada pada range 64512 - 65534, dan 65535 sebagai special AS number. 64496 - 64511 dalam continguos block oleh IANA, 1 - 64495 merupakan public AS number nya. Untuk 4-Byte AS number dari 65536 - 65551 merupakan AS Private, 65552 - 4294967295 adalah AS public nya. 
Share:

0 comments:

Posting Komentar