emmoblin.github.com
分类: LINUX
2010-03-31 10:52:37
参考: 以及测试套件中的README,INSTALL.*** 文件 TAHI是一组专门针对IPv6的测试套件,系统通过这个测试套件的测试后,就可以申请IPv6 Ready Logo Phase-2 和 IPv6 Ready Logo Phase-1。 该测试套件是经常更新的,如果想通过该测试申请以上说的两个logo,就必须用最新版的测试套件,可以去下载。 本文将会介绍如何如何搭建测试环境,以及如何配置测试机和被测试机。文章中涉及到的套件版本如下: v6eval-3.1.0 ct-2.1.1 Self_Test_4-0-5 在正式介绍之前,先说明两个概念: TN :Tester Node A tester node for the conformance tests.即测试机 NUT:Node Under Test (NUT) A testee node for the conformance tests.即被测机 1.在测试机上安装FreeBSD系统 该套测试套件只能运行在FreeBSD系统上,且必须是6.3或更高版本的FreeBSD。 被测机可以是各种Unix,linux系统,本文一linux系统为例。windows系统不知道能不能测,没试过,也没看到相关介绍。 至 于如何安装FreeBSD,在此不在多说,网上有很多相关文档。不过要记得把编译环境和apache2装上,因为安装测试套件时需要编译,而测试完成后, 看结果是通过web页面看得,安装一个apache会比较方便。在FreeBSD上安装apache的方法和注意事项在前一篇文章中有介绍。 2.安装测试包 一共有三个包需要安装:v6eval-3.1.0 ,ct-2.1.1 ,Self_Test_4-0-5 1) v6eval-3.1.0 该包不提供测试脚本,他只是一个测试平台,是跑其他TAHI测试的前提,所以首先要安装它。 解包到任何一个目录: mkdir /usr/ipv6test cd /ust/ipv6test tar zxvf /root/v6eval-3.1.0.tar.gz 安装相关的perl模块: cd /usr/ports/lang/p5-Expect && make install cd /usr/ports/security/p5-Digest-MD5 && make install 安装v6eval: cd /usr/ipv6test/v6eval-3.1.0 make make install 执行完毕后,会在/usr/local/v6eval/下安装一系列文件和目录。 创建bpf特殊设备: vi /etc/rc.conf ---------------------------------------------------------------- devfs_system_ruleset="devfsrules_unhide_bpf" ---------------------------------------------------------------- vi /etc/devfs.rules ---------------------------------------------------------------- [devfsrules_unhide_bpf=1025] add path 'bpf*' user root group wheel mode 0660 unhide ---------------------------------------------------------------- vi /etc/group 执行测试的用户必须属于wheel组,如:wheel:*:0:root 配置串口(如果在后面nut.def的配置中选择manual,则不用管串口的配置,因为手动情况下不需要串口): touch /var/log/aculog chown uucp:dialer /var/log/aculog chmod 660 /var/log/aculog vi /etc/group 执行测试的用户必须属于dialer组,如:dialer:*:68:root 配置网络接口: vi /etc/rc.conf ---------------------------------------------------------------- ipv6_enable="NO" ---------------------------------------------------------------- 不知道这个地方为什么要设置为NO,系统默认是YES,我就默认是YES了。 保证至少一个网络接口启动,一般会是DHCP,如:ifconfig_em0="DHCP" # vi /etc/rc.conf ---------------------------------------------------------------- ifconfig_ ---------------------------------------------------------------- If NUT is a router, you need to specify also Link1. 2)ct-2.1.1 ct的安装非常简单。 cd /ust/ipv6test tar zxvf /root/ct-2.1.1.tar.gz cd ct-2.1.1 make install 此时系统会将ct安装到/usr/local/v6eval/下,我们需要将其拷贝到任意一个目录A下,在目录A中执行测试脚本。 cp -pR /usr/local/v6eval/ct /usr/ipv6test/ chmod -R +w /usr/ipv6test/ct 如果跑完一遍测试脚本,还想对另一个NUT进行测试,那么就需要从/usr/local/v6eval/ct再复制一份ct出来,这样做的目的是保证前一次的测试结果不会被覆盖。 3)Self_Test_4-0-5 不用安装,直接解包到任意目录即可 cd /ust/ipv6test tar zxvf /root/Self_Test_4-0-5.tgz 3.物理配置 NOTE:TN的IP地址可以是IPv4或IPv6的,NUT的IP地址必须是IPv6的。 TN和NUT网络连接图: Example: (If NUT is host implementation) Example if NUT is a host or a special device TN (tester) NUT (host or special device) Example if NUT is router TN (tester) NUT (router) 以上两个图分别是NUT为host和router的网络连接图。 TN和NUT串口连接: COM1 COM1 TN -------------------- NUT serial line 串口连接是为了TN能向NUT发送命令,已使NUT能自动完成某些工作,比如重启。如果在配置nut.def是选择手动,则不需要配置串口,NUT重启的工作也有人工完成。 4.配置文件 1)配置TN a. /etc/resolv.conf 建议删除该文件,以消除其他网络包对测试的影响。也可以不删除。 b.建议删除IPv4的默认路由,也可以不删。 c.配置/usr/local/v6eval/etc/tn.def Configuration is stored in files tn.def and nut.def stored in /usr/local/v6eval/etc/. There are provided sample files tn.def.sample and nut.def.sample in the directory. Empty lines and lines starting with '#' are comments. In tn.def, there are these settings: RemoteDevice Device to be used for remote control. If TN is FreeBSD 6.0-RELEASE or higher, RemoteDebug Specifies debug level for remote control. RemoteLog Specifies log level for remote control. RemoteSpeed Specifies interval that characters are sent at. RemoteLogout Enable/disable logout RemoteMethod Enable/disable remote command invocation. LinkX Specifies interface name and MAC address Link0 de0 00:00:00:00:01:00 (1): a link name. (2): the EXACT name of a Tester Interface. (3): a BOGUS ether source address of If NUT is a router, you need to specify also Link1. In nut.def, there are these settings: System Specifies system type of NUT. The Tool TargetName This entry will be displayed in test result file. HostName Specifies the name of NUT. Type Specifies NUT type. It can not be omitted. User Specifies the account name of NUT's super user. Password Specifies the password of NUT's super user. LinkX Specifies interface name and MAC address Link0 fxp0 00:00:00:00:01:00 (1): a link name. (2): the EXACT name of a Interface Under Test. (3): The EXACT MAC address of If NUT is a router, you need to configure also Link1. To automatize testing process, you also need remotes. These are special scripts which make work you'd otherwise had to do manually. These remotes can also be downloaded from . However, these are no longer maintained. You can make own and place them into
/usr/local/v6eval/bin/linux-v6.
Then, go to the /usr/local/lib/perl5/site-perl/"version" and edit file
V6evalRemote.pm. Find blocks of commented lines and uncomment all lines
with linux-v6. Take care that uncommented lines are not out of
brackets.
|