* [Qemu-devel] user-net -redir working?
@ 2005-11-20 22:45 Richard Neill
2005-11-21 6:34 ` John R. Hogerhuis
0 siblings, 1 reply; 6+ messages in thread
From: Richard Neill @ 2005-11-20 22:45 UTC (permalink / raw)
To: qemu-devel
Does the user-net redirection for tcp actually work?
I have been unable to make it work at all!
I've tried several different host machines (all Linux, different
versions of Qemu from 0.6.1 to 0.7.2), and different guests (Win98 and
Knoppix). But it doesn't work. Eg:
qemu -cdrom /dev/cdrom -boot d -user-net -redir tcp:2300::2301
In Guest (knoppix):
netcat -l -p 2301
On Host:
netcat localhost 2300
This connection is accepted (Netcat doesn't say connection refused),
but then no data is ever transferred.
Could someone confirm whether
a)I am being an idiot
b) -redir is actually broken
c) something is extremely weird in my setup.
Thanks for your help,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] user-net -redir working?
2005-11-20 22:45 Richard Neill
@ 2005-11-21 6:34 ` John R. Hogerhuis
2005-11-21 13:15 ` André Braga
0 siblings, 1 reply; 6+ messages in thread
From: John R. Hogerhuis @ 2005-11-21 6:34 UTC (permalink / raw)
To: qemu-devel
On Sun, 2005-11-20 at 22:45 +0000, Richard Neill wrote:
> qemu -cdrom /dev/cdrom -boot d -user-net -redir tcp:2300::2301
>
> In Guest (knoppix):
> netcat -l -p 2301
>
> On Host:
>
> netcat localhost 2300
>
> This connection is accepted (Netcat doesn't say connection refused),
> but then no data is ever transferred.
>
>
> Could someone confirm whether
> a)I am being an idiot
Without more data, I'd vote for (a). It sounds like netcat is behaving
normally to me. Since you are typing this at the prompt, netcat is
dutifully waiting for you to type something to send over the link.
Perhaps if you type something on the client side and hit <ENTER>? Then
see if it shows up on the server side.
If you don't get any output on the server side, a network sniffer
(tcpdump) on both sides of the connection should be illuminating.
Later,
-- John.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] user-net -redir working?
2005-11-21 6:34 ` John R. Hogerhuis
@ 2005-11-21 13:15 ` André Braga
0 siblings, 0 replies; 6+ messages in thread
From: André Braga @ 2005-11-21 13:15 UTC (permalink / raw)
To: qemu-devel
Disabling the Nagle algorithm (i.e., enabling TCP_NODELAY) or typing a
lot of garbage just to fill the buffer with enough data can help,
also.
And IIRC, netcat has a UDP mode as well. I see no reason for this to
happen, but is there any chance it's using UDP by default, and you're
only redirecting TCP?
Good luck!
--
"The user-friendly computer is a red herring. The user-friendliness of
a book just makes it easier to turn pages. There's nothing
user-friendly about learning to read."
-Alan Kay
On 11/21/05, John R. Hogerhuis <jhoger@pobox.com> wrote:
> On Sun, 2005-11-20 at 22:45 +0000, Richard Neill wrote:
> > This connection is accepted (Netcat doesn't say connection refused),
> > but then no data is ever transferred.
[8<]
> Without more data, I'd vote for (a). It sounds like netcat is behaving
> normally to me. Since you are typing this at the prompt, netcat is
> dutifully waiting for you to type something to send over the link.
>
> Perhaps if you type something on the client side and hit <ENTER>? Then
> see if it shows up on the server side.
>
> If you don't get any output on the server side, a network sniffer
> (tcpdump) on both sides of the connection should be illuminating.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] user-net -redir working?
@ 2005-11-22 2:32 Richard Neill
0 siblings, 0 replies; 6+ messages in thread
From: Richard Neill @ 2005-11-22 2:32 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]
Re: User-net not working:
> Disabling the Nagle algorithm (i.e., enabling TCP_NODELAY) or typing a
> lot of garbage just to fill the buffer with enough data can help,
> also.
>
> And IIRC, netcat has a UDP mode as well. I see no reason for this to
> happen, but is there any chance it's using UDP by default, and you're
> only redirecting TCP?
>
> Good luck!
Thanks for your message.
I think that -redir really is broken: I've also been unsuccessful in
trying to make it work using an FTP server on a Windows guest, and using
the SSH server on a knoppix guest. Has anyone here ever had success with
it? It also fails on hosts with 2 different versions of Mandrake.
Anyway, I've taken your suggestion, and run both ends with ethereal.
Here's what I did:
HOST (Linux);
qemu -cdrom /dev/cdrom -boot d -user-net -redir tcp:2200::22
GUEST (Knoppix):
Boot up, then start sshd. Verify that I can indeed do ssh
root@localhost, and that PermitRootLogin is yes in sshd_config.
Then, start ethereal (on the "any" interface)
HOST:
Start ethereal (on the "any" interface")
ssh -p 2200 root@localhost
At this point, ssh just stalls. It's obviously waiting for something,
but not known what. I get no output at all from it.
End of experiment.
ETHEREAL on HOST is showing a series of empty packets:
SYN
SYN
ACK
FIN
ACK
FIN
ACK
[repeats]
ETHEREAL on GUEST is showing a series of empty packets, all of which
are SYN.
I have no problem in making an outgoing connection from the GUEST to the
HOST.
I'm attaching both log files - they are only 2.5 kB
Any ideas? Has anyone succesfully used the user-net -redir option?
Richard
[-- Attachment #2: ethereal.guest.log --]
[-- Type: application/octet-stream, Size: 1506 bytes --]
[-- Attachment #3: ethereal.host.log --]
[-- Type: application/octet-stream, Size: 1064 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] user-net -redir working?
@ 2005-11-22 15:02 Juergen Keil
0 siblings, 0 replies; 6+ messages in thread
From: Juergen Keil @ 2005-11-22 15:02 UTC (permalink / raw)
To: qemu-devel
> I think that -redir really is broken: I've also been unsuccessful in
> trying to make it work using an FTP server on a Windows guest, and using
> the SSH server on a knoppix guest.
...
> HOST:
> Start ethereal (on the "any" interface")
> ssh -p 2200 root@localhost
Try to use the host's real ip address, not the 127.0.0.1 localhost address.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] user-net -redir working?
@ 2005-11-22 15:50 Ben Taylor
0 siblings, 0 replies; 6+ messages in thread
From: Ben Taylor @ 2005-11-22 15:50 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
Richard Neill <rn214@hermes.cam.ac.uk> wrote:
>
> Re: User-net not working:
>
> > Disabling the Nagle algorithm (i.e., enabling TCP_NODELAY) or typing a
> > lot of garbage just to fill the buffer with enough data can help,
> > also.
> >
> > And IIRC, netcat has a UDP mode as well. I see no reason for this to
> > happen, but is there any chance it's using UDP by default, and you're
> > only redirecting TCP?
> >
> > Good luck!
>
> Thanks for your message.
>
> I think that -redir really is broken: I've also been unsuccessful in
> trying to make it work using an FTP server on a Windows guest, and using
> the SSH server on a knoppix guest. Has anyone here ever had success with
> it? It also fails on hosts with 2 different versions of Mandrake.
>
> Anyway, I've taken your suggestion, and run both ends with ethereal.
> Here's what I did:
>
>
> HOST (Linux);
> qemu -cdrom /dev/cdrom -boot d -user-net -redir tcp:2200::22
>
> GUEST (Knoppix):
> Boot up, then start sshd. Verify that I can indeed do ssh
> root@localhost, and that PermitRootLogin is yes in sshd_config.
>
> Then, start ethereal (on the "any" interface)
>
>
> HOST:
> Start ethereal (on the "any" interface")
> ssh -p 2200 root@localhost
>
> At this point, ssh just stalls. It's obviously waiting for something,
> but not known what. I get no output at all from it.
Can you try "ssh -p 2200 root@<my IP address not localhost>
I've run into this several times dealing with the -redir
function, especially since localhost resolves as 127.0.0.1.
On my Solaris host with a linux guest, the packet arriving
showed up as 127.0.0.1, which ended up with the same
behavior as you're describing.
Ben
[-- Attachment #2: ethereal.guest.log --]
[-- Type: application/octet-stream, Size: 1506 bytes --]
[-- Attachment #3: ethereal.host.log --]
[-- Type: application/octet-stream, Size: 1064 bytes --]
[-- Attachment #4: reply --]
[-- Type: text/plain, Size: 147 bytes --]
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-11-22 15:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 15:02 [Qemu-devel] user-net -redir working? Juergen Keil
-- strict thread matches above, loose matches on Subject: below --
2005-11-22 15:50 Ben Taylor
2005-11-22 2:32 Richard Neill
2005-11-20 22:45 Richard Neill
2005-11-21 6:34 ` John R. Hogerhuis
2005-11-21 13:15 ` André Braga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).