Static Route Juniper

Hi…

Kali ini kita akan coba konfigurasi static route pada Junos Juniper

Pertama, set ip address pada interface masing masing router

Juniper1

set interfaces em4 unit 0 family inet address 192.168.1.254/24
set interfaces em0 unit 0 family inet address 10.0.0.1/24

Juniper2

set interfaces em4 unit 0 family inet address 192.168.2.254/24
set interfaces em0 unit 0 family inet address 10.0.0.2/24

Setelah itu set static route nya

Juniper1

set routing-options static route 192.168.2.0/24 next-hop 10.0.0.2

Juniper2

set routing-options static route 192.168.1.0/24 next-hop 10.0.0.1

Jangan lupa di commit setelah itu cek di tabel routing nya

Juniper1

root> show route

inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24 *[Direct/0] 00:19:14
> via em0.0
10.0.0.1/32 *[Local/0] 00:19:14
Local via em0.0
192.168.1.0/24 *[Direct/0] 00:19:14
> via em4.0
192.168.1.254/32 *[Local/0] 00:19:14
Local via em4.0
192.168.2.0/24 *[Static/5] 00:17:28
> to 10.0.0.2 via em0.0

Juniper2

root> show route

inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24 *[Direct/0] 00:19:45
> via em0.0
10.0.0.2/32 *[Local/0] 00:19:45
Local via em0.0
192.168.1.0/24 *[Static/5] 00:17:50
> to 10.0.0.1 via em0.0
192.168.2.0/24 *[Direct/0] 00:19:45
> via em4.0
192.168.2.254/32 *[Local/0] 00:19:45
Local via em4.0

Coba ping dari PC1 ke PC2 dan sebaliknya

PC1> ping 192.168.2.1
84 bytes from 192.168.2.1 icmp_seq=1 ttl=62 time=1.508 ms
84 bytes from 192.168.2.1 icmp_seq=2 ttl=62 time=2.426 ms
84 bytes from 192.168.2.1 icmp_seq=3 ttl=62 time=3.035 ms
84 bytes from 192.168.2.1 icmp_seq=4 ttl=62 time=2.981 ms
84 bytes from 192.168.2.1 icmp_seq=5 ttl=62 time=2.175 ms

PC2> ping 192.168.1.1
84 bytes from 192.168.1.1 icmp_seq=1 ttl=62 time=1.009 ms
84 bytes from 192.168.1.1 icmp_seq=2 ttl=62 time=4.014 ms
84 bytes from 192.168.1.1 icmp_seq=3 ttl=62 time=3.336 ms
84 bytes from 192.168.1.1 icmp_seq=4 ttl=62 time=2.942 ms
84 bytes from 192.168.1.1 icmp_seq=5 ttl=62 time=3.512 ms

Juniper Dynamic Route OSPF Backbone Area (Area 0)

Hi…

Lanjut lagi ya, kali ini kita coba OSPF Area 0 atau Backbone area pada Juniper. Topologi masih sama seperti sebelumnya pada RIP.

Seperti biasa, pertama kita set IP pada masing masing interface di router

Juniper1

set interfaces em0 unit 0 family inet address 10.0.0.1/24
set interfaces em4 unit 0 family inet address 192.168.1.1/24

Juniper2

set interfaces em0 unit 0 family inet address 10.0.0.2/24
set interfaces em4 unit 0 family inet address 192.168.2.1/24

Selanjut nya tinggal kita aktifkan protocol ospf nya pada Juniper1 dan Juniper2

set protocols ospf area 0.0.0.0 interface all

Untuk mengetahui, protocol ospf sudah running atau belum, kita verifikasi

Juniper1

root> show route

inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24 *[Direct/0] 00:03:40
> via em0.0
10.0.0.1/32 *[Local/0] 00:03:40
Local via em0.0
192.168.1.0/24 *[Direct/0] 00:03:40
> via em4.0
192.168.1.1/32 *[Local/0] 00:03:40
Local via em4.0
192.168.2.0/24 *[OSPF/10] 00:02:29, metric 2
> to 10.0.0.2 via em0.0
224.0.0.5/32 *[OSPF/10] 00:03:40, metric 1
MultiRecv

root> show ospf interface
Interface State Area DR ID BDR ID Nbrs
em0.0 BDR 0.0.0.0 10.0.0.2 10.0.0.1 1
em4.0 DR 0.0.0.0 10.0.0.1 0.0.0.0 0

root> show ospf neighbor
Address Interface State ID Pri Dead
10.0.0.2 em0.0 Full 10.0.0.2 128 36

root> show route protocol ospf

inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.2.0/24 *[OSPF/10] 00:02:48, metric 2
> to 10.0.0.2 via em0.0
224.0.0.5/32 *[OSPF/10] 00:03:59, metric 1
MultiRecv

Juniper2

root> show route

inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/24 *[Direct/0] 00:04:15
> via em0.0
10.0.0.2/32 *[Local/0] 00:04:15
Local via em0.0
192.168.1.0/24 *[OSPF/10] 00:03:24, metric 2
> to 10.0.0.1 via em0.0
192.168.2.0/24 *[Direct/0] 00:04:14
> via em4.0
192.168.2.1/32 *[Local/0] 00:04:14
Local via em4.0
224.0.0.5/32 *[OSPF/10] 00:04:15, metric 1
MultiRecv

root> show ospf interface
Interface State Area DR ID BDR ID Nbrs
em0.0 DR 0.0.0.0 10.0.0.2 10.0.0.1 1
em4.0 DR 0.0.0.0 10.0.0.2 0.0.0.0 0

root> show ospf neighbor
Address Interface State ID Pri Dead
10.0.0.1 em0.0 Full 10.0.0.1 128 37

root> show route protocol ospf

inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.1.0/24 *[OSPF/10] 00:03:45, metric 2
> to 10.0.0.1 via em0.0
224.0.0.5/32 *[OSPF/10] 00:04:36, metric 1
MultiRecv

Dan terakhir, silahkan coba ping dari PC1 ke PC2 dan sebaliknya