Using the HTTP server via TAP

mx at ...19... mx at ...19...
Thu Jun 3 10:05:22 CEST 2010


Hi Peter,
 
I think that it would be very helpful to trace what is actually happening. Have
a look at the tcpdump utility or better at wireshark which is much more
convenient to use.
 
Both tools will show the actual message flows during both dhcp handshakes, in
particular you can inspect which MAC addresses the packets contain, if any of
the guests suggests a distinct IP address or if any vlan tag is set as your kvm
indicates.
 
Wireshark allows for saving the packet dump in a pcap file (as well as tcpdump
does, of course) which you could post here.
 
Cheers
 
Sven
 
 

Peter Nguyen <petern at ...34...> hat am 3. Juni 2010 um 07:28
geschrieben:

> Hi all,
>
> I think i might have figured out my issue. The IP address of 10.0.0.1
> corresponds to the TAP device, which suggests that the requests are
> coming from the TAP device (which it should be i think, unless someone
> can correct me). So i guess it might not actually be possible to get the
> starting IP address ie. the IP address of the XP VM (which is obviously
> not 10.0.0.1).
>
> Peter
>
> Peter Nguyen wrote:
> > Sven,
> >
> > OK, so now i've got 2 different mac addresses for each of the instances.
> > However, it seems to me that the remote ip addresses obtained by the web
> > server
> > are the same, regardless of the machine making the request (ie. either the
> > XP vm
> > or the host browser). Any idea as to why this is happening? I mean, the IP
> > address that XP obtains is not 10.0.0.1, yet when the web server receives a
> > HTTP
> > request, the IP address is always 10.0.0.1.
> >
> > BTW, i used this command to run my XP instance:
> >
> > kvm -localtime -cdrom Microsoft\ Windows\ XP\ Professional\ \(SP2\).iso -m
> > 384
> > -boot d windows.img
> >
> > In this case, I figured that I don't need to supply a mac address for the XP
> > vm
> > given the web server already has a unique mac address. Furthermore, I've had
> > difficulties in assigning a mac address to the xp vm as i keep getting the
> > following message:
> >
> > Warning: vlan 0 is not connected to host network
> >
> > Thanks
> > Peter
> >
> > Quoting "mx at ...19..." <mx at ...19...>:
> >
> >   
> >> Â
> >> Hi Peter,
> >> Â
> >> forget what I've said about qemu :)
> >> Â
> >> I invoke qemu this way:
> >> Â
> >> qemu/i386-softmmu/qemu -kernel $1 -serial stdio -m 1024 -usbdevice mouse
> >> -usbdevice keyboard -net nic,model=pcnet,macaddr=00:81:71:61:51:41 -net
> >> tap,ifname=tap0,script=no,downscript=no
> >> Â
> >> Note that in my commandline the macaddr param sticks to the -net nic param
> >> while
> >> in yours it sticks to the -net tap param.
> >> Â
> >> Isn't this a nice candidate?
> >> Â
> >> Cheers
> >> Â
> >> Sven
> >> Â
> >>
> >> Peter Nguyen <peter.nguyen at ...35...> hat am 2. Juni 2010 um
> >> 14:18
> >> geschrieben:
> >>
> >>     
> >>> BTW, this is the output from dhcpd3.
> >>>
> >>> Wrote 2 leases to leases file.
> >>> Listening on LPF/tap0/de:64:1c:dc:00:f4/10.0.0/24
> >>> Sending on   LPF/tap0/de:64:1c:dc:00:f4/10.0.0/24
> >>> Sending on   Socket/fallback/fallback-net
> >>> DHCPDISCOVER from 52:54:00:12:34:56 via tap0
> >>> DHCPOFFER on 10.0.0.17 to 52:54:00:12:34:56 via tap0
> >>> DHCPREQUEST for 10.0.0.17 (10.0.0.1) from 52:54:00:12:34:56 via tap0
> >>> DHCPACK on 10.0.0.17 to 52:54:00:12:34:56 via tap0
> >>>
> >>> Also, this is the command i used to execute the web server via qemu:
> >>>
> >>> sudo qemu -m 128 -serial stdio -no-kqemu -hda c.img -net nic,model=pcnet
> >>>       
> >> -net
> >>     
> >>> tap,ifname=tap0,macaddr=00:81:71:61:51:41,script=no,downscript=no
> >>>
> >>> It seems to me that the dhcp output is always the same, even if i use the
> >>> "02-00-00-00-00-01" mac address.
> >>>
> >>> Peter
> >>>
> >>>
> >>> Quoting "mx at ...19..." <mx at ...19...>:
> >>>
> >>>       
> >>>> Hi Peter,
> >>>> ÂÂ
> >>>> I'm not sure if I've got your setup right or not.
> >>>> ÂÂ
> >>>> You have a host operating system (guess linux) with two qemu instances,
> >>>>         
> >> one
> >>     
> >>>> running Windows XP and the other running genode with the webserver.
> >>>> ÂÂ
> >>>> Your host system also runs a dhcp server which assigns the same ip
> >>>>         
> >> address
> >>     
> >>>> to
> >>>> both qemu instances.
> >>>> ÂÂ
> >>>> This assignment could be caused by the fact that both qemu instances have
> >>>> the
> >>>> same mac address.
> >>>> ÂÂ
> >>>> The 10.02 release notes state that the nic driver "fakes an ethernet NIC
> >>>> with
> >>>> the MAC address 02-00-00-00-00-01". Where could that MAC address come
> >>>>         
> >> from?
> >>     
> >>>> The
> >>>> driver obtains it from qemu in dde_tx_handler:
> >>>> ÂÂ
> >>>> dde_linux26_net_get_mac_addr(1, (unsigned char*)_mac_addr.addr);
> >>>> ÂÂ
> >>>> ÂÂ
> >>>> This schould be exactly that MAC address you shoud have configured when
> >>>> starting
> >>>> up qemu (did you?):
> >>>> ÂÂ
> >>>> This could look like "-net nic,model=pcnet,macaddr=00:81:71:61:51:41"
> >>>> ÂÂ
> >>>> Perhaps you forgot this step?
> >>>> ÂÂ
> >>>> If you haven't, it would be helpful if you provided a Wireshark trace
> >>>>         
> >> taken
> >>     
> >>>> from
> >>>> your tap interface.
> >>>> ÂÂ
> >>>> Cheers
> >>>> ÂÂ
> >>>> Sven
> >>>> ÂÂ
> >>>>
> >>>> Peter Nguyen <petern at ...34...> hat am 2. Juni 2010 um 05:04
> >>>> geschrieben:
> >>>>
> >>>>         
> >>>>> Hi,
> >>>>>
> >>>>> I was just wondering in using TAP with the HTTP server (and following
> >>>>> the instructions in the genode 10.02 documentation), i've noticed that
> >>>>> when i have multiple connections to the server, whereby i have a
> >>>>>           
> >> windows
> >>     
> >>>>> xp virtual machine making requests to the server in addition to the
> >>>>>           
> >> host
> >>     
> >>>>> operating system (the XP vm is running in qemu as well as the web
> >>>>> server), the IP addresses that the web server obtains are always the
> >>>>> same regardless of the machine making the requests. Does anyone know
> >>>>>           
> >> how
> >>     
> >>>>> to provide unique IP addresses for each VM ie. is there an option i
> >>>>> can/need to specify when i run qemu? or is there something i have to do
> >>>>> with dhcpd3 or the conf,pid or lease files to ensure this
> >>>>>           
> >> functionality.
> >>     
> >>>>> Thanks
> >>>>> Peter
> >>>>>
> >>>>>
> >>>>>           
> >> ---------------------------------------------------------------------------
> >> -
> >>     
> >>>> --
> >>>>         
> >>>>> _______________________________________________
> >>>>> Genode-main mailing list
> >>>>> Genode-main at lists.sourceforge.net
> >>>>> https://lists.sourceforge.net/lists/listinfo/genode-main
> >>>>>           
> >>>> ÂÂ
> >>>> --
> >>>> Sven Fülster
> >>>>         
> >>>
> >>>
> >>>       
> >> ---------------------------------------------------------------------------
> >> ---
> >>     
> >>> _______________________________________________
> >>> Genode-main mailing list
> >>> Genode-main at lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/genode-main
> >>>       
> >> Â
> >> Â
> >> --
> >> Sven Fülster
> >>
> >>
> >> Â
> >> Â
> >>
> >> Peter Nguyen <peter.nguyen at ...35...> hat am 2. Juni 2010 um
> >> 14:18
> >> geschrieben:
> >>
> >>     
> >>> BTW, this is the output from dhcpd3.
> >>>
> >>> Wrote 2 leases to leases file.
> >>> Listening on LPF/tap0/de:64:1c:dc:00:f4/10.0.0/24
> >>> Sending on   LPF/tap0/de:64:1c:dc:00:f4/10.0.0/24
> >>> Sending on   Socket/fallback/fallback-net
> >>> DHCPDISCOVER from 52:54:00:12:34:56 via tap0
> >>> DHCPOFFER on 10.0.0.17 to 52:54:00:12:34:56 via tap0
> >>> DHCPREQUEST for 10.0.0.17 (10.0.0.1) from 52:54:00:12:34:56 via tap0
> >>> DHCPACK on 10.0.0.17 to 52:54:00:12:34:56 via tap0
> >>>
> >>> Also, this is the command i used to execute the web server via qemu:
> >>>
> >>> sudo qemu -m 128 -serial stdio -no-kqemu -hda c.img -net nic,model=pcnet
> >>>       
> >> -net
> >>     
> >>> tap,ifname=tap0,macaddr=00:81:71:61:51:41,script=no,downscript=no
> >>>
> >>> It seems to me that the dhcp output is always the same, even if i use the
> >>> "02-00-00-00-00-01" mac address.
> >>>
> >>> Peter
> >>>
> >>>
> >>> Quoting "mx at ...19..." <mx at ...19...>:
> >>>
> >>>       
> >>>> Hi Peter,
> >>>> ÂÂ
> >>>> I'm not sure if I've got your setup right or not.
> >>>> ÂÂ
> >>>> You have a host operating system (guess linux) with two qemu instances,
> >>>>         
> >> one
> >>     
> >>>> running Windows XP and the other running genode with the webserver.
> >>>> ÂÂ
> >>>> Your host system also runs a dhcp server which assigns the same ip
> >>>>         
> >> address
> >>     
> >>>> to
> >>>> both qemu instances.
> >>>> ÂÂ
> >>>> This assignment could be caused by the fact that both qemu instances have
> >>>> the
> >>>> same mac address.
> >>>> ÂÂ
> >>>> The 10.02 release notes state that the nic driver "fakes an ethernet NIC
> >>>> with
> >>>> the MAC address 02-00-00-00-00-01". Where could that MAC address come
> >>>>         
> >> from?
> >>     
> >>>> The
> >>>> driver obtains it from qemu in dde_tx_handler:
> >>>> ÂÂ
> >>>> dde_linux26_net_get_mac_addr(1, (unsigned char*)_mac_addr.addr);
> >>>> ÂÂ
> >>>> ÂÂ
> >>>> This schould be exactly that MAC address you shoud have configured when
> >>>> starting
> >>>> up qemu (did you?):
> >>>> ÂÂ
> >>>> This could look like "-net nic,model=pcnet,macaddr=00:81:71:61:51:41"
> >>>> ÂÂ
> >>>> Perhaps you forgot this step?
> >>>> ÂÂ
> >>>> If you haven't, it would be helpful if you provided a Wireshark trace
> >>>>         
> >> taken
> >>     
> >>>> from
> >>>> your tap interface.
> >>>> ÂÂ
> >>>> Cheers
> >>>> ÂÂ
> >>>> Sven
> >>>> ÂÂ
> >>>>
> >>>> Peter Nguyen <petern at ...34...> hat am 2. Juni 2010 um 05:04
> >>>> geschrieben:
> >>>>
> >>>>         
> >>>>> Hi,
> >>>>>
> >>>>> I was just wondering in using TAP with the HTTP server (and following
> >>>>> the instructions in the genode 10.02 documentation), i've noticed that
> >>>>> when i have multiple connections to the server, whereby i have a
> >>>>>           
> >> windows
> >>     
> >>>>> xp virtual machine making requests to the server in addition to the
> >>>>>           
> >> host
> >>     
> >>>>> operating system (the XP vm is running in qemu as well as the web
> >>>>> server), the IP addresses that the web server obtains are always the
> >>>>> same regardless of the machine making the requests. Does anyone know
> >>>>>           
> >> how
> >>     
> >>>>> to provide unique IP addresses for each VM ie. is there an option i
> >>>>> can/need to specify when i run qemu? or is there something i have to do
> >>>>> with dhcpd3 or the conf,pid or lease files to ensure this
> >>>>>           
> >> functionality.
> >>     
> >>>>> Thanks
> >>>>> Peter
> >>>>>
> >>>>>
> >>>>>           
> >> ---------------------------------------------------------------------------
> >> -
> >>     
> >>>> --
> >>>>         
> >>>>> _______________________________________________
> >>>>> Genode-main mailing list
> >>>>> Genode-main at lists.sourceforge.net
> >>>>> https://lists.sourceforge.net/lists/listinfo/genode-main
> >>>>>           
> >>>> ÂÂ
> >>>> --
> >>>> Sven Fülster
> >>>>         
> >>>
> >>>
> >>>       
> >> ---------------------------------------------------------------------------
> >> ---
> >>     
> >>> _______________________________________________
> >>> Genode-main mailing list
> >>> Genode-main at lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/genode-main
> >>>       
> >> Â
> >> Â
> >> --
> >> Sven Fülster
> >> xms at ...38...
> >>     
> >
> >
> >
> > ----------------------------------------------------------------------------
> > --
> >
> > _______________________________________________
> > Genode-main mailing list
> > Genode-main at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/genode-main
> >   
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Genode-main mailing list
> Genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
 
--
Sven Fülster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20100603/64e8b579/attachment.html>


More information about the users mailing list