Trying to get VLANs working inside CTs on Proxmox 2.3 and having no luck. In order to remove as many variables as possible, I am not traversing an external switch, merely trying to connect to CTs on the same host to each other across a new VLAN.
First, I added a new veth to each CT (using one here as an example):
Then, I configured the new interface in the CTs by creating /etc/network/interfaces.tail as follows
Then reboot the CT, but I don't see the new IP in the routing table and also lose connectivity through my existing interface (can ping myself, but not the router):
Now rename the file and reboot:
And the connectivity is back:
Any suggestions?
thanks~
First, I added a new veth to each CT (using one here as an example):
Then, I configured the new interface in the CTs by creating /etc/network/interfaces.tail as follows
Code:
auto venet0:99
iface venet0:99 inet static
address 172.16.99.23
netmask 255.255.255.255
vlan-raw-device venet0
Code:
root@ns1:~# 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.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:10 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5321 (5.3 KB) TX bytes:4385 (4.3 KB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.44.23 P-t-P:192.168.44.23 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
venet0:99 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.16.99.23 P-t-P:172.16.99.23 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
root@ns1:~# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default * 0.0.0.0 U 0 0 0 venet0
root@ns1:~# ping -c 5 192.168.44.23
PING 192.168.44.23 (192.168.44.23) 56(84) bytes of data.
64 bytes from 192.168.44.23: icmp_req=1 ttl=64 time=0.021 ms
64 bytes from 192.168.44.23: icmp_req=2 ttl=64 time=0.021 ms
64 bytes from 192.168.44.23: icmp_req=3 ttl=64 time=0.021 ms
64 bytes from 192.168.44.23: icmp_req=4 ttl=64 time=0.023 ms
64 bytes from 192.168.44.23: icmp_req=5 ttl=64 time=0.020 ms
--- 192.168.44.23 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.020/0.021/0.023/0.003 ms
root@ns1:~# ping -c 5 192.168.44.1
PING 192.168.44.1 (192.168.44.1) 56(84) bytes of data.
--- 192.168.44.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3998ms
Code:
root@ns1:~# mv /etc/network/interfaces.tail /etc/network/interfaces.tail.safroot@ns1:~# shutdown -r now
root@ns1:~#
Broadcast message from root@ns1
(/dev/pts/0) at 0:43 ...
The system is going down for reboot NOW!
Connection to ns1 closed by remote host.
Connection to ns1 closed.
otter:~ kurt$ ssh root@ns1
And the connectivity is back:
Code:
root@ns1:~# 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.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:45 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5659 (5.6 KB) TX bytes:4494 (4.4 KB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.44.23 P-t-P:192.168.44.23 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
root@ns1:~# ping -c 5 192.168.44.23
PING 192.168.44.23 (192.168.44.23) 56(84) bytes of data.
64 bytes from 192.168.44.23: icmp_req=1 ttl=64 time=0.019 ms
64 bytes from 192.168.44.23: icmp_req=2 ttl=64 time=0.019 ms
64 bytes from 192.168.44.23: icmp_req=3 ttl=64 time=0.023 ms
64 bytes from 192.168.44.23: icmp_req=4 ttl=64 time=0.021 ms
64 bytes from 192.168.44.23: icmp_req=5 ttl=64 time=0.024 ms
--- 192.168.44.23 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.019/0.021/0.024/0.003 ms
root@ns1:~# ping -c 5 192.168.44.1
PING 192.168.44.1 (192.168.44.1) 56(84) bytes of data.
64 bytes from 192.168.44.1: icmp_req=1 ttl=63 time=142 ms
64 bytes from 192.168.44.1: icmp_req=2 ttl=63 time=0.183 ms
64 bytes from 192.168.44.1: icmp_req=3 ttl=63 time=0.170 ms
64 bytes from 192.168.44.1: icmp_req=4 ttl=63 time=0.171 ms
64 bytes from 192.168.44.1: icmp_req=5 ttl=63 time=0.152 ms
--- 192.168.44.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.152/28.568/142.165/56.798 ms
Any suggestions?
thanks~