IP Aliasing with DHCP

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

IP Aliasing with DHCP

Hugo Osvaldo Barrera
I want to set up an HTTPS server which serves two domains. I know this
is pretty much impossible with one IP, due to how SSL works.

However, my ISP throws me an Ethernet cable, and I can use as many IPs
as I want. - If I connect a switch to that cable, and 5 PCs, they each
get 5 REAL internet IPs.

I'v already seen the "alias" option for ifconfig, however, it always
refers to static IPs, and I've found no reference to this being
possible with dynamic IPs.
Is this possible? A single interface, with TWO dynamic IPs?

Reply | Threaded
Open this post in threaded view
|

Re: IP Aliasing with DHCP

Jorge Enrique Valbuena Vargas
Hugo,
No sure about a real answer to your question, but what i try will be:

Set manually two of the dynamic addresses on my interfaces,other idea would
be use two network interfaces, use the trunk ( man trunk ) and again set
manually the two ip addresses ...

I hope this can help !


On Wed, Nov 11, 2009 at 9:19 PM, Hugo Osvaldo Barrera <
[hidden email]> wrote:

> I want to set up an HTTPS server which serves two domains. I know this
> is pretty much impossible with one IP, due to how SSL works.
>
> However, my ISP throws me an Ethernet cable, and I can use as many IPs
> as I want. - If I connect a switch to that cable, and 5 PCs, they each
> get 5 REAL internet IPs.
>
> I'v already seen the "alias" option for ifconfig, however, it always
> refers to static IPs, and I've found no reference to this being
> possible with dynamic IPs.
> Is this possible? A single interface, with TWO dynamic IPs?

Reply | Threaded
Open this post in threaded view
|

Re: IP Aliasing with DHCP

Matthew Dempsky-3
In reply to this post by Hugo Osvaldo Barrera
On Wed, Nov 11, 2009 at 6:19 PM, Hugo Osvaldo Barrera
<[hidden email]> wrote:
> I'v already seen the "alias" option for ifconfig, however, it always
> refers to static IPs, and I've found no reference to this being
> possible with dynamic IPs.
> Is this possible? A single interface, with TWO dynamic IPs?

This is completely untested (and using very recently added to
-current), but could you create a bridge(4) connecting the primary
interface to several vether(4) interfaces, and then run dhclient on
each vether with a dhclient.conf with 'supercede network-mask
255.255.255.255' for each?

No idea if this would actually work though...

Reply | Threaded
Open this post in threaded view
|

Re: IP Aliasing with DHCP

Theo de Raadt
> On Wed, Nov 11, 2009 at 6:19 PM, Hugo Osvaldo Barrera
> <[hidden email]> wrote:
> > I'v already seen the "alias" option for ifconfig, however, it always
> > refers to static IPs, and I've found no reference to this being
> > possible with dynamic IPs.
> > Is this possible? A single interface, with TWO dynamic IPs?
>
> This is completely untested (and using very recently added to
> -current), but could you create a bridge(4) connecting the primary
> interface to several vether(4) interfaces, and then run dhclient on
> each vether with a dhclient.conf with 'supercede network-mask
> 255.255.255.255' for each?
>
> No idea if this would actually work though...

It should, but I think a few more things need to get fixed before
that.  The bridge is not very efficient, though.

Reply | Threaded
Open this post in threaded view
|

Re: IP Aliasing with DHCP

lausgans@gmail.com
>> vether(4)

> It should, but I think a few more things need to get fixed before
> that.  The bridge is not very efficient, though.

Do you have any valid reason for this style of naming?
I'm ok with bridge(4) instead of 'br' device naming which can interference
with real device name sooner or later.
But vether(4)... What's wrong with you? It should called 'veth' rather than that.
This is absolutely improper way of device naming. This path could bring skid you
for example right to Mac OS X dirs naming like '/Library/Users/Vether' without
any shortenings.