柚子快報(bào)激活碼778899分享:vxlan分布式網(wǎng)關(guān)部署案例
柚子快報(bào)激活碼778899分享:vxlan分布式網(wǎng)關(guān)部署案例
配置邏輯思維步驟:
1、配置同子網(wǎng)互訪 2、配置不同子網(wǎng)互訪(集中式或分布式) 3、所有的vtep配置相同的vbif接口,相同mac,相同IP,開戶分布式網(wǎng)關(guān)功能,開啟主機(jī)信息收集能力 4、在所有的EVPN鄰居間開戶IRB路由傳遞能力 5、創(chuàng)建三層VPN實(shí)例,配置RD,eirt,。 不同的的租戶用不同的RD 6、將vbif接口劃分到VPN實(shí)例中,相同租戶,所有的子網(wǎng)劃分到同一個(gè)VPN實(shí)例匯總,不同的租戶的子網(wǎng)在不同的VPN實(shí)例中,可以實(shí)現(xiàn)租戶隔離。 7、當(dāng)VTEP學(xué)習(xí)到主機(jī)的ARP表項(xiàng)后,會(huì)生成IRB類型路由,可以 用pc 去ping 網(wǎng)關(guān)實(shí)現(xiàn)。 8、接收到一條IRB類型路由時(shí):第一種情況 是使用路由帶的RT:和本端EVPN實(shí)例下的IRT進(jìn)行對比,相同就接受,后面用于arp廣播抑制和vm熱遷移。第二種情況是和本端的L3 VPN實(shí)例下的IRT進(jìn)行對比,如果相同,就接受,并在L3 VPN實(shí)例下的路由表中創(chuàng)建一條主機(jī)路由。
IRb路由信息內(nèi)容解釋 :
RT:取值是EVPN實(shí)例下的ERT VTEP IP:本端的VTEP地址 二層VNI:取值是EVPN實(shí)例下的VNI 三層VNI:VBIF接口,屬于L3 VPN實(shí)例下的三層VNI值 MAC:ARP表項(xiàng)中的MAC地址 IP: ARP表中的IP地址
ERT和IRT是啥:
EVPN實(shí)例中的RT值根據(jù)方向稱為ERT或者IRT,而L3VPN實(shí)例中的RT值根據(jù)方法稱為eIRT或者eERT。
關(guān)鍵參數(shù)說明:
檢查該路由的ERT與接收端EVPN實(shí)例的IRT是否相同。如果相同,則接收該路由,同時(shí)EVPN實(shí)例提取其中包含的主機(jī)IP加MAC信息,用于主機(jī)ARP通告。
檢查該路由的ERT與接收端L3VPN實(shí)例的eIRT是否相同。如果相同,則接收該路由,同時(shí)L3VPN實(shí)例提取其中的主機(jī)IP地址+三層VNI信息,在其路由表中生成Host的路由。該路由的下一跳會(huì)被設(shè)置為對端Leaf的VXLAN隧道接口。
接收端EVPN實(shí)例或L3VPN實(shí)例接收該路由后會(huì)通過下一跳獲取對端Leaf的VTEP IP地址,如果該地址三層路由可達(dá),則建立一條到對端Leaf的VXLAN隧道。
type2 的mac/ip路由: mac路由:主要用于在vtep之間動(dòng)態(tài)學(xué)習(xí)mac地址,只會(huì)攜帶mac地址 沒有ip地址 arp:攜帶mac地址,ip地址,不帶三層vni信息 IRB:攜帶mac地址,IP地址,帶三層vni信息
同網(wǎng)段互訪:封裝二層vni,用于識別不同的bd 不同網(wǎng)段互訪:封裝三層vni,用于標(biāo)識不同的L3 vpn實(shí)例。
跨子網(wǎng)通信原理流程分析:
Leaf-1收到來自PC1的報(bào)文,檢測到報(bào)文的目的MAC是網(wǎng)關(guān)接口MAC,判斷該報(bào)文需要進(jìn)行三層轉(zhuǎn)發(fā)。 Leaf-1根據(jù)報(bào)文的入接口找到對應(yīng)的二層廣播域,然后找到綁定該廣播域VBDIF接口的VPN實(shí)例。根據(jù)報(bào)文的目的IP地址,查找該VPN實(shí)例下的路由表,獲取該路由對應(yīng)的三層VNI,以及下一跳地址。再根據(jù)出接口是VXLAN隧道,
判斷需要進(jìn)行VXLAN封裝: 1.根據(jù)VXLAN隧道的目的IP和源IP地址,獲取對應(yīng)的MAC地址,并將內(nèi)層目的MAC和源MAC替換。 2.將三層VNI封裝到報(bào)文中。 3.外層封裝VXLAN隧道的目的IP和源IP地址,源MAC地址為Leaf1的VBDIF接口MAC地址,目的MAC地址為網(wǎng)絡(luò)下一跳的MAC地址。 封裝后的報(bào)文根據(jù)外層MAC和IP信息在IP網(wǎng)絡(luò)中傳輸,送達(dá)Leaf-2。 Leaf-2收到VXLAN報(bào)文后進(jìn)行解封裝,檢測到報(bào)文的目的MAC是自己的MAC地址,判斷該報(bào)文需要進(jìn)行三層轉(zhuǎn)發(fā)。 Leaf-2根據(jù)報(bào)文攜帶的三層VNI找到對應(yīng)的VPN實(shí)例,通過查找該VPN實(shí)例下的路由表,獲取報(bào)文的下一跳是網(wǎng)關(guān)接口地址,然后將目的MAC地址替換為PC3的MAC地址,源MAC地址替換為Leaf2的MAC地址,轉(zhuǎn)發(fā)給PC3
最終實(shí)現(xiàn)全部pc貫通且能和server服務(wù)器通信
關(guān)聯(lián)圖:
CE4配置:
evpn-overlay enable
ip vpn-instance a ipv4-family route-distinguisher 10:3 vpn-target 10:3 export-extcommunity evpn vpn-target 100:2 import-extcommunity evpn vpn-target 200:2 import-extcommunity evpn vxlan vni 999 //這里將RD值設(shè)置100:3,eERT為100:3,eIRT分別為100:2,200:2 分別對應(yīng)Leaf-1和Leaf-2上設(shè)置的ERT值,目的是接收這些EVPN實(shí)例發(fā)送的路由信息
interface GE1/0/0 undo portswitch undo shutdown ip address 10.0.45.4 255.255.255.0
interface GE1/0/1 undo portswitch undo shutdown ip address 10.0.46.4 255.255.255.0
interface GE1/0/2 undo portswitch undo shutdown ip binding vpn-instance a ip address 192.168.30.1 255.255.255.0
interface LoopBack0 ip address 4.4.4.4 255.255.255.255
interface Nve1 source 4.4.4.4
interface NULL0
bgp 100 peer 5.5.5.5 as-number 100 peer 5.5.5.5 connect-interface LoopBack0 peer 6.6.6.6 as-number 100 peer 6.6.6.6 connect-interface LoopBack0
ipv4-family unicast peer 5.5.5.5 enable peer 6.6.6.6 enable
ipv4-family vpn-instance a network 192.168.30.0 255.255.255.0 advertise l2vpn evpn
l2vpn-family evpn undo policy vpn-target peer 5.5.5.5 enable peer 5.5.5.5 advertise irb peer 5.5.5.5 reflect-client peer 6.6.6.6 enable peer 6.6.6.6 advertise irb peer 6.6.6.6 reflect-client //在三臺設(shè)備的BGP中激活I(lǐng)RP路由傳遞的功能irb
ospf 1 router-id 4.4.4.4 area 0.0.0.0 network 4.4.4.4 0.0.0.0 network 10.0.45.4 0.0.0.0 network 10.0.46.4 0.0.0.0
CE5配置:
evpn-overlay enable
ip vpn-instance a ipv4-family route-distinguisher 10:10 vpn-target 200:2 import-extcommunity evpn vpn-target 100:2 import-extcommunity evpn vpn-target 10:3 import-extcommunity evpn vxlan vni 999 //為了接收Spine發(fā)送的type 5路由,Leaf-1的L3VPN實(shí)例上也要設(shè)置eIRT為10:3
bridge-domain 10 vxlan vni 10 evpn route-distinguisher 100:1 vpn-target 100:2 export-extcommunity vpn-target 100:2 import-extcommunity
bridge-domain 20 vxlan vni 20 evpn route-distinguisher 200:1 vpn-target 200:2 export-extcommunity vpn-target 200:2 import-extcommunity
interface Vbdif10 ip binding vpn-instance a ip address 192.168.10.1 255.255.255.0 vxlan anycast-gateway enable arp collect host enable //設(shè)備處開啟收集arp信息,并通過BGP EVPN type 2路由進(jìn)行傳遞
interface Vbdif20 ip binding vpn-instance a ip address 192.168.20.1 255.255.255.0 vxlan anycast-gateway enable arp collect host enable //設(shè)備處開啟收集arp信息,并通過BGP EVPN type 2路由進(jìn)行傳遞
interface MEth0/0/0 undo shutdown
interface GE1/0/0 undo portswitch undo shutdown ip address 10.0.45.5 255.255.255.0
interface GE1/0/1 undo shutdown
interface GE1/0/1.10 mode l2 encapsulation dot1q vid 10 bridge-domain 10
interface GE1/0/1.20 mode l2 encapsulation dot1q vid 20 bridge-domain 20
interface LoopBack0 ip address 5.5.5.5 255.255.255.255
interface Nve1 source 5.5.5.5 vni 10 head-end peer-list protocol bgp vni 20 head-end peer-list protocol bgp
interface NULL0
bgp 100 peer 4.4.4.4 as-number 100 peer 4.4.4.4 connect-interface LoopBack0
ipv4-family unicast peer 4.4.4.4 enable
l2vpn-family evpn policy vpn-target peer 4.4.4.4 enable peer 4.4.4.4 advertise irb //在三臺設(shè)備的BGP中激活I(lǐng)RP路由傳遞的功能irb
ospf 1 router-id 5.5.5.5 area 0.0.0.0 network 5.5.5.5 0.0.0.0 network 10.0.45.5 0.0.0.0
CE6配置:
evpn-overlay enable
ip vpn-instance a ipv4-family route-distinguisher 10:10 vpn-target 200:2 import-extcommunity evpn vpn-target 100:2 import-extcommunity evpn vpn-target 10:3 import-extcommunity evpn vxlan vni 999 //為了接收Spine發(fā)送的type 5路由,Leaf-2的L3VPN實(shí)例上也要設(shè)置eIRT為10:3
bridge-domain 10 vxlan vni 10 evpn route-distinguisher 100:1 vpn-target 100:2 export-extcommunity vpn-target 100:2 import-extcommunity
bridge-domain 20 vxlan vni 20 evpn route-distinguisher 200:1 vpn-target 200:2 export-extcommunity vpn-target 200:2 import-extcommunity
interface Vbdif10 ip binding vpn-instance a ip address 192.168.10.1 255.255.255.0 vxlan anycast-gateway enable arp collect host enable //設(shè)備處開啟收集arp信息,并通過BGP EVPN type 2路由進(jìn)行傳遞
interface Vbdif20 ip binding vpn-instance a ip address 192.168.20.1 255.255.255.0 vxlan anycast-gateway enable arp collect host enable //設(shè)備處開啟收集arp信息,并通過BGP EVPN type 2路由進(jìn)行傳遞
interface MEth0/0/0 undo shutdown
interface GE1/0/0 undo portswitch undo shutdown ip address 10.0.46.6 255.255.255.0
interface GE1/0/1 undo shutdown
interface GE1/0/1.10 mode l2 encapsulation dot1q vid 10 bridge-domain 10
interface GE1/0/1.20 mode l2 encapsulation dot1q vid 20 bridge-domain 20
interface LoopBack0 ip address 6.6.6.6 255.255.255.255
interface Nve1 source 6.6.6.6 vni 10 head-end peer-list protocol bgp vni 20 head-end peer-list protocol bgp
interface NULL0
bgp 100 peer 4.4.4.4 as-number 100 peer 4.4.4.4 connect-interface LoopBack0
ipv4-family unicast peer 4.4.4.4 enable
l2vpn-family evpn policy vpn-target peer 4.4.4.4 enable peer 4.4.4.4 advertise irb //在三臺設(shè)備的BGP中激活I(lǐng)RP路由傳遞的功能irb
ospf 1 router-id 6.6.6.6 area 0.0.0.0 network 6.6.6.6 0.0.0.0 network 10.0.46.6 0.0.0.0
查看evpn的bgp鄰居是否建立
dis bgp evpn all routing-table
查看隧道建立情況
最終PC1可以ping通所有的pc
ping服務(wù)器:
柚子快報(bào)激活碼778899分享:vxlan分布式網(wǎng)關(guān)部署案例
文章來源
本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點(diǎn)和立場。
轉(zhuǎn)載請注明,如有侵權(quán),聯(lián)系刪除。