ºìÁªLinuxÃÅ»§
Linux°ïÖú

Óɰ²×°Á½¿éÍø¿¨µÄlinuxϵͳÖÐÒýÆðÍøÂ粻ͨÏëµ½µÄ

·¢²¼Ê±¼ä:2008-02-27 09:55:12À´Ô´:ºìÁª×÷Õß:mientoecu
×÷ÕߣºÀ¹â

Ò»Ì죬СÍõͻȻ¼±´Ò´ÒµÄÀ´ÕÒÎÒ£¬Ëû˵£º¡°ÎÒÔÚ»ú×ÓÉϸÕ×°µÄredhatÔõôÀÏÒ²ping²»Í¨·þÎñÆ÷£¬ÎÒÍø¿¨µÄÇý¶¯¶¼°²×°ÁË£¬ping ×Ô¼ºµÄÁ½¿éÍø¿¨µÄIP¶¼ÄÜͨ£¬¿É¾Íʱ·ÃÎʲ»ÁË·þÎñÆ÷¡£ÎÒÊäÈëhttp://172.31.0.101¾ÍÌáʾ¡®µ±ÊÔͼÓë172.31.0.101ÁªÏµÊ±£¬Á¬½Ó±»¾Ü¾ø¡¯¡±

ÎÒÀ´µ½Ð¡ÍõµÄ»úÆ÷ǰ²é¿´ÁËÒ»ÏÂÍøÂçÅäÖá£

ÒýÓÃ:
[root@rhas root]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 000:B7:C6:8F:1D
inet addr:172.31.0.200 Bcast:172.31.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1306 (1.2 Kb) TX bytes:210 (210.0 b)
Interrupt:10 Base address:0xe800 Memory:d9100000-d9100038

eth1 Link encap:Ethernet HWaddr 00:01:03:40:A4:15
inet addr:172.31.0.201 Bcast:172.31.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:32
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:1920 (1.8 Kb)
Interrupt:11 Base address:0xec00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1430 errors:0 dropped:0 overruns:0 frame:0
TX packets:1430 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:143776 (140.4 Kb) TX bytes:143776 (140.4 Kb)

[root@rhas root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.31.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.31.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.31.0.254 0.0.0.0 UG 0 0 0 eth1


µ½ÕâÒ»²½ÎÒ²ÂÏëÍøÏß¿ÉÄÜûÓв嵽ĬÈÏÍø¹Ø¶ÔÓ¦µÄÍø¿¨Éϼ´eth1(àË£¡Ð¡ÍõµÄ»úÆ÷±»ÏâÔÚ×À×ÓÀﲻ̫ºÃŲ¶¯¡£Á¬Ëû×Ô¼º°ÑÍøÏß²åÔÚÄǿ鿨É϶¼²»ÖªµÀÁË¡£)

½Ó×ÅÎÒÔÚÒ»»ú×ÓÉÏping 172.31.0.200ºÍ172.31.0.201,ÔÚСÍõµÄ»úÆ÷¼àÌý

ÒýÓÃ:
[root@rhas root]# tcpdump
tcpdump: listening on eth0
19:32:29.109283 172.31.0.101 >; 172.31.0.200: icmp: echo request (DF)
19:32:30.109337 172.31.0.101 >; 172.31.0.200: icmp: echo request (DF)
19:32:31.109418 172.31.0.101 >; 172.31.0.200: icmp: echo request (DF)
19:32:42.670162 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:32:43.670218 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:32:44.670291 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
........................
........................
19:32:56.671040 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:32:57.671064 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:32:58.671133 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:32:59.671187 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:33:00.671257 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:33:01.671349 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:33:02.671377 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)
19:33:03.671441 172.31.0.101 >; 172.31.0.201: icmp: echo request (DF)

36 packets received by filter
0 packets dropped by kernel


ûÓлØÓ¦£¬¿´Ò»ÏÂFirewallµÄÉèÖá£

