摘要:支持協(xié)議,所以可以很方便的通過(guò)編程實(shí)現(xiàn)大規(guī)模網(wǎng)絡(luò)的自動(dòng)化,被大量運(yùn)用于網(wǎng)絡(luò)中。流表中,優(yōu)先級(jí)高的優(yōu)先匹配,并執(zhí)行匹配規(guī)則的。
sdn (software defines network)
看了些相關(guān)的資料,這里記錄一下自己對(duì)sdn的理解,能力有限,如有錯(cuò)誤歡迎指正。
sdn軟件定義網(wǎng)絡(luò),目的是想要利用軟件來(lái)模擬網(wǎng)絡(luò)設(shè)備,如交換機(jī),路由器之類的。
為什么需要這么做? 一個(gè)主要原因是云計(jì)算的高速發(fā)展,給傳統(tǒng)的數(shù)據(jù)中心帶來(lái)了更加靈活和復(fù)雜的組網(wǎng)需求。
傳統(tǒng)網(wǎng)絡(luò)設(shè)備完成數(shù)據(jù)中心服務(wù)器的組網(wǎng),在此之上,通過(guò)sdn來(lái)完成虛機(jī)和容器之間的連通
ovs (openvSwitch)官方的說(shuō)法:Open vSwitch是一款高質(zhì)量的多層虛擬交換機(jī),以開源Apache 2許可證授權(quán),非常適合在虛擬機(jī)環(huán)境中充當(dāng)2層交換機(jī)。支持多種基于Linux的虛擬化技術(shù),包括Xen / XenServer、KVM和VirtualBox。
支持Open Flow協(xié)議,所以可以很方便的通過(guò)編程實(shí)現(xiàn)大規(guī)模網(wǎng)絡(luò)的自動(dòng)化,被大量運(yùn)用于SDN網(wǎng)絡(luò)中。
架構(gòu)和原理之類的文章很多,這里就不在一一闡述,本文以實(shí)踐為主。
安裝# 安裝docker yum install -y docker-1.13.1 # 預(yù)安裝 yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel # 安裝open vswitch: yum install -y openvswitch-2.8.2-1.el7.x86_64 # 此版本包含ovs-docker systemctl start openvswitch.service systemctl is-active openvswitch systemctl enable openvswitchovs單機(jī)連通性
創(chuàng)建容器, 設(shè)置net=none可以防止docker0默認(rèn)網(wǎng)橋影響連通性測(cè)試
docker run -itd --name con6 --net=none ubuntu:14.04 /bin/bash docker run -itd --name con7 --net=none ubuntu:14.04 /bin/bash docker run -itd --name con8 --net=none ubuntu:14.04 /bin/bash
創(chuàng)建網(wǎng)橋
ovs-vsctl add-br ovs0
使用ovs-docker給容器添加網(wǎng)卡,并掛到ovs0網(wǎng)橋上
ovs-docker add-port ovs0 eth0 con6 --ipaddress=192.168.1.2/24 ovs-docker add-port ovs0 eth0 con7 --ipaddress=192.168.1.3/24 ovs-docker add-port ovs0 eth0 con8 --ipaddress=192.168.1.4/24
查看網(wǎng)橋
[root@controller /]# ovs-vsctl show 21e4d4c5-cadd-4dac-b025-c20b8108ad09 Bridge "ovs0" Port "b167e3dcf8db4_l" Interface "b167e3dcf8db4_l" Port "f1c0a9d0994d4_l" Interface "f1c0a9d0994d4_l" Port "121c6b2f221c4_l" Interface "121c6b2f221c4_l" Port "ovs0" Interface "ovs0" type: internal ovs_version: "2.8.2"
測(cè)試連通性
[root@controller /]# docker exec -it con8 sh # ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.886 ms ^C --- 192.168.1.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.886/0.886/0.886/0.000 ms # # ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.712 ms ^C --- 192.168.1.3 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.712/0.712/0.712/0.000 ms #設(shè)置VLAN tag
查看網(wǎng)橋
[root@controller /]# ovs-vsctl show 21e4d4c5-cadd-4dac-b025-c20b8108ad09 Bridge "ovs0" Port "b167e3dcf8db4_l" Interface "b167e3dcf8db4_l" Port "f1c0a9d0994d4_l" Interface "f1c0a9d0994d4_l" Port "121c6b2f221c4_l" Interface "121c6b2f221c4_l" Port "ovs0" Interface "ovs0" type: internal ovs_version: "2.8.2"
查看interface
[root@controller /]# ovs-vsctl list interface f1c0a9d0994d4_l _uuid : cf400e7c-d2d6-4e0a-ad02-663dd63d1751 admin_state : up duplex : full error : [] external_ids : {container_id="con6", container_iface="eth0"} ifindex : 239 ingress_policing_burst: 0 ingress_policing_rate: 0 lacp_current : [] link_resets : 1 link_speed : 10000000000 link_state : up mac_in_use : "96:91:0a:c9:02:d6" mtu : 1500 mtu_request : [] name : "f1c0a9d0994d4_l" ofport : 3 other_config : {} statistics : {collisions=0, rx_bytes=1328, rx_crc_err=0, rx_dropped=0, rx_errors=0, rx_frame_err=0, rx_over_err=0, rx_packets=18, tx_bytes=3032, tx_dropped=0, tx_errors=0, tx_packets=40} status : {driver_name=veth, driver_version="1.0", firmware_version=""} type : ""
設(shè)置vlan tag
ovs-vsctl set port f1c0a9d0994d4_l tag=100 //con6 ovs-vsctl set port b167e3dcf8db4_l tag=100 //con8 ovs-vsctl set port 121c6b2f221c4_l tag=200 //con7
測(cè)試連通性
[root@controller /]# docker exec -it con8 sh # # ping 192.168.1.2 -c 3 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.413 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.061 ms 64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=0.057 ms --- 192.168.1.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2044ms rtt min/avg/max/mdev = 0.057/0.177/0.413/0.166 ms # # ping 192.168.1.3 -c 3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. From 192.168.1.4 icmp_seq=1 Destination Host Unreachable From 192.168.1.4 icmp_seq=2 Destination Host Unreachable --- 192.168.1.3 ping statistics --- 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2068ms pipe 3 #跨主機(jī)連通性 環(huán)境
網(wǎng)橋: ovs0 容器: con6 192.168.1.2 con7 192.168.1.3 con8 192.168.1.4
創(chuàng)建方式依上
網(wǎng)橋: ovs1 容器: con11
準(zhǔn)備環(huán)境
創(chuàng)建網(wǎng)橋 ovs-vsctl add-br ovs1 創(chuàng)建容器 docker run -itd --name con11 --net=none ubuntu:14.04 /bin/bash 掛到ovs0網(wǎng)橋 ovs-docker add-port ovs1 eth0 con11 --ipaddress=192.168.1.6/24
查看網(wǎng)橋ovs1
[root@compute82 /]# ovs-vsctl show 380ce027-8edf-4844-8e89-a6b9c1adaff3 Bridge "ovs1" Port "0384251973e64_l" Interface "0384251973e64_l" Port "ovs1" Interface "ovs1" type: internal ovs_version: "2.8.2"設(shè)置vxlan
在host1上
[root@controller /]# ovs-vsctl add-port ovs0 vxlan1 -- set interface vxlan1 type=vxlan options:remote_ip=172.29.101.82 options:key=flow [root@controller /]# [root@controller /]# ovs-vsctl show 21e4d4c5-cadd-4dac-b025-c20b8108ad09 Bridge "ovs0" Port "b167e3dcf8db4_l" tag: 100 Interface "b167e3dcf8db4_l" Port "f1c0a9d0994d4_l" tag: 100 Interface "f1c0a9d0994d4_l" Port "121c6b2f221c4_l" tag: 200 Interface "121c6b2f221c4_l" Port "ovs0" Interface "ovs0" type: internal Port "vxlan1" Interface "vxlan1" type: vxlan options: {key=flow, remote_ip="172.29.101.82"} ovs_version: "2.8.2"
在host2上
[root@compute82 /]# ovs-vsctl add-port ovs1 vxlan1 -- set interface vxlan1 type=vxlan options:remote_ip=172.29.101.123 options:key=flow [root@compute82 /]# [root@compute82 /]# ovs-vsctl show 380ce027-8edf-4844-8e89-a6b9c1adaff3 Bridge "ovs1" Port "0384251973e64_l" Interface "0384251973e64_l" Port "vxlan1" Interface "vxlan1" type: vxlan options: {key=flow, remote_ip="172.29.101.123"} Port "ovs1" Interface "ovs1" type: internal ovs_version: "2.8.2"設(shè)置vlan tag
ovs-vsctl set port 0384251973e64_l tag=100連通性測(cè)試
[root@compute82 /]# docker exec -ti con11 bash root@c82da61bf925:/# ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.161 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.206 ms ^C --- 192.168.1.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms root@c82da61bf925:/# root@c82da61bf925:/# ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. ^C --- 192.168.1.3 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2027ms root@c82da61bf925:/# root@c82da61bf925:/# exit結(jié)論
vxlan只能連通兩臺(tái)機(jī)器的ovs上同一個(gè)網(wǎng)段的容器,無(wú)法連通ovs上不同網(wǎng)段的容器。如果需要連通不同網(wǎng)段的容器,接下來(lái)我們嘗試通過(guò)ovs的流表來(lái)解決這個(gè)問(wèn)題。
OpenFlow flow table支持openflow的交換機(jī)中可能包含多個(gè)flow table。每個(gè)flow table包含多條規(guī)則,每條規(guī)則包含匹配條件和執(zhí)行動(dòng)作。flow table中的每條規(guī)則有優(yōu)先級(jí),優(yōu)先級(jí)高的優(yōu)先匹配,匹配到規(guī)則以后,執(zhí)行action,如果匹配失敗,按優(yōu)先級(jí)高低,繼續(xù)匹配下一條。如果都不匹配,每張表會(huì)有默認(rèn)的動(dòng)作,一般為drop或者轉(zhuǎn)給下一張流表。
實(shí)踐 環(huán)境host1 172.29.101.123
網(wǎng)橋: ovs0 容器: con6 192.168.1.2 tag=100 con7 192.168.1.3 tag=100
host2 172.29.101.82
網(wǎng)橋: ovs1 容器: con9: 192.168.2.2 tag=100 con10:192.168.2.3 tag=100 con11: 192.168.1.5 tag=100查看默認(rèn)流表
在host1上查看默認(rèn)流表
[root@controller msxu]# ovs-ofctl dump-flows ovs0 cookie=0x0, duration=27858.050s, table=0, n_packets=5253660876, n_bytes=371729202788, priority=0 actions=NORMAL
在容器con6中ping con7,網(wǎng)絡(luò)連通
[root@controller /]# docker exec -ti con6 bash root@9ccc5c5664f9:/# root@9ccc5c5664f9:/# ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.613 ms 64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.066 ms --- 192.168.1.3 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1058ms rtt min/avg/max/mdev = 0.066/0.339/0.613/0.274 ms root@9ccc5c5664f9:/#
刪除默認(rèn)流表
[root@controller /]# ovs-ofctl del-flows ovs0 [root@controller /]# [root@controller /]# ovs-ofctl dump-flows ovs0 [root@controller /]#
測(cè)試網(wǎng)絡(luò)連通性,發(fā)現(xiàn)網(wǎng)絡(luò)已經(jīng)不通
[root@controller /]# docker exec -ti con6 bash root@9ccc5c5664f9:/# root@9ccc5c5664f9:/# ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. ^C --- 192.168.1.3 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1025ms root@9ccc5c5664f9:/#添加流表
如果要con6和con7能夠通信,需要建立規(guī)則,讓ovs轉(zhuǎn)發(fā)對(duì)應(yīng)的數(shù)據(jù)
查看con6和con7在ovs上的網(wǎng)絡(luò)端口
[root@controller /]# ovs-vsctl show 21e4d4c5-cadd-4dac-b025-c20b8108ad09 Bridge "ovs0" Port "f1c0a9d0994d4_l" tag: 100 Interface "f1c0a9d0994d4_l" Port "121c6b2f221c4_l" tag: 100 Interface "121c6b2f221c4_l" Port "ovs0" Interface "ovs0" type: internal Port "vxlan1" Interface "vxlan1" type: vxlan options: {key=flow, remote_ip="172.29.101.82"} ovs_version: "2.8.2" [root@controller /]# ovs-vsctl list interface f1c0a9d0994d4_l |grep ofport ofport : 3 ofport_request : [] [root@controller /]# [root@controller /]# ovs-vsctl list interface 121c6b2f221c4_l |grep ofport ofport : 4 ofport_request : []
添加規(guī)則:
[root@controller /]#ovs-ofctl add-flow ovs0 "priority=1,in_port=3,actions=output:4" [root@controller /]#ovs-ofctl add-flow ovs0 "priority=2,in_port=4,actions=output:3" [root@controller /]# ovs-ofctl dump-flows ovs0 cookie=0x0, duration=60.440s, table=0, n_packets=0, n_bytes=0, priority=1,in_port="f1c0a9d0994d4_l" actions=output:"121c6b2f221c4_l" cookie=0x0, duration=50.791s, table=0, n_packets=0, n_bytes=0, priority=1,in_port="121c6b2f221c4_l" actions=output:"f1c0a9d0994d4_l" [root@controller /]#
測(cè)試連通性:con6和con7已通
[root@controller msxu]# docker exec -ti con6 bash root@9ccc5c5664f9:/# ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.924 ms 64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.058 ms ^C --- 192.168.1.3 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1057ms rtt min/avg/max/mdev = 0.058/0.491/0.924/0.433 ms root@9ccc5c5664f9:/#
設(shè)置一條優(yōu)先級(jí)高的規(guī)則:
[root@controller /]# ovs-ofctl add-flow ovs0 "priority=2,in_port=4,actions=drop" [root@controller /]# [root@controller /]# docker exec -ti con6 bash root@9ccc5c5664f9:/# root@9ccc5c5664f9:/# ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. ^C --- 192.168.1.3 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2087ms root@9ccc5c5664f9:/# root@9ccc5c5664f9:/#
流表中的規(guī)則是有優(yōu)先級(jí)的,priority數(shù)值越大,優(yōu)先級(jí)越高。流表中,優(yōu)先級(jí)高的優(yōu)先匹配,并執(zhí)行匹配規(guī)則的actions。如果不匹配,繼續(xù)匹配優(yōu)先級(jí)低的下一條。
跨網(wǎng)段連通在上一個(gè)vxlan的實(shí)踐中,通過(guò)設(shè)置vxlan可以打通兩個(gè)機(jī)器上的ovs,但我們提到兩個(gè)機(jī)器ovs上的容器得在同一個(gè)網(wǎng)段上才能通信。
在ip為192.168.2.2的con9上ping另一臺(tái)機(jī)上的con6 192.168.1.2
[root@compute82 /]# docker exec -ti con9 bash root@b55602aad0ac:/# root@b55602aad0ac:/# ping 192.168.1.2 connect: Network is unreachable root@b55602aad0ac:/#添加流表規(guī)則:
在host1上:
[root@controller /]# ovs-ofctl add-flow ovs0 "priority=4,in_port=6,actions=output:3" [root@controller /]# [root@controller /]# ovs-ofctl add-flow ovs0 "priority=4,in_port=3,actions=output:6" [root@controller /]# ovs-ofctl dump-flows ovs0 cookie=0x0, duration=3228.737s, table=0, n_packets=7, n_bytes=490, priority=1,in_port="f1c0a9d0994d4_l" actions=output:"121c6b2f221c4_l" cookie=0x0, duration=3215.544s, table=0, n_packets=0, n_bytes=0, priority=1,in_port="121c6b2f221c4_l" actions=output:"f1c0a9d0994d4_l" cookie=0x0, duration=3168.297s, table=0, n_packets=9, n_bytes=546, priority=2,in_port="121c6b2f221c4_l" actions=drop cookie=0x0, duration=12.024s, table=0, n_packets=0, n_bytes=0, priority=4,in_port=vxlan1 actions=output:"f1c0a9d0994d4_l" cookie=0x0, duration=3.168s, table=0, n_packets=0, n_bytes=0, priority=4,in_port="f1c0a9d0994d4_l" actions=output:vxlan1
在host2上
[root@compute82 /]# ovs-ofctl add-flow ovs1 "priority=1,in_port=1,actions=output:6" [root@compute82 /]# [root@compute82 /]# ovs-ofctl add-flow ovs1 "priority=1,in_port=6,actions=output:1" [root@compute82 /]# ovs-ofctl dump-flows ovs1 cookie=0x0, duration=1076.522s, table=0, n_packets=27, n_bytes=1134, priority=1,in_port="0384251973e64_l" actions=output:vxlan1 cookie=0x0, duration=936.403s, table=0, n_packets=0, n_bytes=0, priority=1,in_port=vxlan1 actions=output:"0384251973e64_l" cookie=0x0, duration=70205.443s, table=0, n_packets=7325, n_bytes=740137, priority=0 actions=NORMAL測(cè)試連通性
在host2 con9上ping 192.168.1.2
[root@compute82 /]# docker exec -ti con9 bash root@b55602aad0ac:/# root@b55602aad0ac:/# ping 192.168.1.2 connect: Network is unreachable root@b55602aad0ac:/#
發(fā)現(xiàn)網(wǎng)絡(luò)并不通,查看發(fā)現(xiàn)路由規(guī)則有問(wèn)題,添加默認(rèn)路由規(guī)則,注意這里需要已privileged權(quán)限進(jìn)入容器
[root@compute82 /]# docker exec --privileged -ti con9 bash root@b55602aad0ac:/# root@b55602aad0ac:/# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 root@b55602aad0ac:/# route add default dev eth0 root@b55602aad0ac:/# root@b55602aad0ac:/# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 root@b55602aad0ac:/#
在host1和host2的容器中都添加好路由規(guī)則后,測(cè)試連通性
[root@compute82 /]# docker exec --privileged -ti con9 bash root@b55602aad0ac:/# root@b55602aad0ac:/# ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.16 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.314 ms ^C --- 192.168.1.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 0.314/0.739/1.165/0.426 ms
已成功通過(guò)ovs,vxlan打通兩臺(tái)機(jī)器上不同網(wǎng)段容器
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/27931.html
摘要:需要修改數(shù)據(jù)包的二層源目地址以及三層包頭的因?yàn)槁酚墒侵鹛D(zhuǎn)發(fā)的,每一跳都需要做這些工作,即使是現(xiàn)在通過(guò)流表轉(zhuǎn)發(fā),中間的轉(zhuǎn)發(fā)器直接轉(zhuǎn)發(fā)報(bào)文,到達(dá)倒數(shù)第一跳的時(shí)候還是需要把數(shù)據(jù)包的目的地址修改為接受端的地址。 前言 熟悉這款設(shè)備的同學(xué),應(yīng)該也快到不惑之年了吧!這應(yīng)該是Cisco最古老的路由器了。上個(gè)世紀(jì)80年代至今,路由交換技術(shù)不斷發(fā)展,但是在這波瀾壯闊的變化之中,總有一些東西在嘈雜的機(jī)房...
摘要:需要修改數(shù)據(jù)包的二層源目地址以及三層包頭的因?yàn)槁酚墒侵鹛D(zhuǎn)發(fā)的,每一跳都需要做這些工作,即使是現(xiàn)在通過(guò)流表轉(zhuǎn)發(fā),中間的轉(zhuǎn)發(fā)器直接轉(zhuǎn)發(fā)報(bào)文,到達(dá)倒數(shù)第一跳的時(shí)候還是需要把數(shù)據(jù)包的目的地址修改為接受端的地址。 前言 熟悉這款設(shè)備的同學(xué),應(yīng)該也快到不惑之年了吧!這應(yīng)該是Cisco最古老的路由器了。上個(gè)世紀(jì)80年代至今,路由交換技術(shù)不斷發(fā)展,但是在這波瀾壯闊的變化之中,總有一些東西在嘈雜的機(jī)房...
摘要:需要修改數(shù)據(jù)包的二層源目地址以及三層包頭的因?yàn)槁酚墒侵鹛D(zhuǎn)發(fā)的,每一跳都需要做這些工作,即使是現(xiàn)在通過(guò)流表轉(zhuǎn)發(fā),中間的轉(zhuǎn)發(fā)器直接轉(zhuǎn)發(fā)報(bào)文,到達(dá)倒數(shù)第一跳的時(shí)候還是需要把數(shù)據(jù)包的目的地址修改為接受端的地址。 前言 熟悉這款設(shè)備的同學(xué),應(yīng)該也快到不惑之年了吧!這應(yīng)該是Cisco最古老的路由器了。上個(gè)世紀(jì)80年代至今,路由交換技術(shù)不斷發(fā)展,但是在這波瀾壯闊的變化之中,總有一些東西在嘈雜的機(jī)房...
摘要:在實(shí)踐中,我們開發(fā)并上線了網(wǎng)關(guān)和負(fù)載均衡網(wǎng)關(guān)。而負(fù)載均衡網(wǎng)關(guān)則支持無(wú)縫替換傳統(tǒng)交換機(jī)實(shí)現(xiàn)網(wǎng)關(guān)集群,支持一致性,并支持根據(jù)任意字段,內(nèi)存和端口來(lái)計(jì)算哈希,支持協(xié)議。網(wǎng)絡(luò)作為信息時(shí)代的重要載體,在云服務(wù)的快速發(fā)展下形成了獨(dú)具特色的虛擬網(wǎng)絡(luò)服務(wù)架構(gòu)和模式。12月19日,2020中國(guó)云網(wǎng)絡(luò)峰會(huì)于北京順利召開,會(huì)上UCloud虛擬網(wǎng)絡(luò)VPC負(fù)責(zé)人陳煌棟給大家?guī)?lái)了演講《UCloud VPC技術(shù)演進(jìn)之路...
摘要:每個(gè)節(jié)點(diǎn)的網(wǎng)橋使用一個(gè)子網(wǎng),每個(gè)容器使用一個(gè)子網(wǎng)內(nèi)的,那么我們就可以組成下圖中所示網(wǎng)絡(luò)。到此,在的協(xié)調(diào)下,各個(gè)主機(jī)上的子網(wǎng)就不會(huì)再?zèng)_突了,另外,會(huì)維護(hù)容器網(wǎng)絡(luò)的路由規(guī)則,容器就可以通過(guò)訪問(wèn)容器了,也就實(shí)現(xiàn)了跨主機(jī)容器互聯(lián)。 當(dāng)您將多臺(tái)服務(wù)器節(jié)點(diǎn)組成一個(gè)Docker集群時(shí),需要對(duì)集群網(wǎng)絡(luò)進(jìn)行設(shè)置,否則默認(rèn)情況下,無(wú)法跨主機(jī)容器互聯(lián),接下來(lái)我們首先分析一下原因。 跨主機(jī)容器互聯(lián) 下圖描述了...
閱讀 1791·2021-11-11 11:02
閱讀 1697·2021-09-22 15:55
閱讀 2499·2021-09-22 15:18
閱讀 3500·2019-08-29 11:26
閱讀 3757·2019-08-26 13:43
閱讀 2656·2019-08-26 13:32
閱讀 912·2019-08-26 10:55
閱讀 973·2019-08-26 10:27