Re: virtual ethernet device [message #21340 is a reply to message #21335] |
Fri, 05 October 2007 13:17  |
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.
|
|
|