freebsd setup environment and test sop - tida

Upload: jchuang1977

Post on 18-Oct-2015

127 views

Category:

Documents


0 download

TRANSCRIPT

PowerPoint Template

Jan. 2012FreeBSD setup environment andIPv6 IOT test SOPTida 2012/3/25

# Confidential Material for Internal Use Only1AgendaFreeBSDFreeBSD

# Confidential Material for Internal Use Only2Acronym / Abbreviation ODM:Original Design ManufacturingJDM: Joint Design ManufacturingOEM: Original Equipment Manufacturing

Looking at company positioning, WNC is striving to become a leading company in the communications field. The primary business model that WNC follows is end-to-end ODM, JDM and OEM services focusing on Broadband, Multimedia and Wireless products and development of a full range of short, medium and long distance communications products.

ODMJDMOEMbusiness modelFreeBSD

FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called "UNIX",[1] as the direct descendant of BSD UNIX (many of whose original developers became FreeBSD developers), FreeBSD's internals and system APIs are UNIX-compliant. Thanks to its permissive licensing terms, much of FreeBSDs code base has become an integral part of other operating systems such as Apple's OS X that have subsequently been certified as UNIX-compliant and have formally received UNIX branding.[2] With the exception of the proprietary OS X, FreeBSD is the most widely used BSD-derived operating system in terms of number of installed computers, and is the most widely used freely licensed, open-source BSD distribution, accounting for more than three-quarters of all installed systems running free, open-source BSD derivatives.[3]Characterised in 2005 as "the unknown giant among free operating systems"[2], FreeBSD is a complete operating system. The kernel, device drivers, and all of the userland utilities, such as the shell, are held in the same source code revision tracking tree. (This is in contrast to Linux distributions, for which the kernel, userland utilities, and applications are developed separately, and then packaged together in various ways by others). Third-party application software may be installed using various software installation systems, the two most common being source installation and package installation, both of which use the FreeBSD Ports system.

# Confidential Material for Internal Use Only3FreeBSDUnixBSD386BSD4.4BSDUnixFreeBSD200FreeBSDUnixUnixPOSIXFreeBSDFreeBSDUserlandShellSubversionCVSLinuxGNULinuxFreeBSDPC-BSD

FreeBSD

FreeBSDGNUGNUISCCDDLBeerwareBSDbinary blobAtherosFreeBSDFreeBSDBSDGPLGPL

# Confidential Material for Internal Use Only4AgendaFreeBSDFreeBSD

# Confidential Material for Internal Use Only5Acronym / Abbreviation ODM:Original Design ManufacturingJDM: Joint Design ManufacturingOEM: Original Equipment Manufacturing

Looking at company positioning, WNC is striving to become a leading company in the communications field. The primary business model that WNC follows is end-to-end ODM, JDM and OEM services focusing on Broadband, Multimedia and Wireless products and development of a full range of short, medium and long distance communications products.

ODMJDMOEMbusiness modelFreeBSD

Step1.

Step2. Install# Confidential Material for Internal Use Only61. FreeBSD

Step3. - keymap selection NOStep4.- Hostname

# Confidential Material for Internal Use Only71. FreeBSD

Step5. -distribution select ()Step6.- partitioning

# Confidential Material for Internal Use Only81. FreeBSD

Step7. - partition editor HD OSStep8.- partitioning editor

# Confidential Material for Internal Use Only91. FreeBSD

Step9. - partition editor HD AutoOSStep10.- partitioning entire disk

# Confidential Material for Internal Use Only101. FreeBSD

Step11. - partition editor finishStep12. - confirmation commit

# Confidential Material for Internal Use Only111. FreeBSD

Step13. - ()Step14. - Network configuration , em0 inter PRO/1000 network connection 7.2.3

# Confidential Material for Internal Use Only121. FreeBSD

Step15. - Local or UTC clock yesStep16. -

# Confidential Material for Internal Use Only131. FreeBSD

Step17. - Step18. -

# Confidential Material for Internal Use Only141. FreeBSD

Step19. - system configuration sshd , ntpd , powerdStep20. - dumpdev configuration NO

# Confidential Material for Internal Use Only151. FreeBSD

Step21. - add user accounts NOStep22. - final configuration exit

# Confidential Material for Internal Use Only161. FreeBSD

Step23. - manual configuration NOStep24. - complete reboot

# Confidential Material for Internal Use Only171. FreeBSD

