Mari kita lanjutkan, masih seputar ospf. Kali ini ane mau share, dari gambar tulisan ini , R1 ke R-ISP itu menggunakan static route tepatnya di config kali ini menggunakan default route. Nah protokol ospf dan routing static tidak langsung bsa tukar informasi routing, supaya bisa tukar informasi routing, kita perlu redistribute protokol static ke dalam ospf. Ini anda hanya perlu fokus pada R1 dan R-ISP untuk confignya,…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
R-ISP set interfaces ge-0/0/0 unit 10 vlan-id 10 set interfaces ge-0/0/0 unit 10 family inet address 10.10.10.10/24 set interfaces lo0 unit 10 family inet address 100.100.100.1/32 set routing-options static route 0.0.0.0/0 next-hop 10.10.10.1 R1 Create policy: set policy-options policy-statement <strong>export_static</strong> term 1 from protocol <strong>static</strong> set policy-options policy-statement <strong>export_static</strong> term 1 then <strong>accept</strong> create static route: set routing-options static route 0.0.0.0/0 next-hop 10.10.10.10 export to protocol ospf: set protocols ospf export <strong>export_static </strong> |
Nah, kira2 ada gambaran ya,,jadi klo soal redistribute anda cukup masuk di hararki policy-options, jadi dah, hehe. Sekarang mari kita lihat hasilnya.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
root@vMX-1> show route logical-system r-isp inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0.0.0.0/0 *[Static/5] 00:07:01 > to 10.10.10.1 via ge-0/0/0.10 10.10.10.0/24 *[Direct/0] 08:28:09 > via ge-0/0/0.10 10.10.10.10/32 *[Local/0] 08:28:20 Local via ge-0/0/0.10 100.100.100.1/32 *[Direct/0] 08:29:06 > via lo0.10 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
root@vMX-1> show route logical-system r4 inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both <strong>0.0.0.0/0 *[OSPF/150] 00:07:54, metric 0, tag 0 > to 10.24.24.2 via ge-0/0/4.24 to 10.34.34.3 via ge-0/0/4.34</strong> 1.1.1.1/32 *[OSPF/150] 08:14:42, metric 0, tag 0 > to 10.24.24.2 via ge-0/0/4.24 to 10.34.34.3 via ge-0/0/4.34 2.2.2.2/32 *[OSPF/150] 08:14:42, metric 0, tag 0 > to 10.24.24.2 via ge-0/0/4.24 3.3.3.3/32 *[OSPF/150] 08:14:42, metric 0, tag 0 > to 10.34.34.3 via ge-0/0/4.34 4.4.4.4/32 *[Direct/0] 08:29:59 > via lo0.4 10.10.10.0/24 *[OSPF/150] 08:14:42, metric 0, tag 0 > to 10.24.24.2 via ge-0/0/4.24 to 10.34.34.3 via ge-0/0/4.34 10.12.12.0/24 *[OSPF/10] 08:28:12, metric 2 > to 10.24.24.2 via ge-0/0/4.24 10.13.13.0/24 *[OSPF/10] 08:28:12, metric 2 > to 10.34.34.3 via ge-0/0/4.34 ---(more)---[abort] |
Coba lihat di show route R4, ada network 0.0.0.0/0, ini artinya routing static yang tadi kita create di R1 berhasil di redistribute ke ospf. jadi selain R1 yaitu R2, R3, R4 0.0.0.0/0 dikenal sebagai network ospf. coba lakukan test ping seperti berikut:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
root@vMX-1> ping 100.100.100.1 logical-system r3 PING 100.100.100.1 (100.100.100.1): 56 data bytes 64 bytes from 100.100.100.1: icmp_seq=0 ttl=63 time=3.021 ms 64 bytes from 100.100.100.1: icmp_seq=1 ttl=63 time=9.659 ms 64 bytes from 100.100.100.1: icmp_seq=2 ttl=63 time=4.244 ms ^C --- 100.100.100.1 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.021/5.641/9.659/2.884 ms root@vMX-1> ping 100.100.100.1 logical-system r2 PING 100.100.100.1 (100.100.100.1): 56 data bytes 64 bytes from 100.100.100.1: icmp_seq=0 ttl=63 time=3.387 ms 64 bytes from 100.100.100.1: icmp_seq=1 ttl=63 time=3.629 ms ^C --- 100.100.100.1 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.387/3.508/3.629/0.121 ms |
Ok Good Luck! 🙂
Komentar