ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Eugene Prokopiev <prokopiev@stc.donpac.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Проброс физического eth0 внутрь VE
Date: Fri, 06 Oct 2006 18:09:16 +0400
Message-ID: <4526638C.2060109@stc.donpac.ru> (raw)
In-Reply-To: <20060928155045.GB24803@lks.home>

> а вы пробовали походить по wiki.openvz.org? :)

прочел http://wiki.openvz.org/Virtual_Ethernet_device и 
http://www.freesource.info/wiki/AltLinux/Dokumentacija/OpenVZ

Пытаюсь сделать ...

Вот устройство на HN, которое требуется пробросить в VE:

[root@m0 ~]# ip a show dev eth2
10: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
     link/ether 00:13:46:e7:d2:1d brd ff:ff:ff:ff:ff:ff
     inet6 fe80::213:46ff:fee7:d21d/64 scope link
        valid_lft forever preferred_lft forever

Проверяю, что оно действительно работает:

[root@m0 ~]# ip addr add 192.168.15.111/24 dev eth2
[root@m0 ~]# ip route add 192.168.15.11 dev eth2
[root@m0 ~]# ping -c 1 192.168.15.11
PING 192.168.15.11 (192.168.15.11) 56(84) bytes of data.
64 bytes from 192.168.15.11: icmp_seq=1 ttl=64 time=2.88 ms

--- 192.168.15.11 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.889/2.889/2.889/0.000 ms

Возвращаю настройки обратно:

[root@m0 ~]# ip route del 192.168.15.11 dev eth2
[root@m0 ~]# ip addr del 192.168.15.111/24 dev eth2

Создаю соответствующее ему veth-устройство:

# vzctl set 101 --veth_add 
veth0,00:13:46:e7:d2:1d,eth0,00:12:34:56:78:9A --save
Processing veth devices
Saved parameters for VE 101

Конфигурирую оба:

[root@m0 ~]# ifconfig eth2 0
[root@m0 ~]# ifconfig veth0 0
[root@m0 ~]# echo 1 > /proc/sys/net/ipv4/conf/eth2/proxy_arp
[root@m0 ~]# echo 1 > /proc/sys/net/ipv4/conf/veth0/proxy_arp
[root@m0 ~]# echo 1 > /proc/sys/net/ipv4/conf/eth2/forwarding
[root@m0 ~]# echo 1 > /proc/sys/net/ipv4/conf/veth0/forwarding

Теперь иду внутрь VE и конфигурирую eth0 там:

[root@m0 ~]# vzctl enter 101
entered into VE 101
[root@localhost /]# ip addr show dev eth0
13: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
     link/ether 00:12:34:56:78:9a brd ff:ff:ff:ff:ff:ff
[root@localhost /]# ip link set eth0 up
[root@localhost /]# ip addr add 192.168.15.111/32 dev eth0
[root@localhost /]# ip route add 192.168.15.11 dev eth0

И вижу, что ничего не работает:

[root@localhost /]# ping 192.168.15.11
PING 192.168.15.11 (192.168.15.11) 56(84) bytes of data.

--- 192.168.15.11 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Что я делаю неправильно?

Правильно ли я вообще понимаю логику:

1. В HN создать veth-устройство, связать его с физическим 
eth-устройством, для обеих включить proxy_arp и forwarding
2. В VE или в HN настроить внутреннее eth-устройство

Может надо делать иначе?

-- 
С уважением, Прокопьев Евгений



  reply	other threads:[~2006-10-06 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 15:06 Eugene Prokopiev
2006-09-28 15:50 ` Konstantin A. Lepikhov
2006-10-06 14:09   ` Eugene Prokopiev [this message]
2006-10-09  9:29     ` Slava Dubrovskiy
2006-10-09 11:42       ` Eugene Prokopiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4526638C.2060109@stc.donpac.ru \
    --to=prokopiev@stc.donpac.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git