openstack dhcp调试
openstack的dhcpserver默认值dnsmasq软件实施,经ps -ef | grep dnsmasq 查看。当虚拟机启动过程启动dhcp求,日志可以是在主机系统日志:
May 23 22:30:29 localhost dnsmasq-dhcp[5043]: DHCPDISCOVER(tapf7321a93-ac) fa:16:3e:33:0a:6a
May 23 22:30:29 localhost dnsmasq-dhcp[5043]: DHCPOFFER(tapf7321a93-ac) 10.0.0.41 fa:16:3e:33:0a:6a
May 23 22:30:29 localhost dnsmasq-dhcp[5043]: DHCPREQUEST(tapf7321a93-ac) 10.0.0.41 fa:16:3e:33:0a:6a
May 23 22:30:29 localhost dnsmasq-dhcp[5043]: DHCPACK(tapf7321a93-ac) 10.0.0.41 fa:16:3e:33:0a:6a host-10-0-0-41
能够看到dhcp四个阶段:发现、提供、选择、确认。
同一时候能够通过 nova console-log instance查看虚拟机启动日志
Starting network...
udhcpc (v1.18.5) started
Sending discover...
Sending select for 10.0.0.41...
Lease of 10.0.0.41 obtained, lease time 86400
假设出现dhcp问题能够先查看日志,重新启动dnsmasq进程。
killall dnsmasq
service neutron-dhcp-agent restart
dhcp使用的是udp协议,默认port为68和67(68port发送到67),能够
tcpdump -n port 67 or port 68
版权声明:本文博主原创文章。博客,未经同意不得转载。