Tuesday, 24 December 2013

RHEL:ipbonding

# service network status
# ifconfig eth1:1 inet 1.2.3.4 netmask 0xffffff00 broadcast up
# ifconfig eth1:1
eth1:1   Link encap:Ethernet  HWaddr 00:50:56:80:08:06
         inet addr:1.2.3.4  Bcast:1.2.3.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

# cd /etc/sysconfig/network-scripts

# ls ifcfg*
 ifcfg-eth0  ifcfg-eth1 ifcfg-eth2  ifcfg-lo
# cp ifcfg-eth1 ifcfg-eth1:1
# cat ifcfg-eth1:1DEVICE=”eth1?  <—  change to  eth1:1
BOOTPROTO=none
NM_CONTROLLED=”yes”
ONBOOT=yes
TYPE=”Ethernet”
UUID=”85b993bb-8e89-871b-887f-6d3973795928?
HWADDR=00:50:56:87:17:04
IPADDR=1.2.3.23 < — change to your new IP, 1.2.3.4
PREFIX=24
GATEWAY=1.2.3.1
DNS1=1.2.3.12
DOMAIN=myworld.ca
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=”System eth1?
# service network stop
# service network start

==========
Step 1- Load Kernel module
# cat /etc/modprobe.d/bonding.conf
  alias bond0 bonding
Step2- create channel bonding interface
#cd /etc/sysconfig/network-scripts/
# cat ifcfg-bond0
DEVICE=bond0
BROADCAST="192.168.0.255"
GATEWAY="192.168.0.254"
IPADDR="192.168.0.1"
NETMASK="255.255.255.0"
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS="mode=0 miimon=1000"
Step 3- Configure Network interfaces
Interface eth0 configuration:-
# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
USERCTL=no
TYPE=Ethernet
Interface eth1 configuration:-
# cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
TYPE=Ethernet
USERCTL=no
# ifconfig bond0 up
# ifconfig

# cat /sys/class/net/bonding_masters
bond0
# cat /sys/class/net/bond0/bonding/mode
balance-rr 0
# cat /proc/net/bonding/bond0

=========
Changing Hostname
1. change in /etc/hosts ….
2. cat /etc/sysconfig/network |grep -i hostname
change HOSTNAME=<hostname> … vi /etc/sysconfig/network
3. #service network restart …. will restart the network with the new host name
OR #/etc/init.d/network restart



No comments:

Post a Comment