Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th June 2010, 06:54
cvgeeks cvgeeks is offline
Member
 
Join Date: Mar 2010
Posts: 48
Thanks: 1
Thanked 7 Times in 6 Posts
Smile Multiple IP's on one nic not working

Hello all,

I have waited to post this as I wanted to ensure I tried everything I could to ensure as legit a post as possible and without posting whats already been posted.

I have a problem with multiple ip's on one nic. I'm running Fedora12 with ISPConfig 2. My server has been running fine for about a year now and I have a customer who would like a website with it's own SSL.
I understand that I will need a dedicated IP for this and that I have. I also understand that I need to add a virtual IP to eth0 and that I did. I followed the instructions given at: http://www.howtoforge.com/perfect-se...ispconfig-2-p3 and to my dismay it works after I restart the network and until the server is rebooted and then eth0 takes the ip on eth0:0 and binds it to eth0.

Heres what I did maybe I'm doing somthing wrong:

cp ifcfg-eth0 ifcfg-eth0:0
vi ifcfg-eth0:0
changed the DEVICE: from eth0 to eth0:0
changed IP
saved and exit.
Restarted network
ifconfig all is good it now shows
eth0 bound to the proper ip
eth0:0 bound to the proper ip

then I reboot the server when it comes up ifconfig shows

eth0 bound to the newly added ip given to eth0:0 and eth0:0 no longer shows up.

I have searched and searched and I just can't seem to understand why eth0 is doing this.

Seems I'm doing somthing wrong for sure just don't know what! Any help would be greatly appreciated and thanks in advance.
Reply With Quote
Sponsored Links
  #2  
Old 8th June 2010, 15:12
cvgeeks cvgeeks is offline
Member
 
Join Date: Mar 2010
Posts: 48
Thanks: 1
Thanked 7 Times in 6 Posts
Talking

Ok, I've been researching all night and here is what I have come up with.

I need to add:
ifconfig eth0:0 xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy up

to the /etc/rc.local file so that the settings will be reapplied to the servers nic upon reboot.

I added:
ifup eth0:0 to the /etc/rc.local file instead. Looks like maybe I'm using the wrong command ) - Oops!

I'll try this solution out today when I get in the datacenter as I do not have access to the machine at this point as I rebooted it last night and it's nolonger online ;(

I'll keep you up to date if this works.

Thanks.
Reply With Quote
  #3  
Old 8th June 2010, 16:31
cvgeeks cvgeeks is offline
Member
 
Join Date: Mar 2010
Posts: 48
Thanks: 1
Thanked 7 Times in 6 Posts
Unhappy

Ok, I'm stumped! I added the correct line to the rc.local file and still the eth0:0 virtual ip gets used by eth0 upon reboot.
All works fine when I restart the network but upon a reboot the eth0:0 ip gets used by eth0 and I end up not having eth0:0.

Any help would be appreciated.
Reply With Quote
  #4  
Old 8th June 2010, 17:14
cvgeeks cvgeeks is offline
Member
 
Join Date: Mar 2010
Posts: 48
Thanks: 1
Thanked 7 Times in 6 Posts
Smile

Ok, I got it! My issue was not in the way I was setting it up my issue turned out to be that NetworkManager was controlling the nics upon each reboot so it needed to be turned off. WoW!

So incase anyone wants to know how I did what I did:

1. cd /etc/sysconfig/network-scripts
2. cp ifcfg-eth0 ifcfg-eth0:0
3. vi ifcfg-eth0:0
---------------Contents of the file ifcfg-eth0:0---------------------
DEVICE=eth0 <--change from eth0 to eth0:0 this sets your virtual interface--<<
BOOTPROTO=static <--This says your ip is static not dynamic--<<
DNS1=192.168.1.5 <--Enter your primary dns servers ip address here--<<
GATEWAY=192.168.1.1 <--Your gateway addy here --<<
IPADDR=192.168.1.2 <--Change from old IP (to) new IP--<<
NETMASK=255.255.255.0 <--Should stay the same in most cases--<<
TYPE=Ethernet
ONPARENT=yes
NM_CONTROLLED=yes <--This was my downfall so I turned NetworkManager off.
IPV6INIT=no
USERCTL=no
PREFIX=28
DEFROUTE=yes
NAME="System eth0" <--Change from "System eth0" (to) System eth0:0--<<
UUID=81bc1da6-9516-a6bf-93g7-613092a810b1
ONBOOT=yes
HWADDR=00:11:85:5b:56:9A
--------------------------------End of file ---------------------------

:How to turn off network manager:

#chkonfig NetworkManager off
#chkconfig network on
----------------------------------------------------------------------
Now we need to modify /etc/rc.local to start eth0:0 everytime the server reboots otherwise the settings will not take affect.

vi /etc/rc.local
-------------------Contents of rc.local--------------------------------
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
ifup eth0:0 <--We add this pointer to the virtual interface--<<
~
~
~
~
----------------------End of rc.local
Now save and exit:
restart the server
bang! Your up and running with multiple ips on a single nic. Sweet!
Reply With Quote
  #5  
Old 9th June 2010, 02:58
cvgeeks cvgeeks is offline
Member
 
Join Date: Mar 2010
Posts: 48
Thanks: 1
Thanked 7 Times in 6 Posts
Talking Feeling kinda silly right now...

I figured it out however I also just figured out that ISPConfig 2 has a feature called Automatic Networking which is really neat I might ad and what it does is everything I did above simply by turning this feature on which is off by default I learned and then entering your new ip address in the server control panel.

To turn this fantastic feature on simply use vi to edit this file:
/home/admispconfig/ispconfig/lib/config.inc.php

You can do a search for network_config and it should take you to this line in the file:
$go_info["server"]["network_config"] = 0; // 0 = none, 1 = automatic
Now change the 0; to a 1; - thats the zero after the equals sign only.

Now reboot and enter your ip's in the control panel.

You can ssh into your server and run ifconfig to see a list of devices and their respective ip's bound to them. You should see a new eth0:0 with your new ip bound to it. Seems ISPConfig sets up the netmask and gateways according to your existing eth0 setttings.

Hope this helps someone out their )
Reply With Quote
The Following User Says Thank You to cvgeeks For This Useful Post:
falko (9th June 2010)
  #6  
