networking with debian based templates [message #26641] |
Tue, 29 January 2008 17:07 |
vzjay
Messages: 3 Registered: January 2008
|
Junior Member |
|
|
Hello *,
I'm trying to use the following templates:
debian-4.0-i386-minimal
ubuntu-7.10-i386-minimal
After creating the VEs by:
vzctl create 114 --ostemplate debian-4.0--i386-minimal --config vps.1
vzctl set 114 --hostname blah.somedomain.com --save
vzctl set 114 --ipadd public.ip.add.ress --save
vzctl set 114 --nameserver 4.2.2.1 --save
vzctl start 114
vzctl enter 114
root@localhost:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
venet0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0
Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:588 (588.0 b)
venet0:0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:public.ip.add.ress P-t-P:public.ip.add.ress
Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
Why does it create two venet0 interfaces with one being loopback and
one being my public IP address?
Of course, there's no network connectivity with this setup.
Additionally, /etc/network/interfaces only has two entries. One for
venet0 (public IP address) and lo (loopback). There are several other
rpm based and gentoo VEs running on this machine using a public IP
address without issue.
Any input would be appreciated!
|
|
|
|
Re: networking with debian based templates [message #26646 is a reply to message #26645] |
Wed, 30 January 2008 00:29 |
efball
Messages: 41 Registered: September 2006 Location: Santa Rosa, California
|
Member |
|
|
On Wed, Jan 30, 2008 at 12:39:11AM +0100, albinootje wrote:
> existx@existx.net wrote:
>
> hi,
>
>> I'm trying to use the following templates:
>>
>> debian-4.0-i386-minimal
> ---cut for brevity---
>> venet0 Link encap:UNSPEC HWaddr
>> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>> inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0
>> Mask:255.255.255.255
>> UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
>> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:0 (0.0 b) TX bytes:588 (588.0 b)
>>
>> venet0:0 Link encap:UNSPEC HWaddr
>> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>> inet addr:public.ip.add.ress P-t-P:public.ip.add.ress
>> Bcast:0.0.0.0 Mask:255.255.255.255
>> UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
>>
>> Why does it create two venet0 interfaces with one being loopback and
>> one being my public IP address?
>>
>> Of course, there's no network connectivity with this setup.
>
> i'm using a self-build debian etch template on a debian etch machine,
> and i see the same thing, but it works without any problems since many
> months
The CentOS templates do the same thing, and networking is
working fine for me too:
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:11110 errors:0 dropped:0 overruns:0 frame:0
TX packets:10901 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4268320 (4.0 MiB) TX bytes:1105071 (1.0 MiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:141.121.58.181 P-t-P:141.121.58.181 Bcast:141.121.58.181 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
I see your Bcast for venet0:0 is 0.0.0.0 and mine (for CentOS) is the
public IP address. On my Debian (and Ubuntu) VZs the Broadcast is
0.0.0.0. Wierd.
--
E Frank Ball efball@efball.com
|
|
|
Re: networking with debian based templates [message #26647 is a reply to message #26645] |
Wed, 30 January 2008 00:42 |
vzjay
Messages: 3 Registered: January 2008
|
Junior Member |
|
|
Hi,
My Host is CentOS 5.x. I also have
DEF_OSTEMPLATE="debian-4.0-i386-minimal" defined in /etc/vz/vz.conf
I can ping the Host Node's IP and the Host Node can ping the VM's IP
(both are public IP addresses) but I can't connect to the outside world.
There is one gentoo VM and one centos VM running with the same
configuration, but connecting to the outside world and allowing connections.
[root@elbrus ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Controls source route verification
net.ipv4.conf.all.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
[root@elbrus ~]#
Additionally, there's no iptables rules currently.
[root@elbrus ~]# iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@elbrus ~]#
Any ideas?
Thanks in advance!
albinootje wrote:
> existx@existx.net wrote:
>
> hi,
>
> > I'm trying to use the following templates:
> >
> > debian-4.0-i386-minimal
> ---cut for brevity---
> > venet0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
> > inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0
Mask:255.255.255.255
> > UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
> > RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> > TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
> > collisions:0 txqueuelen:0
> > RX bytes:0 (0.0 b) TX bytes:588 (588.0 b)
> >
> > venet0:0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
> > inet addr:public.ip.add.ress P-t-P:public.ip.add.ress
Bcast:0.0.0.0 Mask:255.255.255.255
> > UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
> >
> > Why does it create two venet0 interfaces with one being loopback and
one being my public IP address?
> >
> > Of course, there's no network connectivity with this setup.
>
> i'm using a self-build debian etch template on a debian etch machine,
> and i see the same thing, but it works without any problems since many
months
>
> i have : DEF_OSTEMPLATE="debian-4.0-i386-minimal"
> in /etc/vz/vz.conf
>
> i've edited /etc/sysctl.conf according to the OpenVZ-wiki
>
> and that's about it, works like a charm!
>
|
|
|