Step25. - root command sysinstall LAN IP Step26. - sysinstall main menu configure

# Confidential Material for Internal Use Only181. FreeBSD

Step27. - root command sysinstall LAN IP Step28. - sysinstall main menu configure

# Confidential Material for Internal Use Only191. FreeBSD

Step29. - em0IPStep30. - Do you want to try IPv6 NO

# Confidential Material for Internal Use Only201. FreeBSD

Step30. - Do you want to try DHCP yes

# Confidential Material for Internal Use Only211. FreeBSD

Step29. -

# Confidential Material for Internal Use Only221. FreeBSD

Step30. Xorg # pkg_add r xorg

Step31. Gnome2 () # pkg_add r gnome2

Step32. : # echo exec gnome-session >~/.xinitrc

Step33. # vi /etc/re.conf gdm_enable=YES hald_enable=YES dbus_enable=YESvi i /ESCvi :wq

Step34. reboot# Confidential Material for Internal Use Only231. FreeBSD

Step35. ping

Step36. Perl-5.12.4

# cd /usr/ports/lang/perl5.12 # make # make install

Step37. Expect # cd /usr/ports/lang/p5-Expext # make # make install

Step38. Digest-MD5 # cd /usr/ports/security/p5-Digest-MD5 # make # make install

Step39. YAML # cd /usr/ports/textproc/p5-YAML # make # make install# Confidential Material for Internal Use Only241. FreeBSD

Step40. # tar zxvf v6eval-3.3.2.tar.gz

Step41 80386.nl/pub/v6eval.txt lib/Cm/CmMain.cc + , - cmd

:

-if((in=fopen("/etc/utmp","r"))==NULL) {return;}-u=myUtmpEnt(in,ux); fclose(in);-if(!u) {return;}+struct utmpx ul, *u;+const char *tty;++tty = ttyname(0);+if (tty == NULL)+tty = ttyname(1);+if (tty == NULL)+tty = ttyname(2);

+-

# Confidential Material for Internal Use Only251. FreeBSD

Step42. # cd v6eval-3.3.2

Step43. # make

Step44. # make install

Step45. Self test tool # tar vxfz Self_Test_5-0-0.tgz

Step46. vi /etc/devfs.rules

add path bpf0 user root group wheel mode 0660 unhideadd path bpf1 user root group wheel mode 0660 unhideadd path bpf2 user root group wheel mode 0660 unhideadd path bpf3 user root group wheel mode 0660 unhideadd path bpf4 user root group wheel mode 0660 unhideadd path bpf5 user root group wheel mode 0660 unhideadd path bpf6 user root group wheel mode 0660 unhideadd path bpf7 user root group wheel mode 0660 unhide

Step47. vi /usr/local/v6eval/etc/tn.def # filter ipv6 # Link rl0 00:00:00:00:01:00

# Confidential Material for Internal Use Only261. FreeBSD

Step48. # vi /usr/local.v6eval/etc/nut.def # system manual # TargetName abc # HostName abc # Type host # User root # Password v6eval # Link0 eth0 00:00:92:a7:6d:f5

Step 49. # vi ./config.pl 30

# Confidential Material for Internal Use Only27FreeBSD

Step50. # vi /urs/local/v6eval/etc/tn.def # Link0 emo 00:00:00:00:01:00 # Link1 rl1 00:00:00:00:01:01 ps. Link0LAN port , Link1WAN port

Step51. # vi /urs/local/v6eval/etc/nut.def # Link0 bdg1 IAD LAN port MAC # Link1 eth1 IAD WAN port MACPs. MAC: MAC 28:10:7B:30:B7:BD 2810:7Bff:fe30:B7BDff:fe~b.MAC21282 101000 21 , 101010 = 2a2a10:7Bff:fe30:B7BD

Step52. # vi /etc/rc.conf # ipv6_enable=NO # devfs_sys tem_ruleset=devfsrules_unhide_bpf

# Confidential Material for Internal Use Only28FreeBSD

Step53. DUT WEB UI WAN port

Step54. WEB UI LAN port

Step55. reboot DUT

# Confidential Material for Internal Use Only29AgendaFreeBSDFreeBSD

# Confidential Material for Internal Use Only30Acronym / Abbreviation ODM:Original Design ManufacturingJDM: Joint Design ManufacturingOEM: Original Equipment Manufacturing

