close Warning: Can't synchronize with repository "(default)" (/common/SVN/wimax does not appear to be a Subversion repository.). Look in the Trac log for more information.

Changes between Initial Version and Version 1 of dSite/mConnectivity/cKernel


Ignore:
Timestamp:
Jan 7, 2015, 8:46:21 PM (9 years ago)
Author:
seskar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • dSite/mConnectivity/cKernel

    v1 v1  
     1== ip L2TP Connectivity To I2 ==
     2
     3=== Installing the Prerequisite Software ===
     4
     5We're using the ip l2tp tunnels that have been part of the linux kernels since verion 2.6.35. To use it you must load the l2tp_eth module (manually) as this support is not loaded automatically. Tunnels are built in a 2 stage process that uses ''/etc/network/interfaces'' and the script that brings the interfaces up (''tunnel.sh'').
     6
     7''/etc/network/interfaces'' should look like:
     8{{{
     9# This file describes the network interfaces available on your system
     10# and how to activate them. For more information, see interfaces(5).
     11
     12# The loopback network interface
     13auto lo
     14iface lo inet loopback
     15
     16# The primary network interface - this is the outbound interface (static assignment)
     17auto eth0
     18iface eth0 inet static
     19        address XXX.YYY.ZZZ.111
     20        netmask 255.255.255.224
     21        gateway XXX.YYY.ZZZ.1
     22        dns-nameservers 8.8.8.8
     23
     24auto eth1
     25iface eth1 inet manual
     26}}}
     27
     28The convention we've adopted is that '''eth0 is the externally route-able interface''' and '''eth1''' is local subnet interface (please note that it doesn't need an IP address at this stage). The tunnel script (''tunnel.sh'') looks like:
     29
     30{{{
     31#!/bin/bash                                                                   
     32
     33modprobe l2tp_eth
     34ifconfig eth1 up
     35
     36ip l2tp add tunnel remote  128.6.192.147 local XXX.YYY.ZZZ.1111 \
     37     tunnel_id 1 peer_tunnel_id 1 udp_sport 3000 udp_dport 3000 encap udp
     38
     39ip l2tp add session  name l2tpsess1 \
     40        tunnel_id 1 session_id 1 peer_session_id 1
     41
     42ip link set l2tpsess1 up mtu 1446
     43ip link add brvlan1 type bridge
     44ip link set l2tpsess1 master brvlan1
     45ip link set eth1 master brvlan1
     46ifconfig brvlan1 up
     47}}}
     48
     49This script preforms the following actions:
     50 1. Loads the l2tp kernel module
     51 1. Brings up the local interfaces
     52 1. Brings up the tunnel
     53 1. Creates the session for the interface
     54 1. Creates the bridge
     55 1. Connects the session interface to the local (i.e. bridge the two interfaces)
     56 1. Brings the bridge up.
     57
     58You can check the newly created bridge functionality after running the script by executing:
     59    {{{
     60root@landing1:/root# brctl show brvlan1
     61bridge name     bridge id               STP enabled     interfaces
     62brvlan1         8000.003048b19da9       no              eth1
     63                                                        l2tpsess1
     64    }}}
     65
     66