Difference between revisions of "Network Bonding di Ubuntu"

From OnnoWiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
 
2) apt-get install ifenslave
 
2) apt-get install ifenslave
 
3) edit /etc/network/interfaces as follows
 
3) edit /etc/network/interfaces as follows
−
# The loopback network interface
 
−
auto lo
 
−
iface lo inet loopback
 
  
−
auto bond0
+
# The loopback network interface
−
iface bond0 inet static
+
auto lo
−
# change the next three lines according to actual network settings
+
iface lo inet loopback
−
address 192.168.1.200
 
−
gateway 192.168.1.1
 
−
netmask 255.255.255.0
 
  
−
slaves eth0 eth1
+
auto bond0
−
bond-mode balance-rr
+
iface bond0 inet static
−
bond-miimon 100
+
# change the next three lines according to actual network settings
−
bond-primary eth0 eth1
+
address 192.168.1.200
−
up /sbin/ifenslave bond0 eth0 eth1
+
gateway 192.168.1.1
−
down /sbin/ifenslave -d bond0 eth0 eth1
+
netmask 255.255.255.0
 +
slaves eth0 eth1
 +
bond-mode balance-rr
 +
bond-miimon 100
 +
bond-primary eth0 eth1
 +
up /sbin/ifenslave bond0 eth0 eth1
 +
down /sbin/ifenslave -d bond0 eth0 eth1
  
 
4) either do a complete system reboot or the following:
 
4) either do a complete system reboot or the following:
−
a) /etc/inti.d/networking restart
+
 
−
b) ifconfig eth0 0 (and ignore the error, this [ and the next ] command will delete what ever ip address that eth0 has been originally set to)
+
a) /etc/inti.d/networking restart
−
c) ifconfig eth1 0
+
b) ifconfig eth0 0 (and ignore the error, this [ and the next ] command will delete what ever ip address that eth0 has been originally set to)
−
d) adjust the routes if necessary, mostly the default route needs to be replaced (change to via bond0 instead of eth0 or eth1, for example:
+
c) ifconfig eth1 0
−
route del default dev eth0
+
d) adjust the routes if necessary, mostly the default route needs to be replaced (change to via bond0 instead of eth0 or eth1, for example:
 +
 
 +
route del default dev eth0
 
or
 
or
−
route del default dev eth1
+
route del default dev eth1
 
)
 
)
  
Line 47: Line 49:
 
* [[Linux Howto Network Bonding]]
 
* [[Linux Howto Network Bonding]]
 
* [[Network Bonding di Ubuntu]]
 
* [[Network Bonding di Ubuntu]]
 +
* [[Ubuntu Bonding Network Interface]]

Latest revision as of 18:01, 26 February 2022

Ethernet bonding howto in Ubuntu 10.10 January 9, 2011ricoch3nLeave a commentGo to comments Tested in 64bit environment.

1) echo “alias bond0 bonding” > /etc/modprobe.d/bonding.conf 2) apt-get install ifenslave 3) edit /etc/network/interfaces as follows

# The loopback network interface
auto lo
iface lo inet loopback
auto bond0
iface bond0 inet static
# change the next three lines according to actual network settings
address 192.168.1.200
gateway 192.168.1.1
netmask 255.255.255.0
slaves eth0 eth1
bond-mode balance-rr
bond-miimon 100
bond-primary eth0 eth1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1

4) either do a complete system reboot or the following:

a) /etc/inti.d/networking restart
b) ifconfig eth0 0 (and ignore the error, this [ and the next ] command will delete what ever ip address that eth0 has been originally set to)
c) ifconfig eth1 0
d) adjust the routes if necessary, mostly the default route needs to be replaced (change to via bond0 instead of eth0 or eth1, for example:
route del default dev eth0

or

route del default dev eth1

)

Regardless which method is chosen in step 4, it’s usually safer to change the network setting through a local console instead of a remote ssh session.

Source: https://help.ubuntu.com/community/UbuntuBonding

Referensi

Pranala Menarik