<div dir="ltr">Here's a cutting from my autoexec.nos. It creates the JNOS side of the tun interface. Shells out to the OS to create the Linux side of the tun interface. Issues ARP commands and then finally adds some routes so that things will flow up and down the tun.<div>
<br></div><div><div># Set up TUN port ********************************************</div><div>attach tun tun0 1500 0</div><div>ifconfig tun0 ipaddress 44.64.28.6</div><div>ifconfig tun0 netmask 255.255.255.248</div><div>ifconfig tun0 mtu 1500</div>
<div>pause 1</div><div>shell echo 1 > /proc/sys/net/ipv4/ip_forward  # make sure that we are forwarding IP on the Linux box - won;t work without this</div><div>shell ifconfig tun0 44.64.28.2 netmask 255.255.255.248 pointopoint 44.64.28.6 up  # set up the Linux side of the interface</div>
<div>shell arp -i eth0 -Ds 44.64.28.6 eth0 pub  # publish the ARP so that Layer2 is satisfied</div><div>shell route add -host 44.64.28.6 tun0  # add some routes so that Linux knows where to find us</div><div>shell route add -net <a href="http://44.64.28.8/29">44.64.28.8/29</a> tun0</div>
<div>#</div><div>ifconfig encap ipaddress 44.64.28.6</div></div><div><br></div><div>Hope this helps.</div><div><br></div><div>Mark</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 7:40 PM, Mark Phillips <span dir="ltr"><<a href="mailto:g7ltt@g7ltt.com" target="_blank">g7ltt@g7ltt.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Erm ......</p>
<p dir="ltr">Eth1?</p>
<p dir="ltr">You got 2 network cards in there?</p>
<p dir="ltr">Have you added routes? Whats does the JNOS trace screen show you for tun0?</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">Mark<br>
</p>
</font></span><div class="gmail_quote"><div><div class="h5">On Aug 16, 2013 11:52 AM, "Miguel Bahi Cruz" <<a href="mailto:miguelbahi_cruz@hotmail.com" target="_blank">miguelbahi_cruz@hotmail.com</a>> wrote:<br type="attribution">
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">



<div><div dir="ltr"><br><br><div><hr>From: <a href="mailto:miguelbahi_cruz@hotmail.com" target="_blank">miguelbahi_cruz@hotmail.com</a><br>To: <a href="mailto:nos-bbs@tapr.org" target="_blank">nos-bbs@tapr.org</a><br>Subject: RE: [nos-bbs] Jnos networking problem<br>

Date: Fri, 16 Aug 2013 17:36:27 +0200<br><br>


<div dir="ltr">Mark, Gustavo, thanks for your suggestions.<div><br></div><div>Yes, the problem continues, tryng the arp command.</div><div><br></div><div>after publish the arp command the result is : </div><div><br></div>

<div><div>arp -i eth1 -Ds 192.168.0.201 eth1 pub</div><div><br></div><div>root@eb5jequxserver:/etc# arp</div><div><br></div><div>Addres                HWtype   AddresHW         Indic Máscara         Interfaz</div><div>192.168.0.61             ether   00:1f:16:9c:49:00   C                     eth1</div>

<div>Livebox                  ether   84:9c:a6:d1:4f:8d   C                     eth1</div><div>192.168.0.201            *       <from_interface>    MP                    eth1</div><div><br></div><div>If the problem is the interface 201 don't have is own "virtual" mac, is possible create one?</div>

<div>note : .61 is my windows pc, livebox is the adsl router.</div><div><br></div><div><br></div><div><br></div><div>this is the result of ifconfig jnos command, for best diagnose of the problem.</div><div><br></div><div>

<div>jnos> ifconfig</div><div>tun0     IP addr 192.168.0.201 MTU 1500 Link encap TUN</div><div>         flags 0x0 trace 0x0 netmask 0x00000255 broadcast 0.0.0.0</div><div>         sent: ip 18 tot 18 idle 0:00:04:13</div>

<div>         recv: ip 22 tot 22 idle 0:00:04:13</div><div>loopback IP addr 127.0.0.1 MTU 65535 Link encap None</div><div>         flags 0x0 trace 0x0 netmask 0xffffffff broadcast 255.255.255.255</div><div>         sent: ip 0 tot 0 idle 0:00:14:39</div>

<div>         recv: ip 0 tot 0 idle 0:00:14:39</div><div>encap    IP addr 44.44.44.44 MTU 1500 Link encap None</div><div>         flags 0x0 trace 0x0 netmask 0xffffffff broadcast 255.255.255.255</div><div>         sent: ip 0 tot 0 idle 0:00:14:39</div>

<div>         recv: ip 0 tot 0 idle 0:00:14:39</div></div><div><br></div><div>(44.44.44.44 ) is a "dummy " test ham ip addres.</div><div><br></div>73's</div><div><br></div><div><br><div><br></div></div>                                    </div>

</div>                                      </div></div>
<br></div></div><div class="im">_______________________________________________<br>
nos-bbs mailing list<br>
<a href="mailto:nos-bbs@tapr.org" target="_blank">nos-bbs@tapr.org</a><br>
<a href="http://www.tapr.org/mailman/listinfo/nos-bbs" target="_blank">http://www.tapr.org/mailman/listinfo/nos-bbs</a><br>
<br></div></blockquote></div>
</blockquote></div><br></div>