文档章节

Linux 6RD HOWTO

xxjbs001
 xxjbs001
发布于 2013/12/13 16:38
字数 843
阅读 71
收藏 0
6rd

Linux 6RD HOWTO

© 2010-2011 Nathan Lutchansky, All Rights Reserved

Last modified: 2011-01-23

Introduction

This document describes how to install extremely basic 6RD support on Linux with an emphasis on Ubuntu 10.04. Network interface and routing setup must be done by hand: don't try this if you're not intimately familiar with manually configuring IPv6. These instructions are not for IPv6 or Linux novices!

What is 6RD?

IPv6 Rapid Deployment on IPv4 Infrastructures, or 6RD for short, is an automatic tunneling mechanism recently standardized by the IETF which allows ISPs to easily deploy IPv6 as an overlay on an existing IPv4 network. Using the ISP-assigned IPv4 address and a static set of configuration parameters received in the DHCPv4 6RD option, home routers can assign IPv6 prefixes to LAN-side subnets and configure a default route through an IPv6-in-IPv4 tunnel to the ISP's 6RD border router.

This mechanism easily scales to a large number of customers as neither the ISP's 6RD border router nor DHCPv4 server require any per-customer configuration for 6RD.

What are the requirements to use 6RD?

First, your ISP must provide 6RD connectivity. As of this writing, only a handful of ISPs are deploying 6RD, the most prominent being Comcast who is deploying 6RD in a controlled trial.

Second, your home router must support 6RD. Most don't. If you have a standalone wireless router such as those made by Linksys, D-Link, etc, then try searching Google to see if your router supports 6RD.

If you use a standard Linux system as your home router, it must have kernel version 2.6.33 or later with the CONFIG_IPV6_SIT_6RD option enabled, and iproute2 2.6.33 (sometimes known as ss100224) or later.

To check if your kernel supports 6RD, run:

$ grep 6RD /boot/config-$(uname -r)
CONFIG_IPV6_SIT_6RD=y
$

If grep returns CONFIG_IPV6_SIT_6RD=y, then your kernel supports 6RD. Otherwise, if you get no result or "CONFIG_IPV6_SIT_6RD is not set", then your kernel does not support 6RD.

To check if iproute2 supports 6RD, run:

$ ip tunnel help
Usage: ip tunnel { add | change | del | show | prl | 6rd } [ NAME ]
          [ mode { ipip | gre | sit | isatap } ] [ remote ADDR ] [ local ADDR ]
...

Your iproute2 supports 6RD if 6rd is shown on the first line.

If you're running Ubuntu 10.04 (Lucid), your kernel and iproute2 are too old, so you'll need to install the versions for Maverick that have been backported to Lucid. The Maverick kernel is available as an optional package from the official Lucid updates repository, and the Maverick iproute2 can be installed from my iproute ppa.

Installation of these packages can be done as follows:

# add-apt-repository ppa:nathan-launchpad/iproute-lucid-ppa
# apt-get update
# apt-get install iproute linux-headers-generic-lts-backport-maverick linux-image-generic-lts-backport-maverick

Running add-apt-repository may prompt you to install python-software-properties, which you will then need to do before continuing. After the new packages are installed, you will need to reboot the system, of course, to start using the new kernel.

How do I enable 6RD?

If you're using a standalone router device that supports 6RD, it's quite possible that you're already using 6RD! After all, the whole idea behind 6RD is that it can be configured and enabled with no input from the end user. Check our front page to see if you've connected to this web server with IPv6. If not, you'll need to contact your ISP or seek help elsewhere.

To enable 6RD on a standard Linux system, you'll first need to obtain your ISP's 6RD parameters. (Comcast users can obtain this information from the Comcast 6RD page.) You will need the 6RD prefix and the IPv4 address of the 6RD border router. If your ISP does not provide these to you directly, you'll need to modify your DHCP client to display the contents of the 6RD DHCP option, as follows:

[TBD - insert directions to install this dhclient script]

Once you have the 6RD parameters, you can determine your delegated prefix. This is the IPv6 address block you will be using for your local network.

