OpenVZ Forum


Home » General » Support » Elastix on OpenVZ, I cant to do the bridge
Elastix on OpenVZ, I cant to do the bridge [message #37869] Thu, 29 October 2009 01:49 Go to next message
Augustino is currently offline  Augustino
Messages: 9
Registered: October 2009
Junior Member
hello

I want to install elaxtix on openvz, i found many handbooks, I also had internet in my container but currently, I dont have access to internet in the container but I have access in the father machine, the insternet is needed to install the repositories

I dont have internet in the container

I am making this
Wheres is the error?

brctl addbr br0
# ifconfig eth0 0
# brctl addif br0 eth0
# ifconfig br0 192.168.1.125 netmask 255.255.255.0
# ip route add default via 192.168.1.1 dev br0
# ifconfig eth0 192.168.1.105 netmask 255.255.255.0
# ifconfig venet0 192.168.1.125 netmask 255.255.255.0
# vzctl start 777
# vzctl set 777 --netif_add eth0 --save
# vzctl exec 777 ifconfig eth0 192.168.1.105 netmask 255.255.255.0
# brctl addif br0 veth777.0
# vzctl exec 777 ip route add default via 192.168.1.1 dev eth0
RTNETLINK answers: File exists
# vzctl enter 777
entered into VE 777
[root@test /]# ping google.com
ping: unknown host google.com

Best Regards

[Updated on: Thu, 29 October 2009 02:10]

Report message to a moderator

Re: Elastix on OpenVZ, I cant to do the bridge [message #37896 is a reply to message #37869] Fri, 30 October 2009 12:29 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello Augusto,


from my point of view the marked commands are erroneous

Quote:

# brctl addbr br0
# ifconfig eth0 0
# brctl addif br0 eth0
# ifconfig br0 192.168.1.125 netmask 255.255.255.0
# ip route add default via 192.168.1.1 dev br0
# ifconfig eth0 192.168.1.105 netmask 255.255.255.0
# ifconfig venet0 192.168.1.125 netmask 255.255.255.0
# vzctl start 777
# vzctl set 777 --netif_add eth0 --save
# vzctl exec 777 ifconfig eth0 192.168.1.105 netmask 255.255.255.0
# brctl addif br0 veth777.0
# vzctl exec 777 ip route add default via 192.168.1.1 dev eth0


IP addresses are not supposed to be assigned on both br0 and eth0 interfaces.
Please, read http://wiki.openvz.org/Veth#Virtual_Ethernet_devices_can_be_ joined_in_one_bridge

Just properly configure eth0 add it to bridge as well as veth777.0.
Re: Elastix on OpenVZ, I cant to do the bridge [message #37903 is a reply to message #37896] Sat, 31 October 2009 03:27 Go to previous messageGo to next message
Augustino is currently offline  Augustino
Messages: 9
Registered: October 2009
Junior Member
Then Should I just do the following?

Install bridge-utils with apt-get

1.Create bridge device
brctl addbr vzbr0


2. Add veth devices to bridge
brctl addif vzbr0 veth777.0


3. Configure bridge device
ifconfig vzbr0 0
echo 1 > /proc/sys/net/ipv4/conf/vzbr0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/vzbr0/proxy_arp


4. The new IP for the container?
ip route add 192.168.1.125 dev vzbr0


Thats all? Should I configure the iptables?
Is needed anymore?
This is needed? or not?


# vzctl set 777 --netif_add eth0 --save
# vzctl exec 777 ifconfig eth0 192.168.1.105 netmask 255.255.255.0
# brctl addif br0 veth777.0
# vzctl exec 777 ip route add default via 192.168.1.1 dev eth0


Best Regards

[Updated on: Sat, 31 October 2009 03:27]

Report message to a moderator

Re: Elastix on OpenVZ, I cant to do the bridge [message #37914 is a reply to message #37903] Mon, 02 November 2009 00:24 Go to previous messageGo to next message
llazzaro is currently offline  llazzaro
Messages: 1
Registered: November 2009
Junior Member
I am also having a similar problem.

Strange thing is this

server host running cts is 10.0.0.3
ct0 has the static ip 10.0.0.8
gateway 10.0.0.2

server could ping gateway, and scape to internet
ct0 could ping 10.0.0.3, but cant ping 10.0.0.2...so no internet

I follow that steps, I dont know why.


any help, in how to debug this with tcpdump?
Re: Elastix on OpenVZ, I cant to do the bridge [message #37956 is a reply to message #37903] Fri, 06 November 2009 10:45 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

Quote:

Should I configure the iptables?


It's up to you. Configuring iptables has nothing to do with configuring bridge.

Quote:

This is needed? or not?



Quote:

#vzctl set 777 --netif_add eth0 --save


Of course, it must be done otherwise you cannot add veth777.0 into the bridge.
Quote:

# vzctl exec 777 ifconfig eth0 192.168.1.105 netmask 255.255.255.0


You assign ip address inside the VE with this command. If you want your VE to use network this command has to be invoked.

Quote:

# brctl addif br0 veth777.0


You've already invoked this command.

Quote:

# vzctl exec 777 ip route add default via 192.168.1.1 dev eth0


You may set up the default route inside VE.
Re: Elastix on OpenVZ, I cant to do the bridge [message #38097 is a reply to message #37956] Sat, 14 November 2009 23:57 Go to previous messageGo to next message
Augustino is currently offline  Augustino
Messages: 9
Registered: October 2009
Junior Member
maratrus wrote on Fri, 06 November 2009 05:45
Hi,

Quote:

Should I configure the iptables?


It's up to you. Configuring iptables has nothing to do with configuring bridge.

Quote:

This is needed? or not?



Quote:

#vzctl set 777 --netif_add eth0 --save


Of course, it must be done otherwise you cannot add veth777.0 into the bridge.
Quote:

# vzctl exec 777 ifconfig eth0 192.168.1.105 netmask 255.255.255.0


You assign ip address inside the VE with this command. If you want your VE to use network this command has to be invoked.

Quote:

# brctl addif br0 veth777.0


You've already invoked this command.

Quote:

# vzctl exec 777 ip route add default via 192.168.1.1 dev eth0


You may set up the default route inside VE.


I am pained, follow many tutorials and I cant get internet in my virtual machine, Can somebody say the steps? Please
Re: Elastix on OpenVZ, I cant to do the bridge [message #38127 is a reply to message #38097] Fri, 20 November 2009 14:06 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Dear Augusto,

it's still unclear what in particular prevents you from using internet from inside the container.

Suppose that you have already passed all steps that you pointed in message #37903.
Could you please provide us with the following output:
- ip a l (from inside the container and from the HN)
- ip r l (from inside the container and from inside the HN)
- check iptables rules (iptables -t nat -L && iptables -t filter -L && iptables -t mangle -L)
- brctl vzbr0 show
- ping anything from inside the VE, at the same moment run tcpdump on eth0 interface inside the HN, eth0 and br0 interfaces on the HN.
Re: Elastix on OpenVZ, I cant to do the bridge [message #38128 is a reply to message #38097] Fri, 20 November 2009 14:07 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
BTW, is it possible to get your node from outside?
If yes, could you provide me with needed information to access the HN (via PM)?
Re: Elastix on OpenVZ, I cant to do the bridge [message #38219 is a reply to message #37869] Mon, 30 November 2009 04:20 Go to previous message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
I have Elastix 1.6 running on an OpenVZ container. You should not have to do anything with networking as anything Elastix does with networking is overridden automatically. Not sure how OpenVZ or the container template do this but that's what happens. There are a few OpenVZ specific packages loaded in container templates and perhaps they are involved.

You can potentially mess up networking temporarily by trying to change networking settings inside the container via Elastix or command line but all you have to do is reboot and the networking changes will be undone by OpenVZ.

In my experience the 2 likely problems that occur with ALL Asterisk distributions are udev and/or iptables.

If you have access to the container command line via a console or through the Host try "iptables -F" which will clear any iptables entries in memory that may be blocking you. These settings will be reloaded next time you reboot but at least it gives you SSH access so you can modify the iptables config file.

You also need to do these 2 things on the Elastix container to fix udev.

nano +346 /etc/rc.d/rc.sysinit
#/sbin/udev
/sbin/MAKEDEV tty
/sbin/MAKEDEV pty

nano +5 /usr/sbin/safe_asterisk
#TTY=9

Here is a detailed procedure installing Asterisk/FreePBX from source where this info comes from.

http://www.powerpbx.org/Asterisk-FreePBX-on-an-OpenVZ-Virtuo zzo-Virtual-Private-Server-v1

This is assuming you have the container set up properly on the node in the first place. If you are in fact having networking problems I am pretty sure it has nothing to do with Elastix or the container and more to do with how how it is set up on the node.

[Updated on: Thu, 03 December 2009 02:02]

Report message to a moderator

Previous Topic: CPULIMIT problem
Next Topic: Live migration with host file system mounted
Goto Forum:
  


Current Time: Wed Jul 24 04:31:09 GMT 2024

Total time taken to generate the page: 0.02450 seconds