Talk:Local testing with KVM, VDE and dnsmasq: Difference between revisions

From FAIWiki
Jump to navigation Jump to search
(Correct name.)
(Add dhcpd.conf)
 
Line 8: Line 8:
DHCPDISCOVER from 52:54:00:12:34:56 via tap0
DHCPDISCOVER from 52:54:00:12:34:56 via tap0
DHCPOFFER on 172.25.25.10 to 52:54:00:12:34:56 via tap0
DHCPOFFER on 172.25.25.10 to 52:54:00:12:34:56 via tap0
</pre>
/etc/dhcp3/dhcpd.conf is as follows (minus comments)
<pre>
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 172.25.25.0 netmask 255.255.255.0 {
range 172.25.25.10 172.25.25.100;
option routers 172.25.25.1;
}
</pre>
</pre>


/var/run/vde2/tap0.ctl didn't initially exist. I had to load the tun module before bringing the interface up. It's probably worth saying this in the docs.
/var/run/vde2/tap0.ctl didn't initially exist. I had to load the tun module before bringing the interface up. It's probably worth saying this in the docs.
[[User:RusselJones|Russell Jones]] 19:50, 13 October 2009 (CEST)
 
[[User:RusselJones|Russell Jones]] 19:50, 13 October 2009 (CEST)

Latest revision as of 18:45, 14 October 2009

Note that you don't need dhcp3-server and tftpd-hpa which are pulled in by default.

Really? Doesn't the use of tap and -net nic stop the internal dhcp from working for you? I used the command line vdeq kvm -m 256 -net nic,vlan=1 -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl -hda 4g-pxe-test.img -boot n -tftp /srv/fai/tftp/

And I just get "Searching for server (DHCP)....No IP address" with the second bit repeated many times. Perhaps another option is needed? I've tried a real DHCP server, listening on tap0's IP. It gets the discover packet, and sends an offer, but qemu's network card emulation seems to ignore it. I ran iptables -F and made sure all the policies are set to accept, so it's not that.

DHCPDISCOVER from 52:54:00:12:34:56 via tap0
DHCPOFFER on 172.25.25.10 to 52:54:00:12:34:56 via tap0

/etc/dhcp3/dhcpd.conf is as follows (minus comments)

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 172.25.25.0 netmask 255.255.255.0 {
	range 172.25.25.10 172.25.25.100;
	option routers 172.25.25.1;
}


/var/run/vde2/tap0.ctl didn't initially exist. I had to load the tun module before bringing the interface up. It's probably worth saying this in the docs.

Russell Jones 19:50, 13 October 2009 (CEST)