Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can anyone help with binding multiple IP addresses to a nic card in Linux 7.3? I have added them and activated them, however, when I reboot, they don't all seem to "stick". Also, in GUI mode, they can show as activated, however when I type "ifconfig" in the command line, only a few will show as recognized. Thanks for any help.
Distribution: Changes monthly. Also use Solaris, IRIX, and FreeBSD (and that's just at my house!)
Posts: 40
Rep:
Hello,
In Linux IP addresses other than the default (eth0:x) will not be remembered after a reboot. The best thing to do is put your ipconfig commands to add the aliases in /etc/rc.d/rc.local. If you need the interfaces to be active prior to a specific application (MySQL, Apache, etc..) you will need to set up an init script in /etc/rc.d/init.d and link to it in /etc/rc.d/rc5.d and give it a sequence # low enough to run prior to your application(s).
I am trying to set up virtual hosts using unique IP addresses. David, I looked at the manual link you provided, but it is talking about aliases, which I don't think pertains to my situation, but if I was looking in the wrong area, please let me know. Thanks for any help.
Ok .... I am trying to bind multiple IP addresses to one host (server). One domain name (DNS name) will be linked to numerous IP addresses, and yes, it is for websites using Apache.
Thanks for your help.
If multiple IP addresses cannot be bound to one DNS name, then multiple DNS names would be ok .... the thing that I'd like to ensure, though, is that I would have 5 or 6 unique IP addresses linked to this one server. Do you know how to do that? Thanks again!
The doc I linked to shows you how to have multiple IP addresses on a network card. Note that you don't "need" multiple ip addresses to host multiple sites. You can just point several dns entries to one ip address then let apache's VirtualHost directive figure out which pages to serve.
If the PC does not have a public ip address then it may not be as easy to get multiple ip addresses on the system due to routing problems.
Unless there is a specific reason for wanting multiple ip addresses I wouldn't bother.
For Red Hat systems, in /etc/sysconfig/network-scripts/ you have the configuration files for your network devices. There you will find for your first ethernet device a file ifcfg-eth0 which will contain something similar to
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.