[nos-bbs] tun0 and more Linux routing commands

Bill V WA7NWP wa7nwp at gmail.com
Sat Feb 12 19:47:36 EST 2011


I'm having some mixed success moving to the new (to me) TUN0 scheme
for connecting the JNOS2 VM with the Linux networking stack.   I'm
curious how other folks are dealing with this.

I'm starting with Maiko's example setup doing roughly this:

-------------------------------------------
# Create a network interface. This allows us to talk to the linux
# box on which JNOS is running - and in turn - to the internet.
#
attach tun tun0 1500 0
#
ifconfig tun0 ipaddress 192.168.27.12
ifconfig tun0 netmask 255.255.255.0
ifconfig tun0 mtu 1500
#
# Give it a chance to come up
#
pause 1
#
# JNOS creates the TUN device, so JNOS needs to do some post configuration,
# by shelling out to the linux command line and running 'ifconfig' command.
shell ifconfig tun0 192.168.27.33 pointopoint 192.168.27.12 mtu 1500 up
-----------------------------------

It appears the JNOS startup creates the TUN0 interface, which is then
configured back in the linux world with the shell ifconfig command.

My question is, where you doing the other operations?

Apparently also needed is:

 /bin/modprobe tun
 echo "1" > /proc/.../enable_forwarding

Maybe a route add for the other packets on the LAN to get them
forwarded through the linux stack to JNOS.

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

???

Or maybe the TUN scheme isn't like the old serial port forwarding and
we don't need the proxy arp?

Thanks - I've very close to being back with JNOS - at least on the
AXUPD world - tonight.

Bill - WA7NWP




More information about the nos-bbs mailing list