Re: Netzwerk-Gerät tap0
On Thu, Feb 20, 2003 at 11:26:41AM +0100, Raphael Mack wrote:
> Hallo,
sali,
> nachdem ich mein debian gebootet habe gibt es ein Netzwerkgerät namens
> tap0. Für dieses ist auch eine default-route eingetragen, die ich
> bevor ich mit pon ins Netz gehe immer löschen muss. Wie bekomme ich
> die defaulot-route weg? Was ist tap0 überhaupt/wozu ist es da?
/usr/src/linux/Documentation/networkoring/tuntap.txt
Universal TUN/TAP device driver.
Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>
Linux, Solaris drivers
Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>
FreeBSD TAP driver
Copyright (c) 1999-2000 Maksim Yevmenkin <m_evmenkin@yahoo.com>
Revision of this document 2002 by Florian Thiel <florian.thiel@gmx.net>
1. Description
TUN/TAP provides packet reception and transmission for user space programs.
It can be seen as a simple Point-to-Point or Ethernet device, which,
instead of receiving packets from physical media, receives them from
user space program and instead of sending packets via physical media
writes them to the user space program.
In order to use the driver a program has to open /dev/net/tun and issue a
corresponding ioctl() to register a network device with the kernel. A network
device will appear as tunXX or tapXX, depending on the options chosen. When
the program closes the file descriptor, the network device and all
corresponding routes will disappear.
Depending on the type of device chosen the userspace program has to read/write
IP packets (with tun) or ethernet frames (with tap). Which one is being used
depends on the flags given with the ioctl().
The package from http://vtun.sourceforge.net/tun contains two simple examples
for how to use tun and tap devices. Both programs work like a bridge between
two network interfaces.
br_select.c - bridge based on select system call.
br_sigio.c - bridge based on async io and SIGIO signal.
However, the best example is VTun http://vtun.sourceforge.net :))
> Ach noch was: Weiß einer warum es so lange dauert mit route die
> Routingtabelle anzuzeigen? Wenn ein Paket geschcikt wird kann das ja
> auch nicht so lange dauern die route rauszufinden. Warum dauert es
> dann immer so eine Ewigkeit?
scheint das auflösen des hostnamens zu sein.
probier mal mit "route -n ..."
HTH
- gruss turrican
Reply to: