tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Interface type
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
Now, we could easily get the user to configure that in dhcpcd.conf, but
I would rather try and at least automate these defaults if at all
possible.
So again, is there an ioctl or not to work out if the interface is
tap(4) or virtual or physical.
If interface name aliasing goes through then we cannot rely on the name
of the interface as a guide.
Thanks
Roy
Home |
Main Index |
Thread Index |
Old Index