Joshua J. Kugler
2013-Aug-21 21:48 UTC
[CentOS] Problem with DHCP and default route in CentOS
I have a CentOS 6.4 VM that is getting its DHCP information from dnsmasq (a libvirt instance). However, it is not applying the routing information. Attached is a tcpdump of the dhcpc output. You'll see: Default-Gateway Option 3, length 4: 192.168.122.1 However, when I run 'route -n', I get: # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 Any ideas as to why the default route/gateway information isn't being applied? j -- Joshua J. Kugler - Fairbanks, Alaska Azariah Enterprises - Programming and Website Design joshua at azariah.com - Jabber: pedahzur at gmail.com PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A -------------- next part -------------- 14:52:48.824645 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 338) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 52:54:00:93:ff:ac, length 310, xid 0x23b2de1d, Flags [none] (0x0000) Client-Ethernet-Address 52:54:00:93:ff:ac Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Request Requested-IP Option 50, length 4: 192.168.122.3 Parameter-Request Option 55, length 13: Subnet-Mask, BR, Time-Zone, Classless-Static-Route Domain-Name, Domain-Name-Server, Hostname, YD YS, NTP, MTU, Option 119 Default-Gateway Vendor-Class Option 60, length 43: "anaconda-Linux 2.6.32-358.el6.x86_64 x86_64" 14:52:48.825900 IP (tos 0x0, ttl 64, id 65407, offset 0, flags [none], proto UDP (17), length 335) 192.168.122.1.bootps > 192.168.122.3.bootpc: [bad udp cksum 44a1!] BOOTP/DHCP, Reply, length 307, xid 0x23b2de1d, Flags [none] (0x0000) Your-IP 192.168.122.3 Server-IP 192.168.122.1 Client-Ethernet-Address 52:54:00:93:ff:ac Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: ACK Server-ID Option 54, length 4: 192.168.122.1 Lease-Time Option 51, length 4: 3600 RN Option 58, length 4: 1800 RB Option 59, length 4: 3150 Subnet-Mask Option 1, length 4: 255.255.255.0 BR Option 28, length 4: 192.168.122.255 Default-Gateway Option 3, length 4: 192.168.122.1 Domain-Name-Server Option 6, length 4: 192.168.122.1 Hostname Option 12, length 13: "datacollector"
On Wed, Aug 21, 2013 at 5:48 PM, Joshua J. Kugler <joshua at azariah.com>wrote:> I have a CentOS 6.4 VM that is getting its DHCP information from dnsmasq (a > libvirt instance). However, it is not applying the routing information. > Attached is a tcpdump of the dhcpc output. You'll see: > > Default-Gateway Option 3, length 4: 192.168.122.1 > > However, when I run 'route -n', I get: > > # route -n > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface > 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 > eth0 > 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 > eth0 > > Any ideas as to why the default route/gateway information isn't being > applied? >This sure sounds like a bug I discovered on my own 6.4 KVM node configuration. The following added to /etc/dnsmasq.conf remedied a dnsmasq+pxe problem for me (back in May 2013). # ref: https://bugzilla.redhat.com/show_bug.cgi?id=594682#c6 # ref: http://etherboot.org/wiki/dnsmasq#a_potential_problem_and_a_fix dhcp-no-override> > j > > > -- > Joshua J. Kugler - Fairbanks, Alaska > Azariah Enterprises - Programming and Website Design > joshua at azariah.com - Jabber: pedahzur at gmail.com > PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >-- ---~~.~~--- Mike // SilverTip257 //
Joshua J. Kugler
2013-Aug-21 23:39 UTC
[CentOS] Problem with DHCP and default route in CentOS
Further investigation. If I create a route-eth0 file and put this in it: default 192.168.122.1 dev eth0 I get this upon network restart: Error: either "to" is duplicate, or "192.168.122.1" is a garbage. Which this page: http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1%2dnetworkscripts%2dstatic%2droutes.html says I will get if the default route is set via DHCP. So, the system is seeing the default route, and apparently even trying to set it, but it's not lasting. I'm really lost on this one. j On Wednesday, August 21, 2013 13:48:02 Joshua J. Kugler wrote:> I have a CentOS 6.4 VM that is getting its DHCP information from dnsmasq (a > libvirt instance). However, it is not applying the routing information. > Attached is a tcpdump of the dhcpc output. You'll see: > > Default-Gateway Option 3, length 4: 192.168.122.1 > > However, when I run 'route -n', I get: > > # route -n > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 > 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 > 0 eth0 > > Any ideas as to why the default route/gateway information isn't being > applied? > > j-- Joshua J. Kugler - Fairbanks, Alaska Azariah Enterprises - Programming and Website Design joshua at azariah.com - Jabber: pedahzur at gmail.com PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A