欢迎来到天天文库
浏览记录
ID:51993821
大小:1.08 MB
页数:20页
时间:2020-03-27
《《管理Linux网络》PPT课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第十章 管理Linux网络本章目标了解Linux中网络设备的命名规则掌握修改网络参数的方法使用netconfig命令修改网络参数通过修改配置文件改变网络参数利用各类监视工具检查网络状态本章内容10.4网络状况监视工具10.3与网络相关的配置文件10.2使用网络配置工具10.1常见网络设备10.1常见网络设备lo回环设备eth0系统内第一块以太网卡ppp0系统内第一个串行设备多数出现在使用ADSL拨入Internet时10.2使用网络配置工具10.2.1在命令行中配置网络参数10.2.2带有交互功能的netcon
2、fig命令10.2.1在命令行中配置网络参数ifconfigroutehostname#ifconfigeth0eth0Linkencap:EthernetHWaddr00:0C:29:D9:2E:B9inetaddr:192.168.149.2Bcast:192.168.149.255Mask:255.255.255.0inet6addr:fe80::20c:29ff:fed9:2eb9/64Scope:LinkUPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1RXpack
3、ets:494errors:0dropped:0overruns:0frame:0TXpackets:479errors:0dropped:0overruns:0carrier:0collisions:0txqueuelen:1000RXbytes:48033(46.9KiB)TXbytes:86344(84.3KiB)Interrupt:169Baseaddress:0x2000#ifconfigeth0192.168.149.10netmask255.255.255.0#ifconfigeth0:110.0
4、.0.1netmask255.255.255.0#ifconfigeth0down#ifconfigeth0up10.2.1在命令行中配置网络参数ifconfigroutehostname#route-n查看路由信息KernelIProutingtableDestinationGatewayGenmaskFlagsMetricRefUseIface192.168.149.0*255.255.255.0U000eth010.0.0.0*255.0.0.0U000eth011.0.0.0*255.0.0.0U000
5、eth0#routeadddefaultgw192.168.149.1#routeadd-net10.0.0.0/24(要到达的网络)gw192.168.149.1(通过本机的哪个接口出去)#routedel-net10.0.0.0/2410.2.1在命令行中配置网络参数ifconfigRouteUname–a查看系统内核hostname#hostnamewnt.com.cn#hostname-i#hostnamelinux-srv#cat/etc/hosts127.0.0.1linux-srvlocalhos
6、tlocalhost.localdomain10.2.2带有交互功能的netconfig命令配置信息被保存在下列文件中:/etc/sysconfig/network-scripts/ifcfg-ethN/etc/resolv.conf重新启动网络服务#servicenetworkrestartShuttingdowninterfaceeth0:[OK]Shuttingdownloopbackinterface:[OK]Bringinguploopbackinterface:[OK]Bringingupinter
7、faceeth0:[OK]10.3与网络相关的配置文件/etc/sysconfig/network-scripts/ifcfg-ethN/etc/sysconfig/network/etc/hosts/etc/host.conf/etc/resolv.confDEVICE=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=192.168.149.2NETMASK=255.255.255.0GATEWAY=192.168.149.110.3与网络相关的配置文件/etc/sysconfig/
8、network-scripts/ifcfg-ethN/etc/sysconfig/network/etc/hosts/etc/host.conf/etc/resolv.confNETWORKING=yesHOSTNAME=localhost.localdomain10.3与网络相关的配置文件/etc/sysconfig/network-scripts/ifcfg-ethN/etc/sy
此文档下载收益归作者所有