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

  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.

> 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

----

  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.0 stuff
  that i've come across.

-- 

  jared

[ openbsd 3.8 GENERIC ( oct 30 ) // i386 ]

Reply via email to