Looking at company positioning, WNC is striving to become a leading company in the communications field. The primary business model that WNC follows is end-to-end ODM, JDM and OEM services focusing on Broadband, Multimedia and Wireless products and development of a full range of short, medium and long distance communications products.

ODMJDMOEMbusiness modelFreeBSD

Step1. WAN IP # ipconfig rl1 192.168.2.100 ping 192.168.2.100 and ping 192.168.0.1 telnet control DUT

Step2. # cd Self_Test_5-0-0 # make clean # make ipv6ready_p2_router

Step3. Spec # cd Self_Test_5-0-0/spec.p2 # make clean # make ipv6ready_p2_router

Step4. Spec17~24 # cd Self_Test_5-0-0/spec.p2 # make clean # make AROPT=-s 17 e 24 ipv6ready_p2_router

# Confidential Material for Internal Use Only31FreeBSD

Step5. Set static route of NUT manually as followingDUTcmd

Step6. cmd # route A inet6 add 3ffe:501:ffff:110::/64 gw fe80:0200:00ff:fe00:0100 dev eth0

Step7.Set static route of NUT manually as followingDUTcmd

Step8. cmd # route A inet6 del 3ffe:501:ffff:110::/64 gw fe80:0200:00ff:fe00:0100 dev eth0

# Confidential Material for Internal Use Only32FreeBSD

Step9. Set static route of NUT manually as followingDUTcmd

Step10. cmd # route A inet6 add default gw fe80:0200:00ff:fe00:0100 dev eth0

Step11.Set static route of NUT manually as followingDUTcmd

Step12. cmd # route A inet6 del default gw fe80:0200:00ff:fe00:0100 dev eth0

# Confidential Material for Internal Use Only33FreeBSD (WLDX) :killall firewalldkillall radvdkillall dhcp6skillall dnsmasqkillall havpkillall og3610_lte_watchdogkillall og3610_lte_daemonecho 1 > /proc/sys/net/ipv6/conf/bdg1/disable_ipv6 echo 0 > /proc/sys/net/ipv6/conf/bdg1/disable_ipv6 ip -6 addr add 3ffe:501:ffff:101:bef6:85ff:fe78:22b8/64 dev eth1ip -6 addr add 3ffe:501:ffff:100:bef6:85ff:fe76:400a/64 dev bdg1echo 1 > /proc/sys/net/ipv6/conf/all/forwardingecho 1 > /proc/sys/net/ipv6/conf/eth1/forwardingecho 1 > /proc/sys/net/ipv6/conf/bdg1/forwardingecho 2 > /proc/sys/net/ipv6/conf/all/dad_transmitsecho 2 > /proc/sys/net/ipv6/conf/eth1/dad_transmitsecho 2 > /proc/sys/net/ipv6/conf/bdg1/dad_transmitsecho 2 > /proc/sys/net/ipv6/conf/all/accept_dadecho 2 > /proc/sys/net/ipv6/conf/eth1/accept_dadecho 2 > /proc/sys/net/ipv6/conf/bdg1/accept_dadecho 1 > /proc/sys/net/ipv6/conf/all/optimistic_dadecho 1 > /proc/sys/net/ipv6/conf/eth1/optimistic_dadecho 1 > /proc/sys/net/ipv6/conf/bdg1/optimistic_dadecho 1 > /proc/sys/net/ipv6/conf/all/accept_redirectsecho 1 > /proc/sys/net/ipv6/conf/eth1/accept_redirectsecho 1 > /proc/sys/net/ipv6/conf/bdg1/accept_redirectsecho 0 > /proc/sys/net/ipv6/conf/eth1/accept_raip6tables -I INPUT -j ACCEPTip6tables -I FORWARD -j ACCEPTiptables -I INPUT -j ACCEPTiptables -I FORWARD -j ACCEPTip6tables -I OUTPUT -p UDP --dport 9303:9303 -j DROP# Confidential Material for Internal Use OnlyFreeBSD /var/radvd.conf :

