[lxc-users] Connecting container to tagged VLAN
Joshua Schaeffer
jschaeffer0922 at gmail.com
Wed Jan 27 22:19:37 UTC 2016
On Wed, Jan 27, 2016 at 2:39 PM, Fajar A. Nugraha <list at fajar.net> wrote:
>
>
> Is eth1 connected to your switch as trunk? If no (e.g. you have the same
> settings for eth1 and eth2 on the switch side),
>
Both ports are connected as trunk. As far as the switch side goes each
ports is configured the same. Trunked for VLAN 10, 500 and 501. Native VLAN
is 10.
eth2 already works. I set it up for testing outside of all containers (i.e.
on the host only). From the host:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
0.0.0.0 192.168.54.1 0.0.0.0 UG 0 0 0 eth0
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0
lxcbr0
10.240.78.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.54.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0
PING 10.240.78.1 (10.240.78.1) 56(84) bytes of data.
64 bytes from 10.240.78.1: icmp_seq=1 ttl=255 time=1.76 ms
64 bytes from 10.240.78.1: icmp_seq=2 ttl=255 time=2.22 ms
64 bytes from 10.240.78.1: icmp_seq=3 ttl=255 time=1.90 ms
^C
--- 10.240.78.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.768/1.966/2.229/0.196 ms
> then you can't tag it inside your host.
>
I did have that idea and tried it without success:
# The second network interface
auto eth1
iface eth1 inet manual
#commenting out dot1q
#iface eth1.500 inet manual
# vlan-raw-device eth1
[...]
auto br0-500
iface br0-500 inet manual
bridge_ports eth1
bridge_stp off
bridge_fd 0
bridge_maxwait 0
>
> To put it another way:
> - start with known-good configuration, THEN make incremental changes
> - in yout case, start by testing whether it works on the HOST side when
> you assign an IP address to eth1.500, WITHOUT br0-500 bridge
>
Okay thanks, I will try different configurations out.
> , and WITHOUT any ip address assigned to eth2.
>
I'm not sure what you mean by not assigning an IP address to eth2. Eth2 is
already working from the host, and I don't plan on using it inside any
container (I may have failed to mention that before). Also how would the
NIC work without an IP address? I feel I'm missing something obvious here.
Thanks,
Joshua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160127/57291fa7/attachment.html>
More information about the lxc-users
mailing list