Name Services on Linux
● อย่างไร
– http://www.google.com สำาหรับคน
– 173.94.38.{176-180}:80 สำาหรับคอมพิวเตอร์
Name Services (ต่อ)
● Linux resolve address (แปลงจากชือเป็ น address)
่
อย่างไร?
● อย่่ใน C library function
● ซึงสามารถ config ได้
่
– Name Service Configuration – /etc/nsswitch.conf
● เริมจาก /etc/nsswitch.conf
่
Name Services (ต่อ)
● Server / minimum install
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Name Services (ต่อ)
– กรณีของ desktop ทีติดตัง Multicast DNS (avahi)
่ ้
passwd: compat
group: compat
shadow: compat
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Name Services (ต่อ)
● Name Service Switch ระบุ database สำาหรับ name เป็ น
number
passwd: compat
group: compat
shadow: compat
● สำาหรับ password, group, shadow ใช้ compat mode
Name Services (ต่อ)
● dns ในทีนคือ domain name system
่ ี้
● ซึงจะใช้ config ทีระบุไว้ใน /etc/resolv.conf
่ ่
– domain ระบุ local domain name
– search ระบุ domain part ในกรณีทใช้ชือ host แบบสัน
ี่ ่ ้
– nameserver ระบุ DNS server