LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-15-2010, 11:37 AM   #1
samuellay
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Question Multiple IPV4 addresses not working after boot, works after network restart


Fedora 12 running under VirtualBox 3.2.8 w/ Bridged networking
Host OS Windows 7

I have 3 IP addresses set up in on my Fedora 12 installation:
Directory: /etc/sysconfig/network-scripts/
ifcfg-eth0 -> 192.168.0.170
ifcfg-eth0:0 -> 192.168.0.171
ifcfg-eth0:1 -> 192.168.0.172

Hostname is configured to host associated with 192.168.0.170 in /etc/hosts

When I reboot and execute

# ifconfig

eth0 is associated with the 172 address and the other addresses are not active. After I run

# service network restart

All of the addresses are active and associated with the correct interfaces.

Any hints on where to look for the problem?

Content of my ifcfg files below:

/etc/sysconfig/network-scripts/ifcfg-eth0 :
Code:
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
HWADDR=08:00:27:0A:9D:24
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.0.170
PREFIX=24
DNS1=192.168.0.1
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
GATEWAY=192.168.0.1
IPV6INIT=no
USERCTL=no
NM_CONTROLLED=yes
/etc/sysconfig/network-scripts/ifcfg-eth0:0 :
Code:
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0:0
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.0.171
PREFIX=24
DNS1=192.168.0.1
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
GATEWAY=192.168.0.1
IPV6INIT=no
USERCTL=no
ONPARENT=yes
NM_CONTROLLED=yes
ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-eth0:1 :
Code:
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0:1
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.0.172
PREFIX=24
DNS1=192.168.0.1
NAME="System eth0:1"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
GATEWAY=192.168.0.1
IPV6INIT=no
USERCTL=no
ONPARENT=yes
NM_CONTROLLED=yes
ONBOOT=yes
After booting:
Code:
# ifconfig

eth0      Link encap:Ethernet  HWaddr 08:00:27:0A:9D:24  
          inet addr:192.168.0.172  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe0a:9d24/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5888 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:369293 (360.6 KiB)  TX bytes:9165 (8.9 KiB)
          Interrupt:10 Base address:0xd020
Restart network:
Code:
# service network restart
 . . .
# ifconfig

eth0      Link encap:Ethernet  HWaddr 08:00:27:0A:9D:24  
          inet addr:192.168.0.170  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe0a:9d24/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5905 errors:0 dropped:0 overruns:0 frame:0
          TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:370529 (361.8 KiB)  TX bytes:16535 (16.1 KiB)
          Interrupt:10 Base address:0xd020 

eth0:0    Link encap:Ethernet  HWaddr 08:00:27:0A:9D:24  
          inet addr:192.168.0.171  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:10 Base address:0xd020 

eth0:1    Link encap:Ethernet  HWaddr 08:00:27:0A:9D:24  
          inet addr:192.168.0.172  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:10 Base address:0xd020

Last edited by samuellay; 10-15-2010 at 11:52 AM. Reason: Formatting/Spelling/Additional Info
 
Old 10-15-2010, 02:49 PM   #2
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
I would try wiping out the existing configs and recreating them.

Make a backup of the originals first.
 
Old 10-15-2010, 04:20 PM   #3
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
Quote:
Any hints on where to look for the problem?
/var/log/messages

You could also put
Code:
/etc/init.d/network restart
in /etc/rc.local so that the network will restart upon reboot.
 
Old 10-18-2010, 01:26 PM   #4
samuellay
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks to rhbegin and valen_tino for suggestions.

I tried removing and re-creating the
/etc/sysconfig/network-scripts/ifcfg-{eth0,eth0:0,eth0:1}
files and that didn't work.

Adding /etc/init.d/network restart to /etc/rc.local
would have solved the issue; but I would have learned nothing from
the exercise.

The problem was that the NetworkManager service was enabled
and the network service was not. I failed to realize this
when I decided to experiment with IP alaises. With NetworkManager
off and network on, life after reboot is sweet!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tutorial: Assigning Multiple Addresses to a Network Interface LXer Syndicated Linux News 0 10-10-2008 04:30 PM
What do I need to set up a network with multiple IP addresses? kerinism1 Linux - Networking 10 10-06-2007 05:33 AM
reboot works but service network restart does not spikeroo Linux - Networking 4 12-15-2005 04:41 PM
Network stuck... works on restart manudath Linux - Networking 0 01-03-2005 03:57 PM
Multiple IP addresses on one network card jeucken Linux - Networking 1 10-04-2002 07:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration