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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.