Chinaunix首页 | 论坛 | 博客
  • 博客访问: 791010
  • 博文数量: 102
  • 博客积分: 10011
  • 博客等级: 上将
  • 技术积分: 2301
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-08 13:00
文章存档

2011年(2)

2010年(30)

2009年(25)

2008年(45)

我的朋友

分类: BSD

2008-08-17 15:23:59

1 确认网卡工作
在Linux 系统中使用常见的lsmod  命令单看当前的网卡是否工作
[root@cait-linux sysconfig]# lsmod
Module                  Size  Used by
nls_utf8                2113  0
parport_pc             24577  1
lp                     12077  0
parport                37129  2 parport_pc,lp
autofs4                24773  0
i2c_dev                11329  0
i2c_core               22081  1 i2c_dev
sunrpc                162725  1
ipt_REJECT              6593  0
ipt_state               1857  0
ip_conntrack           40565  1 ipt_state
iptable_filter          2753  1
ip_tables              16705  3 ipt_REJECT,ipt_state,iptable_filter
button                  6481  0
battery                 8901  0
ac                      4805  0
md5                     4033  1
ipv6                  235137  6
uhci_hcd               31065  0
shpchp                 82373  0
snd_ens1371            24937  2
snd_rawmidi            26597  1 snd_ens1371
snd_seq_device          8137  1 snd_rawmidi
snd_pcm_oss            49017  0
snd_mixer_oss          17985  2 snd_pcm_oss
snd_pcm                96841  2 snd_ens1371,snd_pcm_oss
snd_timer              29893  1 snd_pcm
snd_page_alloc          9673  1 snd_pcm
snd_ac97_codec         63889  1 snd_ens1371
snd                    55461  10 snd_ens1371,snd_rawmidi,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_ac97_codec
soundcore               9889  2 snd
pcnet32                30153  0
mii                     5185  1 pcnet32
floppy                 58481  0
dm_snapshot            17029  0
dm_zero                 2369  0
dm_mirror              27825  0
ext3                  116809  2
jbd                    71385  1 ext3
dm_mod                 57557  6 dm_snapshot,dm_zero,dm_mirror
mptscsih                1601  0
mptsas                 10061  1 mptscsih
mptspi                  9805  3 mptscsih
mptfc                   9033  1 mptscsih
mptscsi                44173  3 mptsas,mptspi,mptfc
mptbase                56929  4 mptsas,mptspi,mptfc,mptscsi
sd_mod                 17217  3
scsi_mod              121933  5 mptsas,mptspi,mptfc,mptscsi,sd_mod
[root@cait-linux sysconfig]#
 
使用 看看是否有网络卡的运作
[root@cait-linux sysconfig]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:3D:A3:E9 
          inet addr:10.10.81.136  Bcast:10.10.81.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe3d:a3e9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:241487 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1733 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19337378 (18.4 MiB)  TX bytes:177187 (173.0 KiB)
          Interrupt:10 Base address:0x1400
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:7767 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7767 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10676226 (10.1 MiB)  TX bytes:10676226 (10.1 MiB)
[root@cait-linux sysconfig]# ping -c 5 10.10.81.1
PING 10.10.81.1 (10.10.81.1) 56(84) bytes of data.
64 bytes from 10.10.81.1: icmp_seq=0 ttl=255 time=6.82 ms
64 bytes from 10.10.81.1: icmp_seq=1 ttl=255 time=1.76 ms
64 bytes from 10.10.81.1: icmp_seq=2 ttl=255 time=0.433 ms
64 bytes from 10.10.81.1: icmp_seq=3 ttl=255 time=0.724 ms
64 bytes from 10.10.81.1: icmp_seq=4 ttl=255 time=1.43 ms
--- 10.10.81.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 0.433/2.235/6.826/2.344 ms, pipe 2
[root@cait-linux sysconfig]#
 
 
 
[root@cait-linux sysconfig]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.81.0      *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         10.10.81.1      0.0.0.0         UG    0      0        0 eth0
[root@cait-linux sysconfig]#
 
[root@cait-linux sysconfig]# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no
}
~
[root@cait-linux sysconfig]# tail -n 10 /etc/serices
tail: cannot open `/etc/serices' for reading: No such file or directory
[root@cait-linux sysconfig]# tail -n 10 /etc/services
binkp           24554/udp                       # Binkley
asp             27374/tcp                       # Address Search Protocol
asp             27374/udp                       # Address Search Protocol
tfido           60177/tcp                       # Ifmail
tfido           60177/udp                       # Ifmail
fido            60179/tcp                       # Ifmail
fido            60179/udp                       # Ifmail
# Local services
[root@cait-linux sysconfig]#
 
[root@cait-linux sysconfig]# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State     
tcp        0    136 10.10.81.136:ssh            10.10.81.131:12380          ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ]         DGRAM                    7134   @/var/run/hal/hotplug_socket
unix  10     [ ]         DGRAM                    4777   /dev/log
unix  2      [ ]         DGRAM                    2759   @udevd
unix  2      [ ]         DGRAM                    60052 
unix  3      [ ]         STREAM     CONNECTED     42292  /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     42291 
unix  2      [ ]         DGRAM                    14713 
unix  3      [ ]         STREAM     CONNECTED     13383 
unix  3      [ ]         STREAM     CONNECTED     13382 
unix  3      [ ]         STREAM     CONNECTED     13380  /tmp/orbit-root/linc-14ed-0-73f05d418f551
unix  3      [ ]         STREAM     CONNECTED     13379 
unix  3      [ ]         STREAM     CONNECTED     13378  /tmp/orbit-root/linc-c4c-0-4faf4dc1bfdf2
unix  3      [ ]         STREAM     CONNECTED     13377 
unix  3      [ ]         STREAM     CONNECTED     13376  /tmp/orbit-root/linc-14ed-0-73f05d418f551
unix  3      [ ]         STREAM     CONNECTED     13375 
unix  3      [ ]         STREAM     CONNECTED     13372  /tmp/orbit-root/linc-951-0-4a3050b63486e
unix  3      [ ]         STREAM     CONNECTED     13371 
unix  3      [ ]         STREAM     CONNECTED     13368  /tmp/.ICE-unix/3076
unix  3      [ ]         STREAM     CONNECTED     13367 
unix  3      [ ]         STREAM     CONNECTED     13362  /tmp/.X11-unix/X0
阅读(2383) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~