Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 1999 18:31:18 +0700 (ALMST)
From:      Boris Popov <bp@butya.kz>
To:        freebsd-net@freebsd.org
Subject:   Multiple ethernet frames for IPX
Message-ID:  <Pine.BSF.4.10.9906151808450.606-100000@lion.butya.kz>

next in thread | raw e-mail | index | archive | help
	Hello,

	Yes, it is really works now ;). This is first public release of
if_ef driver which extends current functionality of existing ethernet
drivers.

	Below I'm put a part of README file included in the distribution.
If someone can review/test this work and give me any suggestions, critics
or anything else I'm will be very grateful.

	URL of driver archive ftp://ftp.butya.kz/pub/ipx/ifef-1.0b0.tar.gz

	Ok, here is README:
-----------------------------------------------------------------------
    Multiple ethernet frame types support for FreeBSD.
    
    This document explains how it works and how to install this support.

    1. Introduction
    ===============

    Traditional *BSD network architecture uses one 'raw' ethernet device
to support all frame types. This makes known problems when one protocol
should be bound to a number of different frame types. The most significant
problem is a routing, because routes based on interface number and even 
if we receive all frames and pass them to protocol input routine it will
be problematical to pass packets back to appropriate frame type.

    This can be solved in a number of ways:

    1. Rewrite all of the protocols in order to distinguish frame type,
    2. Rewrite an ethernet driver (in which way ?),
    3. Add support for frame type into struct ifaddr definition,
    4. Write a pseudo ethernet driver to split up a single ethernet into
       multiple devices and each of them should represent single frame type,
    5. add others by taste.

    After playing with differents variants I have found that writing pseudo
ethernet driver is a most (from my point of view) convenient.

    2. Design
    =========

    At first, we should select an appropriate device naming convention. This
also can be done in a number of ways and determined by reasonable balance
between easy to understand device names and a number of code to be
rewriting. So, I select next scheme:
	ed0	- traditinal ethernet device,
	ed0f0	- Ethernet_II frame device,
	ed0f1	- Ethernet_802.3 frame,
	ed0f2	- Ethernet_802.2 frame and
	ed0f3	- Ethernet_SNAP frame.
	
    As follows from the above, in the new scheme device unit number represents
one of the frame type. This is easy to implement and reqires very little  
changes to existing kernel code (in particular adding few lines to
ifunit() routine).

    Behaviour of each of ed0f* device should be close to underlying ethernet
device. This is also can be easy achieved with number of caveats.

    After that, it should be easy to configure multiple frame types for
a single protocol on single 'raw' device:

    ifconfig ed0f0 ipx 0x102	- configure IPX network 102 on ethernet_II,
    ifconfig ed0f1 ipx 0x101	- configure IPX network 101 on ethernet_802.3
    etc...

    Since interfaces are different all routing mechanism should work as
expected and require no intervention into the protocol stack implementation.

    3. Implementation
    =================

    Well, this was a mostly theoretical issues. In my first implementation
of this technology all code was builtin in kernel, but it is possible to
move most of the code to KLD module. While loading this module scans all
ethernet devices and clones them with different names:
    deviceUNIT becomes deviceUNITfUNIT

    After loading all new devices can be configured as usual and old 'raw'
device still continues to work without any problems.

    Currently support is limited only to IPX protocol, but it could be
very easy to extend each frame to support other protocol types (you should
know how particular protocol incaspulated into given frame type).

    Here is a sample ifconfig output from our production server machine:

ed2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
<skip>
	ether 00:40:95:00:22:fa 
ed2f0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ipx 101H.40950022fa 
	ether 00:40:95:00:22:fa 
ed2f1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ipx 9da8aa54.40950022fa 
	ether 00:40:95:00:22:fa 
ed2f2: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:40:95:00:22:fa 
ed2f3: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:40:95:00:22:fa 

--
Boris Popov
http://www.butya.kz/~bp/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9906151808450.606-100000>