Linuxѧϰ֮·--Ìí¼ÓIP±ðÃû
Ö´ÐÐдµÀ
ifconfig?½á¹ûÈçÏ£ºÐ´µÀ
lo ? ? ? ? ? ? Link encap:Local Loopback? ? ? ? ? ? ? ? inet addr:127.0.0.1 Mask:255.0.0.0
? ? ? ? ? ? ? ??inet6 addr: ::1/128 Scope:Host
? ? ? ? ? ? ? ??UP LOOPBACK RUNNING MTU:16436 Metric:1
? ? ? ? ? ? ? ??RX packets:1746 errors:0 dropped:0 overruns:0 frame:0
? ? ? ? ? ? ? ??TX packets:1746 errors:0 dropped:0 overruns:0 carrier:0
? ? ? ? ? ? ? ??collisions:0 txqueuelen:0
? ? ? ? ? ? ? ??RX bytes:87540 (85.4 KiB) TX bytes:87540 (85.4 KiB)
p3p1 ? ? ?Link encap:Ethernet HWaddr 00:E0:6F:08:B6:85
? ? ? ? ? ? ? ??inet addr:192.168.1.121 Bcast:192.168.1.255 Mask:255.255.255.0
? ? ? ? ? ? ? ??inet6 addr: fe80::2e0:6fff:fe08:b685/64 Scope:Link
? ? ? ? ? ? ? ??UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
? ? ? ? ? ? ? ??RX packets:233870 errors:0 dropped:3 overruns:0 frame:0
? ? ? ? ? ? ? ??TX packets:182913 errors:0 dropped:0 overruns:0 carrier:0
? ? ? ? ? ? ? ??collisions:0 txqueuelen:1000
? ? ? ? ? ? ? ??RX bytes:324502272 (309.4 MiB) TX bytes:16169733 (15.4 MiB)
? ? ? ? ? ? ? ??Interrupt:23 Base address:0xcc00
loΪ±¾µØ»Ø»·IP
p3p1ÊÇÎÒµÄÎïÀíÍø¿¨
?
¾ßÌå²Ù×÷ÈçÏÂдµÀ
/sbin/ifconfig p3p1:1 192.168.1.122 broadcast 192.168.1.255 netmask 255.255.255.0 up/sbin/route add -host 192.168.1.122 def p3p2
/sbin/ifconfig p3p1:2 192.168.1.123 broadcast 192.168.1.255 netmask 255.255.255.0 up
/sbin/route add -host 192.168.1.123 def p3p3
?ÕâÑù¾Í»áÓжà¸öIP£¬¿ÉÒÔpingϲâÊÔ
?
µ«ÖØÆôÖ®ºó¾Í»áÏûʧ£¬¿ÉÒÔ½«ÕâÁ½ÌõÃüÁîдµ½/etc/rc.localÎļþ⣬ÈÃϵͳ¿ª»úʱ×Ô¶¯ÔËÐм´¿É¡£