ÕÒÒ»¿é3COMµÈµÄÍø¿¨(Ö§³ÖVLANµÄ¼´¿É)£¬ÔÚÄÚºËÖдòÉÏVLANµÄ²¹¶¡£¬È·ÈÏÄãÐèÒª¼¸¸öÍø¶Î£¬´Ó¶øÉèÖü¸¸öIPµØÖ·£¬Í¬Ê±ÔÙÉèÖü¸¸öMACµØÖ·¡£ (LINUXÖÐÊÇ¿ÉÒÔ×Ô¼º¸ÄMACµØÖ·µÄ)¡£½«ÄãµÄLINUX»úÆ÷ÕæÕýÄ£Äâ³Éһ̨·ÓÉÆ÷£¬ÕâÑùµÄЧ¹û¸üºÃ£¬Ó¦Óó¡ºÏÒ²¸ü¹ã¡£¾ÙÀý˵Ã÷£ºÄãÓÐA¡¢B¡¢C¡¢D ËĄ̈É豸£¬ÆäÖÐA¡¢BÊÇ×ÀÃæPC£¬CÊÇһ̨·ÓÉÆ÷(ÊÇÄãµÄÄÚ²¿ÍøÂçµÄÍø¹Ø)£¬DÊÇһ̨ÉÏÃæËù˵µÄLINUX¡£Ä㹫˾ҪÇóÄÚÍâÍø¸ôÀ룬ÔÚA¡¢BÉÏÓÐÒ»¸öÄÚÍâÍøÎïÀí¸ôÀëÇл»Æ÷(¼òµ¥µÄ½²£¬ÓÐÒ»¸ö¿ª¹Ø£¬¿ªÊÇÎïÀí¸úÍâÍøÁ¬Í¨£¬¹Øʱ¸úÄÚÍøÁ¬Í¨)¡£ÕâÖÖÓ¦ÓÃÏ£¬A¡¢BµÄÍø¹ØÊǹ̶¨µÄ£¬ÄÇÎÒÃǾÍÒªÇóLINUXµÄIP¸úC ·ÓÉÆ÷µÄIPÓ¦¸ÃÒ»Ò»¶ÔÓ¦£¬Í¬Ê±ÓÉÓÚARP±íµÄ¹Øϵ£¬ÎÒÃÇ»¹µÃÒªÇóLINUXµÄMACµØÖ·Ò²Ó¦¸Ã¸úC·ÓÉÆ÷µÄMACÒ»Ò»¶ÔÓ¦£¬·ñÔòA¡¢B»úÆ÷Çл»ÍøÂçʱ»áÓÐÒ»¶Îʱ¼äÊDz»Í¨µÄ(µÈ´ýARP±íÀÏ»¯)¡£²»Öª´ó¼ÒÃ÷°×ÁËûÓУ¬ÆäʵºÃ´¦»¹Óкܶ࣬Ï´ËÎÒÓпÕÔÚ¸ú´ó¼Ò½«ÏêϸµÄʵʩ²½Öè¼°ÔÀíÏêϸд³öÀ´
£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«£«
¶ÔÒ»¸öÉÔ´óÒ»µãµÄÍøÂç¶øÑÔ£¬´æÔÚ×Ŷà¸öIPÍø¶Î£¬Í¬Ê±ÓеÄÍøÂ绹ҪÇóÄÚÍâÍø¸ôÀë¡£ÏÂÃæÎÒ½«ÔõÑùÔÚһ̨LINUXÉÏÄ£Äâһ̨·ÓÉÆ÷µÄ²½Öè¼òÊöÈçÏ£¬¸øÓÐÕâÖÖÐèÇóµÄµÜÐÖÒ»¸ö²Î¿¼¡£
ÎÒµÄÃèÊö»·¾³Îª£ºredhat 7.2 (2.4.7-10),3com 3c509Íø¿¨¡£
1 °²×°redhat 7.2°æ±¾£¬ÆäÖеÄkernelΪlinux-2.4.7-10
2 ÏÂÔØvlanÈí¼þ°ü£¬¶ÔÓ¦linux-2.4.7-10µÄΪvlan1.3.tar.gz
3 ÔÚ/usr/srcĿ¼Ï½⿪vlanÈí¼þ°ü
4 proc /usr/src/vlan ½«vlan¼ÓÈëµ½linux kernelÖÐ
5 cd /usr/src/linux-2.4.7-10 ÅäÖÃkernelµÄÄ£¿é make menuconfig
6 ½øÈënetwork configuration Ñ¡Ôñdot1qÖ§³Ö £¬±£´æÍË
7 ±àÒëkernel , make dep;make clean;make bzImage;make modules;make modules-install
8 cp /usr/src/linux-2.4.7-10/.../boot/bzImage /boot/vmlinuz-2.4.7-10, cp /usr/src/linux-2.4.7-10/.../system /boot/system-2.4.7-10
9 ÖØÆðlinux,Æô¶¯Ê±¿´µ½dot1q support by ben greear, vlan ÒѾÆô¶¯
10 cd /usr/src/vlan ±àÒëvconfigÎļþ£¬make ,Èç¹ûÍ˳ö£¬¼ì²éÒ»ÏÂvconfig.cÖе÷ÓÃÎļþµÄλÖá£
11 ½«vconfig¿ÉÖ´ÐÐÎļþ¿½±´µ½ /usr/sbin, cp /usr/src/vlan/vconfig /usr/sbin/vconfig ¡£
12 ÅäÖÃvlanÉ豸£¬ÒÔeth0ΪÀý£¬vconfig eth0 2;vconfig eth0 3£¬ÔÚÖ÷¶Ë¿ÚÉÏÅäÖÃvlan 1 µÄipµØÖ·¡£
13 ÔÚvlanÉ豸ÉÏÉèÖÃipµØÖ·¡£Ifconfig eth0.2 ipaddress netmask mask
14 ÔÚvlanÉ豸ÉÏÉèÖÃMACµØÖ·¡£Ifconfig eth0.2 MACaddress(ifconfig Ó÷¨ÇëÓÃ
ifconfig --helpÀ´²é¿´)¡£
15 ½«Â·ÓÉÆ÷ÉϺÍlinuxÏàÁ¬µÄ¶Ë¿ÚÅäÖóÉtrunk,ÒÔcisco 3548ΪÀý
interface fastethernet 0/48
switchport trunk encapulation dot1q
16 ½«redhat ĬÈϹرյÄip forwarding¹¦ÄÜ´ò¿ª¡£echo "1">/proc/sys/net/ipv4/ip_forward
17 ²âÊÔͬ vlanµÄÉ豸ºÍlinux ·ÓÉÆ÷×Ӷ˿ڻ¥·Ã£¬²âÊÔ²»Í¬vlanÖÐÉ豸ͨ¹ýlinux ·ÓÉÆ÷»¥·Ã¡£
ÒÔÉ϶¼ÊÇÎÒµÄʵ¼Ê²Ù×÷¾Ñ飬ÇëCOPYÇ°´òÉÏLINUXSIRµÄ±êÇ©¼´¿É¡£
feidecheng ÓÚ 2008-04-27 14:01:00·¢±í:
ѧϰÁË