interface bdg1{AdvSendAdvert on;MaxRtrAdvInterval 600;MinRtrAdvInterval 200;AdvDefaultPreference medium;#AdvDefaultLifetime 1800;AdvManagedFlag off;AdvOtherConfigFlag off;AdvLinkMTU 1500;AdvSourceLLAddress on;MinDelayBetweenRAs 3;AdvReachableTime 0;AdvRetransTimer 0;AdvCurHopLimit 64;prefix 3ffe:501:ffff:100::/64{AdvOnLink on;AdvAutonomous on;AdvRouterAddr off;AdvValidLifetime 2592000;AdvPreferredLifetime 604800;};};radvd -C /var/radvd.conf Confidential Material for Internal Use OnlyFreeBSD 3.

route -A inet6 add default gw fe80::200:ff:fe00:0100 dev bdg1route -A inet6 add default gw fe80::200:ff:fe00:a0a0 dev bdg1section 1 item 73: static route gw change to fe80::200:ff:fe00:a0a0section 2 item 13-20(17): ip6tables -I INPUT -p icmpv6 --icmpv6-type 135 -j DROP ip6tables -D INPUT -p icmpv6 --icmpv6-type 135 -j DROPsection 2 item 40-46(42): ip6tables -I INPUT -p icmpv6 --icmpv6-type 136 -j DROP ip6tables -D INPUT -p icmpv6 --icmpv6-type 136 -j DROPsection 2 item 115-120: do not running radvdsection 2 item 128-129: M & O flag set to "off", AdvReachableTime & AdvRetransTimer set to "0"section 2 item 130: use default radvd.confsection 2 item 142-143: item 142 hoplimit "0"item 143 hoplimit "15"first run radvd and then add routesection 2 item 146: ip -6 addr add 3ffe:501:ffff:0:bef6:85ff:fe76:400a/64 dev bdg1 ip -6 addr add 3ffe:501:ffff::/64 dev bdg1section 2 item 150: route -A inet6 add 3ffe:501:ffff::/64 gw fe80::200:ff:fe00:a0a0 dev bdg1# Confidential Material for Internal Use OnlyFreeBSD section 3: echo 1 > /proc/sys/net/ipv6/conf/bdg1/disable_ipv6 echo 0 > /proc/sys/net/ipv6/conf/bdg1/disable_ipv6 ip -6 addr add 3ffe:501:ffff:101:bef6:85ff:fe78:22b8/64 dev eth1ip -6 addr add 3ffe:501:ffff:100:bef6:85ff:fe76:400a/64 dev bdg1echo 1 > /proc/sys/net/ipv6/conf/all/forwardingecho 1 > /proc/sys/net/ipv6/conf/eth1/forwardingecho 1 > /proc/sys/net/ipv6/conf/bdg1/forwardingecho 2 > /proc/sys/net/ipv6/conf/all/dad_transmitsecho 2 > /proc/sys/net/ipv6/conf/eth1/dad_transmitsecho 2 > /proc/sys/net/ipv6/conf/bdg1/dad_transmitsecho 2 > /proc/sys/net/ipv6/conf/all/accept_dadecho 2 > /proc/sys/net/ipv6/conf/eth1/accept_dadecho 2 > /proc/sys/net/ipv6/conf/bdg1/accept_dadecho 1 > /proc/sys/net/ipv6/conf/all/optimistic_dadecho 1 > /proc/sys/net/ipv6/conf/eth1/optimistic_dadecho 1 > /proc/sys/net/ipv6/conf/bdg1/optimistic_dadecho 1 > /proc/sys/net/ipv6/conf/all/accept_redirectsecho 1 > /proc/sys/net/ipv6/conf/eth1/accept_redirectsecho 1 > /proc/sys/net/ipv6/conf/bdg1/accept_redirectsecho 0 > /proc/sys/net/ipv6/conf/eth1/accept_rasection 3 item 11: ip6tables -I INPUT -s :: -p icmpv6 --icmpv6-type 135 -j DROP ip6tables -D INPUT -s :: -p icmpv6 --icmpv6-type 135 -j DROPsection 3 item 19: ip6tables -I INPUT -d ff02::1 -p icmpv6 --icmpv6-type 136 -j DROP ip6tables -D INPUT -d ff02::1 -p icmpv6 --icmpv6-type 136 -j DROPsection 3 item 28: ip -6 addr add 8000::bef6:85ff:fe76:400a/64 dev bdg1section 3 item 29: ip -6 addr add fec0::bef6:85ff:fe76:400a/64 dev bdg1section 4: route -A inet6 add default gw fe80::0200:00ff:fe00:0100 dev bdg1section 5: route -A inet6 add default gw fe80::0200:00ff:fe00:0100 dev bdg1section 5 item 9: ip -6 addr add fec0::bef6:85ff:fe76:400a/64 dev bdg1

# Confidential Material for Internal Use Only

# Confidential Material for Internal Use Only38