免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2758 | 回复: 0
打印 上一主题 下一主题

FreeBSD Configure IPv6 Networking / Static IP Addr [复制链接]

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-07 09:34 |只看该作者 |倒序浏览

Q.How do I configure
IPv6
networking under
FreeBSD
7.x server? How do I assign IPv6 IP address using command line utility?
A.IPv6 (IP next generation) can be easily configured under FreeBSD 7.x or 6.x. You need to know:
a) Adefault router IPv6address such as 2001:470:1e04:5ea::1
b)128 bit IPv6 IPsuch as 2001:470:1e04:5ea::10
FreeBSD IPv6 Network Configuration
Open /etc/rc.conf file, enter:
# vi /etc/rc.conf
WARNING!Following configuration requires that the
kernel
has been compiled with options INET6 (which is default in FreeBSD 6.x and 7.x)
Append following configurations:
ipv6_enable="YES"
ipv6_ifconfig_fxp0="2001:470:1e04:5ea::10"
ipv6_defaultrouter="2001:470:1e04:5ea::1"
Where,

  • ipv6_enable="YES": Turn on IPv6 networking support.
  • ipv6_ifconfig_fxp0="2001:470:1e04:5ea::10": Assign an IP address
  • ipv6_defaultrouter="2001:470:1e04:5ea::1": assign a default router

Save and close the file. Restart networking, enter:
# /etc/rc.d/netif restart && /etc/rc.d/routing restart
To view newly assigned IP address, enter:
# ifconfig
# ifconfig | grep inet6
How do I test my FreeBSD IPv6 networking connectivity?
Simply use ping6 or traceroute6 commands, enter:
$ ping6 ipv6.google.com
Try traceroute6 command, enter
$ traceroute6 ipv6.google.com
1?: [LOCALHOST]                      pmtu 1280
1:  2001:5c0:8fff:fffe::a68c                 312.051ms
2:  no reply
3:  if-5-0-1.6bb1.mtt-montreal.ipv6.teleglobe.net 388.794ms
4:  if-3-0.mcore3.mtt-montreal.ipv6.teleglobe.net asymm  5 345.947ms
5:  if-13-0.mcore4.nqt-newyork.ipv6.teleglobe.net asymm  6 364.053ms
6:  2001:5a0:400:200::1                      asymm  7 387.877ms
7:  2001:5a0:400:200::6                      381.125ms
8:  2001:5a0:600:100::5                      asymm  6 357.572ms
9:  2001:5a0:600::5                          asymm  7 363.006ms
10:  pr61.iad07.net.google.com                asymm  9 386.211ms !A
     Resume: pmtu 1280
Try host command to obtian both IPv6 and IPv6 address, enter:
$ host www.kame.net
Sample output:
www.kame.net has address 203.178.141.194
www.kame.net has IPv6 address2001:200:0:8002:203:47ff:fea5:3085
Finally, you can always visit
www.kame.net
and see dancing kame to confirm IPv6. You can also try
IPv6 Google search
.
How do I assign IP address using command line ifconfig utility?
Use ifconfig command as follows to assign an IP address:
# ifconfig {interface-name} inet6 {IPv6-Address} prefixlen {routed-bit}
# ifconfig le0 inet6 001:470:1e04:5ea::10 prefixlen 64
To add a default router, enter:
# route -n add -inet6 default {IPv6-Router-IP}
# route -n add -inet6 default 2001:470:1e04:5ea::1
Further readings:


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_1385714.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP