Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multiple ip's, one nice
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Rain Designs
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 130
Location: Los Angeles, CA

PostPosted: Fri Aug 30, 2002 5:59 am    Post subject: multiple ip's, one nice Reply with quote

I know this a newbie question, but if I am given these 2 ips:

66.12.66.86
66.12.66.87

by my ISP, how do I set up my box to run both those IP's through one nic?

Once again I know this is a newbie questions, but hey, I'm a newbie!

Thanks in advance,

-Rain
_________________
^M = Death by notepad

http://www.raindesigns.com
Back to top
View user's profile Send private message
nitro322
Guru
Guru


Joined: 24 Jul 2002
Posts: 594
Location: USA

PostPosted: Fri Aug 30, 2002 6:13 am    Post subject: Reply with quote

From google:

Quote:
if you want to bind two seperate ips to the same interface, do this:

ifconfig eth0:0 <first ip> netmask <whatever your netmask is> up
ifconfig eth0:1 <second ip> netmask <whatever your netmask is> up

once you are done, type an ifconfig -a to show all the ips bound to all
the intefaces on the box.

if you want to put the ips on like a secondary or a third ethernet card,
then just replace the eth0 with eth1 or eth2, whatever.

usign this method, you should be able to bind as many ips as you want.
to test it once i bound an entire /19 to one card once on a machine
running solaris and it totally worked. Slow as sin, but totally worked.

I'm sure you can find a lot more info out there about this if necessary, just search google.
Back to top
View user's profile Send private message
psp
Tux's lil' helper
Tux's lil' helper


Joined: 06 Aug 2002
Posts: 120
Location: Cape Town, South Africa

PostPosted: Fri Aug 30, 2002 10:31 am    Post subject: Reply with quote

akisan has it right! Edit your /etc/conf.d/net. Uncomment the alias_eth0.... part and add the other ip address. Then run: /etc/init.d/net.eth0 restart

Example for eth0:
---------------------

iface_eth0="66.12.66.86 bradcast <your_broadcast> netmask <you_netmask>"
alias_eth0="66.12.66.87"
gateway="<your_gateway>"

Hope this is useful. I suggest reading more docs on what exactly this does and what else you can do.
Back to top
View user's profile Send private message
Rain Designs
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 130
Location: Los Angeles, CA

PostPosted: Fri Aug 30, 2002 4:48 pm    Post subject: Reply with quote

I'll try both ways when I get home :D

Thanks for the help!

-Rain
_________________
^M = Death by notepad

http://www.raindesigns.com
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Mon Sep 02, 2002 1:52 am    Post subject: Reply with quote

Sorry, but what purpose does it serve to bind two ip addresses to a single interface?
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Sep 02, 2002 2:16 am    Post subject: Reply with quote

OdinsDream wrote:
Sorry, but what purpose does it serve to bind two ip addresses to a single interface?

IP-based virtual hosting, for one.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
ramon
n00b
n00b


Joined: 21 Jun 2002
Posts: 45
Location: Amsterdam - Holland

PostPosted: Tue Sep 03, 2002 7:25 pm    Post subject: Reply with quote

Quote:
Sorry, but what purpose does it serve to bind two ip addresses to a single interface?


I use it on a Sun Solaris server to have it answer to the internal network with one IP and to the DMZ with another IP
(there in different adress-ranges)

I don't want to add a second nic....

That way I can use services allowed on the internal network to connect to the server which are not allowed for anyone connecting from the outside.

Grtz Ramon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum