* [gentoo-user] the user mode linux can't access network..
@ 2006-08-21 6:38 fei huang
2006-08-21 8:33 ` Etaoin Shrdlu
0 siblings, 1 reply; 10+ messages in thread
From: fei huang @ 2006-08-21 6:38 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]
I have my user mode kernel running on my gentoo box following the gentoo's
guide: http://www.gentoo.org/doc/en/uml.xml
but can not access the Internet, pinging my host system appears to be no
problem though..
my host system has a ADSL connection to the Internet, and "eth0" has been
assigned with IP 192.168.0.1.
here is my command line that brings up the user mode linux:
UML> linux ubd0=root_fs ubd1=swap_fs eth0=tuntap,,,192.168.0.1
I assigned 192.168.0.2 to my UML, added default route entry; copyed
over my resolv.conf.
but still can't contact with my name servers nor other Internet hosts.
did I miss something? or the guide is just incomplete?
thanks.
daniel
<http://www.gentoo.org/doc/en/uml.xml>
[-- Attachment #2: Type: text/html, Size: 1023 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 6:38 [gentoo-user] the user mode linux can't access network fei huang
@ 2006-08-21 8:33 ` Etaoin Shrdlu
2006-08-21 9:24 ` fei huang
0 siblings, 1 reply; 10+ messages in thread
From: Etaoin Shrdlu @ 2006-08-21 8:33 UTC (permalink / raw
To: gentoo-user
On Monday 21 August 2006 08:38, fei huang wrote:
> did I miss something? or the guide is just incomplete?
I see you are directly connecting the real host to the virtual host using
tuntap (eg, you don't use uml_switch).
You probably need to enable forwarding (and possibly masquerading) on the
real box:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
The guide DOES mention this, in the section "using an existing network".
HTH
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 8:33 ` Etaoin Shrdlu
@ 2006-08-21 9:24 ` fei huang
2006-08-21 10:23 ` Etaoin Shrdlu
0 siblings, 1 reply; 10+ messages in thread
From: fei huang @ 2006-08-21 9:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
On 8/21/06, Etaoin Shrdlu <shrdlu@unlimitedmail.org> wrote:
>
> On Monday 21 August 2006 08:38, fei huang wrote:
>
> > did I miss something? or the guide is just incomplete?
>
> I see you are directly connecting the real host to the virtual host using
> tuntap (eg, you don't use uml_switch).
I would like the most direct and easy way to access the network, seems the
uml_switch needs just a lot more steps to set up the network... not sure
though.
You probably need to enable forwarding (and possibly masquerading) on the
> real box:
>
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> The guide DOES mention this, in the section "using an existing network".
yep, that's why I get so frustrated, I did exactly the same as what the
guide instructs..
any other posibilities that may cause the problem?
HTH
> --
> gentoo-user@gentoo.org mailing list
>
> thank you so much..
daniel
[-- Attachment #2: Type: text/html, Size: 1624 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 9:24 ` fei huang
@ 2006-08-21 10:23 ` Etaoin Shrdlu
2006-08-21 10:37 ` fei huang
0 siblings, 1 reply; 10+ messages in thread
From: Etaoin Shrdlu @ 2006-08-21 10:23 UTC (permalink / raw
To: gentoo-user
On Monday 21 August 2006 11:24, fei huang wrote:
> yep, that's why I get so frustrated, I did exactly the same as what
> the guide instructs..
> any other posibilities that may cause the problem?
Ok, let's see: you say that your eth0 (which I guess is the interface
connected to the ADSL and thus to the Internet) has ip address
192.168.0.1. Then, you use this command to start uml:
UML> linux ubd0=root_fs ubd1=swap_fs eth0=tuntap,,,192.168.0.1
this means that the *host's* tun/tap interface gets ip address
192.168.0.1 as well. So, the host ends up with its two interfaces having
the same ip address (do "ip addr" or "ifconfig" when uml is running to
confirm this) .
If the above is true, try using different addresses for the tun/tap<->uml
network, for example from the 10.0.0.0 pool.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 10:23 ` Etaoin Shrdlu
@ 2006-08-21 10:37 ` fei huang
2006-08-21 14:22 ` fei huang
0 siblings, 1 reply; 10+ messages in thread
From: fei huang @ 2006-08-21 10:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
On 8/21/06, Etaoin Shrdlu <shrdlu@unlimitedmail.org> wrote:
>
> On Monday 21 August 2006 11:24, fei huang wrote:
>
> > yep, that's why I get so frustrated, I did exactly the same as what
> > the guide instructs..
> > any other posibilities that may cause the problem?
>
> Ok, let's see: you say that your eth0 (which I guess is the interface
> connected to the ADSL and thus to the Internet) has ip address
> 192.168.0.1. Then, you use this command to start uml:
>
> UML> linux ubd0=root_fs ubd1=swap_fs eth0=tuntap,,,192.168.0.1
>
> this means that the *host's* tun/tap interface gets ip address
> 192.168.0.1 as well. So, the host ends up with its two interfaces having
> the same ip address (do "ip addr" or "ifconfig" when uml is running to
> confirm this) .
yep, I did notice this problem, and tried to change the tun/tap interface
to 192.168.0.3,
I guess this must be the same network with eth0 of my host system,, but no
luck...
If the above is true, try using different addresses for the tun/tap<->uml
> network, for example from the 10.0.0.0 pool.
> --
I'll try it out... hope this works. thanks.
gentoo-user@gentoo.org mailing list
regards.
daniel.
[-- Attachment #2: Type: text/html, Size: 2093 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 10:37 ` fei huang
@ 2006-08-21 14:22 ` fei huang
2006-08-21 14:59 ` Etaoin Shrdlu
0 siblings, 1 reply; 10+ messages in thread
From: fei huang @ 2006-08-21 14:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
still no luck... I tried to build everything in kernel, and later build
additional iptable_filter as module, add iptable to my default run level,,
neither of them works..
I found there is a warning message after emerge iptables says: ip forwarding
is not included in iptables any more. what does it mean? is that related
with the issue?
any hints ?...
thanks
daniel
[-- Attachment #2: Type: text/html, Size: 415 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 14:22 ` fei huang
@ 2006-08-21 14:59 ` Etaoin Shrdlu
2006-08-21 15:11 ` fei huang
0 siblings, 1 reply; 10+ messages in thread
From: Etaoin Shrdlu @ 2006-08-21 14:59 UTC (permalink / raw
To: gentoo-user
On Monday 21 August 2006 16:22, fei huang wrote:
> still no luck... I tried to build everything in kernel, and later
> build additional iptable_filter as module, add iptable to my default
> run level,, neither of them works..
I'd try first with iptables filters *disabled*, to make sure it's not a
firewall issue. Once it works, enable packet filtering (if you need it).
But until you are sure it works, make sure nothing prevents traffic
flow, so disable iptables filters.
> I found there is a warning message after emerge iptables says: ip
> forwarding is not included in iptables any more. what does it mean? is
> that related with the issue?
It means that, if you want ip forwarding, you have to enable it manually
using the command
echo 1 > /proc/sys/net/ipv4/ip_forward
To verify that forwarding is working, simply do
cat /proc/sys/net/ipv4/ip_forward
and it should print "1".
Keep in mind that if you reboot, you have to re-enable forwarding if you
want it again.
Finally, run a network analyzer like wireshark and see for yourself
what's happening. I'd look at ARP packets first: make sure ARP is
working correctly.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 14:59 ` Etaoin Shrdlu
@ 2006-08-21 15:11 ` fei huang
2006-08-21 15:44 ` Etaoin Shrdlu
0 siblings, 1 reply; 10+ messages in thread
From: fei huang @ 2006-08-21 15:11 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]
On 8/21/06, Etaoin Shrdlu <shrdlu@unlimitedmail.org> wrote:
>
> On Monday 21 August 2006 16:22, fei huang wrote:
>
> > still no luck... I tried to build everything in kernel, and later
> > build additional iptable_filter as module, add iptable to my default
> > run level,, neither of them works..
>
> I'd try first with iptables filters *disabled*, to make sure it's not a
> firewall issue. Once it works, enable packet filtering (if you need it).
> But until you are sure it works, make sure nothing prevents traffic
> flow, so disable iptables filters.
mm, I disabled it from auto loading.
> I found there is a warning message after emerge iptables says: ip
> > forwarding is not included in iptables any more. what does it mean? is
> > that related with the issue?
>
> It means that, if you want ip forwarding, you have to enable it manually
> using the command
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> To verify that forwarding is working, simply do
>
> cat /proc/sys/net/ipv4/ip_forward
>
> and it should print "1".
> Keep in mind that if you reboot, you have to re-enable forwarding if you
> want it again.
gentoo might do that trick for me, everytime I check that value, it shows
1.
Finally, run a network analyzer like wireshark and see for yourself
> what's happening. I'd look at ARP packets first: make sure ARP is
> working correctly.
> --
> gentoo-user@gentoo.org mailing list
uh, that's a good idea, I'll emege wireshark and see what's happening, the
most annoying thing is that there's no log for troubleshooting, I wonder why
iptable never write anything to syslog? that's wierd.
regards
daniel
[-- Attachment #2: Type: text/html, Size: 2410 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 15:11 ` fei huang
@ 2006-08-21 15:44 ` Etaoin Shrdlu
2006-08-23 15:17 ` fei huang
0 siblings, 1 reply; 10+ messages in thread
From: Etaoin Shrdlu @ 2006-08-21 15:44 UTC (permalink / raw
To: gentoo-user
On Monday 21 August 2006 17:11, fei huang wrote:
> uh, that's a good idea, I'll emege wireshark and see what's happening,
> the most annoying thing is that there's no log for troubleshooting, I
> wonder why iptable never write anything to syslog? that's wierd.
It will, if you tell it. Look at the LOG/ULOG targets.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] the user mode linux can't access network..
2006-08-21 15:44 ` Etaoin Shrdlu
@ 2006-08-23 15:17 ` fei huang
0 siblings, 0 replies; 10+ messages in thread
From: fei huang @ 2006-08-23 15:17 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
thanks for helping...
the problem has been solved by applying iptable rules on my ppp0 instead of
eth0. since ppp0 is the real device that conncts to the Internet.
tks again.
daniel
[-- Attachment #2: Type: text/html, Size: 211 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-08-23 15:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-21 6:38 [gentoo-user] the user mode linux can't access network fei huang
2006-08-21 8:33 ` Etaoin Shrdlu
2006-08-21 9:24 ` fei huang
2006-08-21 10:23 ` Etaoin Shrdlu
2006-08-21 10:37 ` fei huang
2006-08-21 14:22 ` fei huang
2006-08-21 14:59 ` Etaoin Shrdlu
2006-08-21 15:11 ` fei huang
2006-08-21 15:44 ` Etaoin Shrdlu
2006-08-23 15:17 ` fei huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox