Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-08-2004, 07:08 AM   #1
LQ Newbie
Registered: Nov 2004
Posts: 28

Rep: Reputation: 15
bind 2 ip addresses to the server


I need to bind 2 ips to the server(they are in my given ip ranged but haven't been bound to the server). Any idea how I can do this?

Old 11-08-2004, 08:11 AM   #2
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Rep: Reputation: 31
You can set both addresses on the same network card. One will be assigned to the card itself, the other will be an alias to the card.

Primary address: ifconfig eth0 netmask
Second address: ifconfig eth0:1 netmask 255.2555.255.0

There is still some thingss that aren't known. Is this behind a firewall? Are addresses being natted? Is this for a server on the internet or on your intranet?

All of these make a difference in how things are set up.
Old 11-08-2004, 12:31 PM   #3
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 35
The above means of binding IP addresses to a single NIC are good with a few exceptions. eth0:0 is the first usable one.

The second point is that those created IP addresses are only good untilo you reboot.

If you are using redhat, create separate files for
/etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-eth0:0 and ifcfg-eth0:1 etc

If you are using debian based, then the file to edit is /etc/network/interfaces


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing IP addresses BIND 9 rdavis@intdoc.c Linux - Networking 0 07-01-2004 09:18 AM
Bind Multi IP addresses to a single NIC sitg Linux - Networking 2 04-30-2004 08:59 PM
Assigning IP addresses to game server processes jader9920 Linux - Networking 3 12-28-2003 02:32 PM
Server assigned nameserver addresses jrdioko Linux - Newbie 6 10-03-2003 05:10 PM
how to add / bind ip addresses to one box on slackware ? Mouse_103 Linux - Newbie 3 03-30-2003 12:11 PM

All times are GMT -5. The time now is 04:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration