VLAN
After running command line,
ip link add mvlan0 link eth0 type macvlan mode bridge # This is not permanent so I need to figure this out.
ifconfig mvlan0 up
ifconfig -a
mvlan0 Link encap:Ethernet HWaddr e2:a7:ca:6e:c9:a2
inet6 addr: fe80::e0a7:caff:fe6e:c9a2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:634 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:44233 (44.2 KB) TX bytes:648 (648.0 B)
ip addr show
4: mvlan0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
link/ether e2:a7:ca:6e:c9:a2 brd ff:ff:ff:ff:ff:ff
inet6 fe80::e0a7:caff:fe6e:c9a2/64 scope link
valid_lft forever preferred_lft forever
Network Config
IP Address 64.73.220.113
Gateway 64.73.220.1
Netmask 255.255.255.0
Nameserver 216.15.129.205
Nameserver 216.15.129.206
cat //etc/lxc/dnsmasq.conf
dhcp-host=app,10.0.3.20
dhcp-host=database,10.0.3.30
/var/lib/lxc/web/config
# Template used to create this container: /usr/share/lxc/templates/lxc-ubuntu
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Common configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
# Container specific configuration
lxc.rootfs = /var/lib/lxc/web/rootfs
lxc.mount = /var/lib/lxc/web/fstab
lxc.utsname = web
lxc.arch = amd64
# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.hwaddr = 00:16:3e:b2:e4:2e
lxc.network.name = eth0
lxc.network.type = macvlan
lxc.network.macvlan.mode = bridge
lxc.network.flags = up
lxc.network.link = mvlan0
lxc.network.hwaddr = cc:45:bc:27:43:9c
lxc.network.name = eth1
/var/lib/lxc/web/rootfs/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 64.73.220.113
gateway 64.73.220.1
netmask 255.255.255.0
dns-nameservers 216.15.129.205 216.15.129.206