[nos-bbs] tun0 and more Linux routing commands
Bill V WA7NWP
wa7nwp at gmail.com
Mon Feb 14 18:38:52 EST 2011
Hi,
>> It appears the JNOS startup creates the TUN0 interface, which is then
>> configured back in the linux world with the shell ifconfig command.
>
> Correct, that gives a basic route between JNOS and LINUX. Depending on
> what distro you are running, it would be wise to use the full pathname
> to the 'ifconfig' linux command.
I've discovered that a portion of my difficulties was in trying to run
JNOS as a normal user and launching the ifconfig command with su2.
Running as root, which a bit scary, just works.
>> /bin/modprobe tun
>
> On any redhat based system I've used, that is automatic. Otherwise
> you could put the command in the rc.local file.
> echo 1 >/proc/sys/net/ipv4/ip_forward
Yup. That's the one.
> Only needed if you want clients on your linux LAN to reach JNOS and
> back. Without it, packets will not traverse between eth0 and tun0
> on your linux box, and they will never reach JNOS then.
Getting to JNOS from the other systems is big part of my game plan...
>> And finally, so the Linux box responds to arp requests for the JNOS box.
>> # Proxy ARP for jnos2 port of local LAN
>> # $ARP -s 192.168.27.12 00:0d:60:29:56:bb pub
>
> I've never understood this need for ARP that I see so many times. Is this
> something from the old days ? I've never used it. If I am on a particular
> Winxp on my LAN, I simply do 'route add 192.168.1.201 192.168.1.60' on the
> particular PC, and I can telnet, browse, whatever to my JNOS. In the above
> example route, JNOS=192.168.1.201 and LINUX(running JNOS)=192.168.1.60.
>
> Can anyone educate me on why I see so many people putting this arp thing in
> ? Is there some functionality that I am missing out of this ?
Slowly all of this is coming back to me. With my current setup with
only one IP address on the JNOS box it doesn't appear to be needed.
Maybe it's automatic from the TUN setup. Maybe it had to be done
manually when using the serial port interconnection. Otherwise, how
does the Linux box know to tell the world it's the destination of the
Ethernet packet for the IP address of the JNOS box. I know the one
time it was essential was when my Linux box was the gateway
destination for a 44Net LAN while the upstream gateway box at the ISP
had a member IP on that lan. So if any of the RF stations sent an ARP
request for the MAC handling the ISP box IP address, my machine had to
respond, pick up the packet and tunnel it back to the ISP box.
> Maiko
Bill
More information about the nos-bbs
mailing list