tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Interface type

On Wed, Sep 10, 2008 at 06:16:14PM +0100, Roy Marples wrote:
> On Wed, 2008-09-10 at 18:27 +0200, Quentin Garnier wrote:
> > On Wed, Sep 10, 2008 at 06:16:27PM +0200, Martin Husemann wrote:
> > > On Wed, Sep 10, 2008 at 05:06:30PM +0100, Roy Marples wrote:
> > > > So why does tap0 (which is a tunnel as used by OpenVPN) not have the
> > > > IFF_POINTOPOINT flag?
> > > 
> > > tap(4) can be used in various ways, for example in a bridge(4) to provide
> > > another MAC to run multiple pppoe(4) across a single external ethernet.
> > 
> > The whole point of tap(4) is to be considered an Ethernet device for all
> > intents and purposes.
> Which still doesn't answer my question :)
> Let me put it another way - given an interface name, can I find out if
> it represents a physical device?
> Let me be even more clear on what I want to achieve.
> dhcpcd runs automatically, finds bge0 (wired) and iwi0 (wireless).
> Both bge0 and iwi0 are attached to different subnets.
> iwi0 comes up first, default route and /etc/resolv.conf is created.
> Then bge0 comes up (laptop, plugged into LAN). dhcpcd will then change
> the default route to go via bge0 and update /etc/resolv.conf with
> nameservers from bge0 and then iwi0.
> Once bge0 comes up, a VPN connects and dhcpcd configures that too.
> So we now have a list of possible nameservers. Ideally we should
> prioritize them like so
> tap0 VPN
> bge0 Wired
> iwi0 Wireless
> We should also prioritise the routing like so
> bge0 Wired
> iwi0 Wireless
> tap0 VPN

> So again, is there an ioctl or not to work out if the interface is
> tap(4) or virtual or physical.


The short answer is "no."

Now that we got that out of the way. :-)

I think that a default interface prioritization may not be useful enough
to justify the size and complexity of implementing it in C in dhcpcd.

What if

        1 the VPN alone gives me a stable, global IP number,
        2 my wireless connection is stable as I walk from room to room
          in my office, but
        3 the ethernet jacks are not all on the same subnet 

Speaking for myself, under those circumstances, I want the precise
opposite priority order to the one that you give above.  I don't think
that it can be implemented by examining the interface type, alone.

Here is a thought: maybe you should prioritize leases instead of


David Young             OJC Technologies      Urbana, IL * (217) 278-3933 ext 24

Home | Main Index | Thread Index | Old Index