ÒýÓÃ:
[root@rhas3 123]# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


ÓÖ²»ÊÇ·À»ðǽµÄÎÊÌ⣬ÏëÁËһϣ¬ÎÒÔ½·¢¿Ï¶¨¸Õ²ÅµÄÏë·¨ÊÇÕýÈ·µÄ¡£

ÒýÓÃ:
[root@rhas root]# cat /etc/modules.conf
alias eth0 e100
alias eth1 3c59x
alias sound-slot-0 via82cxxx_audio
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >;/dev/null 2>;&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >;/dev/null 2>;&1 || :
alias usb-controller usb-uhci

[root@rhas root]#mii-tool
eth0: negotiated 100baseTx-Fd flow-control, link ok
eth1: no linkk


ÕÒµ½Ô­ÒòÁË£¬¹ûÈ»ÊDz巴ÁË¡£¼ÈÈ»²»·½±ã»»¶Ë¿Ú×î¼òµ¥µÄ¾Í°Ñeth1¼´3ComÍø¿¨å´µ÷¾ÍOKÁË

µ±È»Ò²¿ÉÒÔ°ÑÁ½¿éÍø¿¨·ÖÅäÔÚ²»Í¬µÄÍø¶Î¡£

ÒýÓÃ:
[root@rhas root]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
# 3Com Corporation|3c905C-TX/TX-M [Tornado]
DEVICE=eth1
BOOTPROTO=static
BROADCAST=172.31.0.255
HWADDR=00:01:03:40:A4:15
IPADDR=172.31.0.201
NETMASK=255.255.255.0
NETWORK=172.31.0.0
ONBOOT=no
TYPE=Ethernet~
~
~
"/etc/sysconfig/network-scripts/ifcfg-eth1" [ÒÑת»»] 10L, 207C 9,1 È«²¿


»òÕßÔÚÆô¶¯Å¶Ê±¸ù±¾²»Òª¼ÓÔØ3ComÍø¿¨µÄÇý¶¯Å¶¡£

´ÓÆô¶¯ÎÒÃǵÄÍøÂç

ÒýÓÃ:
[root@rhas root]# service network restart
ÕýÔÚ¹Ø±Õ½Ó¿Ú eth0£º [ È·¶¨ ]
¹Ø±Õ»·»Ø½Ó¿Ú£º [ È·¶¨ ]
ÉèÖÃÍøÂç²ÎÊý£º [ È·¶¨ ]
µ¯³ö»·»Ø½Ó¿Ú£º [ È·¶¨ ]
µ¯³ö½çÃæ eth0£º

[ È·¶¨ ]
[root@rhas root]#
[root@rhas root]#
[root@rhas root]#
[root@rhas root]# ifconfig
eth0 Link encap:Ethernet HWaddr 000:B7:C6:8F:1D
inet addr:172.31.0.200 Bcast:172.31.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5560 (5.4 Kb) TX bytes:504 (504.0 b)
Interrupt:10 Base address:0xe800 Memory:d9100000-d9100038

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2041 errors:0 dropped:0 overruns:0 frame:0
TX packets:2041 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:209184 (204.2 Kb) TX bytes:209184 (204.2 Kb)

[root@rhas root]# ping 172.31.0.101
PING 172.31.0.101 (172.31.0.101) 56(84) bytes of data.
64 bytes from 172.31.0.101: icmp_seq=0 ttl=64 time=0.542 ms
64 bytes from 172.31.0.101: icmp_seq=1 ttl=64 time=0.270 ms

--- 172.31.0.101 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1004ms
rtt min/avg/max/mdev = 0.270/0.406/0.542/0.136 ms, pipe 2
[root@rhas root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.31.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.31.0.254 0.0.0.0 UG 0 0 0 eth0
[root@rhas root]#


´Ëʱ·ÃÎÊÍøÂçûÓÐÎÊÌ⣬¹ÊÕÏÅųý¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