<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>onvox.net &#187; Networking</title>
	<atom:link href="http://onvox.net/category/networking/feed" rel="self" type="application/rss+xml" />
	<link>http://onvox.net</link>
	<description></description>
	<lastBuildDate>Tue, 06 Apr 2010 17:19:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Stateful Cisco IOS Firewalls</title>
		<link>http://onvox.net/networking/stateful-cisco-ios-firewalls</link>
		<comments>http://onvox.net/networking/stateful-cisco-ios-firewalls#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:37:31 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=183</guid>
		<description><![CDATA[Cisco IOS Firewall is capable of stateful packet filtering when it is configured to do so. By applying inspection rules to an interface, you can configure the router to drop packets that could be potentially harmful given the state of a currently established session. For example, using a TCP inspection rule will not allow a [...]]]></description>
			<content:encoded><![CDATA[<p>Cisco IOS Firewall is capable of stateful packet filtering when it is configured to do so.</p>
<p>By applying inspection rules to an interface, you can configure the router to drop packets that could be potentially harmful given the state of a currently established session. For example, using a TCP inspection rule will not allow a TCP reset (RST) packet through the interface unless there is currently a TCP session established with the machine sending the reset.</p>
<p>To apply stateful packet filtering rules, you must apply an access control list (ACL) to the interface you wish to inspect. Packets traversing this interface will then be examined against the ACL first, then checked against the inspection rule(s) to determine whether the packet should be forwarded or dropped. <strong>Note that any packet may be rejected by the inspection rules, ACL, or both! </strong></p>
<p>First, decide which interface you would like to do stateful inspection on. This is typically your WAN or untrusted network interface. Configure an IP ACL with this interface in mind. If you are configuring a firewall for an interface that uses DHCP, keep in mind that the destination IP for packets allowed in will be the IP address assigned to that interface. Therefore I generally use <code>any</code> and remember it is there for that purpose. This alleviates the issue of having to adjust ACLs every time your router receives a new IP address from your ISP. Also keep in mind that you must use an extended ACL when you are also using inspection rules:</p>
<pre>
Router(config)#ip access-list extended Internet-inbound-ACL
Router(config-ext-nacl)#10 permit tcp any any eq 22
Router(config-ext-nacl)#20 deny ip any any log
</pre>
<p>The above permits traffic on port 22 (SSH) to traverse the interface. The deny statement is added for clarity and logging.</p>
<p>Next define your inspection rules. IOS supports more than 170 protocols:<br />
<code>[no] ip inspect name <em>inspection-name protocol</em> [alert {on | off}] [timeout <em>seconds</em>]</code></p>
<pre>
Router(config)#ip inspect name FIREWALL tcp
Router(config)#ip inspect name FIREWALL udp
</pre>
<p>Finally apply the ACL and the inspection rules to the interface:</p>
<pre>
Router(config)#interface FastEthernet4
Router(config-if)#ip access-group Internet-inbound-ACL in
Router(config-if)#ip inspect FIREWALL out
</pre>
<p>It is important that the inspect statement is applied in the <strong>outbound</strong> direction. I found numerous documentation that stated it needed to be applied in the inbound direction, however I have found that this does not work and any new connection attempts are not stored in the session table or permitted through the interface!</p>
<p>You can verify the configuration that was just applied by issuing a <code>show ip inspect session</code> command. The output should look something like this:</p>
<pre>
Router#sh ip inspect sessions
Established Sessions
 Session 83C60000 (192.168.0.3:44271)=>(76.73.X.X:22) ssh SIS_OPEN
 Session 83C65828 (192.168.0.4:54333)=>(74.X.X.X:5222) tcp SIS_OPEN
 Session 83C5AAB0 (192.168.0.4:54327)=>(208.43.X.X:80) tcp SIS_OPEN
 Session 83C685A8 (192.168.0.4:54335)=>(174.X.X.X:443) tcp SIS_OPEN
 Session 83C66EE8 (192.168.0.4:54332)=>(74.X.X.X:5222) tcp SIS_OPEN
 Session 83C63BB8 (192.168.0.4:54334)=>(208.89.X.X:80) tcp SIS_OPEN
</pre>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/networking/stateful-cisco-ios-firewalls/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 addrconf: prefix with wrong length 48</title>
		<link>http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48</link>
		<comments>http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48#comments</comments>
		<pubDate>Mon, 15 Feb 2010 18:03:25 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=176</guid>
		<description><![CDATA[If your hosting provider gives out an entire /48 for every hosted server, your syslog may get overwhelmed with messages concerning the subnet mask: 1 Time(s): [705959.619704] IPv6 addrconf: prefix with wrong length 48 To solve this temporarily you can disable auto-configuration and router advertisements: echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf This seems [...]]]></description>
			<content:encoded><![CDATA[<p>If your hosting provider gives out an entire /48 for every hosted server, your syslog may get overwhelmed with messages concerning the subnet mask:</p>
<pre>1 Time(s): [705959.619704] IPv6 addrconf: prefix with wrong length 48</pre>
<p>To solve this temporarily you can disable auto-configuration and router advertisements:</p>
<pre>
echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf
</pre>
<p>This seems to suppress the annoying log messages on my Ubuntu based environment. If you would like to make this persistent through reboots, add the following lines to <code>/etc/sysctl.conf</code>:</p>
<pre>
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.autoconf = 0
</pre>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling IPv6 on Cisco Catalyst 3750 Devices</title>
		<link>http://onvox.net/networking/enabling-ipv6-on-cisco-catalyst-3750-devices</link>
		<comments>http://onvox.net/networking/enabling-ipv6-on-cisco-catalyst-3750-devices#comments</comments>
		<pubDate>Tue, 09 Feb 2010 18:00:32 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[3750]]></category>
		<category><![CDATA[Catalyst]]></category>
		<category><![CDATA[IOS]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=169</guid>
		<description><![CDATA[I was recently baffled to see that when I entered configuration mode within a VLAN interface on a Catalyst access layer switch that I could not set any IPv6 options! It turns out that by default, SDM prefers what it calls the “desktop default” template. This means it is optimized for IPv4 and does not [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently baffled to see that when I entered configuration mode within a VLAN interface on a Catalyst access layer switch that I could not set any IPv6 options! It turns out that by default, SDM prefers what it calls the “desktop default” template. This means it is optimized for IPv4 and does not include IPv6 support. Fortunately a quick but painful fix to this is to change the prefered SDM template from “desktop default” to “dual-ipv4-and-ipv6″:</p>
<pre>
Switch>enable
Switch#config t
Switch(config)#sdm prefer dual-ipv4-and-ipv6
Switch(config)#end
Switch#reload
</pre>
<p>Unfortunately, you will need to reload (reboot) the device in order for the changes to take place, which will obviously incur annoying downtime for your users. Once the device has reloaded you can verify by issuing a <code>show sdm prefer</code> command which should look something like this:</p>
<pre>
Switch#show sdm  prefer
 The current template is "desktop IPv4 and IPv6 default" template.
 The selected template optimizes the resources in
 the switch to support this level of features for
 8 routed interfaces and 1024 VLANs.

  number of unicast mac addresses:                  2K
  number of IPv4 IGMP groups + multicast routes:    1K
  number of IPv4 unicast routes:                    3K
    number of directly-connected IPv4 hosts:        2K
    number of indirect IPv4 routes:                 1K
  number of IPv6 multicast groups:                  1.125k
  number of directly-connected IPv6 addresses:      2K
  number of indirect IPv6 unicast routes:           1K
  number of IPv4 policy based routing aces:         0
  number of IPv4/MAC qos aces:                      0.5K
  number of IPv4/MAC security aces:                 1K
  number of IPv6 policy based routing aces:         0
  number of IPv6 qos aces:                          0.5K
  number of IPv6 security aces:                     0.5K
</pre>
<p>Now you should be able to configure IPv6 interfaces and ACLs.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/networking/enabling-ipv6-on-cisco-catalyst-3750-devices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dual NAT Load-Balancing with Cisco</title>
		<link>http://onvox.net/networking/dual-nat-load-balancing-with-cisco</link>
		<comments>http://onvox.net/networking/dual-nat-load-balancing-with-cisco#comments</comments>
		<pubDate>Sat, 09 Jan 2010 04:46:17 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[NAT]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=153</guid>
		<description><![CDATA[Load balancing through two NAT connections is now partially possible with the use of some tricky configurations within Cisco IOS running on integrated services routers. I recently was tasked with configuring this scenario and found that Cisco has documented a way of doing this. Although their guide describes this process in enough detail to fit [...]]]></description>
			<content:encoded><![CDATA[<p>Load balancing through two NAT connections is now partially possible with the use of some tricky configurations within Cisco IOS running on integrated services routers. I recently was tasked with configuring this scenario and found that Cisco has <a href="http://www.cisco.com/en/US/tech/tk648/tk361/technologies_configuration_example09186a00808d2b72.shtml">documented</a> a way of doing this.</p>
<p>Although their guide describes this process in enough detail to fit a lot of different situations, I felt it would be useful to revisit the configuration process in hopes of helping other people facing similar requirements and for my own documentation purposes.</p>
<p>Everything in this article was used specifically with a Cisco 1811 router running 12.4(24)T2 Advanced IP Services software, however the majority of this guide should work with any recent integrated service router with advanced IP services.</p>
<p><strong>Scenario</strong></p>
<p>This example describes a router that has one DHCP-configured interface to one ISP and one static address to another ISP, each on different WAN interfaces of this router. You should configure policy-based routing will be configured for specific or secure traffic (such as HTTPS, SSH, etc) to ensure that it always uses one ISP connection. Fail-over redundancy will also be configured in the event one of these connections become unavailable. This configuration also assumes the interfaces and NAT has already been configured for each connection.</p>
<p><strong>Configuration</strong></p>
<p>Specify the desired object tracking timer for interfaces in seconds. I used 5 as did the Cisco documentation:</p>
<pre>track timer interface 5</pre>
<p>Next create new tracked SLA objects &#8211; one for each of the ISP connections, and add desired delay change notifications in seconds:</p>
<pre>track 100 ip sla 1 reachability
 delay down 15 up 10
track 200 ip sla 2 reachability
 delay down 15 up 10
</pre>
<p>For an interface running DHCP, route tracking can be enabled with the following interface configuration command:</p>
<pre>ip dhcp client route track 100</pre>
<p>*Where 100 is the desired tracking object number created above</p>
<p>Modify the static IP default route entry for the static IP connection to be tracked:</p>
<pre>ip route 0.0.0.0 0.0.0.0 interface FastEthernet1 [next hop] <span style="color: #ff9900;">254</span> track <span style="color: #ff0000;">200</span></pre>
<p>The digits in orange signify the metric for this static route. Since the DHCP learned route has a metric of 254, I set this static default route with the same metric so that equal-cost load balancing could be achieved. The red digits should match the desired object track number we created earlier.</p>
<p>Next configure an OER tracking entry to monitor each ISP connection. The <code>icmp-echo</code> line can be a difficult choice. It is important to identify an address to ping that is reachable only through that connection. With the addition of the <code>source-interface</code> line referencing an outside interface with a global address, I do not believe this to be an issue in the majority of topologies as the echo reply would never make it back the device, however I have not had sufficient time to experiment with this case to see how this works in reality.</p>
<pre>ip sla 1
 icmp-echo 172.31.100.1 source-interface FastEthernet0
 timeout 1000
 threshold 40
 frequency 3
ip sla 2
 icmp-echo 172.31.200.1 source-interface FastEthernet1
 timeout 1000
 threshold 40
 frequency 3</pre>
<p>Schedule the new SLAs for start time and duration:</p>
<pre>ip sla schedule 1 life forever start-time now
ip sla schedule 2 life forever start-time now</pre>
<p><strong>Fail-over redundancy</strong></p>
<p>Tacked on to the route-maps configured to allow NAT, I added an additional permit sequence that set the next hop based on availability:</p>
<pre>route-map NET1 permit 10
  match ip address NETWORK1
  set ip next-hop verify-availability [primary route] 10 track 100
  set ip next-hop verify-availability [secondary route] 20 track 200
route-map NET2 permit 10
  match ip address NETWORK2
  set ip next-hop verify-availability [primary route] 10 track 200
  set ip next-hop verify-availability [secondary route] 20 track 100</pre>
<p>This will set specify which router should be primary for each network. In this case I set each network&#8217;s primary route to a different connection in an effort to spread the load but still ensure both networks work in the event either ISP connection were to fail.</p>
<p><strong>Conclusion</strong></p>
<p>So now that load-balancing has somewhat been configured on the device, it is time to talk about the feasibility. The one point to take away from this is that it is not true load-balancing even if there are two equal default routes to choose. This is because the nature of NAT will force the session on to one of the two connections.  My suggestion is to use this but limit the subnets to use one primarily and the other for backup, alternating the networks between the two WAN connections. In the end, this is what I did and has been a wonderful solution overall.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/networking/dual-nat-load-balancing-with-cisco/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create 6in4 tunnels in Arch Linux</title>
		<link>http://onvox.net/linux/how-to-create-6in4-tunnels-in-arch-linux</link>
		<comments>http://onvox.net/linux/how-to-create-6in4-tunnels-in-arch-linux#comments</comments>
		<pubDate>Sun, 25 Jan 2009 21:41:16 +0000</pubDate>
		<dc:creator>Andrew Greenwood</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[6in4]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=131</guid>
		<description><![CDATA[Arch Linux uses a BSD-style network interface configuration located in /etc/rc.conf, which can make exotic network configurations interesting, to say the least. The following rc.d script is meant to help remedy the situation by providing a configurable wrapper to sanely manage a 6in4 link interface. This script uses the route2 method; make sure that the [...]]]></description>
			<content:encoded><![CDATA[<p>Arch Linux uses a BSD-style network interface configuration located in <em>/etc/rc.conf</em>, which can make exotic network configurations interesting, to say the least. The following rc.d script is meant to help remedy the situation by providing a configurable wrapper to sanely manage a 6in4 link interface.</p>
<ul>
<li>This script uses the <em>route2</em> method; make sure that the <strong>iproute2</strong> package is installed.</li>
</ul>
<p>As <em>root</em>, write the following rc.d init script to <em>/etc/rc.d/6in4-tunnel</em>:</p>
<pre>#!/bin/bash

### begin user configuration

##############################################
#                                            #
#  Stop this script before you reconfigure!  #
#                                            #
##############################################

# if_name     - interface name that is to be created for the 6in4 link
if_name=6in4

# server_ipv4 - ipv4 address of the server that is providing the 6in4 tunnel
server_ipv4=127.0.0.1

# client_ipv4 - ipv4 address of the client that is receiving the 6in4 tunnel
client_ipv4=127.0.0.1

# client_ipv6 - ipv6 address of the client 6in4 tunnel endpoint
client_ipv6=2001:feed:face:beef::2/64

# link_mtu    - set the mtu for the 6in4 link
link_mtu=1480

# tunnel_ttl  - set the ttl for the 6in4 tunnel
tunnel_ttl=64

### end user configuration

daemon_name=6in4-tunnel

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting $daemon_name daemon"

    ifconfig $if_name &amp;&gt;/dev/null
    if [ $? -eq 0 ]; then
      stat_busy "Interface $if_name already exists"
      stat_fail
      exit 1
    fi

    ip tunnel add $if_name mode sit remote $server_ipv4 local $client_ipv4 ttl $tunnel_ttl
    ip link set $if_name up mtu $link_mtu
    ip addr add $client_ipv6 dev $if_name
    ip route add ::/0 dev $if_name

    add_daemon $daemon_name
    stat_done
    ;;

  stop)
    stat_busy "Stopping $daemon_name daemon"

    ifconfig $if_name &amp;&gt;/dev/null
    if [ $? -ne 0 ]; then
      stat_busy "Interface $if_name does not exist"
      stat_fail
      exit 1
    fi

    ip link set $if_name down
    ip tunnel del $if_name

    rm_daemon $daemon_name
    stat_done
    ;;

  *)
    echo "usage: $0 {start|stop}"
esac
exit 0</pre>
<p>You will need to provide your 6in4 link configuration between the following sections of <em>/etc/rc.d/6in4-tunnel</em>:</p>
<pre>### begin user configuration</pre>
<pre>### end user configuration</pre>
<p>Once <em>/etc/rc.d/6in4-tunnel</em> has been configured properly, give it permission to be executed:</p>
<pre># chmod +x /etc/rc.d/6in4-tunnel</pre>
<p>To create the 6in4 tunnel link and bring up the interface:</p>
<pre># /etc/rc.d/6in4-tunnel start</pre>
<p>To delete the 6in4 tunnel link and remove the interface:</p>
<pre># /etc/rc.d/6in4-tunnel stop</pre>
<p>The following method allows <em>/etc/rc.d/6in4-tunnel</em> to start automatically at system startup.</p>
<dl>
<dd>
<ul>
<li> Verify that the 6in4 tunnel link is configured and working properly before doing this!</li>
</ul>
</dd>
</dl>
<p>As <em>root</em>, insert <em>6in4-tunnel</em> right after <em>network</em> in the <strong>DAEMONS</strong> line of <em>/etc/rc.conf</em>.</p>
<p>After this addition, the <strong>DAEMONS</strong> line in <em>/etc/rc.conf</em> should look something like this:</p>
<pre>...

#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng iptables ip6tables network 6in4-tunnel openntpd ...

...</pre>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-6in4-tunnels-in-arch-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create IPv4 GRE tunnels in Ubuntu</title>
		<link>http://onvox.net/linux/how-to-create-ipv4-gre-tunnels-in-ubuntu</link>
		<comments>http://onvox.net/linux/how-to-create-ipv4-gre-tunnels-in-ubuntu#comments</comments>
		<pubDate>Mon, 19 Jan 2009 06:00:04 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[GRE]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[Tunnels]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=94</guid>
		<description><![CDATA[Here is an easy way to make use of IPv4 GRE tunnels in Ubuntu, or any other Debian based distro. You will need to edit /etc/network/interfaces. Here is a template with the information you will need to add: auto tun1 iface tun1 inet static address &#60;tunnel IP&#62; netmask &#60;tunnel subnet mask&#62; pre-up iptunnel add tun1 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an easy way to make use of IPv4 GRE tunnels in Ubuntu, or any other Debian based distro. You will need to edit <code>/etc/network/interfaces</code>.</p>
<p>Here is a template with the information you will need to add:</p>
<pre>
auto tun1
iface tun1 inet static
    address <strong>&lt;tunnel IP&gt;</strong>
    netmask <strong>&lt;tunnel subnet mask&gt;</strong>
    pre-up iptunnel add tun1 mode gre local <strong>&lt;local IP&gt;</strong> remote <strong>&lt;remote IP&gt;</strong> ttl 255
    up ifconfig tun1 multicast
    pointopoint <strong>&lt;remote tunnel IP&gt;</strong>
    post-down iptunnel del tun1
</pre>
<p>As with the previous post about <a href="http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu">6in4</a> tunnels in Ubuntu, lets take a brief look at each line.</p>
<p><code>auto tun1</code> is used by the /etc/init.d/networking script. Just like the 6in4 tunnel, the auto parameter will instruct the script to automatically start or stop the interface. The script will get called during startup and will bring up this interface automatically. This line is entirely optional and depends on your personal preference.</p>
<p><code>iface tun1 inet static</code> starts the configuration block for a new IPv4 interface. This is the interface of the tunnel we are about to create that will encapsulate traffic destined for the other side of the tunnel.</p>
<p><code>address <strong>&lt;tunnel IP&gt;</strong></code> is the IP address you wish to assign to this machine&#8217;s side of the GRE tunnel.</p>
<p><code>netmask <strong>&lt;tunnel subnet mask&gt;</strong></code> is the subnet mask of the tunnel. I highly suggest using a 255.255.255.252 subnet mask as this tunnel will be point-to-point and there is no reason to waste address space, even if it is private addressing. If you are unfamiliar with how subnet masks are used, please refer to <a href="http://en.wikipedia.org/wiki/Subnetwork">Subnetwork</a> on Wikipedia.</p>
<p><code>pre-up iptunnel add tun1 mode gre local <strong>&lt;local IP&gt;</strong> remote <strong>&lt;remote IP&gt;</strong> ttl 255</code> &#8211; The <code>pre-up</code> parameter tells the init script to run the <code>iptunnel</code> command prior to bringing up the interface. This is where we are actually creating the tunnel and telling it to use GRE mode. <code>&lt;local IP&gt;</code> is this machine&#8217;s IP address of an interface on which you want to run this tunnel. For example, if eth0 had the address of 71.31.47.23, you could set the local IP address above to that address in order to have this tunnel use eth0. <code>&lt;remote IP&gt;</code> is the global IP address where the other side of the tunnel exists. </p>
<p><code>up ifconfig tun1 multicast</code> &#8211; The <code>up</code> parameter tells the init script to run <code>ifconfig tun1 multicast</code> once the interface is up. In this case, we are enabling multicast on this interface. This is particularly useful if you wish to run a routing protocol over this tunnel, such as OSPF.</p>
<p><code>pointopoint <strong>&lt;remote tunnel IP&gt;</strong></code> &#8211; The remote IP here is the IP address of the other side of the GRE tunnel. For example, if your side of the tunnel is 172.31.10.1 and their side is 172.31.10.2, then 172.31.10.2 would be the IP address to specify here.</p>
<p><code>post-down iptunnel del tun1</code> &#8211; Just like <code>pre-up</code>, <code>post-down</code> tells the init script to run this command after the interface has been shutdown. In this case, we are deleting the tunnel we created earlier with the <code>pre-up</code> command.</p>
<p>As with the with the 6in4 tunnel, you can name this tunnel interface something that is more meaningful than <code>tun1</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-ipv4-gre-tunnels-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create 6in4 tunnels in Ubuntu</title>
		<link>http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu</link>
		<comments>http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu#comments</comments>
		<pubDate>Sun, 18 Jan 2009 18:48:35 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[6in4]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=45</guid>
		<description><![CDATA[The simplest way to create a static 6in4 tunnel in Ubuntu, or any other Debian based distro, is to edit /etc/network/interfaces. Here is a template with the information you will need to add: auto tun1 iface tun1 inet6 v4tunnel address &#60;your IPv6 address&#62; netmask 64 ttl 64 endpoint &#60;remote IPv4 tunnel address&#62; up ip link [...]]]></description>
			<content:encoded><![CDATA[<p>The simplest way to create a static <a href="http://en.wikipedia.org/wiki/6in4">6in4</a> tunnel in Ubuntu, or any other Debian based distro, is to edit <code>/etc/network/interfaces</code>.</p>
<p>Here is a template with the information you will need to add:</p>
<pre>auto tun1
iface tun1 inet6 v4tunnel
        address <strong>&lt;your IPv6 address&gt;</strong>
        netmask 64
        ttl 64
        endpoint <strong>&lt;remote IPv4 tunnel address&gt;</strong>
        up ip link set mtu 1280 dev tun1
        up ip route add 2000::/3 dev tun1</pre>
<p>Lets take a brief look at what each line does.</p>
<p><code>auto tun1</code> is used by the <code>/etc/init.d/networking</code> script. The auto parameter will instruct the script to automatically start or stop the interface. The script will get called during startup and will bring up this interface automatically. This line is entirely optional and depends on your personal preference.</p>
<p><code>iface tun1 inet6 v4tunnel</code> starts the configuration block for a 6in4 tunnel. That is, IPv6 traffic encapsulated in IPv4 packets. This is extremely similar to how GRE works with purely IPv4 traffic.</p>
<p><code>address &lt;your IPv6 address&gt;</code> is where you need to specify the IPv6 address assigned to your machine. This is typically ends in ::2.</p>
<p><code>netmask 64</code> specifies the subnet mask for the IPv6 address you entered above. 64 is the smallest recommended subnet (see <a href="http://tools.ietf.org/html/rfc3627">RFC3627</a> for why they no longer use numbers such as 127). 64 is what you should normally expect to use.</p>
<p><code>ttl 64</code> specifies the Time to Live value set for packets sent by your tunnel endpoint. This only affects the IPv4 packet that is used to encapsulate your v6 traffic. It does not change the original IPv6 packet. Time to Live is a number of iterations a packet can live through before it should be discarded. This number is reduced by one on every router it passes enroute to its destination. 64 is used here because it restricts the packet to roughly the same region.</p>
<p>Here is a quick break down of default TTL values:</p>
<ul>
<li>0 &#8211; restricted to same host</li>
<li>1 &#8211; restricted to same subnet</li>
<li>32 &#8211; restricted to same site</li>
<li>64 &#8211; restricted to same region</li>
<li>128 &#8211; restricted to same continent</li>
<li>255 &#8211; unrestricted</li>
</ul>
<p><code>endpoint &lt;remote IPv4 tunnel address&gt;</code> is the IPv4 address to send encapsulated IPv6 traffic to. Your IPv6 provider will provide you with their IPv4 tunnel endpoint address.</p>
<p><code>up ip link set mtu 1280 dev tun1</code>. This statement reconfigures the interface from the default MTU to 1280 bytes. This is desirable to prevent fragmentation because of the IPv6 packet being encapsulated in an IPv4 packet.<br />
<b>NOTE:</b> SixXS seems to use 1280 as their default for tunnels, other providers likely use 1480 (which is default). If you leave this line out of your configuration, it should default to 1480.</p>
<p><code>up ip route add 2000::/3 dev tun1</code>. This last statement adds a default route for all IPv6 traffic to be sent through device <code>tun1</code> which in turn would be encapsulated in an IPv4 packet and sent to the endpoint address of your IPv6 provider which would send it on its way through the IPv6 network.</p>
<p>After you have saved the file, the next step is to up the interface using <strong>ifup tun1</strong> or if you decided to put in the <code>auto tun1</code> line you can restart your networking services using the init script: <strong>/etc/init.d/networking restart</strong>.</p>
<p>One final note. You can name this tunnel interface anything you want. For example, every time <code>tun1</code> was used above it could have been replaced with something more meaningful. For example, in <a href="http://www.sixxs.net/faq/connectivity/?faq=ossetup&amp;os=linuxdebian">SIXXS documentation</a>, they usually call the interface <code>sixxs</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Onvox.net is IPv6 Capable</title>
		<link>http://onvox.net/networking/onvoxnet-is-ipv6-capable</link>
		<comments>http://onvox.net/networking/onvoxnet-is-ipv6-capable#comments</comments>
		<pubDate>Sat, 17 Jan 2009 21:55:22 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://dev.onvox.net/?p=31</guid>
		<description><![CDATA[UPDATE 1/24/2009: I moved my static tunnel over to Hurricane Electric&#8217;s tunnel broker service. There are many advantages to them over SixXS and the client support seems to be a lot more friendly. Recently, I requested a SIXXS tunnel to this box. Currently, the only IPv6 capable portion is the root domain website (onvox.net). I [...]]]></description>
			<content:encoded><![CDATA[<p><b>UPDATE 1/24/2009:</b> I moved my static tunnel over to Hurricane Electric&#8217;s <a href="http://www.tunnelbroker.net">tunnel broker</a> service. There are many advantages to them over SixXS and the client support seems to be a lot more friendly.</p>
<p>Recently, I requested a <a href="http://www.sixxs.net">SIXXS</a> tunnel to this box. Currently, the only IPv6 capable portion is the root domain website (onvox.net). I am unable to control the reverse DNS entry for the tunnel end-point preventing me from making e-mail IPv6 complaint as well. I will be experimenting with IPv6 connectivity, mainly for an upcoming project at work. To ensure you have accessed this site via IPv6, take a look at the bottom of the page for the &#8220;Client IP&#8221; to see the address you came from.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/networking/onvoxnet-is-ipv6-capable/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable 802.1Q VLAN tagging in Ubuntu</title>
		<link>http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu</link>
		<comments>http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu#comments</comments>
		<pubDate>Thu, 18 Sep 2008 01:59:59 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[802.1Q]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VLAN]]></category>

		<guid isPermaLink="false">http://dev.onvox.net/?p=3</guid>
		<description><![CDATA[To make use of IEEE 802.1Q VLAN tagging capabilities in Ubuntu you must first install the user mode programs for Virtual LAN support: sudo apt-get install vlan Next the 8021q kernel module must be loaded to enable VLAN support on a kernel level: sudo modprobe 8021q A quick review of lsmod will ensure the kernel [...]]]></description>
			<content:encoded><![CDATA[<p>To make use of <a href="http://en.wikipedia.org/wiki/IEEE_802.1Q">IEEE 802.1Q</a> VLAN tagging capabilities in Ubuntu you must first install the user mode programs for <a href="http://en.wikipedia.org/wiki/Vlan">Virtual LAN</a> support:</p>
<p><code>sudo apt-get install vlan</code></p>
<p>Next the <code>8021q</code> kernel module must be loaded to enable VLAN support on a kernel level:</p>
<p><code>sudo modprobe 8021q</code></p>
<p>A quick review of <code>lsmod</code> will ensure the kernel module was loaded:</p>
<p><code>lsmod | grep 8021q</code></p>
<p>The output of the command should look similar to this:</p>
<pre>8021q                  26896  0</pre>
<p>Next we can create a tagged interface  in <code>/etc/network/interfaces</code>. The following example configures eth1 for VLAN 10 to use DHCP to obtain its IP address:</p>
<p><code>iface eth1.10 inet dhcp</code></p>
<p>The new VLAN 10 interface can now be initialized using:</p>
<p><code>ifup eth1.10</code></p>
<p>The usual nomenclature for making your interface come up automatically during the boot process is the same for your existing interfaces, just use <code>eth1.10</code>.</p>
<p>Once the interface is initialized you may want to refer to the following proc locations for configuration information:</p>
<p><code>/proc/net/vlan/config</code><br />
<code>/proc/net/vlan/[vlan-device]</code></p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