The delegated prefix is constructed by appending your ISP-assigned IPv4 address to the 6RD prefix. For example, if your 6RD prefix is 2001:db8::/32, your ISP-assigned IPv4 address is 192.0.2.100, and your home network is connected to your router on interface eth0, you would configure your LAN address as follows:

# printf "%02x%02x:%02x%02x\n" 192 0 2 100
c000:0264
# ip addr add 2001:db8:c000:0264::1/64 dev eth0
#

Next, you will need to bring up the 6RD tunnel interface. Assuming your ISP's 6RD border router is at 1.2.3.4:

# ip tunnel add 6rd mode sit local 192.0.2.100 ttl 64
# ip tunnel 6rd dev 6rd 6rd-prefix 2001:db8::/32
# ip addr add 2001:db8:c000:0264::1/32 dev 6rd # ip link set 6rd up
# ip route add ::/0 via ::1.2.3.4 dev 6rd #

That's it! Your border router should now be able to ping IPv6 addresses such as ipv6.google.com.

Now you may configure radvd, ip6tables, or any other IPv6-related settings that are necessary for your network.



本文转载自:

xxjbs001
粉丝 55
博文 749
码字总数 215621
作品 0
浦东
QA/测试工程师
私信 提问
Installing VMware Tools in Ubuntu

Installing VMware Tools in Ubuntu I've noticed that people are installing Linux distributions in virtual machines. Especially the virtualization products of VMware are popular. ......

长平狐
2013/01/06
123
0
《The One Page Linux Manual》的中文版

  对于初学者来说,Linux等开源技术的学习曲线比较“陡”。美国新泽西州立大学(The State University of New Jersey)的老师为了方便Linux入门课程讲授,将最常用的命令总结了一下,撰写一...

dbtrain
2018/06/26
0
0
【PDF分享】NCURSES-Programming-HOWTO-中文版.pdf

这是一份关于如何使用NCURSES 库编写程序的HOWTO 文档,文档来源是The Linux Documentation Project 的官方网站。这份文档详细的介绍了NCURSES 库的使用。同时也是一份NCURSES教程,可以是你...

红薯
2010/09/19
1K
7
The Linux GCC HOWTO中译版

http://www.lslnet.com/linux/books/howto/GCC-HOWTO.html

红薯
2009/01/29
457
1
linux包管理命令有哪些?(教程篇)

对于linux新手,看http://www.vpser.net/vps-howto和winscp 之后就是错综复杂的包管理命令了. aptitude有图文教程 站内有rpm,debian,apt-get,dpkg 感觉还是很混杂.想请熟悉的朋友各自发一段教...

seau
2014/04/10
178
0

没有更多内容

加载失败,请刷新页面

加载更多

Flutter移动端实战手册

该文章属于<简书 — 刘小壮>原创,转载请注明: <简书 — 刘小壮> https://www.jianshu.com/p/d27c1f5ee3ff iOS接入Flutter 在进行iOS和Flutter的混编时,iOS比Android的接入方式略复杂,但也...

刘小壮
13分钟前
0
0
测试环境项目一键部署

git项目测试环境一键部署脚本 #!/bash/sh pid=`ps -ef | grep 'user_demo.jar' | grep -v grep | awk '{print $2}'` kill -9 $pid #跳转到git clone下目录 cd /home/apple/userdemo/ #拉取最......

ccman996
16分钟前
0
0
应用框架(spring-boot参数配置与使用)

这很耳东先生
22分钟前
0
0
使用SecureCRT从windows上传文件到Linux

点击File,然后选择SFTP,打开SFTP,然后进行下列操作。 1.指定文件所在路径 lcd E:\ 2.查看当前windows文件所在路径 lpwd 3.指定linux下文件上传路径 cd /usr/local 4.查询当前linux文件上传...

大雁南飞了
25分钟前
1
0
前后端分离-前端搭建(Vue)(3)加入Element和axios

继续上篇博客的Vue刚刚搭建完 , https://my.oschina.net/u/4116654/blog/3064431 这次我们来把Element 和axios弄好 首先先安装Element 下载好了之后 在src目录下的main.js里去添加Element的...

咸鱼-李y
35分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部