Posted by: Barly Wicaksono | 15 August, 2012

Load Balancing OSPF di Juniper

Basic Knowledge

Load balancing merupakan suatu cara agar traffic yang kita kirim dapat melalui “multiple path” untuk memecah traffic melalui banyak path diantara router.

Menggunakan platform Internet Processor ASIC, traffic dipecah menggunakan algoritman hash melalui interface yang tersedia. Menggunakan algoritma Round Robin sebagai pengaturan paketnya. Maksimum hingga 8 equal cost path. Traffic diatur menggunakan tipe “per-packet” bukan per-flow.

Menggunakan platform Internet Processor II ASIC,  traffic dipecah menggunakan algoritman hash melalui interface yang tersedia. Menggunakan algoritma Round Robin sebagai pengaturan paketnya. Maksimum hingga 16 equal cost path. Traffic diatur menggunakan tipe “per-flow” bukan “per-packet”.

Pertanyaan :
Pada router mana harus dikonfigurasi load balancing?

Jawab :
Pada router yang memiliki multiple link yaitu Router R1 dan Router R4.

Load Balancing

.

Konfigurasi Router

<br />- Logical Router R1 -<br />set logical-routers R1 interfaces em0 unit 0 vlan-id 12<br />set logical-routers R1 interfaces em0 unit 0 family inet address 12.12.12.1/24<br />set logical-routers R1 interfaces em0 unit 1 vlan-id 13<br />set logical-routers R1 interfaces em0 unit 1 family inet address 13.13.13.1/24<br />set logical-routers R1 interfaces lo0 unit 0 family inet address 1.1.1.1/32<br />set logical-routers R1 protocols ospf export Load_Balance<br />set logical-routers R1 protocols ospf area 0.0.0.0 interface em0.0<br />set logical-routers R1 protocols ospf area 0.0.0.0 interface em0.1<br />set logical-routers R1 protocols ospf area 0.0.0.0 interface lo0.0 passive<br />set logical-routers R1 policy-options policy-statement Load_Balance term OSPF then load-balance per-packet<br /><br />- Logical Router R2 -<br />set logical-routers R2 interfaces em1 unit 0 vlan-id 12<br />set logical-routers R2 interfaces em1 unit 0 family inet address 12.12.12.2/24<br />set logical-routers R2 interfaces em1 unit 1 vlan-id 24<br />set logical-routers R2 interfaces em1 unit 1 family inet address 24.24.24.1/24<br />set logical-routers R2 interfaces lo0 unit 1 family inet address 2.2.2.2/32<br />set logical-routers R2 protocols ospf area 0.0.0.0 interface em1.0<br />set logical-routers R2 protocols ospf area 0.0.0.0 interface em1.1<br />set logical-routers R2 protocols ospf area 0.0.0.0 interface lo0.1 passive<br /><br />- Logical Router R3 -<br />set logical-routers r3 interfaces em2 unit 0 vlan-id 20<br />set logical-routers r3 interfaces em2 unit 0 family inet address 192.168.20.2/30<br />set logical-routers r3 interfaces em2 unit 1 vlan-id 30<br />set logical-routers r3 interfaces em2 unit 1 family inet address 192.168.30.1/30<br />set logical-routers r3 interfaces lo0 unit 2 family inet address 3.3.3.3/32<br />set logical-routers R3 protocols ospf area 0.0.0.0 interface em2.0<br />set logical-routers R3 protocols ospf area 0.0.0.0 interface em2.1<br />set logical-routers R3 protocols ospf area 0.0.0.0 interface lo0.2 passive<br /><br />- Logical Router R4 -<br />set logical-routers R4 interfaces em3 unit 0 vlan-id 34<br />set logical-routers R4 interfaces em3 unit 0 family inet address 34.34.34.2/24<br />set logical-routers R4 interfaces em3 unit 1 vlan-id 24<br />set logical-routers R4 interfaces em3 unit 1 family inet address 24.24.24.2/24<br />set logical-routers R4 interfaces lo0 unit 3 family inet address 4.4.4.4/32<br />set logical-routers R4 protocols ospf export Load_Balance<br />set logical-routers R4 protocols ospf area 0.0.0.0 interface em3.0<br />set logical-routers R4 protocols ospf area 0.0.0.0 interface em3.1<br />set logical-routers R4 protocols ospf area 0.0.0.0 interface lo0.3 passive<br />set logical-routers R4 policy-options policy-statement Load_Balance term OSPF then load-balance per-packet<br /><br />- Interface Vlan Tagging -<br />set interfaces em0 vlan-tagging<br />set interfaces em1 vlan-tagging<br />set interfaces em2 vlan-tagging<br />set interfaces em3 vlan-tagging<br />---------------------------------------------------------------------------------------<br />

