02.01.2016 Views

Linux

linux_admin_text-1.0.0_2

linux_admin_text-1.0.0_2

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 <br />

2.5.7 <strong>Linux</strong> DHCP <br />

<strong>Linux</strong> DHCP <br />

BOOTPROTO= dhcp<br />

DHCP DNS /etc/resolv.conf<br />

/etc/resolv.conf <br />

PEERDNS yes <br />

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0<br />

DEVICE= eth0<br />

BOOTPROTO= dhcp<br />

ONBOOT= yes<br />

PEERDNS=yes<br />

network <br />

# service network restart<br />

IP DNS <br />

$ ifconfig eth0<br />

eth0 Link encap:Ethernet HWaddr 00:1C:42:D0:CA:A0<br />

inet addr:192.168.0.200 Bcast:192.168.0.255 Mask:255.255.255.0<br />

<br />

$ route<br />

Kernel IP routing table<br />

Destination Gateway Genmask Flags Metric Ref Use Iface<br />

192.168.0.0 ∗ 255.255.255.0 U 1 0 0 eth0<br />

default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0<br />

$ cat /etc/resolv.conf<br />

# Generated by NetworkManager<br />

nameserver 192.168.0.1<br />

nameserver 192.168.0.2<br />

www.lpi.or.jp 65 (C) LPI-Japan

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!