|
|
|
|
Re: VLAN Setup [message #15663 is a reply to message #15660] |
Thu, 09 August 2007 08:57   |
jonasb
Messages: 20 Registered: July 2007
|
Junior Member |
|
|
I can't get it to work. I can start the VE. And I can ping it from HN but not outside HN. The strange thing is that my vlan disappear when I start the VE. And is availiable again when I stop it.
[root@vz-test ~]# uname -a
Linux vz-test 2.6.18-8.1.8.el5.028stab039.1PAE #1 SMP Mon Jul 23 20:45:26 MSD 2007 i686 i686 i386 GNU/Linux
[root@vz-test ~]# vconfig add eth1 105
Added VLAN with VID == 105 to IF -:eth1:-
[root@vz-test ~]# ifconfig eth1.105 192.168.20.137 netmask 255.255.255.240 broadcast 192.168.20.143
[root@vz-test ~]# vzctl set 10666 --netdev_add eth1.105 --save
Saved parameters for VE 10666
[root@vz-test ~]# vzctl set 10666 --ipadd 192.168.20.138 --save
Saved parameters for VE 10666
[root@vz-test ~]# ifconfig eth1.105
eth1.105 Link encap:Ethernet HWaddr 00:30:48:60:71:9D
inet addr:192.168.20.137 Bcast:192.168.20.143 Mask:255.255.255.240
inet6 addr: fe80::230:48ff:fe60:719d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1538 (1.5 KiB) TX bytes:1596 (1.5 KiB)
[root@vz-test ~]# vzctl start 10666
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.20.138
arpsend: 192.168.20.138 is detected on another computer : 00:00:0c:07:ac:01
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 192.168.20.138 eth1.106 FAILED
arpsend: 192.168.20.138 is detected on another computer : 00:1a:6d:02:43:45
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 192.168.20.138 eth1.104 FAILED
Setting CPU units: 1000
Setting CPUs: 1
Configure meminfo: 768000
File resolv.conf was modified
VE start in progress...
[root@vz-test ~]# ping -c 1 192.168.20.138
PING 1192.168.20.138 (1192.168.20.138) 56(84) bytes of data.
64 bytes from 192.168.20.138: icmp_seq=1 ttl=64 time=0.075 ms
--- 1192.168.20.138 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.075/0.075/0.075/0.000 ms
[root@vz-test ~]# ifconfig eth1.105
eth1.105: error fetching interface information: Device not found
[root@vz-test ~]# cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth1.106 | 106 | eth1
eth1.104 | 104 | eth1
[root@vz-test ~]# ifconfig eth1.105
eth1.105: error fetching interface information: Device not found
[root@vz-test ~]# vzctl stop 10666
Stopping VE ...
VE was stopped
VE is unmounted
[root@vz-test ~]# ifconfig eth1.105
eth1.105 Link encap:Ethernet HWaddr 00:30:48:60:71:9D
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1538 (1.5 KiB) TX bytes:1428 (1.3 KiB)
[root@vz-test ~]# cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth1.106 | 106 | eth1
eth1.104 | 104 | eth1
eth1.105 | 105 | eth1
[Updated on: Thu, 09 August 2007 08:58] Report message to a moderator
|
|
|
|
Re: VLAN Setup [message #15666 is a reply to message #15664] |
Thu, 09 August 2007 10:45   |
jonasb
Messages: 20 Registered: July 2007
|
Junior Member |
|
|
vaverin wrote on Thu, 09 August 2007 05:51 | As far as I understand you want to use several VE with vlan's IP without any vlan configurations inside VEs. Am I correct?
|
Correct!
vaverin wrote on Thu, 09 August 2007 05:51 |
jonasb wrote on Thu, 09 August 2007 12:57 | I can't get it to work. I can start the VE. And I can ping it from HN but not outside HN. The strange thing is that my vlan disappear when I start the VE. And is availiable again when I stop it.
[root@vz-test ~]# uname -a
Linux vz-test 2.6.18-8.1.8.el5.028stab039.1PAE #1 SMP Mon Jul 23 20:45:26 MSD 2007 i686 i686 i386 GNU/Linux
[root@vz-test ~]# vconfig add eth1 105
Added VLAN with VID == 105 to IF -:eth1:-
[root@vz-test ~]# ifconfig eth1.105 192.168.20.137 netmask 255.255.255.240 broadcast 192.168.20.143
|
here you have configured vlan vid 105 on HW node. OK
jonasb wrote on Thu, 09 August 2007 12:57 |
[root@vz-test ~]# vzctl set 10666 --netdev_add eth1.105 --save
Saved parameters for VE 10666
|
This is wrong, you should not move this device into VE, it's extra task for your purposes.
|
OK, so I don't use --netdev_add at all?
vaverin wrote on Thu, 09 August 2007 05:51 |
jonasb wrote on Thu, 09 August 2007 12:57 |
[root@vz-test ~]# vzctl set 10666 --ipadd 192.168.20.138 --save
Saved parameters for VE 10666
|
This is wrong again: 192.168.20.138 is already used. You should use any non-used IP for your VEs.
|
It doesn't matter which IP-address I use I always got errormessages that they are in use. Im really sure that I don't use them anywhere else.
[Updated on: Thu, 09 August 2007 10:46] Report message to a moderator
|
|
|
|
|
Re: VLAN Setup [message #15797 is a reply to message #15762] |
Mon, 13 August 2007 19:46   |
jonasb
Messages: 20 Registered: July 2007
|
Junior Member |
|
|
This is now solved. Andrey@SWSoft helped me out.
The problem was when the router cleaned up the arp cache the arp for the VE was removed.
I had to add an extra "ip rule" and after that it worked.
/sbin/ip rule add from 192.168.20.128/28 table 90
/sbin/ip rule add to 192.168.20.128/28 lookup main pref 90
/sbin/ip route add default dev eth1.10 via 192.168.20.130 table 90
[Updated on: Mon, 13 August 2007 19:47] Report message to a moderator
|
|
|
|
|