Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant assign ip address on boot centos 6.5 x86_64

Status
Not open for further replies.

ady2012

MIS
Jun 6, 2010
108
US
I have configured 2 files in /etc/sysconfig/network-scripts below here
ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
IPADDR=100.100.10.1
NETWORK=100.100.10.0
NETMASK=255.255.255.0
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"

ifcfg-eth0
TYPE=Ethernet
DEVICE=eth0
IPADDR=100.100.10.2
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
After booting centos 6.5 64 bit and ip anddress still blank
ifconfig -a
bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MASTER MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet HWaddr 50:B7:C3:76:8A:33
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:27 Base address:0x8000

And I should do service network restart

Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: Determining if ip address 100.100.10.1 is already in use for device bond0...
[ OK ]
Bringing up interface eth0: Determining if ip address 100.100.10.2 is already in use for device eth0...

ifconfig -a
bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:100.100.10.1 Bcast:100.100.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet HWaddr 50:B7:C3:76:8A:33
inet addr:100.100.10.2 Bcast:100.100.10.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:27 Base address:0x8000

Any ideas to get it works from booting for ifcfg-bond0 and ifcfg-eth0 without restart network again to get ip address.
Thanks.
 
I knew about bonding. The problem is how to make eth0 and bond0 up on boot without service network restart.Just try bond0 and eth0 on centos 6.2 x86 and centos 6.5 x86_64. I got same problem.
 
I have bonding set up for my servers - works great. I define some entries in /etc/sysconfig/network:

NETWORKING=yes
NETWORKING_IPV6=no
IPV6INIT=no
HOSTNAME=testbox.test.com
GATEWAY=10.10.10.1

and here is my configuration for the bonding:

ifcfg-bond0
BROADCAST=10.10.10.255
IPADDR=10.10.10.52
NETMASK=255.255.255.0
ONBOOT=yes
USERCTL=no
BONDING_OPTS="mode=1 miimon=100 downdelay=300 updelay=300"

ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
MASTER=bond0
#HWADDR=2C:76:8A:4F:AC:AC # Commented by Clonezilla
ONBOOT=yes
SLAVE=yes
USERCTL=no

ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
MASTER=bond0
#HWADDR=2C:76:8A:4F:AC:AD # Commented by Clonezilla
ONBOOT=yes
SLAVE=yes
USERCTL=no

Also, since I am running RHEL, I have set up /etc/modprobe.d/bonding.conf with this:

alias bond0 bonding.


After setting up those config files, a "service network stop" followed by a "service network start" got everything going.
 
ps - if all is working right, an "ifconfig -a" should look something like this:

bond0 Link encap:Ethernet HWaddr 2C:76:8A:4F:AC:AC
inet addr:10.10.10.52 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:7106865 errors:0 dropped:0 overruns:0 frame:0
TX packets:2632453 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:940211655 (896.6 MiB) TX bytes:332645378 (317.2 MiB)

eth0 Link encap:Ethernet HWaddr 2C:76:8A:4F:AC:AC
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:4879980 errors:0 dropped:0 overruns:0 frame:0
TX packets:2632453 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:751353074 (716.5 MiB) TX bytes:332645378 (317.2 MiB)
Interrupt:32

eth1 Link encap:Ethernet HWaddr 2C:76:8A:4F:AC:AC
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:2226885 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:188858581 (180.1 MiB) TX bytes:0 (0.0 b)
Interrupt:36
 
I didnt have a problem about bond0 and eth0 config.but my eth0 and bond0 didnt get ip address on boot.i should use service network restart.please read my previous post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top