virtual ethernet device [message #21255] |
Wed, 03 October 2007 18:29 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
maximiliano
Messages: 8 Registered: September 2007
|
Junior Member |
|
|
Helo, I need some help Heare Please .
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 #21340 is a reply to message #21335] |
Fri, 05 October 2007 13:17 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
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.
|
|
|