Experimental: Advertise container network with BGP in ipvlan l3#1067
Experimental: Advertise container network with BGP in ipvlan l3#1067YujiOshima wants to merge 4 commits intomoby:masterfrom
Conversation
|
@YujiOshima thanks for the awesome contribution. Exciting to see the L3-to-the-edge case shaping up very well. Github is not able to render your commit properly due to the size of the changes (mostly due to vendor-in I believe). Can you please use the same PR, but split the changes into few commits ?
Also as we discussed earlier, a few functionality comments :
|
|
@mavenugo Thank you for commnet!
OK, I'll do it right now.
Yes, definitely. It use vrf function of BGP speaker, this is one of vrf use case I think.
I agree. I add |
|
For the BGP neighbor on the ToR switch, it seems to me the most logical thing would be to use eBGP peering with either unique AS #'s or a single AS but allow the AS to be repeated. Are there any advantages to using iBGP and RRs? |
|
@fredhsu I think both eBGP and iBGP should be an option since its just design decisions of the network infra. wdyt? |
|
@nerdalert True, I guess at the end of the day BGP client doesn't need to care how its implemented in the core. |
|
Sorry closed by mistake... |
|
@mavenugo now I split the commits.
I think if you use same AS in eBGP, there is some limit in topology for avoid loop. So different AS should be used for eBGP. |
|
@YujiOshima as discussed offline, for a specific functionality of exchanging the routes, this PR brings in huge dependencies which is hard to justify. Since the BGP requirements for ipvlan-l3 mode is quite narrow, is it possible to choose only the relevant dependencies instead of pulling in so many packages ? |
|
@YujiOshima reviewing the code a bit deeper, it is clear that |
|
@mavenugo yeah It would probably be able to reduce dependencies. |
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
|
@YujiOshima It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:
Thank you! |
In ipvlan l3 mode, ipvlan driver advertise container network to another host.
Containers can communicate each other inter host easily in ipvlan l3mode.
See also #1014
network create command like
docker network create -d ipvlan --subnet=192.168.1.0/24 --ip-range=192.168.1.32/28 -o ipvlan_mode=l3 -o bgp-neighbor=10.0.1.1 -o vrf=100 -o parent=eth0 -o asnum=65001 -o rasnum=65002 vrf100and
docker run --net=vrf100 busybox,ipvlan advertise container address(now 192.168.1.33) as /32.
Options
vrf: vrf IDIf you set vrf ID, ipvlan driver advertise container route as VPN network.
Advertise only same vrf ID network.
bgp-neighbor: IP address of BGP neighborFor a test between two hosts, set other host ip address in bgp-neighbor, and vice versa.
And you don't need to set asnum and rasnum (use default 65000).
More than three hosts, you must use route reflector of eBGP.
asnum, rasnum: AS number of BGP speakerasnumis self as,rasnumis neighbor as.Signed-off-by: YujiOshima yuji.oshima0x3fd@gmail.com