<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ohiopacket.org/index.php?action=history&amp;feed=atom&amp;title=Replacing_JNOS_with_Linux</id>
	<title>Replacing JNOS with Linux - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ohiopacket.org/index.php?action=history&amp;feed=atom&amp;title=Replacing_JNOS_with_Linux"/>
	<link rel="alternate" type="text/html" href="https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;action=history"/>
	<updated>2026-04-10T21:47:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2170&amp;oldid=prev</id>
		<title>Opadmin at 01:51, 21 March 2013</title>
		<link rel="alternate" type="text/html" href="https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2170&amp;oldid=prev"/>
		<updated>2013-03-21T01:51:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:51, 20 March 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;modprobe ipip &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;modprobe ipip &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ENCAP=encap.txt &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ENCAP=encap.txt &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LOCALENCAP=$(/sbin/ifconfig eth0) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LOCALENCAP=$(/sbin/ifconfig eth0 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| grep &amp;#039;inet addr:&amp;#039; | awk &amp;#039;{print $2}&amp;#039; | awk -F &amp;#039;:&amp;#039; &amp;#039;{print $2}&amp;#039;&lt;/ins&gt;) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LOCALAMPR=44.128.0.1 &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LOCALAMPR=44.128.0.1 &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ENCAPGW=$(cat $ENCAP | grep -v &amp;#039;#&amp;#039; | awk &amp;#039;{print $5}&amp;#039; | sort | uniq) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ENCAPGW=$(cat $ENCAP | grep -v &amp;#039;#&amp;#039; | awk &amp;#039;{print $5}&amp;#039; | sort | uniq) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AMPRIFCHK=$(/sbin/ifconfig &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eth0 &lt;/del&gt;| grep &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;inet addr:&amp;#039; | awk &amp;#039;{print $2}&amp;#039; | awk &lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;F &amp;#039;:&amp;#039; &amp;#039;{print $2}&amp;#039;&lt;/del&gt;) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AMPRIFCHK=$(/sbin/ifconfig | grep -&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c ampr&lt;/ins&gt;) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This will assign the next available interface, we&amp;#039;re calling these amprN &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This will assign the next available interface, we&amp;#039;re calling these amprN &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if [ ${AMPRIFCHK} = &amp;quot;0&amp;quot; ] &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if [ ${AMPRIFCHK} = &amp;quot;0&amp;quot; ] &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Opadmin</name></author>
	</entry>
	<entry>
		<id>https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2169&amp;oldid=prev</id>
		<title>Opadmin at 01:49, 21 March 2013</title>
		<link rel="alternate" type="text/html" href="https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2169&amp;oldid=prev"/>
		<updated>2013-03-21T01:49:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:49, 20 March 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AMPRIFCHK=$(/sbin/ifconfig | grep -&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c ampr&lt;/del&gt;) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AMPRIFCHK=$(/sbin/ifconfig &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eth0 &lt;/ins&gt;| grep &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;inet addr:&amp;#039; | awk &amp;#039;{print $2}&amp;#039; | awk &lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;F &amp;#039;:&amp;#039; &amp;#039;{print $2}&amp;#039;&lt;/ins&gt;) &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This will assign the next available interface, we&amp;#039;re calling these amprN &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This will assign the next available interface, we&amp;#039;re calling these amprN &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if [ ${AMPRIFCHK} = &amp;quot;0&amp;quot; ] &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if [ ${AMPRIFCHK} = &amp;quot;0&amp;quot; ] &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Opadmin</name></author>
	</entry>
	<entry>
		<id>https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2150&amp;oldid=prev</id>
		<title>Opadmin at 14:53, 25 August 2011</title>
		<link rel="alternate" type="text/html" href="https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2150&amp;oldid=prev"/>
		<updated>2011-08-25T14:53:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:53, 25 August 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For those of you who subscribe to the AMPRNet robot provided by http://www.ampr-gateways.org, you are probably receiving encap.txt files in the format of&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For those of you who subscribe to the AMPRNet robot provided by http://www.ampr-gateways.org, you are probably receiving encap.txt files in the format of&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;route addprivate 44.x.x.x/nn encap internet.ip.of.gateway&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;route addprivate 44.x.x.x/nn encap internet.ip.of.gateway &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;JNOS can happily accept this syntax, but Linux needs it to be broken apart into 3 steps.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;JNOS can happily accept this syntax, but Linux needs it to be broken apart into 3 steps.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This creates the interface with the destination gateway.  Only one of these is needed per gateway&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This creates the interface with the destination gateway.  Only one of these is needed per gateway &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ip tunnel add &amp;lt;interfacename&amp;gt; mode ipip remote internet.ip.of.gateway local local.ip.of.linux&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ip tunnel add &amp;lt;interfacename&amp;gt; mode ipip remote internet.ip.of.gateway local local.ip.of.linux&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This sets the IP address on the interface.  We&amp;#039;ve used the AMPRNet address.  We will use 44.128.0.1 for this example.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This sets the IP address on the interface.  We&amp;#039;ve used the AMPRNet address.  We will use 44.128.0.1 for this example.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ifconfig &amp;lt;interfacename&amp;gt; 44.128.0.1 netmask 255.255.255.255&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ifconfig &amp;lt;interfacename&amp;gt; 44.128.0.1 netmask 255.255.255.255&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Lastly, we must create a route to the target AMPRNet host or network via the newly created interface (which implies the gateway).  We will use 44.128.1.0/24 for this example.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Lastly, we must create a route to the target AMPRNet host or network via the newly created interface (which implies the gateway).  We will use 44.128.1.0/24 for this example. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;route add 44.128.1.0/24 dev &amp;lt;interfacename&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;route add 44.128.1.0/24 dev &amp;lt;interfacename&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Opadmin</name></author>
	</entry>
	<entry>
		<id>https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2149&amp;oldid=prev</id>
		<title>Opadmin: Created page with &quot;When we think about packet radio and TCP/IP, most of us think of JNOS.  The efforts of all current and past developers has given us a &quot;swiss army knife&quot; of packet programs.  No o...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ohiopacket.org/index.php?title=Replacing_JNOS_with_Linux&amp;diff=2149&amp;oldid=prev"/>
		<updated>2011-08-23T20:24:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;When we think about packet radio and TCP/IP, most of us think of JNOS.  The efforts of all current and past developers has given us a &amp;quot;swiss army knife&amp;quot; of packet programs.  No o...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When we think about packet radio and TCP/IP, most of us think of JNOS.  The efforts of all current and past developers has given us a &amp;quot;swiss army knife&amp;quot; of packet programs.  No other software package comes close to providing as many services as JNOS.  The cost of offering so many options is the ability to have feature rich components.  While no component of JNOS is bad, the prospect of being able choose what flavor of services can be an attractive one.  This article is intended to a somewhat seasoned Linux veteran.  It assumes you are capable of setting up LinuxNode and any other network daemons such as Postfix (SMTP), Apache (HTTP), etc.  As time permits, we will try to add additional setup steps.&lt;br /&gt;
&lt;br /&gt;
Out of the box, LinuxNode can support AXIP and AXUDP connections, support KISS type TNCs and can even be setup to accept telnet sessions (with help if (x)inetd).  The other component of JNOS which is used heavily in our installations is the ability to encapsulate AMPRNet (44.x.x.x) traffic into normal IP frames.  This is often used to bridge &amp;quot;pockets&amp;quot; of AMPRNet traffic across Internet links.  Fortunately, Linux can natively handle this as well, but the documentation and examples we found seemed confusing.  With a bit of research and some trial and error, we discovered that what takes one line in JNOS, takes 3 lines in Linux.&lt;br /&gt;
&lt;br /&gt;
For those of you who subscribe to the AMPRNet robot provided by http://www.ampr-gateways.org, you are probably receiving encap.txt files in the format of&lt;br /&gt;
&lt;br /&gt;
route addprivate 44.x.x.x/nn encap internet.ip.of.gateway&lt;br /&gt;
&lt;br /&gt;
JNOS can happily accept this syntax, but Linux needs it to be broken apart into 3 steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This creates the interface with the destination gateway.  Only one of these is needed per gateway&lt;br /&gt;
ip tunnel add &amp;lt;interfacename&amp;gt; mode ipip remote internet.ip.of.gateway local local.ip.of.linux&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This sets the IP address on the interface.  We&amp;#039;ve used the AMPRNet address.  We will use 44.128.0.1 for this example.&lt;br /&gt;
ifconfig &amp;lt;interfacename&amp;gt; 44.128.0.1 netmask 255.255.255.255&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Lastly, we must create a route to the target AMPRNet host or network via the newly created interface (which implies the gateway).  We will use 44.128.1.0/24 for this example.&lt;br /&gt;
route add 44.128.1.0/24 dev &amp;lt;interfacename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The union of these 3 commands will produce the same IPIP encapsulation that JNOS uses.  The next hurdle is how to convert the encap.txt to a format that will work within Linux.  One solution is the following bash script.  It will&lt;br /&gt;
&lt;br /&gt;
1) Read the native formatted encap.txt and translate it into the Linux command set &amp;lt;br&amp;gt;&lt;br /&gt;
2) Create a tunnel interface per remote gateway (starts with ampr0 and adds additional per gateway)  The limit of interface is not limited to 255, in our testing we&amp;#039;ve had 512 without any trouble. &amp;lt;br&amp;gt;&lt;br /&gt;
3) Replace empty octets of the target IP address with zeros (required by route command) &amp;lt;br&amp;gt;&lt;br /&gt;
4) Perform sanity checking for incorrect network addresses (some entries in encap.txt don&amp;#039;t have the correct network address for a given subnet, if fed directly, the Linux route command will fail). &amp;lt;br&amp;gt;&lt;br /&gt;
5) Remove any preexisting tunnels (if you kernel has the ipip compiled in a module) &amp;lt;br&amp;gt;&lt;br /&gt;
6) It will error out if it encounters any issue with any command.  This is useful to ensure everything is running before it gets added to crontab. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;!/bin/bash  &amp;lt;br&amp;gt;&lt;br /&gt;
IPIPLOAD=$(lsmod | grep -c ipip) &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${IPIPLOAD} != &amp;quot;0&amp;quot; ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
rmmod ipip &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
modprobe ipip &amp;lt;br&amp;gt;&lt;br /&gt;
ENCAP=encap.txt &amp;lt;br&amp;gt;&lt;br /&gt;
LOCALENCAP=$(/sbin/ifconfig eth0) &amp;lt;br&amp;gt;&lt;br /&gt;
LOCALAMPR=44.128.0.1 &amp;lt;br&amp;gt;&lt;br /&gt;
ENCAPGW=$(cat $ENCAP | grep -v &amp;#039;#&amp;#039; | awk &amp;#039;{print $5}&amp;#039; | sort | uniq) &amp;lt;br&amp;gt;&lt;br /&gt;
for gw in $ENCAPGW &amp;lt;br&amp;gt;&lt;br /&gt;
do &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
AMPRIFCHK=$(/sbin/ifconfig | grep -c ampr) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This will assign the next available interface, we&amp;#039;re calling these amprN &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${AMPRIFCHK} = &amp;quot;0&amp;quot; ] &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
DEVICE=ampr0 &amp;lt;br&amp;gt;&lt;br /&gt;
else &amp;lt;br&amp;gt;&lt;br /&gt;
DEVNUMBER=$(expr $(/sbin/ifconfig | grep ampr | awk &amp;#039;{print $1}&amp;#039; | tail -n 1 |  sed s/&amp;#039;ampr&amp;#039;//g) + 1) &amp;lt;br&amp;gt;&lt;br /&gt;
DEVICE=ampr${DEVNUMBER} &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
iptunnel add $DEVICE mode ipip remote $gw local $LOCALENCAP &amp;lt;br&amp;gt;&lt;br /&gt;
RETVAL=$? &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${RETVAL} != &amp;quot;0&amp;quot; ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
exit 1 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
ifconfig $DEVICE $LOCALAMPR netmask 255.255.255.255 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RETVAL=$? &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${RETVAL} != &amp;quot;0&amp;quot; ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
exit 1 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for net in $(cat $ENCAP | grep $gw | awk &amp;#039;{print $3}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
do &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; We need to omit -net to route when it is a host record (CIDR = 32) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; If no CIDR is specified, host is assumed, set CIDR to 32 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CIDR=$(echo $net | awk -F &amp;#039;/&amp;#039; &amp;#039;{print $2}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
if [ -z $CIDR ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
CIDR=32 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; We need a host route &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${CIDR} = &amp;quot;32&amp;quot; ] &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
route add $net dev $DEVICE &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RETVAL=$? &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${RETVAL} != &amp;quot;0&amp;quot; ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
exit 1 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
else &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; We need a network route &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET1=$(echo $net | awk -F &amp;#039;.&amp;#039; &amp;#039;{print $1}&amp;#039; | awk -F &amp;#039;/&amp;#039; &amp;#039;{print $1}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET2=$(echo $net | awk -F &amp;#039;.&amp;#039; &amp;#039;{print $2}&amp;#039; | awk -F &amp;#039;/&amp;#039; &amp;#039;{print $1}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET3=$(echo $net | awk -F &amp;#039;.&amp;#039; &amp;#039;{print $3}&amp;#039; | awk -F &amp;#039;/&amp;#039; &amp;#039;{print $1}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET4=$(echo $net | awk -F &amp;#039;.&amp;#039; &amp;#039;{print $4}&amp;#039; | awk -F &amp;#039;/&amp;#039; &amp;#039;{print $1}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Check to see if octets are empty, if they are, insert 0 &amp;lt;br&amp;gt;&lt;br /&gt;
if [ -z $OCTET1 ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET1=0 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if [ -z $OCTET2 ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET2=0 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if [ -z $OCTET3 ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET3=0 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if [ -z $OCTET4 ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
OCTET4=0 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
net=&amp;quot;${OCTET1}.${OCTET2}.${OCTET3}.${OCTET4}/${CIDR}&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; In some cases, the target network has an incorrect network number &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; This causes the route addition to fail. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Fortunately, ipcalc can handle the calculation of the correct network &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Just to be safe, we will pass all networks through ipcalc to verify &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; their accuracy. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
NETSCRUB=$net &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
net=$(ipcalc --nocolor $NETSCRUB | grep Network | awk &amp;#039;{print $2}&amp;#039;) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
route add -net $net dev $DEVICE &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RETVAL=$? &amp;lt;br&amp;gt;&lt;br /&gt;
if [ ${RETVAL} != &amp;quot;0&amp;quot; ]; &amp;lt;br&amp;gt;&lt;br /&gt;
then &amp;lt;br&amp;gt;&lt;br /&gt;
exit 1 &amp;lt;br&amp;gt;&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fi &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Adding route to $net via $gw on $DEVICE&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
done &amp;lt;br&amp;gt;&lt;br /&gt;
done &amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The end result is an output of routes, their gateways and device names&lt;br /&gt;
&lt;br /&gt;
Adding route to 44.x.x.x/32 via &amp;lt;internet.ip.of.gateway147&amp;gt; on ampr147 &amp;lt;br&amp;gt;&lt;br /&gt;
Adding route to 44.x.x.y/32 via &amp;lt;internet.ip.of.gateway148&amp;gt;  on ampr148 &amp;lt;br&amp;gt;&lt;br /&gt;
Adding route to 44.x.x.z/32 via &amp;lt;internet.ip.of.gateway149&amp;gt;  on ampr149 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended that the system run iptables with sensible rules to restrict access to certain services.  We will try to add this information as time permits.&lt;br /&gt;
&lt;br /&gt;
Please [mailto:kb8uvn@ohiopacket.org contact us] with any questions or comments&lt;/div&gt;</summary>
		<author><name>Opadmin</name></author>
	</entry>
</feed>