lbg74
(Lee Byung Gon)
May 17, 2020, 12:37pm
1
How do I configure routing for 20.2 and 20.10 in two containers to communicate?
In the picture above, eth1 is ipvlan (l3s).
Thank you.
tomp
(Thomas Parrott)
May 18, 2020, 12:38pm
2
Please can you show output for both containers of lxc config show <container> --expanded
. Its usually best to do this as a starting point for all instance base queries.
lbg74
(Lee Byung Gon)
May 18, 2020, 1:15pm
3
Dear @tomp
Fisrt, Thank you for your reply about my question.
I tried to configure the routing table with reference to the URL below, but communication between the two containers failed.
URL: https://gist.github.com/nerdalert/f493d475d9ad36e194d6
Please provide guidelines and i will give you feedback after testing.
I started several containers on one node and assigned ipvlan (mode l3s) to each container, so I checked that communication between each ipvlan works well.
My test env is below.
notebook (ubuntu 20.04 / lxd & lxc : 4.1) - vm(4EA, ubuntu20.04) - container(centos)
notebook
lxd vm cluster (4EA)
lxc config show ipvlan01 --expanded
root@lxd01:~# lxc config show ipvlan01 --expanded
architecture: x86_64
config:
image.architecture: amd64
image.description: Centos 7 amd64 (20200516_07:08)
image.os: Centos
image.release: “7”
image.serial: “20200516_07:08”
image.type: squashfs
security.idmap.isolated: “true”
volatile.base_image: a59a81cbc58f0a7f55d87f723b1de9ed32a12092d5aa6835ed837ad0a35b1660
volatile.eth0.host_name: vethbf8ee16c
volatile.eth0.hwaddr: 00:16:3e:07:1d:80
volatile.eth1.last_state.created: “false”
volatile.eth1.name: eth1
volatile.idmap.base: “1065536”
volatile.idmap.current: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536},{“Isuid”:false,“Isgid”:true,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536}]’
volatile.idmap.next: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536},{“Isuid”:false,“Isgid”:true,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536}]’
volatile.last_state.idmap: ‘[]’
volatile.last_state.power: RUNNING
devices:
eth0:
name: eth0
network: lxdfan0
type: nic
eth1:
ipv4.address: 172.16.20.10
ipv4.gateway: auto
mode: l3s
nictype: ipvlan
parent: lxdfan0
type: nic
root:
path: /
pool: local
type: disk
ephemeral: false
profiles:
default
stateful: false
description: “”
lxc config show ipvlan02 --expanded
root@lxd01:~# lxc config show ipvlan02 --expanded
architecture: x86_64
config:
image.architecture: amd64
image.description: Centos 7 amd64 (20200516_07:08)
image.os: Centos
image.release: “7”
image.serial: “20200516_07:08”
image.type: squashfs
security.idmap.isolated: “true”
volatile.base_image: a59a81cbc58f0a7f55d87f723b1de9ed32a12092d5aa6835ed837ad0a35b1660
volatile.eth0.host_name: veth3036606a
volatile.eth0.hwaddr: 00:16:3e:f6:e9:06
volatile.eth1.last_state.created: “false”
volatile.eth1.name: eth1
volatile.idmap.base: “1065536”
volatile.idmap.current: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536},{“Isuid”:false,“Isgid”:true,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536}]’
volatile.idmap.next: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536},{“Isuid”:false,“Isgid”:true,“Hostid”:1065536,“Nsid”:0,“Maprange”:65536}]’
volatile.last_state.idmap: ‘[]’
volatile.last_state.power: RUNNING
devices:
eth0:
name: eth0
network: lxdfan0
type: nic
eth1:
ipv4.address: 172.16.20.2
ipv4.gateway: auto
mode: l3s
nictype: ipvlan
parent: lxdfan0
type: nic
root:
path: /
pool: local
type: disk
ephemeral: false
profiles:
default
stateful: false
description: “”
I am always grateful for your help.
– LBG –
tomp
(Thomas Parrott)
May 18, 2020, 6:03pm
4
I dont think ipvlan over a fan network will work. What is the need for the eth1 nic?
lbg74
(Lee Byung Gon)
May 18, 2020, 9:02pm
5
For example, to assign the same IP band for each system purpose. – Development system / Production system
One of the biggest objectives for testing ipvlan routing between hosts is to flexibly implement for various customer requirements.^^