版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、linux网络配置、测试及故障诊断方法和工具介绍了ifconfig、ping 和traceroute 的用法。一、网络调试工具;如果我们把一台机器接入网络中,通过网络配置工具的配置这时就要用到网络调试工具,目的是判断机器是否已经接入到网络以及网络连接是否正常。我们常用的在各个发行版通用的网络配置工具是ifconfig和netconfig, adsl猫的拔号工具rp-pppoe,普通猫的拔号工具kppp和wvdial,当然linux各大发行版本又有自己的配置工具,这些特定发行版特别的配置工具是非常有效的,大多是图形界面的,操作也非常之简单。1、 关于网络接口及配置工具;网络接口(interfac
2、e)是网络硬件设备在操作系统中的表示方法,比如网卡在linux操作系统中用 ethx,是由0开始的正整数,比如eth0、eth1. ethx。而普通猫和adsl的接口是 pppx,比如ppp0等;在linux操作系统中配置网络接口,一般是通过网络配置工具实现的,但最终目的还是通过网络配置工具来达到修改与网络相关的配置文件而起作用的。由此说来,我们配置网络可以直接修改配置文件。比如网络网络接口(网卡)的ip地址、子掩码、网关,在 redhat/fedora 等或以redhat/fedora 为基础的发行版中,一般要涉及到好几个文件,比如包括 /etc/sysconfig/network-scri
3、pts/ifcfg-eth0等。了解linux网络配置文件是极为重要的,我们通过工具修改了什么,是怎么生效的,只有了解网络配置文件才能搞清楚。由于linux存在很多的发行和版本,大多发行版本都有自己的专用配置工具。主要是为了方便用户配置网络;但也有通用的配置工具,比如 ifconfig 、ifup、ifdown;2 关于网络硬件设备的驱动;网络硬件,比如网卡(包括有线、无线),猫包括普通猫和adsl猫等,都是需要内核支持的,所以我们首先得知道自己的网络设备是不是已经被硬内核支持了。如果不支持,我们得找驱动(或通过内核编译)来支持它,常见的通过安装驱动就可以解决,尤其是常用的网络硬件设备,现在发
4、行的linux发行版几乎都支持;3、ifconfig 配置网络接口的工具介绍;ifconfig 是一个用来查看、配置、启用或禁用网络接口的工具,这个工具极为常用的。比如我们可以用这个工具来临时性的配置网卡的ip地址、掩码、广播地址、网关等。ifconfig 查看网络接口状态;ifconfig 如果不接任何参数,就会输出当前网络接口的情况;rootlocalhost# ifconfigeth0 link encap:ethernet hwaddr 00:c0:9f:94:78:0e inet addr:8 bcast:55 mask:255.255.2
5、55.0 inet6 addr: fe80:2c0:9fff:fe94:780e/64 scope:link up broadcast running multicast mtu:1500 metric:1 rx packets:850 errors:0 dropped:0 overruns:0 frame:0 tx packets:628 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:369135 (360.4 kib) tx bytes:75945 (74.1 kib) inter
6、rupt:10 base address:0x3000lo link encap:local loopback inet addr: mask: inet6 addr: :1/128 scope:host up loopback running mtu:16436 metric:1 rx packets:57 errors:0 dropped:0 overruns:0 frame:0 tx packets:57 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes
7、:8121 (7.9 kib) tx bytes:8121 (7.9 kib)eth0 表示第一块网卡, 其中 hwaddr 表示网卡的物理地址, inet addr 用来表示网卡的ip地址; lo 是表示主机的回坏地址,这个一般是用来测试一个网络程序,但又不想让局域网或外网的用户能够查看,只能在此台主机上运行和查看所用的网络接口;如果我们想知道主机所有网络接口的情况,请用下面的命令;rootlocalhost# ifconfig -a如果我们想查看某个端口,比如我们想查看eth0 的状态,就可以用下面的方法;rootlocalhost# ifconfig eth0ifconfig 配置网络接
8、口;ifconfig 可以用来配置网络接口的ip地址、掩码、网关、物理地址等;用ifconfig 为网卡指定ip地址,这只是用来调试网络用的,并不会更改系统关于网卡的配置文件。如果您想把网络接口的ip地址固定下来,目前有三个方法:一是通过各个发行和版本专用的工具来修改ip地址;二是直接修改网络接口的配置文件;三是修改特定的文件,加入ifconfig 指令来指定网卡的ip地址,比如在redhat或fedora中,把ifconfig 的语名写入/etc/rc.d/rc.local文件中;ifconfig 配置网络端口的方法:ifconfig 工具配置网络接口的方法是通过指令的参数来达到目的的,我们
9、只说最常用的参数;ifconfig 网络端口 ip地址 hw mac地址 netmask 掩码地址 broadcast 广播地址 up/down 实例一:比如我们用ifconfig 来调试 eth0网卡的地址 rootlocalhost# ifconfig eth0 downrootlocalhost# ifconfig eth0 9 broadcast 55 netmask rootlocalhost# ifconfig eth0 uprootlocalhost# ifconfig eth0 eth0 link encap
10、:ethernet hwaddr 00:11:00:00:11:11inet addr:9 bcast:55 mask:up broadcast multicast mtu:1500 metric:1rx packets:0 errors:0 dropped:0 overruns:0 frame:0tx packets:0 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000rx bytes:0 (0.0 b) tx bytes:0 (0.0
11、b)interrupt:11 base address:0x3400第一行:ifconfig eth0 down 表示如果eth0是激活的,就把它down掉。此命令等同于 ifdown eth0;第二行:用ifconfig 来配置 eth0的ip地址、广播地址和网络掩码;第三行:用ifconfig eth0 up 来激活eth0 ; 此命令等同于 ifup eth0第四行:用 ifconfig eth0 来查看 eth0的状态;当然您也可以用直接在指定ip地址、网络掩码、广播地址的同时,激活网卡;要加up参数;比如下面的例子;rootlocalhost# ifconfig eth0 192.1
12、68.1.99 broadcast 55 netmask up 实例二:设置网卡的物理地址(mac地址);比如我们设置网卡eth1的ip地址、网络掩码、广播地址,物理地址并且激活它;rootlocalhost# ifconfig eth1 52 hw ether 00:11:00:00:11:11 netmask broadcast 55 up或rootlocalhost# ifconfig eth1 hw ether 00:11:00:00:11:22rootlocalh
13、ost# ifconfig eth1 52 netmask broadcast 55 up其中 hw 后面所接的是网络接口类型, ether表示以太网, 同时也支持 ax25 、arcnet、netrom等;如何用ifconfig 来配置虚拟网络接口;虚拟网络接口指的是为一个网络接口指定多个ip地址,虚拟接口是这样的 eth0:0 、 eth0:1、eth0:2 . . eth1n; 其实用ifconfig 为一个网卡配置多个ip地址比较简单;看下面的例子;rootlocalhost# ifconfig eth1:0 19
14、51 hw ether 00:11:00:00:11:33 netmask broadcast 55 up注意:指定时,要为每个虚拟网卡指定不同的物理地址;在 redhat/fedora 或与redhat/fedora类似的系统,您可以把配置网络ip地址、广播地址、掩码地址、物理地址以及激活网络接口同时放在一个句子中,写入/etc/rc.d/rc.local中。如何用ifconfig 来激活和终止网络接口的连接;激活和终止网络接口的用 ifconfig 命令,后面接网络接口,然后加上 down或up参数,就可以禁止或激活相应的
15、网络接口了。当然也可以用专用工具ifup和ifdown 工具;rootlocalhost# ifconfig eth0 downrootlocalhost# ifconfig eth0 uprootlocalhost# ifup eth0rootlocalhost# ifdown eth0对于激活其它类型的网络接口也是如此,比如 ppp0,wlan0等;不过只是对指定ip的网卡有效。redhat/fedora网络接口配置工具;由于 ifconfig 用起来比较麻烦,而且是用来测试网络之用,但这个工具并不能修改网络接口的相应配置文件。虽然也能通过把ifconfig配置网络接口的语句写入类似/et
16、c/rc.d/rc.local 文件中,但相对来说还是写入关于网络接口的配置文件中更为安全和可靠;但对于虚拟网络接口写入类似/etc/rc.d/rc.local 中还是可以的;网络接口配置文件在redhat/fedora 中,与以太网卡相关的配置文件位于 /etc/sysconfig/network-scripts目录中,比如 ifcfg-eth0、ifcfg-eth1 . . 比如在fedora 5.0中,ifcfg-eth0 ;如果您用dhcp服务器来自动获取ip的,一般情况下ifcfg-eth0的内容是类似下面这样的;device=eth0onboot=yesbootproto=dhcp
17、type=ethernet如果您是指定ip的,一般内容是类似下面的;device=eth0 注:网络接口onboot=yes 注:开机引导时激活bootproto=static 注:采用静态ip地址;ipaddr=38 注:ip地址netmask= 注:网络掩码;gateway= 注:网关;下面的几个选项也可以利用;hostname=linux 注:指定主机名;domain=localdomain 注:指定域名;hwaddr=00:00:11:22:00:aa 注:指定网卡硬件地址 (mac地址), 也可以省略,不过这在这里
18、来更改mac地址一般是不能生效的。还是通过前面所说的ifconfig的办法来更改吧;网络配置的工具在redhat早期的版本中, 有linuxconf 、redhat-config-network 、netconfig 等工具;在redhat/fedora 最新的版本有 system-config-network-tui (文本模式的) 、system-config-network (图形模式的),netconfig(文本模式的)。这些工具都会直接修改linux系统中关于网络接口的配置文件;这是 ifconfig 所不能比的;其中 redhat-config-network 和system-co
19、nfig-network工具不仅仅是配置网卡的工具,还有配置isdn和普通猫、adsl的工具、网络硬件的添加、主机名字的配置、dns各客户端的配置等。其实是一个工具组的集成;这些工具比较简单,以root权限运行命令就能调用,比如:rootlocalhost# /usr/sbin/system-config-networkrootlocalhost# system-config-networknetconfig 工具是一个在文本模式比较好的工具,推荐大家使用;理由是这个工具在文本模式下,也有一个简单的图形界面;还有命令模式;rootlocalhost# netconfig -d eth0 注:配
20、置eth0rootlocalhost# netconfig -d eth1 注:配置eth1netconfig 的用法如下:rootlocalhost# netconfig -help 注:帮助;-bootproto=(dhcp|bootp|none) boot protocol to use(-gateway=string network gateway(指定网关)-ip=string ip address(指定ip地址)-nameserver=string nameserver(指定dns客户端)-netmask=string netmask(指定网络掩码)-hostname=string
21、 hostname( 指定主机名)-domain=string domain name(指定域名)-d, -device=string network device (指定网络设备)-nodns no dns lookups (没有dns查询)-hwaddr=string ethernet hardware address (指定网卡的物理地址)-description=string description of the device (描述性文字)help options: (帮助选项)-?, -help show this help message-usage display brief
22、usage message设置网卡的dhcp模式自动获得iprootlocalhost# netconfig -d eth0 -bootproto=dhcp手动设置网卡的ip等rootlocalhost# netconfig -d eth0 -ip=3 -netmask= -gateway=拔号工具;adsl pppoe 拔号工具rp-pppoe;rp-pppoe 主页;/penguin/open_source_rp-pppoe.phprp-pppoe 目前在各大发行版
23、本都是存在的,比如redhat/fedora、红旗、slackware、debian、suse等系统,都是采用这个拔号软件,所以您大可不必为下载源码编译安装。只需要在各大发行版的安装盘中就可以找得到;请用各大发行版自带的软件包管理工具来安装此软件包;在redhat/fedora 中可以通过图形配置工具来完成,redhat-config-network 命令,调用配置网络,要通过xdsl来添加拔号,比较简单;所有发行版通用的方法是adsl-setup 命令来配置adsl;rootlocalhost# adsl-setup 注:配置pppoe拔号,请文档下面,都差不多;rootlocalhost#
24、 adsl-start 注:启动拔号;rootlocalhost# adsl-stop 注:断开连接;普通猫的拔号工具;普通猫的拔号工具主要有kppp和wvdial;在redhat/fedora中,用system-config-network 或redhat-config-network 也能设置ppp拔号;在kde桌面环境下,大家一般都用kppp拔号工具,点鼠标就可以完成;wvdial工具是文本的,几乎在各大发行版都有。wvdial的配置文件是/etc/wvdial.conf 。如果您的猫已经驱动好了,运行一下wvdialconf命令就生成了/etc/wvdial.conf了 。当然您得查看
25、一下它的内容;rootlocalhost# wvdialconfrootlocalhost# more /etc/wvdial.conf无线网卡;linux系统下无线网卡的安装和驱动,以及配置还真的没来得及做关键是没有实验的设备和条件,下面的安装和配置是从网上找到的别人的操作,如有不合适之处还希望能够谅解,改天有机会实验了再贴一下!linux无线网卡可以用三种方式驱动:1使用内核自带的网卡驱动程序;2为特定的网卡编译安装驱动模块;3使用ndiswrapper,利用面向windows驱动程序驱动网卡。 现在市场上销售的绝大多数无线网卡都没有linux内核自带的驱动,所以第一种不予考虑;ndisw
26、rapper软件并不编写linux驱动;而是通过内核模块来调用windows下的ndis驱动程序,从而解决无线网卡没有linux驱动问题,但它要求linux内核至少是2.4.26(网上查的,没有验证);所以我们考虑采用第二种;linux下比较常用的无线网卡驱动有:hostap driver和linux-wlan-ng,它们对intersil prism 2/2.5/3芯片有较好的支持。我们觉得usb接口的无线网卡用起来比较方便,而linux-wlan-ng对usb的支持好于hostap driver,所以就下载了linux-wlan-ng最新驱动无线网卡驱动的安装及其配置在配置无线网卡之前,必
27、须确保内核设置中启动了无线局域网支持:#grep config_net_radio /boot/config-uname r config_net_radio=y若没有,重新配置、编译内核来启动“wireless lan(non-hamradio)drivers and wireless extensions”。(注:uname r 显示内核版本号)安装linux-wlan-ng-0.2.1-pre25.tar.gz,内核必须用源码编译过接下来解压并安装:#tar -zxvf linux-wlan-ng-0.2.1-pre25.tar.gz#cd linux-wlan-ng-0.2.1-pre
28、25#./configure 或者 #make config- linux wlan configuration script -the default responses are correct for most users.build prism2.x pcmcia card services (_cs) driver? (y/n) y: nbuild prism2 plx9052 based pci (_plx) adapter driver? (y/n) n: nbuild prism2.5 native pci (_pci) driver? (y/n) n: nbuild prism
29、2.5 usb (_usb) driver? (y/n) n: ylinux source directory /usr/src/linux:the kernel source tree is version 2.4.22alternate target install root directory on host :module install directory /lib/modules/2.4.22:it looks like you have a system v init file setup.prefix for build host compiler? (rarely neede
30、d) :build for debugging (see doc/config.debug) (y/n) y:configuration successful.#make all#make install然后修改相关文件:1 在/etc/wlan/wlan.conf里,设置自己的ssid;ssid_wlan0=mywlanenable_wlan0=y2 创建一个wlancfg-mywlan文件;#cd /etc/wlan#cp wlancfg-default wlancfg-mywlan并把里面的is_adhoc=n改成is_adhoc=y3 在/etc/modules.conf中加入一行:a
31、lias wlan0 prism2_usb在/etc/modprobe.conf中加入一行:alias wlan0 prism2_usb4 插上usb无线网卡,指示灯亮#ifconfig wlan0 up然后就可以给wlan0配置地址了#ifconfig wlan0 inet6 add fec0:106:2900:1/64#ifconfig wlan0#iwconfig wlan0:看无线网卡的一些信息(包括ssid等)三、要实现切换,需要在mn上做一些改进由于不能用ifconfig命令来修改无线网卡的相关参数,在其它节点(非mn)上要更改ssid,只需在/etc/wlan/wlan.conf
32、中改ssid_wlan0=xxxxxx,然后运行:#/etc/init.d/wlan restart#ifconfig wlan0 up就可以了,不过地址得重新配置。linux-wlan-ng驱动下可以用wlanctl-ng命令来配置和更改无线网卡的参数,对于mn如何切换到外地,可以在mn上配置脚本文件(命名为g2ar):#wlanctl-ng wlan0 lnxreq_ifstate ifstate=disable#wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable# wlanctl-ng wlan0 dot11req_start ssid=fore
33、ignwlan bsstype=independent beaconperiod=100 dtimperiod=3 cfpollable=false cfpollreq=false cfpperiod=3 cfpmaxduration=100 probedelay=100 dschannel=6 basicrate1=2 basicrate2=4 operationalrate1=2 operationalrate2=4 operationalrate3=11 operationalrate4=22然后运行命令:#bash g2ar切换到新的ar或切回本地可以配置同样的脚本文件,只需把ssid
34、换成相应的就可以了。dns客户端配置文件/etc/resolv.conf/etc/resolv.conf 里面存放的是各大通信公司dns服务器列表;下面的三个地址可以用一用;当然您可以打电话问你的服务商;nameserver 33nameserver 43nameserver 8改变网络接口的速度和协商方式的工具miitool 和ethtool通过mii-tool和ethtool工具来调整网卡的速度、双工等,这样能提高网卡的效率;mii-tool 配置网络设备协商方式的工具mii-tool 介绍mii-tool - view
35、, manipulate media-independent interface status (mii-tool 是查看,管理介质的网络接口的状态)有时网卡需要配置协商方式 ,比如10/100/1000m的网卡半双工、全双工、自动协商的配置 。但大多数的网络设备是不用我们来修改协商,因为大多数网络设置接入的时候,都采用自动协商来解决相互通信的问题。但在有的情况下,需要我们手动来设置网卡的协商方式;mii-tool 就是能指定网卡的协商方式。 注明:我在使用mii-tool工具修改协商模式时,提示是错误的,因为是在虚拟机中做的,不过虚拟机中的网卡我查看是支持全双工模式的,可是提示错误siocg
36、miiphy on eth0 failed: operation not supported,问题出在那里也不清楚,用google查了下,发现不少人都是这样的错误,也没说明原因;不过多数人提示可以使用ethtool工具去修改,我测试了下,还行!还有一种方法是修改/etc/modules.conf配置文件;ethtool -s eth0 autoneg offethtool -s eth0 duplex full在/etc/modules.conf添加内容alias eth0 bcm5700 line_speed=100 full_duplex=1optionsbcm5700 line_spee
37、d=100 full_duplex=1重起!mii-tool 更改网络接口协商的方法;rootlocalhost# mii-tool -helpusage: mii-tool -vvrrwl -a media,. | -f media interface .-v, -version display version information-v, -verbose more verbose output 注:显示网络接口的信息;-r, -reset reset mii to poweron state 注:重设mii到开启状态;-r, -restart restart autonegotiatio
38、n 注:重启自动协商模式;-w, -watch monitor for link status changes 注:查看网络接口连接的状态变化;-l, -log with -w, write events to syslog 注:写入事件到系统日志;-a, -advertise=media,. advertise only specified media 注:指令特定的网络接口;-f, -force=media force specified media technology 注:更改网络接口协商方式;media: 100baset4, 100basetx-fd, 100basetx-hd,
39、10baset-fd, 10baset-hd,(to advertise both hd and fd) 100basetx, 10baset查看网络接口的协商状态rootlocalhost# mii-tool -v eth0eth0: negotiated 100basetx-fd, link ok product info: vendor 00:00:00, model 0 rev 0 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100ba
40、setx-fd 100basetx-hd 10baset-fd 10baset-hd advertising: 100basetx-fd 100basetx-hd 10baset-fd 10baset-hd link partner: 100basetx-fd 100basetx-hd 10baset-fd 10baset-hd flow-control注:上面的例子,我们可以看得到是自动协商。注意红字的部份;更改网络接口协商方式;更改网络接口的协商方式,我们要用到f选项,后面可以接 100baset4, 100basetx-fd, 100basetx-hd, 10baset-fd, 10ba
41、set-hd等参数;把网络接口eth0改为 1000mb/s全双工的模式rootlocalhost# mii-tool -f 100basetx-fdrootlocalhost#mii-tool -v eth0eth0: 100 mbit, full duplex, link ok product info: vendor 00:00:00, model 0 rev 0 basic mode: 100 mbit, full duplex basic status: link ok capabilities: 100basetx-fd 100basetx-hd 10baset-fd 10base
42、t-hd advertising: 100basetx-fd 100basetx-hd 10baset-fd 10baset-hd也可以使用ethtool工具修改: rootlocalhost# ethtool -s eth0 speed 100 duplex fullethtool 工具关于网络协商功能介绍ethtool - display or change ethernet card settings(ethtool 是用来显示和更改网卡设置的工具);这个工具比较复杂,功能也特别多;ethtool 显示网络端口设置功能rootlocalhost# ethtool eth0settings
43、 for eth0:supported ports: tp mii supported link modes: 10baset/half 10baset/full100baset/half 100baset/fullsupports auto-negotiation: yesadvertised link modes: 10baset/half 10baset/full100baset/half 100baset/fulladvertised auto-negotiation: no 注:自动协商关闭speed: 100mb/s 注:速度 100mbduplex: full 注:全双工port
44、: miiphyad: 32transceiver: internalauto-negotiation: offsupports wake-on: pumbgwake-on: dcurrent message level: 0x00000007 (7)link detected: yes 注:eth0已经激活;ethtool 设置网卡的协商模式;ethtool -s devname speed 10|100|1000 duplex half|full port tp|aui|bnc|mii|fibre autoneg on|off 把网卡eth0 速度改为10mb/s,采用半双工;rootlo
45、calhost# ethtool -s eth1 speed 10 duplex halfrootlocalhost# ethtool eth1settings for eth1: supported ports: tp mii supported link modes: 10baset/half 10baset/full 100baset/half 100baset/full supports auto-negotiation: yes advertised link modes: 10baset/half 10baset/full 100baset/half 100baset/full a
46、dvertised auto-negotiation: no speed: 10mb/s 注:速度 10m/s duplex: half 注:半双工 port: mii phyad: 32 transceiver: internal auto-negotiation: off supports wake-on: pumbg wake-on: d current message level: 0x00000007 (7) link detected: no 注:eth1没有激活;把网卡eth0 速度改为100mb/s,采用全双工;rootlocalhost# ethtool -s eth1 sp
47、eed 100 duplex full rootlocalhost# ethtool eth1settings for eth1: supported ports: tp mii supported link modes: 10baset/half 10baset/full 100baset/half 100baset/full supports auto-negotiation: yes advertised link modes: 10baset/half 10baset/full 100baset/half 100baset/full advertised auto-negotiatio
48、n: no speed: 100mb/s 注:速度 100m/s duplex: full 注:全双工 port: mii phyad: 32 transceiver: internal auto-negotiation: off supports wake-on: pumbg wake-on: d current message level: 0x00000007 (7) link detected: no 注:eth1网卡没有激活;二、linux网络基础网络相关配置文件介绍/etc/hosts 包含(本地网络中)已知主机的一个列表,用于主机名解析;文件格式:ip地址 主机名 别名$ cat
49、 /etc/hosts localhost.localdomain localhost /etc/services internet网络服务文件,将网络服务名转换为端口号协议。由 inetd、telnet、tcpdump 和一些其它程序读取。文件中的每一行对应一种服务,它由4个字段组成,中间用tab或空格分隔,分别表示“服务名称”、“使用端口”、“协议名称”以及“别名”;文件格式:服务 端口/端口类型 别名$ cat /etc/services |moretcpmux 1/tcp # tcp port service multiplexerecho 7/tcpecho 7/u
50、dpdiscard 9/tcp sink nulldiscard 9/udp sink nullsystat 11/tcp usersdaytime 13/tcpdaytime 13/udpnetstat 15/tcpqotd 17/tcp quotemsp 18/tcp # message send protocol/etc/hostname 主机名配置文件,该文件只有一行,记录着本机的主机名。主机名$ cat /etc/hostname lt/etc/host.conf 当系统中同时存在dns域名解析和/etc/hosts主机表机制时,由该/etc/host.conf确定主机名解释顺序。o
51、rder hosts,bind #名称解释顺序multi on #允许主机拥有多个ip地址nospoof on #禁止ip地址欺骗order是关键字,定义先用本机hosts主机表进行名称解释,如果不能解释,再搜索bind名称服务器(dns)。/etc/nsswitch.conf 名称服务交换设定文件。它控制了数据库搜寻的工作,包括承认的主机,使用者,群组等。此外,这个档案还定义了所要搜寻的数据库;:hosts: files dns指明主机数据库来自两个地方,files ( /etc/hosts file) 和 dns;cat /etc/nsswitch.conf # to use db, pu
52、t the db in front of files for entries you want to be# looked up first in the databases# example:#passwd: db files nisplus nis#shadow: db files nisplus nis#group: db files nisplus nispasswd: filesshadow: filesgroup: files#hosts: db files nisplus nis dnshosts: files dns# example - obey only what nisplus tells us.#serv
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年化妆品配方师考试理论知识全真模拟试卷及答案(二十)
- 2026年护士事业编制考试医学基础知识模拟试题及答案(十九)
- 事业编计算机岗笔试全真模拟试卷及答案
- 2026事业单位人事岗面试结构化问答高频考题
- 事业单位人事岗面试高频考题试卷及答案
- 红人运营课件
- HRBP岗位职责课件
- 红旗与人物叠加课件
- 后期摄影技巧课件
- 红旗汽车教程课件
- 母乳喂养周职场妈妈指南
- 光学镜片清洁作业指导书
- 2025年国考证监会法律类专业科目真题及答案解析
- 220kV升压站调试施工方案
- 中小学学校维修改造工程施工组织设计方案
- 梅毒患者日常护理要点
- 《电化学储能电站建设项目文件收集与档案管理规范》
- 网络意识形态工作责任制实施细则
- 2026年钻探施工中的环境保护措施
- 2025年音乐视唱模拟真题及答案
- 全国大学生职业规划大赛《时尚传播》专业生涯发展展示
评论
0/150
提交评论