Anyone have any suggestions relating to this ?
On 12/2/05, turha turha <[EMAIL PROTECTED]> wrote:
>
>
>
> On 12/2/05, jared r r spiegel <[EMAIL PROTECTED]> wrote:
> >
> > On Thu, Dec 01, 2005 at 05:36:24PM +0200, turha turha wrote:
> > > Hi!
> > >
> > > I'm trying to find out if it's possible to get multiple IP's using
> > DHCP to a
> > > single NIC.
> >
> > without knowing what the specifics of the DHCP-situation on the ISP's
> > end is, perhaps a safe assumption is that you're going to need
> > different MACs to be the source of the DHCPDISCOVERs/DHCPREQUESTs
>
>
> I'm pretty sure, that at least if I use two different MAC's I'd get two
> different IP's, I might have tested it, but am not sure though.
>
> a *very* simple solution that will probably Just Work (assuming
> > there is nothing on ISP-side that restricts you to just 1 IP, and
> > assuming
> > your dhclient box can accomodate it) would be to get a little
> > hub/switch and use two external NICs in the dhclient box.
> > connect each NIC and the CPE to the switch and run dhclient for
> > both ifaces.
>
>
> IMO, that's a bit crappy solution, I did think of that, but since from the
> software standpoint what I'm trying to find, at least to my knowledge, is
> doable, I'll try to make it work, without 2 external NIC's. Of course the
> box only has 2 NIC's, I guess I could buy a third, since they aren't that
> expensive, but I'd rather do it with just the two, less cables and all ;-)
>
> > Also, related to this, OBSD doesn't create an additional virtual
> > interface
> > > when using aliases for an IP, is it possible to create an extra
> > interface ?
> > >
> > > The reason for this is so that in pf.conf I could use the interface
> > name in
> > > parenthesis, so when the DHCP changes one of the IP's pf configuration
> >
> > > updates automatically.
> >
> > you can still use the interface name in parens regardless of the
> > virtual interface whatnot.. perhaps you mean something like, if
> > there was a physical NIC, 'fxp0' and two virtual interfaces: " fxp0.0"
> > and
> > "fxp0.1" you could filter based on simply "(fxp0)" or "(fxp)"...
> > i thought you could use a macro for ifspec, but either you can't or
> > i'm
> > testing wrong:
> >
> > ----
> >
> > [/home/jrrs] $ echo "X=\"fxp0\"\npass on \$X all" | pfctl -nvf-
> > X = "fxp0"
> > pass on fxp0 all
> > [/home/jrrs] $ echo "X=\"fxp0 lo0\"\npass on \$X all" | pfctl -nvf-
> > X = "fxp0 lo0"
> > stdin:2: syntax error
> >
> > ----
>
>
> What I'd need would be like having IF fxp0, with two or more virtual
> interfaces, and then using "(fxp0.0)" and "(fxp0.1)" kinda stuff in
> pf.conf, and this is very related to the last question. What I meant by
> the reasoning for not having virtual interfaces was that what's the upside
> of aliases in contrast to virtual interfaces. As far as I know, virtual
> interfaces in this situation would save the day, ie. I could give different
> MAC's to different virtual interfaces and then use dhclient on all the
> interfaces (virtual or otherwise) I wanted to, and use the interface names
> in parenthesis in pf.conf (again virtual or otherwise).
>
> if you had two NICs of the same family (err, driver) from the above
> > suggestion,
> > you could satisfy that with, ieg:
> >
> > ----
> > pass on fxp all
> > ----
> >
> > provided the only fxp(4)s you had were the externals (eg, if you have
> > fxp0, fxp1 for external and fxp2 for internal, that may not be
> > desired,
> > however you could put the 'fxp' rules at the top and then specific
> > fxp2
> > treatment at the bottom)
> >
> > > Does anybody know the reasoning behind not creating a virtual
> > interface ?
> >
> > it's not linux?
> >
> > in seriousness, no. other than seeing that virtual interfaces are not
> > created for physical interfaces who exist (maybe they are created
> > with extant physical interfaces, eg trunk(4)), but there's no
fxp0.0stuff
> > that i've come across.
> >
> > --
> >
> > jared
> >
> > [ openbsd 3.8 GENERIC ( oct 30 ) // i386 ]
> >
> >
> Thanks for the suggestions though.