BSP - Beratung, Schulung, Projekte


The Universal TUN/TAP device driver in Redhat 7.2

This information was provided by Rich Smrcina. Installations should work off the shelf with kernel 2.4.7-10.

This document is an extract of the document provided in /usr/src/linux/Documentation/networking/tuntap.txt of the SuSE 7.2 distribution and adapted to Redhat 7.2

Copyright (C) 1999-2000 Maxim Krasnyansky

Linux, Solaris drivers
Copyright (C) 1999-2000 Maxim Krasnyansky

FreeBSD TAP driver
Copyright (c) 1999-2000 Maksim Yevmenkin

Description

TUN/TAP provides packet reception and transmission for user space programs. It can be viewed as a simple Point-to-Point or Ethernet device, which instead of receiving packets from a physical media, receives them from user space program and instead of sending packets via physical media writes them to the user space program.

When a program opens /dev/tun, driver creates and registers corresponding net device tunX or tapX. After a program closed above devices, driver will automatically delete tunXX or tapXX device and all routes corresponding to it.

This package ( http://vtun.sourceforge.net/tun) contains two simple example programs how to use tun and tap devices. Both programs works like 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 :))

Configuration

The tun driver is like a virtual interface between the host system (in my base RH Linux 7.2) and a program (Hercules). Hercules manages routing 'packets' from operating systems under it's control (VM, VSE, Linux/390) through the tun interface, which hands the packet off to Linux perhaps for subsequent routing to a 'real' network. I've been able to test this from an operating system under Hercules to the Linux driving system, but haven't yet made it outside my laptop (by no fault of the process...I have just not done it yet).

The drawing on the herctcp page makes alot of sense, but I switched the IP addresses of Hercules and the driving system. To me it just made sense to make the driving system 192.168.200.1 and Hercules 192.168.200.2 (the other S/390 operating systems would be .3, .4, etc. The tun driver looks like a CTCA to the S/390 system, so it must be defined as such. The definitions on the herctcp page work fine.

If you have questions, remarks, contributions, whatever, drop me a line.

Enjoy your private Hercules mainframe




BSP Beratung, Schulung, Projekte GmbH