您现在的位置是:热点 >>正文
云计算核心技术Docker教程:Docker使用macvla网络
热点0147083人已围观
简介...
某些应用程序,尤其是旧版应用程序或监视网络流量的应用程序,期望直接连接到物理网络。在这种情况下,可以使用macvlan网络驱动程序为每个容器的虚拟网络接口分配MAC地址,使其看起来像是直云计接连接到物理网络的物理网络接口。在这种情况下,您需要在Docker主机上指定用于的物理接口macvlan,以及的子网和网关macvlan。您甚至可以macvlan使用不同的物理网络接口隔离网络算核。请记住以下几点:
由于IP地址耗尽或“ VLAN传播”,很容易无意间损坏您的网络,在这种情况下,您的网络中有大量不正确的唯一MAC地址。
您的网络设备需要能够处理“混杂模式”,在该模式下,可以心技为一个物理接口分配多个MAC地址。
如果您的应用程序可以使用网桥(在单个Docker主机上)或覆盖(跨多个Docker主机进行通信)工作,那么从长远来看,这些解决方案可能会更好。
创建一个m术Dacvlan网络
创建macvlan网络时,它可以处于桥接模式或802.1q中继桥接模式。
在桥接模式下,macvlan流量通过主机上的物理设备。
在802.1q中继桥接模式下,流量通过Dococker动态创建的802.1q子接口。这使您可以更精细地控制路由和过滤。
桥接模式
要创建macvlan与给定物理网络接口桥接的网络,请--driver macvlan与docker network crekeate命令一起使用。您还需要指定parent,这是流量将在Docker主机上实际通过的接口。
$ docker network create -d macvlan \
--subnet=172.16.86.0/2r教4 \
--gateway=172.16.86.1 \
-o parent=eth0 pub_net
如果您需要排除IP地址在macvlan网络中的使用,例如当一个给定的IP地址已经在使用中时,请使用--aux程:-addresses:
$ docker network create -d macvlan \
--subnet=192.168.32.0/24 \
--ip-range=192.168.32.128/25 \
--Dogateway=192.168.32.254 \
--aux-address="my-router=192.168.32.129" \
-o parent=eth0 macnet32
802.1q中继ck桥接模式
如果您指定parent带有点的接口名称,例如eth0.50,则Docker会将其解释为的子接口,eth0并自动创建该子接口。
$ docker network create -d macvlaner \
--subnet=192.168.50.0/24 \
--gateway=192.168.50.1 \
-o parent=eth0.50 macvlan50
使用ipvlan代替
在上面的示例中,您仍在使用使用L3桥。您可以改用ipvlan L2桥接器。指定-o ipvlan_mode=l2。
$ docker network create -d ipvlan \
--subnet=192.168.210.0/24ma \
--subnet=192.168.212.0/24 \
--gateway=192.168.210.254 \
--gateway=192.168.212.254 \
-o ipvlan_mode=lcv2 -o parent=eth0 ipvlan210
Tags:
相关文章
豆腐怎么炒啊
热点家里自己做了豆腐,剩下很多,请问豆腐怎么炒又嫩又滑?-九州...本来一块嫩滑的豆腐放到锅里炒出之后变得又老又硬。就比如说麻婆豆腐,在麻婆豆腐起锅之前最重要的一步就是调汁收汁,提前准备好一碗调好的汤汁,...
【热点】
阅读更多Google 与 Canonical 合作将 Ubuntu Pro 带到 Google Cloud 上
热点在 2019 年底,Ubuntu Pro 就已登陆亚马逊 EC2(Amazon Elastic Compute Cloud)。Ubuntu Pro 具有十年的软件更新/安全更新、内核实时补丁、Cano...
【热点】
阅读更多氧气罐能上飞机么
热点氧气罐能带上飞机吗?求解答_问答库问答氧气罐不能带上飞机的,因为属于易爆物品。但是丽江的超市和小卖铺都有氧气罐卖,玉龙雪山从山下到山上一路都有卖的,所以不需要提前买好。建议在丽江。氧气罐可否上飞机?飞...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.ushmm.org/search/results/?ID=8s0587Oi8UTv74zPPM4fuhwjNpe2hsEE&q=谷歌霸屏推广【tg:seogoogle987】,Gcv
- https://www.swecobelgium.be/?page=9&s=谷歌霸屏推广【tg:seogoogle987】,EWh
- https://www.sic-info.org/?s=谷歌霸屏推广【tg:seogoogle987】,gbI
- https://www.sonepar.ch/fr/search?q=谷歌霸屏推广【tg:seogoogle987】,W7T
- https://www.maigoo.com/search/?block=&q=谷歌霸屏推广【tg:seogoogle987】,1qD
- https://www.paspaley.com/catalogsearch/result/?action=QUERY&q=谷歌霸屏推广【tg:seogoogle987】,FUH
- https://www.kingston.gov.uk/site-search/results/?q=谷歌霸屏推广【tg:seogoogle987】,jNs
- https://www.theaerogroup.net/?cat=28&s=谷歌霸屏推广【tg:seogoogle987】,lce
- https://www.vfw.org/search-results?q=谷歌霸屏推广【tg:seogoogle987】,Acs
- https://www.vivaraise.fr/catalogsearch/result/?q=谷歌霸屏推广【tg:seogoogle987】,JOy
- https://www.navymwr.org/search/?query=谷歌霸屏推广【tg:seogoogle987】,Feo
- https://www.vocabulary.com/dictionary/谷歌霸屏推广【tg:seogoogle987】,qu0
- https://www.xvideos.com/tags/谷歌霸屏推广【tg:seogoogle987】,jjH
- https://www.simcoemuskokahealth.org/SearchResults.aspx?SearchQuery=谷歌霸屏推广【tg:seogoogle987】,qve
- https://www.flickr.com/photos/tags/谷歌霸屏推广【tg:seogoogle987】gg7
- https://www.rotherham.gov.uk/site-search/results/?q=谷歌霸屏推广【tg:seogoogle987】,OkR
- https://www.revere.org/search?action=SEARCH&q=谷歌霸屏推广【tg:seogoogle987】,Ob7
- https://www.normani.de/search?q=谷歌霸屏推广【tg:seogoogle987】,yBl
- https://www.teamlab.art/th/?submit=谷歌霸屏推广【tg:seogoogle987】,8Kg
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=谷歌霸屏推广【tg:seogoogle987】AbO
- https://www.whiterock2008.com.tw/search?q=谷歌霸屏推广【tg:seogoogle987】,eyY
- https://www.l-and-b.jp/?page=1&s=谷歌霸屏推广【tg:seogoogle987】,8QG
- https://www.paulaschoice.hk/zh_hant/catalogsearch/result/?q=谷歌霸屏推广【tg:seogoogle987】,lmi
- https://www.pierreherme.com/catalogsearch/result/?q=谷歌霸屏推广【tg:seogoogle987】,5uY
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=谷歌霸屏推广【tg:seogoogle987】wR1
- https://www.partilerdunyasi.com/index.php?route=product/search&tag=谷歌霸屏推广【tg:seogoogle987】,HD9
- https://www.roberthalf.com/us/en/jobs/all/谷歌霸屏推广【tg:seogoogle987】DKU
- https://www.usslexington.com/?action=QUERY&s=谷歌霸屏推广【tg:seogoogle987】,eFk
- https://www.military-history.org/?s=谷歌霸屏推广【tg:seogoogle987】,MXO
- https://www.spoiledsweetboutique.com/search/谷歌霸屏推广【tg:seogoogle987】,eRo
- https://www.seforall.org/search?keywords=谷歌霸屏推广【tg:seogoogle987】,EvD
- https://www.world-architects.com/en/search?term=谷歌霸屏推广【tg:seogoogle987】,v2i
- https://www.teamlab.art/zh-hans/?submit=谷歌霸屏推广【tg:seogoogle987】,WhA
- https://www.selfsufficientish.com/main/?s=谷歌霸屏推广【tg:seogoogle987】,iFV
- https://xn--lgernevedlystskoven-lxb.dk/search/谷歌霸屏推广【tg:seogoogle987】,t2O
- https://www.yr.no/en/search?q=谷歌霸屏推广【tg:seogoogle987】,AEX
- https://www.manga-news.com/index.php/recherche/?q=谷歌霸屏推广【tg:seogoogle987】,FHI
- https://www.impactpool.org/search/?type=79&q=谷歌霸屏推广【tg:seogoogle987】tqE
- https://www.londontheatredirect.com/search/谷歌霸屏推广【tg:seogoogle987】,Pxs
- https://www.welshmountainzoo.org/shop/index.php?routeproduct/search&tag=谷歌霸屏推广【tg:seogoogle987】,6A8
- https://hsmoa.com/search?query=谷歌霸屏推广【tg:seogoogle987】4Lk
- https://www.pixiv.net/tags/谷歌霸屏推广【tg:seogoogle987】,Ivb
- https://www.lneg.pt/?cat=140&s=谷歌霸屏推广【tg:seogoogle987】,RW1
- https://www.stonerealestate.com.au/?cat=100&s=谷歌霸屏推广【tg:seogoogle987】,75o
- https://www.wikiart.org/pt/Search/谷歌霸屏推广【tg:seogoogle987】,YqN
- https://www.flickr.com/photos/tags/谷歌霸屏推广【tg:seogoogle987】1T9
- https://www.temu.com/search_result.html?search_key=谷歌霸屏推广【tg:seogoogle987】1YG
- https://m.shoppinghow.kakao.com/m/search/q/谷歌霸屏推广【tg:seogoogle987】7kM
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:谷歌霸屏推广【tg:seogoogle987】,Dvs
- https://www.dba.dk/soeg/?soeg=谷歌霸屏推广【tg:seogoogle987】f81