Home | Mirror | Search

第 93 章 Networking

目錄

1. Hostname
1.1. /etc/hostname
1.2. /etc/host.conf
1.3. /etc/hosts
1.4. hosts.allow / hosts.deny
1.5. /etc/resolv.conf
2. Network adapter
3. Ethernet Interfaces
3.1. ifquery
3.2. DHCP
3.3. Static IP
4. Mask
5. Gateway
6. Configuring Name Server Lookups
7. sysctl
8. bonding
8.1. Ubuntu
9. Finding optimal MTU
10. 介面名稱

1. Hostname

1.1. /etc/hostname

# cat /etc/hostname
web1.example.com
		

1.2. /etc/host.conf

解析順序配置檔案

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

首先在/etc/hosts檔案中尋找,如果不存在,再去DNS伺服器中尋找

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
		

1.4. hosts.allow / hosts.deny

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

許可IP/禁止IP,相當於黑白名單

1.5. /etc/resolv.conf

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