Skip to contentSkip to conversation

problem of SLIRP

Qemu-devel Ye Wen 2 participants 2 messages Sep 9, 2004

lore
Share & tools
lore

Ye Wen

author
#0 lore raw

Hi,

I'm wondering why on some machine I can work with SLIRP fine but on others, I can
ping the 10.0.2.2 (router) well but can't access the Internet. Is it because of some firewall things?

Thanks,

--
Ye Wen
[email protected]

#1 lore raw
Quoted 6 lines · Ye Wen

Hi,

I'm wondering why on some machine I can work with SLIRP fine but on others, I can
ping the 10.0.2.2 (router) well but can't access the Internet. Is it because of some firewall things?

User mode networking (Slirp) operates at the level of an unpriveleged socket. That means that it can listen for TCP connections, make TCP connections, send and receive UDP packets. Basically, you can use the "port" based protocols.

Quoted 1 line

From an unpriveleged socket you cannot send raw IP packets. This

includes ICMP messages since ICMP operates at the IP layer, rather than the ported protocol layer with TCP and UDP.

Ping is an ICMP message. So Slirp fakes a ping by sending a UDP packet instead. So it is not ping. Your firewall may pass pings but not some UDP packets. Hence the confusion.

What it comes down to, is don't use ping to test user mode networking, since it doesn't do what you think. Using a web browser makes a lot more sense, and is easier to understand the effects. The UDP fakery should probably be removed since it doesn't really do what anyone thinks, and therefore just confuses everyone.

Also, for networking problems in general your best bet is to do a network trace on both the host and the guest, and you can see without any doubt how the user mode networking scheme is horking up your packets. I think QEMU is really putting Slirp through its paces, and Slirp is actually going to be brought up to par in short order...

-- John.