Contoh skenario yang akan digunakan adalah sebagai berikut :
R3 merupakan router yang menjalankan
OSPF, sehingga R2 juga harus menjalankan OSPF. Antara R1 dan R2 akan
menjalankan BGP karena kedua router tersebut berasal dari jaringan yang
AS Number-nya berbeda. Konfigurasi yang perlu ditambahkan pada R2 adalah
redistribute OSPF melalui BGP dan redistribute BGP melalui OSPF.
Konfigurasi BGP di R1 adalah sebagai berikut :[admin@R1] > routing bgp instance print Flags: X – disabled 0 name=”default” as=65535 router-id=0.0.0.0 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=no redistribute-other-bgp=no out-filter=”” client-to-client-reflection=yes ignore-as-path-len=no routing-table=”” [admin@R1] > routing bgp instance set 0 as=100 router-id=1.1.1.1 [admin@R1] > routing bgp instance print Flags: X – disabled 0 name=”default” as=100 router-id=1.1.1.1 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=no redistribute-other-bgp=no out-filter=”” client-to-client-reflection=yes ignore-as-path-len=no routing-table=”” [admin@R1] > routing bgp peer add remote-as=200 remote-address=10.10.10.2
[admin@R1] > routing bgp network add network=192.168.10.0/24 [admin@R1] > routing bgp network add network=192.168.11.0/24
Konfigurasi BGP di R2 adalah sebagai berikut :
[admin@R2] > routing bgp instance print Flags: X – disabled 0 name=”default” as=65535 router-id=0.0.0.0 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=no redistribute-other-bgp=no out-filter=”” client-to-client-reflection=yes ignore-as-path-len=no routing-table=”” [admin@R1] > routing bgp instance set 0 as=200 router-id=2.2.2.2 [admin@R1] > routing bgp instance print Flags: X – disabled 0 name=”default” as=200 router-id=2.2.2.2 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=no redistribute-other-bgp=no out-filter=”” client-to-client-reflection=yes ignore-as-path-len=no routing-table=”” [admin@R1] > routing bgp peer add remote-as=100 remote-address=10.10.10.1 [admin@R1] > routing bgp network add network=192.168.20.0/24 [admin@R1] > routing bgp network add network=192.168.30.0/24 [admin@R1] > routing bgp network add network=192.168.21.0/30
Yang perlu ditambahkan di pada R2 adalah redistribute antara OSPF dan BGP seperti berikut.
[admin@R2] > routing bgp instance set 0 redistribute-ospf=yes [admin@R2] > routing bgp instance print Flags: X – disabled 0 name=”default” as=200 router-id=2.2.2.2 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=yes redistribute-other-bgp=no out-filter=”” client-to-client-reflection=yes ignore-as-path-len=no routing-table=”” [admin@R2] > routing ospf instance set 0 redistribute-bgp=as-type-1 [admin@R2] > routing ospf instance print Flags: X – disabled 0 name=”default” router-id=2.2.2.2 distribute-default=never redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-bgp=as-type-1 redistribute-other-ospf=no metric-default=1 metric-connected=20 metric-static=20 metric-rip=20 metric-bgp=auto metric-other-ospf=auto in-filter=ospf-in out-filter=ospf-out
Sehingga tabel routing dari ketiga router adalah sebagai berikut :
[admin@R1] > ip route print Flags: X – disabled, A – active, D – dynamic, C – connect, S – static, r – rip, b – bgp, o – ospf, m – mme, B – blackhole, U – unreachable, P – prohibit # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADC 10.10.10.0/30 10.10.10.1 ether1 0 1 ADC 192.168.10.0/24 192.168.10.1 ether2 0 2 ADC 192.168.11.0/24 192.168.11.1 ether3 0 3 ADb 192.168.20.0/24 10.10.10.2 20 4 ADb 192.168.21.0/30 10.10.10.2 20 5 ADb 192.168.30.0/24 10.10.10.2 20 [admin@R2] > ip route print Flags: X – disabled, A – active, D – dynamic, C – connect, S – static, r – rip, b – bgp, o – ospf, m – mme, B – blackhole, U – unreachable, P – prohibit # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADC 10.10.10.0/30 10.10.10.2 ether1 0 1 ADb 192.168.10.0/24 10.10.10.1 20 2 ADb 192.168.11.0/24 10.10.10.1 20 3 ADo 192.168.20.0/24 192.168.21.1 110 4 ADC 192.168.21.0/30 192.168.21.2 ether2 0 5 ADo 192.168.30.0/24 192.168.21.1 110 [admin@R3] > ip route print Flags: X – disabled, A – active, D – dynamic, C – connect, S – static, r – rip, b – bgp, o – ospf, m – mme, B – blackhole, U – unreachable, P – prohibit # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADo 10.10.10.0/30 192.168.21.2 110 1 ADo 192.168.10.0/24 192.168.21.2 110 2 ADo 192.168.11.0/24 192.168.21.2 110 3 ADC 192.168.20.0/24 192.168.20.0 ether2 0 4 ADC 192.168.21.0/30 192.168.21.1 ether1 0 5 ADC 192.168.30.0/24 192.168.30.1 ether3 0
Posted by 21.45 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar