|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > IP aliasing vs. Indevidual NIC's... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|