Old 16th June 2010, 06:17
cvgeeks cvgeeks is offline
Member
 
Join Date: Mar 2010
Posts: 48
Thanks: 1
Thanked 7 Times in 6 Posts
 
Talking Solved!!!!

I have been trying to get multiple IP's working on one nic for about a week now due to one of my customers needing a SSL. So I tried everything step by step and kept running into blocks and it turned out to be my GLUE RECORDS or Host Records not entered in my DNS as well as no Reverse Pointer Records. So once I was told to fix my glue records I did my home work and found out that my dns was not properly configured.
I ended up doing a fresh install of ISPCONFIG and Fedora then setup all my glue records then enabled automatic networking and turned off NetworkManager then restarted the server then entered the second ip in ispconfig. Then made all my glue records and pointers (maybe their the same) hehe, and then restarted the server. BANG!!!! It was up and running and all my sites were pinging, digging, configing hahaha soooo happyyy now!!!

Hope someone out their having this issue learns a little from this as it is a difficult issue to overcome.


Quote:
Originally Posted by cvgeeks View Post
Hello all,

I have waited to post this as I wanted to ensure I tried everything I could to ensure as legit a post as possible and without posting whats already been posted.

I have a problem with multiple ip's on one nic. I'm running Fedora12 with ISPConfig 2. My server has been running fine for about a year now and I have a customer who would like a website with it's own SSL.
I understand that I will need a dedicated IP for this and that I have. I also understand that I need to add a virtual IP to eth0 and that I did. I followed the instructions given at: http://www.howtoforge.com/perfect-se...ispconfig-2-p3 and to my dismay it works after I restart the network and until the server is rebooted and then eth0 takes the ip on eth0:0 and binds it to eth0.

Heres what I did maybe I'm doing somthing wrong:

cp ifcfg-eth0 ifcfg-eth0:0
vi ifcfg-eth0:0
changed the DEVICE: from eth0 to eth0:0
changed IP
saved and exit.
Restarted network
ifconfig all is good it now shows
eth0 bound to the proper ip
eth0:0 bound to the proper ip

then I reboot the server when it comes up ifconfig shows

eth0 bound to the newly added ip given to eth0:0 and eth0:0 no longer shows up.

I have searched and searched and I just can't seem to understand why eth0 is doing this.

Seems I'm doing somthing wrong for sure just don't know what! Any help would be greatly appreciated and thanks in advance.
Reply With Quote
Reply

Bookmarks

Tags
fedora12, ispconfig 2, multiple ips on one nic

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Heartbeat w/no load balancer multiple IP's wxman Server Operation 0 11th September 2009 17:06
ISPConfig setup for multiple external IPs debian-lover General 5 21st April 2008 11:56
multiple IPs and Vhosts_ispconfig.conf jag7720 Installation/Configuration 1 14th February 2008 11:25
SPF and multiple IPs Spaetzle Installation/Configuration 3 3rd January 2008 11:50
Ldirectord and heartbeat with multiple IPs cracker54 Server Operation 5 30th November 2006 16:31


All times are GMT +2. The time now is 10:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.