Chattanooga
Unix
Gnu
Android
Linux
Users
Group

 

Hot Topics:

Sponsoring:

Need a CentOS Networking Buff...

From: David White 
------------------------------------------------------
Evidently my question is one for the ages, since no one on ServerFault and
anyone in Linode's IRC support channel has been answered it (successfully),
nor anyone on Freenode's #centos has attempted to answer it.

I'm having trouble setting up a 2nd (virtual) interface on my CentOS 6.x
VPS. Everything works, except that whenever I reboot, the 2nd IP address
doesn't come up. However, simply running "ifup eth0:0" after a reboot
causes the 2nd IP to come up without an issue. You can view how I have the
interfaces configured on my question on Server Fault from a couple days ago
here:
http://serverfault.com/questions/584525/starting-a-virtual-network-interface

Since that question, the only changes I've made to the 2nd interface
(eth0:0)'s config file is: I took out the Gateway, I took out the IPv6
stuff, and I took out the "Type" directive ("Ethernet")

I've also tried, today, to rename both the file (ifcfg-eth0:1), AND the
interface defined within the file (DEVICE="eth0:1") to no avail. On the
2nd, new, IP addy's config file, I've also tried changing ONBOOT="yes" to
ONPARENT="yes" which also hasn't worked.

What could I be missing?

-- 
David White
Founder & CEO

*Develop CENTS *
Computing, Equipping, Networking, Training & Supporting
Nonprofit Organizations Worldwide
http://developcents.com
423-693-4234

=============================================================== From: David White ------------------------------------------------------ ... and Will gets the "Indirectly Answering the Question via Serverfault" award! The solution to my problem: Rename the device / interface on the first IP address from "eth0:0" TO "eth0", and then ensure the second device is named "eth0:0". All along, my first interface was configured as device name of "eth0:0" instead of "eth0" That was the root problem. After editing the file /etc/sysconfig/network-scripts/ifconfig-eth0 so that the device name was set to eth0 instead of eth0:0, and then ensuring the 2nd file was setup properly (named ifcfg-eth0:0 with the same device name), everything works -- David White Founder & CEO *Develop CENTS * Computing, Equipping, Networking, Training & Supporting Nonprofit Organizations Worldwide http://developcents.com 423-693-4234

=============================================================== From: William Roush ------------------------------------------------------ /flex William Roush william.roush@roushtech.net 423-463-0592 http://www.roushtech.net/blog/

=============================================================== From: Wil Wade ------------------------------------------------------ It looks like from this: http://www.tecmint.com/create-multiple-ip-addresses-to-one-single-network-interface/ That you should have eth0 and eth0:0 not eth0:1 Perhaps that is causing the fail? It is not finding eth0:0 so not continuing? Does it start autom.... Never mind just saw your email.

=============================================================== From: William Roush ------------------------------------------------------ Of course I'm going to answer it this, I want my Serverfault points! William Roush william.roush@roushtech.net 423-463-0592 http://www.roushtech.net/blog/

=============================================================== From: David White ------------------------------------------------------ You're exactly right. We probably cross-posted / and I finished commenting on / accepting Will (Roush)'s ServerFault answer about the same time you sent this email.

=============================================================== From: Dave Brockman ------------------------------------------------------ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Reading that makes my head hurt. Traditionally you need your interface, which is eth0 defined first, and then subinterfaces or aliases defined afterwards, which are the eth0:X entries. Here's what works for me on CentOS boxen. # more /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=10.X.X.15 NETMASK=255.255.255.0 GATEWAY=10.X.X.251 # more /etc/sysconfig/network-scripts/ifcfg-eth0:0 DEVICE=eth0:0 ONBOOT=yes BOOTPROTO=static IPADDR=10.X.X.7 NETMASK=255.255.255.0 Regards, dtb - -- "Some things in life can never be fully appreciated nor understood unless experienced firsthand. Some things in networking can never be fully understood by someone who neither builds commercial networking equipment nor runs an operational network." RFC 1925 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTNxGTAAoJEMP+wtEOVbcdxoMH/2EoK2GmLASlxoWJ6XpSTOxX yYNYzJx20ILH6P/Qf8XZRs8G01ZcO0PUwJhAauKQESXtp+wSjAAAFB/0fPsCEFm+ HKh5W0CYQJ48f+HipV4thHiYsmXk2pCcwgM2uvJQ7lyILOBqpO77Blrl/C41+CFB XTJKvaoNuGsEJsYu4MZc1oJ2GgLyh/RK7OXUfa+xhBNob2oOU/QAOo/jCaBhmFf0 Fu9x+BQk6IU34eu4SqRk8HqCDUpu1ysPULOW4+3fpbGos/psnua9Pw2Ki3dukGlw A2lQbCnt0wGdracHftDdtwIglfMw8dTD0/+YWDyuMD5FN9SX2ox91KgIheCoVD0= =yaJb -----END PGP SIGNATURE-----

=============================================================== From: Joe Freeman ------------------------------------------------------ Try this- echo "ifup eth0:0" >> /etc/rc.local