[Sysadmins] Сеть в OpenVZ
Alexey Borovskoy
=?iso-8859-1?q?alexey=2Eborovskoy_=CE=C1_gmail=2Ecom?=
Ср Авг 16 00:49:13 MSD 2006
16.08.06, Konstantin A. Lepikhov<lakostis на unsafe.ru> написал(а):
>
> тогда надо смотреть вывод ip r l на host системе.
HN
------
#ip link
# ip l
2: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: dummy0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue
link/ether b2:2d:59:80:27:6a brd ff:ff:ff:ff:ff:ff
6: lan: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:17:31:2a:01:83 brd ff:ff:ff:ff:ff:ff
8: sit0: <NOARP,UP> mtu 1480 qdisc noqueue
link/sit 0.0.0.0 brd 0.0.0.0
1: venet0: <BROADCAST,POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc noqueue
link/void
#ip addr
# ip a
2: 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
4: dummy0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue
link/ether b2:2d:59:80:27:6a brd ff:ff:ff:ff:ff:ff
inet 10.1.1.1/32 scope global dummy0
inet6 fe80::b02d:59ff:fe80:276a/64 scope link
valid_lft forever preferred_lft forever
6: lan: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:17:31:2a:01:83 brd ff:ff:ff:ff:ff:ff
inet 172.16.81.28/24 brd 172.16.81.255 scope global lan
inet6 fe80::217:31ff:fe2a:183/64 scope link
valid_lft forever preferred_lft forever
8: sit0: <NOARP,UP> mtu 1480 qdisc noqueue
link/sit 0.0.0.0 brd 0.0.0.0
1: venet0: <BROADCAST,POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc noqueue
link/void
#ip ro
# ip ro l
10.1.1.2 dev venet0 scope link src 172.16.81.28
172.16.81.0/24 dev lan proto kernel scope link src 172.16.81.28
default via 172.16.81.1 dev lan
VE
-------
# vzctl exec 101 ip link
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
link/void
# vzctl exec 101 ip add
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
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
link/void
inet 127.0.0.1/32 scope host venet0
inet 10.1.1.2/32 scope global venet0:1
# vzctl exec 101 ip ro l
<пусто>
# vzctl exec 101 netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
Но в /etc/net/ifaces/venet0/ipv4route
191.255.255.0/24 scope host
default via 191.255.255.1
Как же она увидит HN?
Делаем в VE route add default gw 172.16.81.28 и всё начинает ездить.
P.S.
NH=VE=ALC30
P.P.S.
Зачем там в скриптах FAKE* то?
Подробная информация о списке рассылки Sysadmins