Giter Site home page Giter Site logo

sa46t's Introduction

SA46T

This is SA46T (Stateless Automatic IPv4 over IPv6 Tunneling) open source implementation using linux tap interface.

ID : http://datatracker.ietf.org/doc/draft-matsuhira-sa46t-spec/

Compile

 % git clone git://github.com/upa/sa46t.git
 % cd sa46t
 % make

How to Use

Example

How to use sa46t with plane id 9, IPv4 prefix 10.0.0.0/24, and mapping IPv6 prefix 2001:db8:1:1::/64.

/---------------------------------------------------\
|                                                   |
|                  Backbone Network                 |
|                    (IPv6 only)                    |
|                                                   |
\---------------------------------------------------/
       |                                   |                
   +--------+                          +--------+            
   | SA46T1 |                          | SA46T2 |            
   +--------+                          +--------+           
       |                                   |              
 /--------------\                   /--------------\ 
 |              |                   |              |
 | Stub Network |                   | IPv4 Network |
 | 10.0.0.0/24  |                   | (Dual Stack) |
 |              |                   |              |
 \--------------/                   \--------------/

SA46T1 advertises prefix 2001:db8:1:1:0:9:a00:0/120 on Backbone Network. And SA46T2 advertises 10.0.0.0/24 on IPv4 Network. Packets from IPv4 network to SA46T Stub Network, that have destination address 10.0.0.X, are encapsulated by SA46T2 with IPv6 header. The destination addrss of Encapsulated packets is 2001:db8:1:1:0:9:a00:X. Thereby encapsulated packets arrives at SA46T1. Then, packets are decapsulated and sent to the Stub Network.

This implementation is not a routeing daemon. It just provides sa46t tunnel interface. Therefore you have to set up some routing entity. e.g. configure static route to sa46t interface and redistribute static in router ospf with quagga.

SA46T configuration of above topology is shown below.

SA46T1

 % ./sa46t
 
  usage:
         sa46t -s [SA46T PREFIX] -p [PLANE ID(HEX)] -d
  
  Option:
         -s : SA46T Address Prefix(/64).
         -p : Specify SA46T Plane ID with 32bit HEX.
         -d : Run as a Daemon.
	 
 # Create sa46t tunnel interface with plane ID 9
 % sudo ./sa46t -s 2001:db8:1:1:: -p 9 -d
 % ifconfig sa46t
 sa46t     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
           UP POINTOPOINT RUNNING  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:500 
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 %
      
 # Set IPv4 default route via dev sa46t9, 
 % sudo ip route add to 0.0.0.0/0 dev sa46t9
 % sudo ip -6 route add to 2001:db8:1:1:0:9:a00:0/120 dev sa46t9
      
 # Or, if you don't want to set default route, use this command shown below,
 % sudo ip route add dev sa46t9 table 10
 % sudo ip rule add from 10.0.0.0/24 table 10 pref 10
  
 # Redistribute 2001:db8:1:1:0:9:a00:0/120 to Backbone Network using any routing daemonds.

SA46T2

 % sudo ./sa46t -s 2001:db8:1:1:: -p 9 -d
 % ifconfig sa46t
 sa46t     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
           UP POINTOPOINT RUNNING  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:500 
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 %
 % sudo ip route add to 10.0.0.0/24 dev sa46t9
 % sudo ip -6 route add to 2001:db8:1:1:0:9::/96 dev sa46t9
  
 # Redistribute 10.0.0.0/24 to IPv4 Network
 # and 2001:db8:1:1:0:9::/96 to Backbone Network using any routing daemons.

ToDo

  • Multiple Plane ID Support
  • Loading Configuration from config file
  • Enable SA46T to be use through vyatta(?)
  • Running on *BSD

sa46t's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.