Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

第 12 章 Networking

目录

12.1. Hostname
12.1.1. /etc/hostname
12.1.2. /etc/host.conf
12.1.3. /etc/hosts
12.1.4. hosts.allow / hosts.deny
12.1.5. /etc/resolv.conf
12.2. Network adapter
12.2.1. 接口名称
12.3. Ethernet Interfaces
12.3.1. ifquery
12.3.2. DHCP
12.3.3. Static IP
12.4. Mask
12.5. Gateway
12.6. Configuring Name Server Lookups
12.7. IP forwarding(IP转发)
12.8. bonding
12.8.1. Ubuntu
12.9. Finding optimal MTU
12.10. wireless
12.10.1. rfkill - tool for enabling and disabling wireless devices
12.10.2. iwlist - Get more detailed wireless information from a wireless interface
12.10.3. iwconfig - configure a wireless network interface
12.10.4. /proc/net/wireless

12.1. Hostname

12.1.1. /etc/hostname

# cat /etc/hostname
web1.example.com
		

12.1.2. /etc/host.conf

解析顺序配置文件

[root@development bin]# cat /etc/host.conf
order hosts,bind
		

首先在/etc/hosts文件中寻找,如果不存在,再去DNS服务器中寻找

12.1.3. /etc/hosts

IP地址后面TAB符,然后写主机地址

127.0.0.1       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.1.10	development.example.com development
		

12.1.4. hosts.allow / hosts.deny

/etc/hosts.allow 和 /etc/hosts.deny

许可IP/禁止IP,相当于黑白名单

12.1.5. /etc/resolv.conf

		
search example.com
nameserver 208.67.222.222
nameserver 208.67.220.220
		
		
comments powered by Disqus