Posted by: Barly Wicaksono | 10 February, 2012

Routing OSPF di Juniper (Single Area)

OSPF adalah protokol interior routing yang berangsur-angsur menggantikan posisi RIP dalam banyak network. OSPF termasuk protokol routing link state.

Setiap router dalam OSPF diberikan router ID. Router ID ini biasanya berupa IP address terbesar yang dimiliki router. Jika router memiliki interface loopback, maka router ID nya adalah IP address dari interface loopback yang terbesar.

Router Link State membangun peta internal dari topologi networknya. Router-router lain menggunakan router ID untuk mengidentifikasi router dalam topology. Setiap router menggambarkan network sebagai sebuah pohon dengan dirinya sendiri sebagai akarnya. Ongkos metric yang dipakai bisa berupa hop count, speed atau keandalan suatu link. (sumber)

OSPF Single Area

OSPF Single Area

Jakarta

  • Interface Em0.0 (vlan 10) : 10.10.10.1/30
  • Interface Lo.0 :       1.1.1.1/32

Bandung

  • Interface em1.0 (vlan 10) : 10.10.10.2/30
  • Interface em1.1 (vlan 20) : 20.20.20.2/30
  • Interface lo0.1 :      2.2.2.2/32

Surabaya

  • Interface em2.0 (vlan 20) : 20.20.20.1/30
  • Interface lo0.2 :      3.3.3.3/32

.
————————————————————————————————————————————————————

  • Konfigurasi Router
  • Router Jakarta

Konfigurasi Interface
set logical-routers Jakarta interfaces em0 unit 0 vlan-id 10
set logical-routers Jakarta interfaces em0 unit 0 family inet address 10.10.10.1/30
set logical-routers Jakarta interfaces lo0 unit 0 family inet address 1.1.1.1/32

Konfigurasi Routing Protocol OSPF
set logical-routers Jakarta protocols ospf area 0.0.0.0 interface em0.0
set logical-routers Jakarta protocols ospf area 0.0.0.0 interface lo0.0

.

  • Router Bandung

Konfigurasi Interface
set logical-routers Bandung interfaces em1 unit 0 vlan-id 10
set logical-routers Bandung interfaces em1 unit 0 family inet address 10.10.10.2/30
set logical-routers Bandung interfaces em1 unit 1 vlan-id 20
set logical-routers Bandung interfaces em1 unit 1 family inet address 20.20.20.2/30
set logical-routers Bandung interfaces lo0 unit 1 family inet address 2.2.2.2/32

Konfigurasi Routing Protocol OSPF
set logical-routers Bandung protocols ospf area 0.0.0.0 interface em1.0
set logical-routers Bandung protocols ospf area 0.0.0.0 interface em1.1
set logical-routers Bandung protocols ospf area 0.0.0.0 interface lo0.1

.

  • Router Surabaya

Konfigurasi Interface
set logical-routers Surabaya interfaces em2 unit 0 vlan-id 20
set logical-routers Surabaya interfaces em2 unit 0 family inet address 20.20.20.1/30
set logical-routers Surabaya interfaces lo0 unit 2 family inet address 3.3.3.3/32

Konfigurasi Routing Protocol OSPF
set logical-routers Surabaya protocols ospf area 0.0.0.0 interface em2.0
set logical-routers Surabaya protocols ospf area 0.0.0.0 interface lo0.2

.

  • Vlan Tagging

Konfigurasi Interface Vlan Tagging
set interfaces em0 vlan-tagging
set interfaces em1 vlan-tagging
set interfaces em2 vlan-tagging
set interfaces em3 vlan-tagging

Konfigurasi Interface Vlan tagging berfungsi untuk menghidupkan fungsi “vlan” pada interface. vlan tersebut berguna untuk penghubung virtual antara interface sebuah router dengan router lainnya. Jika anda tidak mengkonfigurasi interface vlan-tagging, maka konfigurasi tidak akan dapat dijalankan meskipun anda sudah memberikan vlan-id pada setiap interface.

———————————————————————————————————————————————-

  • Running Configuration

Hasilnya konfigurasi router dan interface vlan-tagging diatas jika dalam bentuk konfigurasi pada sistem operasi Junos, dapat dilihat pada file dibawah ini :

Konfigurasi OSPF

———————————————————————————————————————————————-

  • Verifikasi
  • Show Route

