| 185 | |
| 186 | == test == |
| 187 | * dhclient -> 00:0c:29:73:3d:94 |
| 188 | * dhclient2 -> 00:50:56:25:13:28 |
| 189 | * winxp -> 00:0c:29:f0:16:80 |
| 190 | * winxp2 -> 00:50:56:26:9b:1c |
| 191 | |
| 192 | * 上記/etc/dhcp/dhcpd.conf.d/local.mitty.jpの通り、dhclient, winxp2が設定されている |
| 193 | |
| 194 | === dhcpd === |
| 195 | * mitty@dhcpd:~$ tailf /var/log/syslog |
| 196 | {{{ |
| 197 | May 5 14:08:43 dhcpd dhcpd: DHCPDISCOVER from 00:0c:29:73:3d:94 via eth0 |
| 198 | May 5 14:08:43 dhcpd dhcpd: DHCPOFFER on 192.168.0.250 to 00:0c:29:73:3d:94 via eth0 |
| 199 | May 5 14:08:43 dhcpd dhcpd: DHCPREQUEST for 192.168.0.250 (192.168.0.254) from 00:0c:29:73:3d:94 via eth0 |
| 200 | May 5 14:08:43 dhcpd dhcpd: DHCPACK on 192.168.0.250 to 00:0c:29:73:3d:94 via eth0 |
| 201 | |
| 202 | |
| 203 | May 5 14:09:59 dhcpd dhcpd: DHCPDISCOVER from 00:50:56:25:13:28 via eth0 |
| 204 | May 5 14:10:00 dhcpd dhcpd: DHCPOFFER on 192.168.1.100 to 00:50:56:25:13:28 via eth0 |
| 205 | May 5 14:10:00 dhcpd dhcpd: DHCPREQUEST for 192.168.1.100 (192.168.0.254) from 00:50:56:25:13:28 via eth0 |
| 206 | May 5 14:10:00 dhcpd dhcpd: DHCPACK on 192.168.1.100 to 00:50:56:25:13:28 via eth0 |
| 207 | |
| 208 | |
| 209 | May 5 14:10:33 dhcpd dhcpd: DHCPDISCOVER from 00:0c:29:f0:16:80 via eth0 |
| 210 | May 5 14:10:34 dhcpd dhcpd: DHCPOFFER on 192.168.1.101 to 00:0c:29:f0:16:80 (winxp) via eth0 |
| 211 | May 5 14:10:34 dhcpd named[1098]: client 192.168.0.254#60107: updating zone 'dhcp.mitty.jp/IN': adding an RR at 'winxp.dhcp.mitty.jp' A |
| 212 | May 5 14:10:34 dhcpd named[1098]: client 192.168.0.254#60107: updating zone 'dhcp.mitty.jp/IN': adding an RR at 'winxp.dhcp.mitty.jp' TXT |
| 213 | May 5 14:10:34 dhcpd dhcpd: Added new forward map from winxp.dhcp.mitty.jp to 192.168.1.101 |
| 214 | May 5 14:10:34 dhcpd named[1098]: client 192.168.0.254#41458: updating zone '1.168.192.in-addr.arpa/IN': deleting rrset at '101.1.168.192.in-addr.arpa' PTR |
| 215 | May 5 14:10:34 dhcpd named[1098]: client 192.168.0.254#41458: updating zone '1.168.192.in-addr.arpa/IN': adding an RR at '101.1.168.192.in-addr.arpa' PTR |
| 216 | May 5 14:10:34 dhcpd dhcpd: added reverse map from 101.1.168.192.in-addr.arpa. to winxp.dhcp.mitty.jp |
| 217 | May 5 14:10:34 dhcpd dhcpd: DHCPREQUEST for 192.168.1.101 (192.168.0.254) from 00:0c:29:f0:16:80 (winxp) via eth0 |
| 218 | May 5 14:10:34 dhcpd dhcpd: DHCPACK on 192.168.1.101 to 00:0c:29:f0:16:80 (winxp) via eth0 |
| 219 | |
| 220 | |
| 221 | May 5 14:13:23 dhcpd dhcpd: DHCPDISCOVER from 00:50:56:26:9b:1c via eth0 |
| 222 | May 5 14:13:23 dhcpd dhcpd: DHCPOFFER on 192.168.0.2 to 00:50:56:26:9b:1c via eth0 |
| 223 | May 5 14:13:23 dhcpd dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:50:56:26:9b:1c via eth0 |
| 224 | May 5 14:13:23 dhcpd dhcpd: DHCPACK on 192.168.0.2 to 00:50:56:26:9b:1c via eth0 |
| 225 | }}} |
| 226 | |
| 227 | === dhclient === |
| 228 | * -> local.mitty.jp |
| 229 | |
| 230 | * @dhcpd:~$ ssh 192.168.0.250 |
| 231 | |
| 232 | * @dhclient:~$ cat /etc/resolv.conf |
| 233 | {{{ |
| 234 | domain local.mitty.jp |
| 235 | search local.mitty.jp local.mitty.jp. dhcp.mitty.jp. |
| 236 | nameserver 192.168.0.254 |
| 237 | }}} |
| 238 | * @dhclient:~$ /sbin/ifconfig |
| 239 | {{{ |
| 240 | eth0 Link encap:Ethernet HWaddr 00:0c:29:73:3d:94 |
| 241 | inet addr:192.168.0.250 Bcast:192.168.0.255 Mask:255.255.254.0 |
| 242 | |
| 243 | (snip) |
| 244 | }}} |
| 245 | * @dhclient:~$ ip route |
| 246 | {{{ |
| 247 | 192.168.0.0/23 dev eth0 proto kernel scope link src 192.168.0.250 |
| 248 | default via 192.168.0.254 dev eth0 |
| 249 | }}} |
| 250 | * @dhclient:~$ ping winxp |
| 251 | {{{ |
| 252 | PING winxp.dhcp.mitty.jp (192.168.1.101) 56(84) bytes of data. |
| 253 | 64 bytes from winxp.dhcp.mitty.jp (192.168.1.101): icmp_req=1 ttl=128 time=3.98 ms |
| 254 | 64 bytes from winxp.dhcp.mitty.jp (192.168.1.101): icmp_req=2 ttl=128 time=0.471 ms |
| 255 | 64 bytes from winxp.dhcp.mitty.jp (192.168.1.101): icmp_req=3 ttl=128 time=0.353 ms |
| 256 | ^C |
| 257 | |
| 258 | (snip) |
| 259 | }}} |
| 260 | |
| 261 | === dhclient2 === |
| 262 | * -> dhcp.mitty.jp |
| 263 | |
| 264 | * @dhcpd:~$ ssh 192.168.1.100 |
| 265 | |
| 266 | * @dhclient2:~$ cat /etc/resolv.conf |
| 267 | {{{ |
| 268 | domain dhcp.mitty.jp |
| 269 | search dhcp.mitty.jp local.mitty.jp. dhcp.mitty.jp. |
| 270 | nameserver 192.168.0.254 |
| 271 | }}} |
| 272 | * @dhclient2:~$ /sbin/ifconfig |
| 273 | {{{ |
| 274 | eth0 Link encap:Ethernet HWaddr 00:50:56:25:13:28 |
| 275 | inet addr:192.168.1.100 Bcast:192.168.0.255 Mask:255.255.254.0 |
| 276 | |
| 277 | (snip) |
| 278 | }}} |
| 279 | * @dhclient2:~$ ip route |
| 280 | {{{ |
| 281 | 192.168.0.0/23 dev eth0 proto kernel scope link src 192.168.1.100 |
| 282 | default via 192.168.0.254 dev eth0 |
| 283 | }}} |
| 284 | * @dhclient2:~$ ping dhclient |
| 285 | {{{ |
| 286 | PING dhclient.local.mitty.jp (192.168.0.250) 56(84) bytes of data. |
| 287 | 64 bytes from dhclient.local.mitty.jp (192.168.0.250): icmp_req=1 ttl=64 time=0.928 ms |
| 288 | ^C |
| 289 | |
| 290 | (snip) |
| 291 | }}} |