OpenVZ Forum


Home » General » Support » virtual ethernet device
virtual ethernet device [message #21255] Wed, 03 October 2007 18:29 Go to next message
maximiliano is currently offline  maximiliano
Messages: 8
Registered: September 2007
Junior Member
Helo, I need some help Heare Please Sad .

I need to add another interface in a VPS
and I used the following command:

# vzctl set 101 --netif_add vet0

When I go to the VPS 101 I set up the interface with:
# ifconfig vet0 up

Bur the problem is when I want to asign an IP Address:
# ifconfig vet0 192.168.1.30
With this command I lost response with the VPS (sory my english).

I tried with...
# vzctl set 101 --ipadd 192.168.1.30
But this makes another venet0:X interface and I dont want this.

So, the question is, How can I put an ipaddress to this Interface (vet0)?.


Best Regards
Maximiliano C.





[Updated on: Wed, 03 October 2007 18:36]

Report message to a moderator

Re: virtual ethernet device [message #21334 is a reply to message #21255] Fri, 05 October 2007 11:13 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

1.
Quote:

With this command I lost response with the VPS (sory my english).


Sorry, but I have not understood what does it mean?
You can't get your VPS via it IP (192.168.1.30)?
Re: virtual ethernet device [message #21335 is a reply to message #21255] Fri, 05 October 2007 12:07 Go to previous messageGo to next message
maximiliano is currently offline  maximiliano
Messages: 8
Registered: September 2007
Junior Member
Ok, I found some information about this in:

http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_veth -device_persistent

It was very usefull for me.

Thnx Anyway!!

Best Regards
Maximiliano
Re: virtual ethernet device [message #21337 is a reply to message #21335] Fri, 05 October 2007 12:30 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

Can you write the reason and the solution of the problem if it will be possible?
Thank you!
Re: virtual ethernet device [message #21340 is a reply to message #21335] Fri, 05 October 2007 13:17 Go to previous message
maximiliano is currently offline  maximiliano
Messages: 8
Registered: September 2007
Junior Member
Yes, the reason was beacouse I need install and run Heartbeat Service in one VPS (101), but to run this service I needed one Interface (eg. eth0) with the correct configuration (ip - mask - bcast).

I found some information about this in:

http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_veth -device_persistent

Simple configuration with virtual ethernet device
[edit] Start a VE

[host-node]# vzctl start 101

[edit] Add veth device to VE

[host-node]# vzctl set 101 --veth_add veth101.0,00:12:34:56:78:9A,eth0,00:12:34:56:78:9B --save

Configure devices in VE0

[host-node]# ifconfig veth101.0 0
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/proxy_arp
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

Configure device in VE

[host-node]# vzctl enter 101
[ve-101]# /sbin/ifconfig eth0 0
[ve-101]# /sbin/ip addr add 192.168.0.101 dev eth0
[ve-101]# /sbin/ip route add default dev eth0

Add route in VE0

[host-node]# ip route add 192.168.0.101 dev veth101.0


I hope that this can help.

Best Regards
Maximiliano C.
Previous Topic: NFS Problem
Next Topic: Clearing bean counters
Goto Forum:
  


Current Time: Mon Nov 11 17:03:21 GMT 2024

Total time taken to generate the page: 0.04766 seconds