LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

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

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


Hello,

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?

Thanks
 
Old 11-08-2004, 09:11 AM   #2
looseCannon
Member
 
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 1.2.3.4 netmask 255.255.255.0
Second address: ifconfig eth0:1 1.2.3.5 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, 01:31 PM   #3
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 34
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
 
  


Reply


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 10:18 AM
Bind Multi IP addresses to a single NIC sitg Linux - Networking 2 04-30-2004 09:59 PM
Assigning IP addresses to game server processes jader9920 Linux - Networking 3 12-28-2003 03:32 PM
Server assigned nameserver addresses jrdioko Linux - Newbie 6 10-03-2003 06:10 PM
how to add / bind ip addresses to one box on slackware ? Mouse_103 Linux - Newbie 3 03-30-2003 01:11 PM


All times are GMT -5. The time now is 01:40 PM.

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