Welcome, Guest. Please login or register.

Author Topic: Network Multihoming di Linux (RHEL 5.3)  (Read 302 times)

Offline Adi Sunardy

  • The man who sold the world
  • Administrator
  • Hero Member
  • *****
  • Posts: 595
  • Just an Ordinary Man

  • Activity
    0.6%
  • OS:
  • Windows 7 Windows 7
  • Browser:
  • Firefox 3.6.13 Firefox 3.6.13
    • sharing is caring
Network Multihoming di Linux (RHEL 5.3)
« on: February 02, 2011, 11:35:21 AM »
Di Linux, kita dapat "menggabungkan/mengikat" beberapa NIC (Network Interface Card) menjadi satu saluran tunggal/NIC menggunakan modul kernel khusus yang disebut bonding. Metode ini juga disebut multihoming. Penjelasan mengenai Multihoming bisa anda baca di You are not allowed to view links. Register or Login.

Langkah-langkah di bawah ini akan menunjukkan apa yang pernah saya lakukan di server saya dengan OS RHEL 5.3, (konfigurasi disini adalah konfigurasi dummy, Anda harus mengubahnya sesuai dengan konfigurasi Anda):

Langkah #1: Buat file konfigurasi bond0

Red Hat Linux menyimpan konfigurasi jaringan di /etc/sysconfig/network-scripts/. Langkah pertama, kita harus membuat file konfigurasi bond0:
Code: You are not allowed to view links. Register or Login
# vi /etc/sysconfig/network-scripts/ifcfg-bond0
Tambahkan baris berikut di file tersebut:
Code: You are not allowed to view links. Register or Login
DEVICE=bond0
IPADDR=192.168.1.20
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

Ganti alamat IP di atas dengan alamat IP anda yang sebenarnya. Save file dan keluar ke prompt shell.

Langkah #2: Memodifikasi file konfigurasi eth0 dan eth1:

Buka kedua file konfigurasi tersebut menggunakan teks editor yang anda sukai (saya mengggunakan vi)

Code: You are not allowed to view links. Register or Login
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Tambahkan/modifikasi file tersebut dengan value sebagai berikut:
Code: You are not allowed to view links. Register or Login
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Buka file konfigurasi eth1 menggunakan teks editor:
Code: You are not allowed to view links. Register or Login
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
Tambahkan/modifikasi file tersebut dengan value sebagai berikut:
Code: You are not allowed to view links. Register or Login
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Save file dan keluar ke prompt shell.

Langkah #3: Load driver/modul bonding

Modifikasi file konfigurasi modul kernel:

Code: You are not allowed to view links. Register or Login
# vi /etc/modprobe.conf
Tambahkan dua baris berikut:

Code: You are not allowed to view links. Register or Login
alias bond0 bonding
options bond0 mode=balance-alb miimon=100


Save file dan keluar ke prompt shell. Anda dapat mempelajari lebih lanjut tentang semua opsi yang dapat digunakan di You are not allowed to view links. Register or Login

Langkah #4: Test Konfigurasi

Load Bonding Module

Code: You are not allowed to view links. Register or Login
# modprobe bonding
Restart Network Service untuk menghidupkan interface bond0:
Code: You are not allowed to view links. Register or Login
# service network restart
Pastikan semua konfigurasi berjalan dengan benar:
Code: You are not allowed to view links. Register or Login
# less /proc/net/bonding/bond0
Output:
Code: You are not allowed to view links. Register or Login
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:c6:be:59

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:c6:be:63

Lihat semua interface:
Code: You are not allowed to view links. Register or Login
# ifconfig
Output:
Code: You are not allowed to view links. Register or Login
bond0     Link encap:Ethernet  HWaddr 00:0C:29:C6:BE:59
inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
RX packets:2804 errors:0 dropped:0 overruns:0 frame:0
TX packets:1879 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:250825 (244.9 KiB)  TX bytes:244683 (238.9 KiB)

eth0      Link encap:Ethernet  HWaddr 00:0C:29:C6:BE:59
inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec6:be59/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
RX packets:2809 errors:0 dropped:0 overruns:0 frame:0
TX packets:1390 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:251161 (245.2 KiB)  TX bytes:180289 (176.0 KiB)
Interrupt:11 Base address:0x1400

eth1      Link encap:Ethernet  HWaddr 00:0C:29:C6:BE:59
inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec6:be59/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:502 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:258 (258.0 b)  TX bytes:66516 (64.9 KiB)
Interrupt:10 Base address:0x1480

Selesai!

Source: You are not allowed to view links. Register or Login
Jabat Erat,


Adi Sunardy
You are not allowed to view links. Register or Login

 
Share this topic...
In a forum
(BBCode)
In a site/blog
(HTML)


Related Topics

  Subject / Started by Replies Last post
3 Replies
1253 Views
Last post May 22, 2009, 10:41:52 AM
by Adi Sunardy
3 Replies
1661 Views
Last post June 21, 2011, 03:56:52 PM
by Rizal Munadi
1 Replies
2320 Views
Last post April 20, 2010, 09:37:25 AM
by Rizal Munadi
0 Replies
147 Views
Last post July 28, 2010, 01:05:15 AM
by staff forum EUS
0 Replies
39 Views
Last post March 04, 2012, 01:07:40 PM
by Forum Poster