Giter Site home page Giter Site logo

tiny-map-e's Introduction

This implementation is based on draft-ietf-softwire-map-04.

Common Rule:
	IPv6 rule prefix	= 2001:db8:0000::/40
	IPv4 rule prefix	= 192.0.2.0/24
	BR address		= 2001:db8:ffff::1
	EA bits length		= 16

1) BR side setup

1-1) Start map-e daemon
	map-e -6 2001:db8:0000::/40 -4 192.0.2.0/24 -b 2001:db8:ffff::1 -l 16 -m br

1-2) Routing CE destined IPv4 packets to map-e interface
	ip route add 192.0.2.0/24 dev map-e

1-3) Routing BR destined IPv6 packets to map-e interface
	ip route add 2001:db8:ffff::1/128 dev map-e

1-4) DO NOT add BR address to map-e interface
	* Linux kernel(at least 2.6.32) regards IPv6 packet with next header IPIP(0x04)
	  as invaild packet...

2) CE side setup
	IPv4 suffix length	= 32 - 24(IPv4 rule prefix length) = 8
	PSID length		= 16(EA bits length) - 8(IPv4 suffix length) = 8
	EA bits			= 0x1234
	IPv4 suffix 		= 0x12(Top 8bits of EA bits)
	PSID			= 0x34(Bottom 8bits of EA bits)
	PSID offset		= 4bits(fixed in this implementation)

	Assigned CE prefix	= 192.0.2.18/32 + Port Set(0x34)
	CE IPv6 address		= 2001:db8:0012:3400:0000:c000:0212:0034

2-1) Start map-e daemon
	map-e -6 2001:db8:0000::/40 -4 192.0.2.0/24 -b 2001:db8:ffff::1 -l 16 -e 0x1234 -m ce

2-2) Routing IPv4 packets default to map-e interface
	ip route add 0.0.0.0/0 dev map-e
	(All packets routed to map-e interface will be NATed to assigned IPv4 prefix and port set)

2-3) Routing CE destined IPv6 packets to map-e interface
	ip route add 2001:db8:12:3400:0:c000:212:34/128 dev map-e

2-4) DO NOT add CE address to map-e interface
	* for the same reason 1-4)

tiny-map-e's People

Contributors

edenden avatar autobakterie avatar

Stargazers

 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.