Subject:: [vserver] Network access problem!
From: songxuefei 47810 <songxuefei@huawei.com>
Date: Fri, 17 Jul 2009 09:38:14 +0800

 Fri, 17 Jul 2009 09:38:14 +0800

thanks for you response! :-)

-----邮件原件-----
发件人: Herbert Poetzl [mailto:herbert@13thfloor.at] 
发送时间: 2009年7月17日 0:36
收件人: songxuefei 47810
抄送: vserver@list.linux-vserver.org
主题: Re: [vserver] Network access problem!

On Thu, Jul 16, 2009 at 12:15:36PM +0800, songxuefei 47810 wrote:
> Hello all,
> 
> I build a vserver and give the interface configuration, but the 
> vserver can't connect to the host. The ping command doesn't work 
> properly. I use the packet capture tools. It seems that the vserver 
> can't receive the reply messages. The detail interface configuration 
> information is below:
> Interface configuration:

> echo "eth4" > /etc/vservers/xxx./interfaces/0/dev

do you have an eth4 on your host? 

[sxf]:yes, there are five network interface cards in my server.

> echo "192.168.1.2" > /etc/vservers/xxx/interfaces/0/ip echo "24" > 
> /etc/vservers/xxx/interfaces/0/mask

that's simply wrong ... use 255.255.255.0 for mask, or prefix for 24

[sxf]:it is a clerical error. It is not  "mask" but "prefix", so the configuration is:
 echo "24" > 
 /etc/vservers/xxx/interfaces/0/prefix

> The ip address of host os is "192.168.1.1".

> and then I start the vserver xxx, enter the vserver xxx, try to ping 
> the ip address "192.168.1.2", and the result is below:

> bash-3.2# ping 192.168.1.2
> PING 192.168.1.2 (192.168.1.2 ) 56(84) bytes of data.

try again after you fixed the above

best,
Herbert

> --- 192.168.1.2 ping statistics---
> 6 packets transmitted, 0 received, 100% packet loss, time 5007ms
> 
> 
> 
> I use the packet capture tools, the ping request and reply appeard both, it is so
strange, the result is below:
> 
> No.          Time               Source                      Destination          
   Protocol        Info          
> 1             0.000000       192.168.1.2                 192.168.1.2             
   ICMP            request
> 2             0.000023       192.168.1.2                 192.168.1.2             
   ICMP            reply
> 3             1.008884       192.168.1.2                 192.168.1.2             
   ICMP            request
> 4             1.008902       192.168.1.2                 192.168.1.2             
   ICMP            reply
> 5             2.008589       192.168.1.2                 192.168.1.2             
   ICMP            request
> 6             2.008609       192.168.1.2                 192.168.1.2             
   ICMP            reply
> 7             3.008266       192.168.1.2                 192.168.1.2             
   ICMP            request
> 8             3.008283       192.168.1.2                 192.168.1.2             
   ICMP            reply
> 9             4.007962       192.168.1.2                 192.168.1.2             
   ICMP            request
> 10           4.007983       192.168.1.2                 192.168.1.2              
  ICMP            reply
> 
******************************************************************************************
 This email and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of
the information contained here in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended recipient(s)
is prohibited. If you receive this email in error, please notify the sender by phone
or email
 immediately and delete it!
 *****************************************************************************************