old-www/HOWTO/Infrared-HOWTO/infrared-howto-s-network-ne...

286 lines
5.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>IrDA Network Neighborhood</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux Infrared HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Advanced Topics"
HREF="infrared-howto-c-advanced-topics.html"><LINK
REL="PREVIOUS"
TITLE="Beyond IrDA"
HREF="infrared-howto-s-beyond-irda.html"><LINK
REL="NEXT"
TITLE="Linux/IrDA and APM"
HREF="infrared-howto-s-irda-apm.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Infrared HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="infrared-howto-s-beyond-irda.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 5. Advanced Topics</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="infrared-howto-s-irda-apm.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="infrared-howto-s-network-neighborhood"
></A
>5.7. IrDA Network Neighborhood</H1
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1490"
></A
>5.7.1. Laptop-Printer-PDA</H2
><P
>&#13; You can take a little peek at
<A
HREF="http://irda.sourceforge.net"
TARGET="_top"
>Drag-n-drop stuff</A
>
, so you will be able to drop files to your PDA (uses IrOBEX) or
drop files to your printer (uses IrLPT) etc.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1494"
></A
>5.7.2. Bridging/Routing</H2
><P
>&#13; James wrote: " ... there is a much better way of doing the bridging
which is routing. This is entirely user land and requires no kernel
patches.
But the IrLAN protocol is no longer maintained
by the Linux/IrDA core team.
</P
><P
>&#13; It's in two parts (you may only need one your milage may vary...) the
first called irdaipcfg does the following:
</P
><P
>&#13; 1) First part is executed as irdaipcfg ifeth ifirlan daemonizes, then
looks for ARP packets on ifirlan, checks that the arp was not
generated by the machine on which it is running. The arp contains the
ip address of the machine on the other end of the irlan (it was
generated by the gratuatous arp in the irlan code). The program then
sets up a host route to this ip address via ifirlan, adds a proxy arp
to ifeth for it and generates a gratuatous arp on ifeth. It writes the
ip address of the client in /var/run/host.ifirlan so you can easily
undo all of this from a script.
</P
><P
>&#13; 2) Second part is executed as gratarp ifirlan. Sometimes the
gratuatous arp seems to get lost in the pipe work, gratarp daemonizes
and spits out a whole stream of the things...
</P
><P
>&#13; I use them as follows: (you can use them to do whatever you like)
</P
><P
>&#13; On my host (the machine bolted to my local net) irlanx is brought up
as 10.192.0.1 with a netmask of 255.255.255.255 and a broadcast of
10.192.0.1 by my ifup script from /etc/irda/network by irattach.
/etc/irda/network then runs irdaipcfg eth0 irlanx and this does the
routing.
</P
><P
>&#13; From /etc/irda/network
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;"start")
echo 1 &#62;/proc/sys/net/ipv4/conf/all/forwarding
./ifup ifcfg-${device}
/sbin/irdaipcfg ${localnet} ${device}
;;
"stop")
host=`cat /var/run/host.${device}`
if [ .$host != . ]; then
/sbin/arp -d ${host} dev ${localnet}
/sbin/route delete ${host} dev ${device}
fi
./ifdown ifcfg-${device}
/sbin/ifconfig ${device} down
;;
</PRE
></FONT
></TD
></TR
></TABLE
>
on the client I set up IrLAN to use an address on my normal subnet
10.32.32.51 but with netmask 255.255.255.255 (not my usual netmask) I
have some static routes which are host 10.192.0.1 dev irlan, and net
default gw 10.192.0.1 dev irlan. I run gratarp from the
/etc/irda/network, and I can wander arround my house and not lose
telnet and ssh sessions ..."
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1504"
></A
>5.7.3. IPv6</H2
><P
>&#13; As far as I know IPv6 has neighbor discovery mechanism, but I don't have
information about Linux/IrDA used with IPv6. Please see the mailing
list archive for a discussion of this topic under the subject
:"patch-2.2.7-ac1-irda4".
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1507"
></A
>5.7.4. DHCP</H2
><P
>&#13; I have got reports that it is possible to use dhcpcd with IrLAN.
Please use latest DHCP software.
But currently the IrLAN protocol is no longer maintained
by the Linux/IrDA core team.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="infrared-howto-s-beyond-irda.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="infrared-howto-s-irda-apm.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Beyond IrDA</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="infrared-howto-c-advanced-topics.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Linux/IrDA and APM</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>