DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

12
DNS & DHCP on CentOS 5.7 4/12/54 อ.อออออออ ออออ อออออออ

Transcript of DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

Page 1: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

DNS & DHCP on CentOS 5.74/12/54อ.ดรั�สวิ�น วิงศ์�ปรัเมษฐ์�

Page 2: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

Infrastructure

Page 3: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toSet Static IP

/etc/sysconfig/networking/profiles/default/ifcfg-eth0

Install “ DNSMASQ ” packetConfig

/etc/hosts/etc/resolv.conf/etc/dnsmasq.conf

Start Service “ DNSMASQ ”

Page 4: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

Tools & CommandsTools

Nano – Text EditorCommands

ifconfig - view / add ip address nano - run nano editor rpm - operate packet rpm cd - go to directory ls - list file / folder in directory service - operate service chkconfig - check service nslookup- show dns server

Page 5: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

Tools & Commandsrpm

- i - install-h, -v - show “#” while operate-e - erase/uninstall-nodeps - disable dependent other

node-qa - list all installed packet

other option| more - viwe more page

Page 6: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

Tools & Commands#chkconfig --listlevel

0 - halt (Do NOT set initdefault to this)1 - Single user mode2 - Multiuser, without NFS (The same as 3, if you do not have networking)3 - Full multiuser mode4 - unused5 - X116 - reboot (Do NOT set initdefault to this)

Page 7: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toSet Static IP

#nano /etc/sysconfig/networking/profiles/default/ifcfg-eth0

# ifdown eth0# ifup eth0

Page 8: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toInstall “ DNSMASQ ” packet#rpm -ivh dnsmasq-2.59-1.el5.rfx.x86_64.rpm

Unistall packet#rpm -evh --nodeps xxxxxxxx.rpm

Page 9: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toConfig

#nano /etc/hosts

Page 10: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toConfig

#nano /etc/resolv.conf

Page 11: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toConfig

#nano /etc/dnsmasq.conf

uncomment and set the following options expand-hostsdomain=example.comdhcp-range=192.168.0.50,192.168.0.150,12hdhcp-host=11:22:33:44:55:66,foo,192.168.0.10

Page 12: DNS & DHCP on CentOS 5.7 4/12/54 อ. ดรัสวิน วงศ์ปรเมษฐ์

How toStart Service “ DNSMASQ ”

#service dnsmasq start

Check IP on your Client