Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 3rd, 2003, 04:46 PM
misteraven misteraven is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 67 misteraven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 16 sec
Reputation Power: 6
IP aliasing vs. Indevidual NIC's...

I'm in a situation where I need to add a new domain to my Apache virtual host configuration that is IP based (So I can add SSL to it). Apparantly IP based hosting requires unique LAN IP's, therefore requiring some changes made to the ipconfig. After research I saw that modern versions of Linux support up to 256 IP aliases per NIC, so you don't have to run out and install a new NIC each time an IP is required.

My question is there any draw backs to IP aliasing?

I ran into some issues with a message board I'm hosting (vBulletin) not working properly and I believe it stemmed from the changes I made to the ipconfig. Here's the tutorial i followed: http://www.pcquest.com/content/serv...e/202041301.asp

Can anyone explain this IP aliasing a bit deeper?

Reply With Quote
  #2  
Old February 3rd, 2003, 10:41 PM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
The only real disadvantage is that traffic to all the ips are going through one nic card, but this is a very minor drawback, since servers usually have at least a 100mbit nic card in them, and the typical internet server never does that kind of throughput no matter how many ips they have. So in other words, there is no real disadvantage, ipaliasing is extremely common.

As for explaining it in more detail, there isn't really any that needs to be done. Either setup your network scripts to do it on boot, or just use ifconfig manually to add them (i was lazy and just added the ifconfig calls to the rc.local, so they were called on boot each time :P)

Anyway:
/sbin/ifconfig eth0:0 x.x.x.x netmask 255.255.254.0
/sbin/ifconfig eth0:1 x.x.x.x netmask 255.255.254.0

As you can see, it's just like ifconfig-ing the 'main' ip address, except you have the :x after the interface as the alias number.

Of course the ip's have to be routed to the machine already, but I'm assuming this is not part of your question.
__________________
Jon Coulter
ledjon@ledjon.com

Reply With Quote
  #3  
Old February 4th, 2003, 07:06 AM
misteraven misteraven is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 67 misteraven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 16 sec
Reputation Power: 6
Thanks for the quick overview.

Another related question...

It would seem after I added the IP alias eth0:0 to my ipconfig that a message board (vbulletin) running off one of the already configured name based virtual hosts (previously set up and definietly working properly) seems to be having issues. Many times when user tries to post, it simply hangs and never actually goes through as if the script is unable to find my database. The database server is hosted on a separate linux box on the same LAN. Are there any issues that you could possibly foresee that would impact something like this by simply adding an IP alias to my primary (and only) NIC?

It could possibly be a coincidence that it suddenly started having issues, but I doubt it.

Reply With Quote
  #4  
Old February 5th, 2003, 01:34 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
could be coincidence. especially if it happens sometimes and sometimes not.

one thing i think you could have done wrong:
the two IPs need to be in different subnets for routing to work correctly, i am not sure if you could workaround this with host-routes (both would need them) or if the aliasing feature has built-in compensation for that.

i.e. if they are on different subnets, the database server also needs IP aliasing with IPs from the same two subnets for back-connecting to the server.

Also, on one subnet, you always have to use the same netmask. Never use different ones for different machines.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #5  
Old February 6th, 2003, 04:28 AM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 17
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
Another distinct advanatge of aliasing is that you can only stick so many nics in one box, which means using nic per ssh host will limit it to 5 hosts per box. Which by no streach of imagination can be called reasonable.
__________________
And you know I mean that.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > IP aliasing vs. Indevidual NIC's...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway