Está en la página 1de 6

BI THC HNH CHNG 2 : THC HNH KCH HOT IPV6 TRN HH WINDOW, LINUX.

CU HNH KT NI
Hin nay, hu ht cc h iu hnh u h tr th tc IPv6: window, linux, BSD, Solaris, HP-UX. Trong bi thc hnh ny, chng ta s tin hnh mt s cu hnh v kt ni c bn trong cc my tnh s dng h iu hnh window 2003, linux.

Thc hnh
Mc tiu: Kch hot th tc TCP/IPv6 trn HH window, linux. Thc hin mt s thao tc cu
hnh kt ni.

Chun b: Mng thc hnh c thit lp nh hnh v sau. Bao gm mt my tnh ci HH


Window 2003 server, mt my tnh ci HH Linux Enterprise 3.0

Window 2003 server

Linux

`
IPv4: 203.119.9.15 IPv6: 2001:dc9::1 IPv4: 203.119.9.16 IPv6: 2001:dc9::2

Hnh 1: M hnh mng thc hnh bi 1

Tm tt:
Kch hot IPv6 protocol trn my tnh window 2003, linux, router Cisco Quan st mt s thng tin cu hnh. Thc tp mt s lnh: Gn a ch bng tay, kim tra kt ni bng a ch IPv6, xo a ch

Cc bc thc hin:
I. Trn my tnh ci HH window server 2003.
Mi lnh giao tip c thc hin trong ca s lnh : Chn Run, g CMD v nhn Enter. 1. Quan st cu hnh khi cha kch hot IPv6 protocol ipconfig Kt qu: ch c nhng thng tin lin quan IPv4 hin ln. 2. Kch hot th tc IPv6. netsh interface ipv6 install Ch : G c dng lnh trong ca s cmd. Lnh ny s tin hnh ci t IPv6 protocol trn HH window 2003 server. 3. Quan st li thng tin cu hnh Th tc IPv6 trn HH c kch hot cng vi mt s cu hnh mc nh. Chng ta s tin hnh quan st thng tin cu hnh, ghi li v xem mt s thng tin mc nh bng cc lnh sau: ipconfig (/all) Kt qu: Quan st thy thng tin v a ch IPv6. Ghi li a ch IPv6 xut ra mn hnh: a ch bt u bi tin t FE80 l a ch link-local c t ng cu hnh t a ch MAC ca card mng. Chng ta s tm hiu cch thc t ng to a ch ny trong phn sau. Thc hin cc lnh sau: netsh> interface ipv6> show interface # Hin th nhng giao din to nn bi IPv6 protocol show interface Local Area Connection # Hin th thng tin ca giao din vt l show interface "6to4 Pseudo-Interface" # Hin th thng tin ca giao din o dnh cho 6to4 tunnel show routes # Hin th tuyn c to mc nh. Khi IPv6 protocol c kch hot, HH window s t ng to nhiu giao din, trong c nhng giao din thc vt l (Local Area Connection) ca card mng, c nhng giao din o, v d "6to4 Pseudo-Interface" l giao din o c window t ng cu hnh cho cng ngh tunnel 6to4 nu card mng ca my c gn sn mt a ch IPv4 ton cu.

Mi giao din ny c nh danh bng mt s index duy nht. Ngi s dng c th dng lnh to thm nhng giao din khc. Ghi li mt s thng tin cu hnh sau:

Giao din to ra khi kch hot ipv6 protocol v cc index ca cc giao din Thng tin v giao din vt l - Local Area Connection a ch ipv6 trn giao din:

Giao din o dng cho 6to4 tunnel a ch ipv6 trn giao din a ch ipv6 ca gateway

Cc route c to mc nh Prefix Idx Gateway/Interface

4. Cu hnh bng tay a ch IPv6 cho giao din card mng Gn a ch IPv6 ton cu cho giao din card mng netsh>interface ipv6> add address Local Area Connection 2001:dc9::1 5. Kim tra li thng tin cu hnh ipconfig Local Area Connection ipconfig /all Bn s quan st thy trn giao din vt l, c thng tin v a ch IPv6 bn va gn bng tay. nh danh giao din ca a ch IPv6 c th t ng to t a ch MAC hoc nhn dy s ngu nhin. Khi kch hot IPv6 protocol trn HH Window, cch thc to a ch t ng bng cch nhn dy s ngu nhin lm nh danh giao din c mc nh kch hot. Nu mun tt chc nng ny, ta s dng lnh sau: netsh>interface ipv6> set privacy state=disabled store=persistent Khi cha tt chc nng trn, nu lc ny trong mng LAN c router qung b thng tin prefix, my tnh window ca bn s ng thi c ba a ch IPv6: a ch IPv6 gn bng tay a ch IPv6 t ng to t prefix qung b ca router v a ch MAC a ch IPv6 t prefix v 64 bt nh danh giao din ngu nhin, thay i theo khong thi gian nht nh.

II. Trn my tnh ci HH linux


6. Quan st cu hnh khi cha kch hot IPv6 protocol ifconfig Kt qu: ch c nhng thng tin lin quan IPv4 hin ln. 7. Kch hot th tc IPv6. modprobe ipv6 lsmod | grep -w 'ipv6' && echo "load thanh cong modul thuc thi ipv6 Nu kt qu lnh xut ra dng ch load thanh cong modul thuc thi ipv6, tc module thc thi IPv6 c load ln thnh cng. 8. Quan st li thng tin cu hnh ifconfig Bn s quan st thy thng tin v a ch IPv6 link-local t ng c to ra. HH linux khng t ng to giao din o cho tunnel 6to4 nh window. Ghi li a ch IPv6 link-local trn giao din card mng: Thc hin cc lnh: ifconfig eth0 ip -6 route show dev eth0 eth0 ip -6 neigh show dev eth0 # Hin th thng tin v cc node IPv6 ln cn # Hin th thng tin v giao din eth0 # Hin th thng tin v cc route to ra cho giao din

9. Cu hnh bng tay a ch IPv6 cho giao din card mng ifconfig eth0 inet6 add 2001:dc9::2/64 10. Kim tra li thng tin cu hnh ifconfig ifconfig eth0

III. Kim tra kt ni bng a ch IPv6 trong mng LAN


11. Quan st trao i thng tin gia hai my: Trn my tnh ci HH Linux, bt ring mt ca s lnh v s dng tcpdump theo di giao tip gia hai my: tcpdump -t -n -i eth0 -s 512 -vv ip6 or proto ipv6

12. Kim tra kt ni bng a ch link-local

Trn my window:

Ping6 -t a_ch_link-local_ca_my-window%index_ca_giao_din-vt_l Ping6 -t a_ch_link-local_ca_my-linux%index_ca_giao_din-vt_l Ch : Khi ping a ch link-local, phi xc nh ch mc ca giao din. Trong HH Window, ch mc c xc nh bng cch t sau du %

Trn my linux:

ping6 -I eth0 a_ch_link-local_ca_my-linux ping6 -I eth0 a_ch_link-local_ca_my-window Ch : Khi ping a ch link-local, phi xc nh giao din (bng c -I). 13. Kim tra kt ni bng a ch ton cu gn bng tay:

Trn my window:

Ping6 -t 2001:dc9::1 Ping6 -t 2001:dc9::2

Trn my linux:

Ping6 2001:dc9::2 Ping6 2001:dc9::1 Bng ca s quan st trao i gia hai my tnh tcpdump, bn c th quan st thy trao i thng tin gia hai my tnh.

IV. Xo a ch gn bng tay v g b IPv6 protocol.


14. Trn my window: Xo a ch gn bng tay: netsh>interface ipv6> delete address Local Area Connection 2001:dc9::1 G b IPv6 protocol uninstall 15. Trn my linux: Xo a ch gn bng tay: ifconfig eth0 inet6 del 2001:dc9::2

V. B sung
Modul thc thi IPv6 protocol trn HH Linux khng c t ng load ln khi my tnh khi ng. a ch IPv6 gn bng tay s b xa i sau khi my linux khi ng li. load modul thc thi IPv6 khi khi ng li my v a ch IPv6 gn bng tay khng b xa i mi khi khi ng li my, chng ta cn trc tip thm thng tin vo cc file cu hnh mng nh sau: 16. Cu hnh load IPv6 modul t ng Kim tra th vin script IPv6 tn ti: Kim tra c tn ti file /etc/sysconfig/network-scripts/network-functions-ipv6 Hoc test bng lnh: test -f /etc/sysconfig/network-scripts/network-functions-ipv6 && echo "C thu vien IPv6 script" Sa i file cu hnh mng Dng vi thm dng NETWORKING_IPV6=yes vo file /etc/sysconfig/network. 17. Cu hnh vnh vin a ch IPv6 Sa i file cu hnh giao din Dng vi sa i file /etc/sysconfig/network-scripts/ifcfg-eth0, thm nhng dng thng tin sau vo file: IPV6INIT=yes IPV6ADDR=<a_ch_IPv6>