.

Verifikasi

<br />- Show Route -<br />barly# run show route logical-router R1<br />logical-router: R1<br />inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)<br />+ = Active Route, - = Last Active, * = Both<br />1.1.1.1/32 *[Direct/0] 01:35:43<br />&gt; via lo0.0<br />2.2.2.2/32 *[OSPF/10] 01:34:49, metric 1<br />&gt; to 12.12.12.2 via em0.0<br />3.3.3.3/32 *[OSPF/10] 01:34:54, metric 1<br />&gt; to 13.13.13.2 via em0.1<br />4.4.4.4/32 *[OSPF/10] 01:34:49, metric 2<br />&gt; to 12.12.12.2 via em0.0<br />to 13.13.13.2 via em0.1<br />12.12.12.0/24 *[Direct/0] 01:35:43<br />&gt; via em0.0<br />12.12.12.1/32 *[Local/0] 01:35:43<br />Local via em0.0<br />13.13.13.0/24 *[Direct/0] 01:35:43<br />&gt; via em0.1<br />13.13.13.1/32 *[Local/0] 01:35:43<br />Local via em0.1<br />24.24.24.0/24 *[OSPF/10] 01:34:49, metric 2<br />&gt; to 12.12.12.2 via em0.0<br />34.34.34.0/24 *[OSPF/10] 01:34:54, metric 2<br />&gt; to 13.13.13.2 via em0.1<br />224.0.0.5/32 *[OSPF/10] 01:35:47, metric 1<br />MultiRecv<br />-----<br /><br />- Ping Test -<br />[edit]<br />barly# run ping 5.5.5.5 logical-router r1<br />PING 5.5.5.5 (5.5.5.5): 56 data bytes<br />64 bytes from 5.5.5.5: icmp_seq=0 ttl=61 time=1.047 ms<br />64 bytes from 5.5.5.5: icmp_seq=1 ttl=61 time=1.600 ms<br />64 bytes from 5.5.5.5: icmp_seq=2 ttl=61 time=0.890 ms<br />64 bytes from 5.5.5.5: icmp_seq=3 ttl=61 time=1.001 ms<br />^C<br />--- 5.5.5.5 ping statistics ---<br />4 packets transmitted, 4 packets received, 0% packet loss<br />round-trip min/avg/max/stddev = 0.890/1.135/1.600/0.275 ms<br /><br />- Traceroute Test -<br />barly# run traceroute 1.1.1.1 logical-router R4<br />traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 40 byte packets<br />1 24.24.24.1 (24.24.24.1) 4.804 ms 0.787 ms 0.554 ms<br />2 1.1.1.1 (1.1.1.1) 2.989 ms 3.131 ms 1.066 ms<br />barly# run traceroute 4.4.4.4 logical-router R1<br />traceroute to 4.4.4.4 (4.4.4.4), 30 hops max, 40 byte packets<br />1 12.12.12.2 (12.12.12.2) 0.682 ms 2.363 ms 0.556 ms<br />2 4.4.4.4 (4.4.4.4) 0.862 ms 3.712 ms 1.055 ms<br />---------------------------------------------------------------------------------------<br />

.

Running Configuration
Load Balancing OSPF

.


Responses

  1. mas.. kalo high availability di juniper itu gimana mas configurasinya..? pakai 2 provider standby dan aktif.. ?

    terimakasih..

    • HA Yang kearah mana dulu nih, kearah WAN apa LAN?
      Kalau WAN pake BGP Multipath.
      Kalau LAN Pake VRRP.


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 )

Google+ photo

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

Connecting to %s

Categories

%d bloggers like this: