View previous topic :: View next topic |
Author |
Message |
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Fri Aug 30, 2002 5:59 am Post subject: multiple ip's, one nice |
|
|
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 |
|
|
nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Fri Aug 30, 2002 6:13 am Post subject: |
|
|
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 |
|
|
psp Tux's lil' helper
Joined: 06 Aug 2002 Posts: 120 Location: Cape Town, South Africa
|
Posted: Fri Aug 30, 2002 10:31 am Post subject: |
|
|
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 |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Fri Aug 30, 2002 4:48 pm Post subject: |
|
|
I'll try both ways when I get home
Thanks for the help!
-Rain _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
OdinsDream Veteran
Joined: 01 Jun 2002 Posts: 1057
|
Posted: Mon Sep 02, 2002 1:52 am Post subject: |
|
|
Sorry, but what purpose does it serve to bind two ip addresses to a single interface? |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Sep 02, 2002 2:16 am Post subject: |
|
|
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 |
|
|
ramon n00b
Joined: 21 Jun 2002 Posts: 45 Location: Amsterdam - Holland
|
Posted: Tue Sep 03, 2002 7:25 pm Post subject: |
|
|
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 |
|
|
|