OpenVZ Forum


Home » International » Russian » Vlan
Vlan [message #32079] Fri, 18 July 2008 15:18 Go to previous message
weldpua2008 is currently offline  weldpua2008
Messages: 58
Registered: July 2006
Member
Create VLAN device on physical network interface (eth0) and move it (VLAN device) to container:
host # vconfig add eth0 <vlan_id>
host # vzctl set <CTID> --netif_add eth0.<vlan_id> --save
Create VLAN device inside container on veth device
ve # vconfig add eth0 <vlan_id>

Делаю:
~# vconfig add eth0 20
Added VLAN with VID == 20 to IF -:eth0:-

# vzctl set 222 --netif_add eth0.20 --save
Configure veth devices: veth222.0
Saved parameters for VE 222

debian:~# vzctl enter 222
entered into VE 222
VE:222 h:/# vconfig add eth0 20
ERROR: trying to add VLAN #20 to IF -:eth0:- error: Invalid argument
VE:222 h:/# logout
exited from VE 222
debian:~# vzctl restart 222
Restarting VE
Stopping VE ...
VE was stopped
VE is unmounted
Starting VE ...
VE is mounted
Adding IP address(es): 10.11.25.2
Setting CPU limit: 65
Setting CPU units: 38250
Setting devices
Configure meminfo: 465505
Set hostname: forum.skm.net.ua
Setting quota ugidlimit: 1000
Configure veth devices: veth222.0
VE start in progress...
debian:~#
Display all 953 possibilities? (y or n)
debian:~#
debian:~# vzctl enter 222
entered into VE 222
VE:222 h:/# vconfig add eth0 20
ERROR: trying to add VLAN #20 to IF -:eth0:- error: Invalid argument
VE:222 h:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:525 errors:0 dropped:0 overruns:0 frame:0
TX packets:388 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:703523 (687.0 KiB) TX bytes:21454 (20.9 KiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.11.25.2 P-t-P:10.11.25.2 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1



# logout
exited from VE 222
debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0E:2E:A4:1C:C5
inet addr:10.1.1.3 Bcast:10.1.255.255 Mask:255.255.0.0
inet6 addr: fe80::20e:2eff:fea4:1cc5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:199139437 errors:910 dropped:1169 overruns:101 frame:0
TX packets:286884470 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4200451771 (3.9 GiB) TX bytes:407282252 (388.4 MiB)
Interrupt:5 Base address:0xe800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1364 (1.3 KiB) TX bytes:1364 (1.3 KiB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:286715036 errors:0 dropped:0 overruns:0 frame:0
TX packets:186916564 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:677347402 (645.9 MiB) TX bytes:145211851 (138.4 MiB)

veth222.0 Link encap:Ethernet HWaddr 00:18:51:D5:2C:92
inet6 addr: fe80::218:51ff:fed5:2c92/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Previous Topic: Размер диска внутри VE opensuse-10-i386-default
Next Topic: Не используется SWAP
Goto Forum:
  


Current Time: Wed Jun 18 16:46:21 GMT 2025

Total time taken to generate the page: 0.04068 seconds