¶à²¥¹ã²¥ÊÇÓÃÓÚ½¨Á¢·Ö²½Ê½ÏµÍ³£ºÀýÈçÍøÂçÓÎÏ·¡¢ICQ ÁÄÌì¹¹½¨¡¢Ô¶³ÌÊÓƵ»áÒéϵͳµÄÖØÒª¹¤¾ß¡£Ê¹Óöಥ¹ã²¥µÄ³ÌÐòºÍ UDP Ïòµ¥¸ö½éÉÜ·½·¢ËÍÐÅÏ¢µÄ³ÌÐòÏàËÆ¡£Çø±ðÔÚÓڶಥ¹ã²¥³ÌÐòʹÓÃÌØÊâµÄ¶à²¥ IP µØÖ·¡£
Ŀ¼
Ò»¡¢ÅäÖà Linux Ö§³Ö¶à²¥ IP
¶þ¡¢Ê¹Óà Linux ¶à²¥ IP ¹ã²¥Êý¾Ý
ÀýÈç±¾µØ¼ÆËã»úµÄµÄIPµØÖ·ÊÇ£º127.0.0.1 ¶þËüµÄ¶à²¥µØÖ·ÊÇ£º 224.0.0.1¡£ÕâÊÇÓÉ RCF 1390 ¶¨ÒåµÄ¡£Îª·¢ËÍ IP ¶à²¥Êý¾Ý£¬·¢ËÍÕßÐèҪȷ¶¨Ò»¸öºÏÊʵĶಥµØÖ·£¬Õâ¸öµØÖ·´ú±íÒ»¸ö×é¡£IPv4 ¶à²¥µØÖ·²ÉÓà D Àà IP µØÖ·È·¶¨¶à²¥µÄ×é¡£ÔÚ Internet ÖУ¬¶à²¥µØÖ··¶Î§ÊÇ´Ó 224.0.0.0 µ½ 234.255.255.255¡£ÆäÖбȽÏÖØÒªµÄµØÖ·ÓУº
¡¡¡¡224.0.0.1 £ Íø¶ÎÖÐËùÓÐÖ§³Ö¶à²¥µÄÖ÷»ú
¡¡¡¡224.0.0.2 £ Íø¶ÎÖÐËùÓÐÖ§³Ö¶à²¥µÄ·ÓÉÆ÷
¡¡¡¡224.0.0.4 £ Íø¶ÎÖÐËùÓÐµÄ DVMRP ·ÓÉÆ÷
¡¡¡¡224.0.0.5 £ ËùÓÐµÄ OSPF ·ÓÉÆ÷
¡¡¡¡224.0.0.6 £ ËùÓÐµÄ OSPF Ö¸ÅÉ·ÓÉÆ÷
¡¡¡¡224.0.0.9 £ ËùÓÐ RIPv2 ·ÓÉÆ÷
IPv6 µØÖ·¿Õ¼äÖÐÓÐ 1/256 µÄµØÖ·¿Õ¼ä·ÖÅä¸ø¶à²¥µØÖ·¡£Ò»¸öFF£¨11111111£©Öµ±êʶ¸ÃµØÖ·ÊǶಥµØÖ·¡£±êʶ¶Î¸ßÈýλʼÖÕÉèÖÃΪ 0 ²¢±£Áô¡£µÚËÄλT±êʶÉèÖÃΪ 0 ʱ±íʾһ¸öÓÀ¾Ã·ÖÅäµÄ¶à²¥µØÖ·¡£T ±êʶÉèÖÃΪ 1 ʱ£¬±íʾ·ÇÓÀ¾Ã·ÖÅäµÄ¶à²¥µØÖ·£¬ÕâÖÖµØÖ·×÷Ϊһ¸öÁÙʱµÄ¶à²¥µØÖ·¡£
Ò»¡¢ÅäÖà Linux Ö§³Ö¶à²¥ IP
ÔÚĬÈÏ״̬Ï£¬´ó¶à Linux ·¢Ðа汾¹Ø±ÕµÄ¶Ô¶à²¥ IP µÄÖ§³Ö¡£ÎªÁËÔÚ Linux ϵͳʹÓöಥÌ×½Ó¿Ú£¬ÐèÒª´ÓÐÂÅäÖúͱàÒë Linux Äںˡ£ÏÂÃæ¿´Ò»ÏÂÅäÖò½Ö裺
1.cd /usr/src/linux
2.make menuconfig
3.Ñ¡ÔñÍøÂçÑ¡Ïî
4.Ñ¡ÖÐ IP£ºEnable Multicasting IP Ò»Ïî
5.±£´æ²¢´Ó menuconfig Í˳ö
6.ÔËÐУºmake dep£»make clean£»make bzlmage
7.cp/vmlinuz/vdimLz_good
8.cparch/i386/boot/zImage/vmlinzz
9.cd/etc
10.±à¼ lilo£®conf£¬¼ÓÈëÕë¶Ô /vmlinuz_good µÄÄÚºËÐÂÑ¡Ïî
11.ÔËÐÐ li1o
Linux Äں˱àÒëºó£¬ÒÔ³¬¼¶Óû§Éí·ÝÔËÐÐÃüÁ
££router add -net 224.0.0.0 netmask 224.0.0.0 dev lo
ºËʵÃüÁîÊÇ·ñ¼ÓÈëϵͳ£¬ÔËÐÐÃüÁ
££route -eKernel IP routing table
Destination gatewary Genmask Flags MSS Window irtt Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
BASE_ADDRESS>MC * 240.0.0.0 U 0 0 0 lo
Default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
ÆäÖгöÏֶಥµØÖ·£º 224.0.0.1¡£¾Í±íʾÅäÖóɹ¦ÁË¡£
¶þ¡¢Ê¹Óà Linux ¶à²¥ IP¹ã²¥Êý¾Ý
1¡¢Ê×ÏÈÔÚ·þÎñÆ÷¶Ë½¨Á¢¶à²¥³ÌÐò£º
·þÎñÆ÷¶Ë³ÌÐò´úÂëºÍ½âÊÍ£º
/* * broadcast.c - An IP multicast server */ #include
2¡¢´´½¨ Linux ¿Í»§¶ËµÄ³ÌÐò¶à²¥ IP ¹ã²¥
½¨Á¢ºÅ¹ã²¥·þÎñÆ÷ºó£¬¾ÍÐèÒªÒ»¸ö¿Í»§¶ËµÄÊÕÌý³ÌÐò£¬ÊÕÌý¶à²¥ IP ¹ã²¥ÒªÇóÔÚ³ÌÐòÖÐ×÷ÒÔϼ¸Ï×÷£º
£¨1£©¡¢¶à²¥·½ÊÕÌý£¬¿Í»§¶Ë±àд֪ͨ Linux ÄÚºËÿ¸öÖ¸¶¨µÄÌ×½Ó¿Ú¼ÓÈë¶à²¥ IP ¹ã²¥×é¡£
£¨2£©¡¢ÊÕÌý·½±ØÐëÔËÐÐÔÚͬһ¸ö Linux ¼ÆËã»úµÄ²»Í¬½ø³ÌµÄͬһ¸öÌ×½Ó¿Ú¡£
£¨3£©¡¢±àдÅäÖõ¤½¿ÚÉ趨¹ã²¥ÐÅÏ¢¿ÉÒÔ·¢Ë͸øͬһ¸ö Linux Ö÷»ú£¬ÕâÑù×÷µÄÓô¦ÊÇÔÚͬһ¸ö Linux Ö÷»úÉϲâÊԹ㲥³ÌÐòºÍÊÕÌý³ÌÐò£¬Ò×ÓÚµ÷ÊÔ¡£
¿Í»§¶Ë³ÌÐò´úÂëºÍ½âÊÍ
/* * listen.c - An IP multicast client */ #include
3¡¢ÔËÐÐ Linux ¶à²¥ IP ³ÌÐò
ÔËÐгÌÐò£¬´ò¿ªÁ½¸öÖն˴°¿Ú²¢ÔÚÿ¸ö´°¿ÚÖÐÊäÈëÒÔÉϵÄÔ´´úÂë¡£ÔÚÒ»¸ö´°¿ÚÖмüÈë make£¬±àÒë broadcast ºÍ listen ÕâÁ½¸öµÄ¿ÉÖ´ÐÐÎļþ,ÓÉ GUN make ½¨Á¢Ò»¸ö Makfiles Îļþ¡£GUN make ÊÇ Linux ϵͳÖÐÒ»¸ö×Ô¶¯Éú³ÉºÍά»¤Ä¿±ê³ÌÐòµÄ¹¤¾ß¡£
ÔÚÒ»¸ö´°¿ÚÖÐͨ¹ýÖ´ÐÐ ./broadcast,ÔÚÁíÒ»¸öµÄ´°¿ÚÖ´ÐÐ ./listen£¬Æô¶¯ÊÕÌý³ÌÐò£¬ÄãÓ¦¸Ã¿´µ½ÈçÏÂÊä³ö£º
££./listenResponse #1 form sever :test from broadcast Response #2 form sever :test from broadcast Response #3 form sever :test from broadcast Response #4 form sever :test from broadcast Response #5 form sever :test from broadcast Response #6 form sever :test from broadcast Response #7 form sever :test from broadcast Response #8 form sever :test from broadcast #
4¡¢×ܽá
Linux ¶à²¥ IP ÊÇÒ»ÖÖͬʱÏò¼Û¸ñ½ø³Ì¸ßЧµÄ·¢ËÍÐÅÏ¢µÄ½éÉÜ¡£¶à²¥´«ÊäÖУ¬Êý¾Ý±»·¢Ë͵½½ÓÊÕÕߵĶಥµØÖ·£¬¶ø²»ÊÇÿ¸ö½ÓÊÕÕߵĵ¥²¥µØÖ·£¬·¢ËÍÕßÖ»·¢ËÍÒ»¸öÊý¾Ý¿½±´£¬Ô´¶Ëµ½Ä¿±ê¶Ë·¾¶ÉϵÄÖмä½Úµã¸´ÖƸÃÊý¾Ý¡£ÏÖÔڶಥ IP ÒѾ¹ã·ºÓ¦ÓÃÓÚÍøÂçÓÎÏ·¡¢ÊÓƵ¹ã²¥µÄÁìÓò¡£
657129880@qq.co ÓÚ 2013-04-21 18:12:34·¢±í:
лл·ÖÏí£¡£¡£¡
juyo ÓÚ 2005-12-22 09:02:35·¢±í:
ÊܽÌÁË
°®ÁãÕûÕû ÓÚ 2005-10-24 00:13:24·¢±í:
²»´í£¬Ö§³Ö
bluesky ÓÚ 2005-09-26 00:01:06·¢±í:
ÎÒ¶¥~~~~~~~~~~~~~~`
°®µÄ±ßÔµ ÓÚ 2005-09-21 00:08:46·¢±í:
²»´í
»ð ÓÚ 2005-07-09 00:09:28·¢±í:
Ö§³Ö