OpenVZ Forum


Home » General » Support » *SOLVED* unable to connect to the internet or any other machine on the local n/w..pls help!!
*SOLVED* unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7849] Fri, 27 October 2006 09:59 Go to next message
sanjooz_2002 is currently offline  sanjooz_2002
Messages: 19
Registered: October 2006
Junior Member
I have successfuly installed OpenVZ on centOS. The OS tht is running on the virtual server also has centOS. Although I am able to connect to the virtual server from other machines on the local n/w, I am unable to connect to other machines from within the virtual server. Neither am I able to connect to the internet from within the virtual server. Even pinging to any machine from within the virtual server does not yield any result!! Sad

I get the following output for the sysctl -p command when typed on the virtual server.

# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
error: unknown error 1 setting key 'kernel.sysrq'
error: unknown error 1 setting key 'kernel.core_uses_pid'

I have also added the following line in /etc/modprobe.conf file

options ip_conntrack ip_conntrack_enable_ve0=1

But that doesn't seem to be of any help.

The o/p for ip a l and ip r l on the main hardware node are as follows:

#ip a l
2: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:16:17:72:bf:31 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.3/24 brd 192.168.0.255 scope global eth0
6: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:a1:95:29:d1 brd ff:ff:ff:ff:ff:ff
inet <public ip>/24 brd <broadcast ip> scope global eth1
1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
link/void

#ip r l
192.168.0.10 dev venet0 scope link src 202.68.152.232
<Public IP n/w>/24 dev eth1 proto kernel scope link src <Public IP>
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.3
169.254.0.0/16 dev eth1 scope link
default via <Gateway> dev eth1

eth0 is connected to the local n/w and eth1 is connected to the internet.

Any idea why this is happening??? I am a newbee and hence kindly bear with me if this seems silly..

Any help is appreciated. thx in advance.

[Updated on: Fri, 10 November 2006 06:38] by Moderator

Report message to a moderator

Re: unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7867 is a reply to message #7849] Fri, 27 October 2006 14:32 Go to previous messageGo to next message
Fabian Kropp is currently offline  Fabian Kropp
Messages: 8
Registered: September 2006
Junior Member
I am unfamiliar with centOS, but it looks like you configured veth !?

If so did you use different MAC adresses for but "sides" of the virtual NIC ?

br
Fabian
Re: unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7874 is a reply to message #7849] Fri, 27 October 2006 15:01 Go to previous messageGo to next message
sanjooz_2002 is currently offline  sanjooz_2002
Messages: 19
Registered: October 2006
Junior Member
Thanks for the response fabian!!

As far as your question goes I think (im not sure) I haven't configured veth. I used the commands given in the manual .i.e

# vzctl set 101 --ipadd 192.168.0.10 --save

Is the above command wrong?If yes, then please suggest the correct command.

This is what I find when I try starting the vps

[root@localhost /]# /usr/sbin/vzctl start 101
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.0.10
arpsend: 192.168.0.10 is detected on another computer : 00:01:f4:0c:18:fb
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 192.168.0.10 eth1 FAILED
Setting CPU units: 1000
File resolv.conf was modified
Setting quota ugidlimit: 100
VE start in progress...


I ddnt understand that, if I havent used the hw address during the installation/configuration process, then how come it assigns one to the vps intrfc..and as far as my knowledge is concerned hw addr should be unique. hence there shouldnt b a hw addr conflict. and as far as the ip addr goes there isnt any system in my local n/w which uses this private ip. Then how come I get this error.


one more que. should there be a modprobe.conf file in the vps???Because I can't find it in the vps. it only exists on the main h/w node.

hope the above info gives you a more clear picture about my problem. Thanks.

cheers'
Re: unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7888 is a reply to message #7874] Mon, 30 October 2006 06:31 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
[QUOTE
]192.168.0.10 is detected on another computer : 00:01:f4:0c:18:fb
[/QUOTE]
This means, that there is another computer in your network that uses IP address 192.168.0.10. As you understand there shouldn't be two computers with same IP address in one network.

Quote:


should there be a modprobe.conf file in the vps??


No, it shouldn't. No kernel modules can be loaded in VE, it's only permited in VE0. Hence modprobe.conf file is useless.

HTH,
vass.
Re: unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7902 is a reply to message #7849] Mon, 30 October 2006 10:58 Go to previous messageGo to next message
sanjooz_2002 is currently offline  sanjooz_2002
Messages: 19
Registered: October 2006
Junior Member
Hi vass!!I have checked my entire n/w. There exists no system with the IP addr 192.168.0.10 other than my vps.

I had one doubt, my main hardware node has got two lan cards. One connected to the ISP g/w and the other to the local n/w .i.e 192.168.0.0/24 . I am using a firewall to do the natting .i.e from the local n/w to the inter fc connected to the ISP. Would that be causing a problem?? Moreover service network restart command on the vps shell gives the following o/p.

#service network retstart
]# /usr/sbin/vzctl enter 101
entered into VE 101
-bash-3.00# /sbin/service network restart
Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: error: unknown error 1 setting key 'kernel.sysrq'
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
error: unknown error 1 setting key 'kernel.core_uses_pid'
[FAILED]
Bringing up loopback interface: [ OK ]
Bringing up interface venet0: [ OK ]

I have checked my /etc/usb_beancounters file. None of the params have been hit. Is that kernel error the one causing the problem. Please help..and Thanks a ton for responding!!!
Re: unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7903 is a reply to message #7849] Mon, 30 October 2006 11:01 Go to previous messageGo to next message
sanjooz_2002 is currently offline  sanjooz_2002
Messages: 19
Registered: October 2006
Junior Member
I am extremely sorry for that error. It is not /etc/usb_beancounters Smile . It is /proc/user_beancounters..
Re: unable to connect to the internet or any other machine on the local n/w..pls help!! [message #7992 is a reply to message #7849] Thu, 02 November 2006 10:07 Go to previous message
sanjooz_2002 is currently offline  sanjooz_2002
Messages: 19
Registered: October 2006
Junior Member
I finally got rid of the problem Very Happy . Actually, I had tried compiling with a wrong kernel flavour .i.e ovzkernel-smp. I am using a normal machine (a single cpu )as a server. I was trying to build a vps on that server. Hence, I re-installed openvz (dont know if that is necessary Confused ) and this time I used the normal ovzkernel flavour and not the -smp flavour.

Therefore type :-
#yum install ovzkernel

instead of

#yum install ovzkernel-smp

Thanks!!
Previous Topic: *SOLVED* iptables support inside vps
Next Topic: *SOLVED* OpenVZ is the greatest thing since sliced bread!
Goto Forum:
  


Current Time: Sun May 12 07:11:48 GMT 2024

Total time taken to generate the page: 0.01615 seconds