barly# run show route logical-router all

logical-router: Bandung

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

1.1.1.1/32 *[OSPF/10] 00:45:30, metric 1
> to 10.10.10.1 via em1.0
2.2.2.2/32 *[Direct/0] 01:12:37
> via lo0.1
3.3.3.3/32 *[OSPF/10] 00:46:10, metric 1
> to 20.20.20.1 via em1.1
10.10.10.0/30 *[Direct/0] 00:46:11
> via em1.0
10.10.10.2/32 *[Local/0] 00:46:11
Local via em1.0
20.20.20.0/30 *[Direct/0] 00:46:11
> via em1.1
20.20.20.2/32 *[Local/0] 00:46:11
Local via em1.1
224.0.0.5/32 *[OSPF/10] 01:12:38, metric 1
MultiRecv
—–

logical-router: Jakarta

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

1.1.1.1/32 *[Direct/0] 01:12:38
> via lo0.0
2.2.2.2/32 *[OSPF/10] 00:45:30, metric 1
> to 10.10.10.2 via em0.0
3.3.3.3/32 *[OSPF/10] 00:45:30, metric 2
> to 10.10.10.2 via em0.0
10.10.10.0/30 *[Direct/0] 00:46:11
> via em0.0
10.10.10.1/32 *[Local/0] 00:46:11
Local via em0.0
20.20.20.0/30 *[OSPF/10] 00:45:30, metric 2
> to 10.10.10.2 via em0.0
224.0.0.5/32 *[OSPF/10] 01:12:38, metric 1
MultiRecv
—–

logical-router: Surabaya

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

1.1.1.1/32 *[OSPF/10] 00:45:30, metric 2
> to 20.20.20.2 via em2.0
2.2.2.2/32 *[OSPF/10] 00:48:43, metric 1
> to 20.20.20.2 via em2.0
3.3.3.3/32 *[Direct/0] 00:48:53
> via lo0.2
10.10.10.0/30 *[OSPF/10] 00:48:43, metric 2
> to 20.20.20.2 via em2.0
20.20.20.0/30 *[Direct/0] 01:12:37
> via em2.0
20.20.20.1/32 *[Local/0] 01:12:37
Local via em2.0
224.0.0.5/32 *[OSPF/10] 01:12:38, metric 1
MultiRecv
—–

  • OSPF Neighbour Detail

barly# run show ospf neighbor detail logical-router all

logical-router: Bandung
Address Interface State ID Pri Dead
10.10.10.1 em1.0 Full 1.1.1.1 128 31
Area 0.0.0.0, opt 0×42, DR 10.10.10.2, BDR 10.10.10.1
Up 00:47:20, adjacent 00:46:40
20.20.20.1 em1.1 Full 3.3.3.3 128 31
Area 0.0.0.0, opt 0×42, DR 20.20.20.1, BDR 20.20.20.2
Up 00:47:01, adjacent 00:47:01
—–

logical-router: Jakarta
10.10.10.2 em0.0 Full 2.2.2.2 128 35
Area 0.0.0.0, opt 0×42, DR 10.10.10.2, BDR 10.10.10.1
Up 00:47:20, adjacent 00:46:40
—–

logical-router: Surabaya
20.20.20.2 em2.0 Full 2.2.2.2 128 38
Area 0.0.0.0, opt 0×42, DR 20.20.20.1, BDR 20.20.20.2
Up 00:47:01, adjacent 00:47:01
—–

———————————————————————————————————————————————-

  • Ping

barly# run ping 1.1.1.1 logical-router Jakarta
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=64 time=0.560 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.146 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=64 time=0.168 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=64 time=0.150 ms
^C
— 1.1.1.1 ping statistics —
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.146/0.256/0.560/0.176 ms

[edit]
barly# run ping 1.1.1.1 logical-router Bandung
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=64 time=0.599 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.578 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=64 time=0.516 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=64 time=1.041 ms
^C
— 1.1.1.1 ping statistics —
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.516/0.683/1.041/0.209 ms

[edit]
barly# run ping 1.1.1.1 logical-router Surabaya
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=63 time=4.475 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=0.880 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=63 time=0.841 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=63 time=0.897 ms
^C
— 1.1.1.1 ping statistics —
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.841/1.773/4.475/1.560 ms



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

Join 107 other followers