OpenVZ Forum


Home » General » Support » Help please with seting up networking inside a VE
Help please with seting up networking inside a VE [message #37163] Mon, 24 August 2009 12:07 Go to next message
dragos2 is currently offline  dragos2
Messages: 15
Registered: August 2009
Junior Member
I am running an Ubuntu 8.04 64 bit
# uname -a
2.6.24-24-openvz


The server has a public IP address and name, and has
internet connectivity(I configure it through ssh).

The problem is that I can't get networking to work inside
a new VE, for example the precreated ubuntu-8.04-x86

vzctl create 777 --ostemplate ubuntu-8.04-x86
vzctl start 777
vzctl set 777 --ip 193.*.*.*  --hostname mydomain.anotherdomain.com --nameserver 193.x.y.z  --save


The ifconfig outside the ve:
root@deb01:~# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:1e:68:04:69:08
          inet addr:193.19.*.*  Bcast:193.19.*.*  Mask:255.255.255.0
          inet6 addr: fe-----------e04:6908/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:242768 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123061 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:337725456 (322.0 MB)  TX bytes:9318291 (8.8 MB)
          Interrupt:17

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:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:88 (88.0 B)  TX bytes:88 (88.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:11 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:660 (660.0 B)  TX bytes:0 (0.0 B)


Inside the VE:

root@deb01:/# 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:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:600 (600.0 B)  TX bytes:600 (600.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: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:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:193.19.*.*  P-t-P:193.19.*.*  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1



The sysctl.conf
 # On Hardware Node we generally need
 # packet forwarding enabled and proxy arp disabled

 net.ipv4.conf.default.forwarding=1
 net.ipv4.conf.default.proxy_arp=1
 net.ipv4.ip_forward=1

 # Enables source route verification
 net.ipv4.conf.all.rp_filter = 1

 # Enables the magic-sysrq key
 kernel.sysrq = 1

 # TCP Explict Congestion Notification
 #net.ipv4.tcp_ecn = 0

 # we do not want all our interfaces to send redirects
 net.ipv4.conf.default.send_redirects = 1
 net.ipv4.conf.all.send_redirects = 0


Inside the VE there is no internet.

Any sugestions of what to do more ?

[Updated on: Mon, 24 August 2009 12:09]

Report message to a moderator

Re: Help please with seting up networking inside a VE [message #37165 is a reply to message #37163] Mon, 24 August 2009 12:34 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

your CT (=container) and hostnode share not the same IP, right, ok
... and your iptables rules set is "clean" not an "firewall" is configured ?

Bye,
Thorsten
Re: Help please with seting up networking inside a VE [message #37177 is a reply to message #37165] Tue, 25 August 2009 08:37 Go to previous messageGo to next message
dragos2 is currently offline  dragos2
Messages: 15
Registered: August 2009
Junior Member
Sorry but I don't understand your reply.

Both container and VE share same public IP.
Is this wrong ?

Firewall is ufw enabled with ssh open.
Re: Help please with seting up networking inside a VE [message #37226 is a reply to message #37177] Thu, 27 August 2009 14:30 Go to previous message
bithead2 is currently offline  bithead2
Messages: 5
Registered: July 2009
Junior Member
The container and VE cannot have the same IP address.

CJ
Previous Topic: problems with quotes?
Next Topic: number of cpus on a x64 kernel
Goto Forum:
  


Current Time: Sun Nov 10 12:39:47 GMT 2024

Total time taken to generate the page: 0.04720 seconds