linux brctl
linux brctl
http://blog.csdn.net/HoO_flying/archive/2007/04/05/1553175.aspx
ÓÐÎą̊Ö÷»ú¡£ÆäÖÐһ̨Ö÷»ú×°ÓÐlinux
£¬°²×°ÁËÍøÇÅÄ£¿é£¬¶øÇÒÓÐËÄ¿éÎïÀíÍø¿¨£¬·Ö±ðÁ¬½ÓͬһÍø¶ÎµÄÆäËûÖ÷»ú¡£ÎÒÃÇÏ£ÍûÆä³ÉΪһ¸öÍøÇÅ£¬ÎªÆäËûËĄ̈Ö÷»ú(IP·Ö±ðΪ192.168.1.2
£¬192.168.1.3£¬192.168.1.4£¬192.168.1.5)
Ö®¼äת·¢Êý¾Ý°ü¡£Í¬Ê±£¬ÎªÁË·½±ã¹ÜÀí£¬Ï£ÍûÍøÇÅÄܹ»ÓÐÒ»¸öIP£¨192.168.1.1£©£¬ÄÇÑù¹ÜÀíÔ±¾Í¿ÉÒÔÔÚ192.168.1.0/24Íø¶ÎÄÚµÄÖ÷»ú
ÉÏtelnetµ½ÍøÇÅ£¬¶ÔÆä½øÐÐÅäÖã¬ÊµÏÖÔ¶³Ì¹ÜÀí¡£
Ç°Ò»½ÚÖÐÌáµ½£¬ÍøÇÅÔÚͬһ¸öÂß¼Íø¶Îת·¢Êý¾Ý°ü¡£Õë¶ÔÉÏÃæµÄÍØÆË£¬Õâ¸öÂß¼Íø¶Î¾ÍÊÇ192.168.1.0/24Íø¶Î¡£ÎÒÃÇΪÕâ¸öÂß¼Íø¶ÎÒ»¸öÃû³Æ£¬br0¡£Ê×ÏÈÐèÒªÅäÖÃÕâÑùÒ»¸öÂß¼Íø¶Î¡£
# brctl addbr br0 (½¨Á¢Ò»¸öÂß¼Íø¶Î£¬Ãû³ÆΪbr0)
ʵ¼ÊÉÏ£¬ÎÒÃÇ¿ÉÒÔ°ÑÂß¼Íø¶Î192.168.1.0/24¿´×÷ʹһ¸öVLAN £¬¶øbr0ÔòÊÇÕâ¸öVLANµÄÃû³Æ¡£
½¨Á¢Ò»¸öÂß¼Íø¶ÎÖ®ºó£¬ÎÒÃÇ»¹ÐèҪΪÕâ¸öÍø¶Î·ÖÅäÌض¨µÄ¶Ë¿Ú¡£ÔÚLinuxÖУ¬Ò»¸ö¶Ë¿Úʵ¼ÊÉϾÍÊÇÒ»¸öÎïÀíÍø¿¨¡£¶øÿ¸öÎïÀíÍø¿¨µÄÃû³ÆÔò·Ö±ðΪeth0£¬eth1£¬eth2£¬eth3¡£ÎÒÃÇÐèÒª°Ñÿ¸öÍø¿¨Ò»Ò»ºÍbr0Õâ¸öÍø¶ÎÁªÏµÆðÀ´£¬×÷Ϊbr0ÖеÄÒ»¸ö¶Ë¿Ú¡£
# brctl addif br0 eth0 (ÈÃeth0³ÉΪbr0µÄÒ»¸ö¶Ë¿Ú)
# brctl addif br0 eth1 (ÈÃeth1³ÉΪbr0µÄÒ»¸ö¶Ë¿Ú)
# brctl addif br0 eth0 (ÈÃeth2³ÉΪbr0µÄÒ»¸ö¶Ë¿Ú)
# brctl addif br0 eth3 (ÈÃeth3³ÉΪbr0µÄÒ»¸ö¶Ë¿Ú)
ÍøÇŵÄÿ¸öÎïÀíÍø¿¨×÷Ϊһ¸ö¶Ë¿Ú£¬ÔËÐÐÓÚ»ìÔÓģʽ£¬¶øÇÒÊÇÔÚÁ´Â·²ã¹¤×÷£¬ËùÒԾͲ»ÐèÒªIPÁË¡£
# ifconfig eth0 0.0.0.0
# ifconfig eth1 0.0.0.0
# ifconfig eth2 0.0.0.0
# ifconfig eth3 0.0.0.0
È»ºó¸øbr0µÄÐéÄâÍø¿¨ÅäÖÃIP£º192.168.1.1¡£ÄÇÑù¾ÍÄÜÔ¶³Ì¹ÜÀíÍøÇÅ¡£
# ifconfig br0 192.168.1.1
¸øbr0ÅäÖÃÁËIPÖ®ºó£¬ÍøÇžÍÄܹ»¹¤×÷ÁË¡£192.168.1.0/24Íø¶ÎÄÚµÄÖ÷»ú¶¼¿ÉÒÔtelnetµ½ÍøÇÅÉ϶ÔÆä½øÐÐÅäÖá£
ÒÔÉÏÅäÖõÄÊÇÒ»¸öÂß¼Íø¶Î£¬Êµ¼ÊÉÏLinuxÍøÇÅÒ²ÄÜÅäÖóɶà¸öÂß¼Íø¶Î(Ï൱ÓÚ½»»»»úÖл®·Ö¶à¸öVLAN)¡£
Ïà¹ØÎĵµ£º
Ò»¡¢¸ÅÊö
̸µ½ÔÚlinuxϵͳϱàдI2CÇý¶¯£¬Ä¿Ç°Ö÷ÒªÓÐÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊÇ°ÑI2CÉ豸µ±×÷Ò»¸öÆÕͨµÄ×Ö·ûÉ豸À´´¦Àí£¬ÁíÒ»ÖÖÊÇÀûÓÃlinux I2CÇý¶¯Ìåϵ½á¹¹À´Íê³É¡£ÏÂÃæ±È½ÏÏÂÕâÁ½ÖÖÇý¶¯¡£
µÚÒ»ÖÖ·½·¨µÄºÃ´¦£¨¶ÔÓ¦µÚ¶þÖÖ·½·¨µÄÁÓÊÆ£©ÓУº
¡ñ ˼·±È½ÏÖ±½Ó£¬²»ÐèÒª ......
²Î¿¼£º
http://andrew.sayya.org/blog/?p=520
http://menjoy.javaeye.com/blog/258398
mbr-----grub------menu.lst------vmlinuz(linux)------initrd----etc/inittab----/etc/rc.status----/etc/sysconfig/boot
------/etc/init.d/boot.d/*--------/etc/init.d/boot.local--------/etc/rc.d/rc*.d/*-----mingetty-----l ......
Ò»¡¢½ø³Ì¿ØÖÆ£º
fork
´´½¨Ò»¸öнø³Ì
clone
°´Ö¸¶¨Ìõ¼þ´´½¨×Ó½ø³Ì
execve
ÔËÐпÉÖ´ÐÐÎļþ
exit
ÖÐÖ¹½ø³Ì
_exit
Á¢¼´ÖÐÖ¹µ±Ç°½ø³Ì
getdtablesize
½ø³ÌËùÄÜ´ò¿ªµÄ×î´óÎļþÊý
getpgid
»ñÈ¡Ö¸¶¨½ø³Ì×é±êʶºÅ
setpgid
ÉèÖÃÖ¸¶¨½ø³Ì×é±êÖ¾ºÅ
getpgrp
»ñÈ¡µ±Ç°½ø³Ì×é±êʶºÅ
setpgrp
ÉèÖõ±Ç°½ø³Ì×é±êÖ¾ºÅ
g ......
Èç¹ûÄãÊÇËÄ´¨Ñ§Éú£¬Èç¹ûÄãÊDz¦ºÅÉÏÍø£¬Èç¹ûÄãÏëѧlinux¡£ÄÇôÐͬͨÐŲ¦ºÅÆ÷Ò»¶¨ÈÃÄãÍ´²»ÓûÉú~~~
µÚÒ»ÖÖ·½·¨£º×ÔÁ¦¸üÉú£¬ÐéÄâ»ú´úÀí·¨
Õâ·½·¨¾ø¶Ô¿ÉÒÔÈÃÄãÔÚlinuxÏÂÉϵÃÁËÍø£¬µ«·½·¨ºÃ»µ£¬ÒÔ¼°ÊÇ·ñ²ÉÓÃÄú×Ô¼ºµàÁ¿~
Ϊ´ËÄãÐèÒªÏ ......
linuxĿ¼¼Ü¹¹
/ ¸ùĿ¼
/bin ³£ÓõÄÃüÁî binary file µÄÄ¿錄
/boot ´æ·ÅϵͳÆô¶¯Ê±±ØÐë¶ÁÈ¡µÄµµ°¸£¬°üÀ¨ºËÐÄ (kernel) ÔÚÄÚ
/boot/grub/menu.lst GRUBÉèÖÃ
/boot/vmlinuz ÄÚºË
&nbs ......