OpenVZ Forum


Home » International » Russian » Сеть между VE
Сеть между VE [message #7301] Tue, 10 October 2006 15:04 Go to previous message
enpx is currently offline  enpx
Messages: 50
Registered: October 2006
Member
Здравствуйте!

Требуется создать несколько VE, которые видели бы друг друга (HN <-> VE не обязательно). Делаю так:

[root@m1 ~]# vzctl create 101 --ostemplate altlinux-20060928 --config vps.basic
Creating VE private area: /var/lib/vz/private/101
Performing postcreate actions
VE private area was created
[root@m1 ~]# vzctl create 102 --ostemplate altlinux-20060928 --config vps.basic
Creating VE private area: /var/lib/vz/private/102
Performing postcreate actions
VE private area was created

[root@m1 ~]# vzctl set 101 --ipadd 192.168.47.1 --save
Saved parameters for VE 101
[root@m1 ~]# vzctl set 102 --ipadd 192.168.47.2 --save
Saved parameters for VE 102

[root@m1 ~]# vzctl start 101
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.47.1
Setting CPU units: 1000
VE start in progress...
[root@m1 ~]# vzctl start 102
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.47.2
Setting CPU units: 1000
VE start in progress...

[root@m1 ~]# vzctl exec 101 ping 192.168.47.2
... тут просто висим ...
[root@m1 ~]# vzctl exec 102 ping 192.168.47.1
connect: Network is unreachable


Смотрю, что же там внутри настроено:

root@m1 ~]# vzctl exec 101 ip address
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
    link/void
    inet 127.0.0.1/32 scope host venet0
    inet 192.168.47.1/32 scope global venet0:1
[root@m1 ~]# vzctl exec 102 ip address
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
    link/void
    inet 127.0.0.1/32 scope host venet0
    inet 192.168.47.2/32 scope global venet0:1
[root@m1 ~]# vzctl exec 101 ip route
192.0.2.0/24 dev venet0  scope host
default via 192.0.2.1 dev venet0
[root@m1 ~]# vzctl exec 102 ip route
192.0.2.0/24 dev venet0  scope host
default via 192.0.2.1 dev venet0


Непорядок, от 192.168.47.2/32 действительно толку мало, а 127.0.0.1/32 вообще не нужен. Пытаюсь сделать так:

[root@m1 ~]# vzctl set 101 --ipadd 192.168.47.1/24 --save
Bad parameter for --ipadd: 192.168.47.1/24


Что делаю неправильно?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VE default route
Next Topic: Набор VE : один router/firewall и все остальные за ним
Goto Forum:
  


Current Time: Tue Jul 09 17:23:20 GMT 2024

Total time taken to generate the page: 0.02515 seconds