Re: protocol handler for a proprietary protocol



Chris Friesen wrote:
Tauno Voipio wrote:

The tun/tap driver is in reverse to what the OP wants to do.
The tun/tap creates a pseudo-interface to connect to the network
stack toward the internals of the host, but the OP wants to
connect to the link level interface (Ethernet). The packet
socket is the correct method here.


If you set up ethernet bridging you can forward the packets injected via tun/tap out a real ethernet device.

<nitpicking>

Sending network layer packets to another host is forwarding,
sending data link layer packets directly to another interface is
bridging.

</nitpicking>

The bridging is set up so that there will be a new pseudo-interface,
the bridge, named from br0 onward. The IP properties are set to the
bridge interface, and the IP packets are handled like the packets
to / from a real data link interface. The data-link frames are
'forwarded' between the members of the bridge without ever visiting
the IP layer. An important detail is that the bridge component
interfaces shall not have IP addresses or routings of their own
anymore. This applies to the bridged tap interface as well.

The bridge interface is included into the normal routing tables
of the IP layer as any other data link interface, and the packets
can be forwarded to an interface not in the same bridge (and back,
of course).

--

Tauno Voipio
tauno voipio (at) iki fi
.



Relevant Pages

  • Re: If_bridge behaving as HUB
    ... I have a bridge setup with a number of vlan IF's as members. ... After a while traffic destined for one member IF are sent to all member IF's. ... A bridge works like a hub, forwarding traffic from one interface to ... Multicast and broadcast packets are always forwarded to all ...
    (freebsd-net)
  • Re: Pseudo Bridge
    ... The pseudo-bridges left interface is X and right interface is Y ... thinked of building a simple bridge, ... But I need to rate the packets that come from the lan side of the ...
    (comp.unix.admin)
  • Re: bridge with access on both interfaces
    ... > so inside packets to the bridge box are responded ... What you can do is configure the primary interface ...
    (freebsd-net)
  • Re: High performance IDS/Firewall
    ... I will place the IDS on the outside bridge ... > interface and apply IPFW rules on the system as needed. ... Bridging works fine, but it seems that statefull rules needs a high ... - while bridgesays that non IP packets are transmitted without ...
    (freebsd-performance)
  • Terminal Server Setup
    ... description GRE Tunnel Source Interface ... input packets with dribble condition detected ... output buffer failures, ... Serial1/0 is up, line protocol is up ...
    (comp.dcom.sys.cisco)