½ÌÓýÍøÈçºÎÔÚLinuxÏÂÓÃIPv6¿´IPTV
2008-12-15 ÐÇÆÚÒ» ÇçÀÊ
×òÌìÍíÉϻƺ½ÔÚQȺÉϸæÖªÎÒÃÇÖÐÑëÈýÓиö½ÚÄ¿½Ð¸èÉùƯ¹ýÈýÊ®ÄêµÄ´óÐÍÒôÀÖ½ÚÄ¿¡£ÍƼöÎÒÃÇÈ¥¿´£¬½á¹û·¢ÏÖÊÇÐèҪʹÓÃIPv6²ÅÄܹ»¹Û¿´¡£¶øÏÖÔںܶàIPTVÁ÷ýÌå²¥·ÅÆ÷ÏëPPLive»ò»ª¹¤×Ô²úµÄbanacast¶¼²»Ö§³ÖIPv6¡£ËùÒÔÎÒÃǼ´Ê¹Ïë¿´¶¼¿´²»ÁË¡£Ìýׯƺ½Êö˵½ÚÄ¿£¬ÎÒÃÇÖ»Óаµ×ÔYYµÄ·Ý¡£
»¹ºÃÕâ¸ö½ÚÄ¿ÊÇÁ¬Ðø²¥·Å¼¸ÌìµÄ£¬×òÌì²¥·Åµ½80Äê´ú£¬½ñÌìÓ¦¸ÃÊǵ½90Äê´ú¡£¸Ï½ôÀס»Æº½£¬½ÐËû°ïÎÒÅä¸öIPv6¡£¸Õ¸ÕÖÕÓڸ㶨¡£¿´×ÅÇåÎúµÉöPTV£¬ÄÇÖָоõÔõÒ»¸öˬ×ÖÁ˵á£
ÏÖÔÚ×ܽáÒ»¸öϽÌÓýÍøÓû§ÔÚLinuxÏÂÈçºÎʹÓÃIPv6¿´IPTV£¬ÌرðÊʺϻª¹¤µÄͬѧ£¬ÒòΪÎÒÃÇÍíÉÏ12µã¾Í¡°¶ÏÍø¡±ÁË¡£Êµ¼ÊÉÏÊÇIPv4µÄ±»Ñ§Ð£Â·ÓɸøÀ¹½ØÁË£¬ÕâʹµÃIPv6ÊÆÔÚ±ØÐС£
ÔÚËÞÉáʹÓ÷ÓɵÄͬѧҪ½«Â·ÓÉÆ÷°Îµô£¬Ö±½Ó½«±¾»úÍø¿ÚÁ¬½Óµ½Ñ§Ð£¿ª·Å¸øÄãµÄRJ45¶Ë¿Ú¡£ÕâÊÇÒòΪÎÒÃÇËÞÉáʹÓõÄ·ÓÉÆ÷Ò»°ã¶¼ÊDz»Ö§³ÖIPv6µÄ¡£µ±È»ÕâÒâζ×ÅÖ»ÄÜÓÐÒ»¸öÈËÓã¬Ã»°ì·¨¡£
È»ºó½«±¾»úIPºÍÍø¹ØµÈÓÐ192˽ÓÐÍø¶Î°´Ñ§Ð£·ÖÅ䏸ÄãµÉöPµØÖ·Ð޸ĻØÀ´£º
forrest@Forrest:/etc$ sudo vim network/interfaces
# This file describes the network interfaces available on yoursystem
# and how to activate them. For more information, seeinterfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address222.201.190.240
netmask255.255.255.0
network222.201.190.0
broadcast222.201.190.255
gateway222.201.190.254
# dns-*options are implemented by the resolvconf package, ifinstalled
dns-nameservers 222.201.130.30
È»ºóÒªÖØÆôÍø¿¨Ê¹ÅäÖÃÉúЧ£º
forrest@Forrest:/etc$ sudo /etc/init.d/networking restart
* Reconfiguring networkinterfaces...[ OK ]
½ÓÏÂÀ´ÓÃifconfig²é¿´ÊÇ·ñÄÚºËÒѾ°²×°ÁËIPv6ÐÒéÕ»£¬²¢ÇÒÊÇ·ñÒѾÅäÖúÃIPv6µØÖ·£º
forrest@Forrest:/etc$ ifconfig
eth0Link encap:Ethernet HWaddr00:15:f2:5d:23:fc
inet addr:222.201.190.240Bcast:222.201.190.255 Mask:255.255.255.0
inet6 addr:2001:250:3000:3ca0:215:f2ff:fe5d:23fc/64Scope:Global
inet6 addr: fe80::215:f2ff:fe5d:23fc/64 Scope
ink
UP BROADCAST RUNNING MULTICASTMTU:1500 Metric:1
RX packets:93922 errors:0 dropped:0 overruns:0 frame:0
TX packets:277 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5998150 (5.9 MB) TX bytes:50544 (50.5KB)
Interrupt:21 Base address:0x2000
loLink encap
ocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame:0
TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5300 (5.3 KB) TX bytes:5300 (5.3KB)
¿ÉÒÔ¿´µ½ÎÒµÄϵͳÒѾ°²×°ÁËIPv6ÐÒéÕ»²¢ÇÒÒѾ×Ô¶¯»ñÈ¡ÁËÒ»¸öIPv6µØÖ·£¬ËùÒÔ½ÓÏÂÀ´¾Í¿ÉÒÔÖ±½Ó²âÊÔÒÔϸÃIPv6ÐÒéÕ»ºÍµØÖ·ÊÇ·ñ¿ÉÓãº
ÕâÑùÖ®ºó¾Í¿ÉÒÔÓÃping6²âÊÔÊÇ·ñÒѾÅäÖóɹ¦£º
forrest@Forrest:/etc$ ping6ipv6.google
PING ipv6.google(2001:4860:c003::68) 56 data bytes
64 bytes from 2001:4860:c003::68: icmp_seq=2 ttl=52 time=98.4ms
64 bytes from 2001:4860:c003::68: icmp_seq=3 ttl=52 time=97.5ms
64 bytes from 2001:4860:c003::68: icmp_seq=4 ttl=52 time=97.3ms
64 bytes from 2001:4860:c003::68: icmp_seq=5 ttl=52 time=97.9ms
64 bytes from 2001:4860:c003::68: icmp_seq=6 ttl=52 time=97.8ms
64 bytes from 2001:4860:c003::68: icmp_seq=7 ttl=52 time=97.7ms
64 bytes from 2001:4860:c003::68: icmp_seq=8 ttl=52 time=97.4ms
64 bytes from 2001:4860:c003::68: icmp_seq=9 ttl=52 time=97.7ms
^V64 bytes from 2001:4860:c003::68: icmp_seq=10 ttl=52 time=98.1ms
^C
--- ipv6.google ping statistics ---
10 packets transmitted, 9 received, 10% packet loss, time9046ms
rtt min/avg/max/mdev = 97.373/97.801/98.415/0.347 ms
¿´µ½ÈçÏÂÊä³ö£¬ÄÇô¹§Ï²Ä㣬ÄãÏÖÔÚÒѾ¿ÉÒԳɹ¦µØÒÔIPv6ÐÒéÕ»·¢ËÍIPv6°ü¸øÖ§³ÖIPv6µÄÍøÕ¾ÁË¡£
ÒòΪÎÒµÄϵͳÊÇUbuntu8.10°æ±¾£¬ËùÒÔÎÒ»³ÒÉÊÇϵͳ°ïÎÒ×Ô¶¯°²×°ÁËIPv6ÐÒéÕ»ºÍÅäÖÃÁËIPv6µØÖ·£¬Èç¹ûÄãÓÃifconfig¿´²»µ½IPv6ÐÅÏ¢£¬ÄÇô°´ÏÂÃæµÄ×ö·¨×ßÒ»±é£º
ÒÔÏÂÄÚÈÝÕª×ÔÕâÆªÎÄÕ£ºabm..www.ipv6.scut.edu.cn/config/linux.html
Ê×ÏÈΪLinuxÌí¼Óipv6Ä£¿é£º
#insmod ipv6
Ìí¼Ó³É¹¦ºó£¬¿ÉÒÔÓÃlsmod²é¿´µ½ÓÐipv6Ä£¿é¡£
¸øÍø¿¨Ìí¼ÓµØÖ·£¬ÀýÈçeth0£º
# ifconfig eth0 add 2001:250:1800:1::88/64
¾ßÌ嵨ַÇëÏòÍø¹Ü×Éѯ»ñµÃ¡£
ÕâÑùÖ®ºó¾Í¿ÉÒÔÓÃping6²âÊÔÊÇ·ñÒѾÅäÖóɹ¦£º
forrest@Forrest:/etc$ ping6ipv6.google
PING ipv6.google(2001:4860:c003::68) 56 data bytes
64 bytes from 2001:4860:c003::68: icmp_seq=2 ttl=52 time=98.4ms
64 bytes from 2001:4860:c003::68: icmp_seq=3 ttl=52 time=97.5ms
64 bytes from 2001:4860:c003::68: icmp_seq=4 ttl=52 time=97.3ms
64 bytes from 2001:4860:c003::68: icmp_seq=5 ttl=52 time=97.9ms
64 bytes from 2001:4860:c003::68: icmp_seq=6 ttl=52 time=97.8ms
64 bytes from 2001:4860:c003::68: icmp_seq=7 ttl=52 time=97.7ms
64 bytes from 2001:4860:c003::68: icmp_seq=8 ttl=52 time=97.4ms
64 bytes from 2001:4860:c003::68: icmp_seq=9 ttl=52 time=97.7ms
^V64 bytes from 2001:4860:c003::68: icmp_seq=10 ttl=52 time=98.1ms
^C
--- ipv6.google ping statistics ---
10 packets transmitted, 9 received, 10% packet loss, time9046ms
rtt min/avg/max/mdev = 97.373/97.801/98.415/0.347 ms
¿´µ½ÈçÏÂÊä³ö£¬ÄÇô¹§Ï²Ä㣬ÄãÏÖÔÚÒѾ¿ÉÒԳɹ¦µØÒÔIPv6ÐÒéÕ»·¢ËÍIPv6°ü¸øÖ§³ÖIPv6µÄÍøÕ¾ÁË¡£
ÓÃifconfig²é¿´Íø¿¨µÄÅäÖãº
forrest@Forrest:/etc$ ifconfig
eth0Link encap:Ethernet HWaddr00:15:f2:5d:23:fc
inet addr:222.201.190.240Bcast:222.201.190.255 Mask:255.255.255.0
inet6 addr: 2001:250:3000:3ca0:215:f2ff:fe5d:23fc/64Scope:Global