• 全部
  • 經驗案例
  • 典型配置
  • 技術公告
  • FAQ
  • 漏洞說明
  • 全部
  • 全部
  • 大數據引擎
  • 知了引擎
產品線
搜索
取消
案例類型
發布者
是否解決
是否官方
時間
搜索引擎
匹配模式
高級搜索

VXLAN EVPN 普通用戶訪問虛擬機

2024-07-26提問
  • 0關注
  • 0收藏,1782瀏覽
粉絲:0人 關注:1人

問題描述:

基本拓撲是使用OSPF打通  PC6-9是虛擬機 地址是192.168.10.1  20.1   10.2   20.2

現在可以跨網段互訪

需求是用戶可以訪問虛擬機

基礎路由配置

 

 

 

 

 #配置回環口 19.xx 路由都是18.xx

sy

undo info en

sysname S10510X-1

int LoopBack 0

IP ADD 173.16.19.100 32

 

int rang g1/0/1 to g1/0/4

port link-mode route

int g1/0/1

ip add 173.16.18.153 30

int g1/0/2

ip add 173.16.18.109 30

int g1/0/3

ip add 173.16.18.137 30

int g1/0/4

ip add 1.1.1.1 30

 

sy

undo info en

sysname S10510X-2

int LoopBack 0

IP ADD 173.16.19.200 32

 

int rang g1/0/1 to g1/0/3

port link-mode route

int g1/0/1

ip add 173.16.18.154 30

int g1/0/2

ip add 173.16.18.141 30

int g1/0/3

ip add 173.16.18.145 30




sy

undo info en

sysname Leaf-1

int LoopBack 0

IP ADD 173.16.19.80 32

 

int rang g1/0/1 to g1/0/2

port link-mode route

int g1/0/1

ip add 173.16.18.110 30

int g1/0/2

ip add 173.16.18.142 30




sy

undo info en

sysname Leaf-2

int LoopBack 0

IP ADD 173.16.19.90 32

 

int rang g1/0/1 to g1/0/2

port link-mode route

int g1/0/1

ip add 173.16.18.138 30

int g1/0/2

ip add 173.16.18.146 30

 

ospf

ar 0

net 0.0.0.0 0.0.0.0

基本路由打通了

 

#leaf-設備

 

#L2vpn開啟

l2vpn enable

#創建普通的vlan

vlan 10 20

vxlan tunnel arp-learning disable

vxlan tunnel mac-learning disable

#創建服務集

vsi vpna

#,開啟arp抑製功能,關閉廣播泛洪 禁止廣播、未知單播和未知組播數據幀向遠端站點泛洪。 statistics enable命令用來開啟以太網服務實例的報文統計功能

# arp suppression enable

# flooding disable all

#創建VXLAN 10 相當於華為VNI 10

vxlan 10

quit

實例下啟用evpn來創建bum隧道   EVPN使用三類路由創建  傳遞二層路由  不涉及 1 4 5 除非引入外部路由時才涉及

evpn encapsulation vxlan

route-distinguisher 10:10

vpn-target 10:10 export-extcommunity

vpn-target 10:10 import-extcommunity

 

vsi vpnb

# arp suppression enable

# flooding disable all

vxlan 20

 

quit

evpn encapsulation vxlan

route-distinguisher 20:20

vpn-target 20:20 export-extcommunity

vpn-target 20:20 import-extcommunity

 #這裏為後麵用戶訪問虛擬機引入路由做配置我不理解但是做了

bgp 100

ip vpn-instance a

 address-family ipv4

   balance 4

   network 0.0.0.0 0.0.0.0

return

sy

#配置跟S10510bgp對等體 建立連接 使用EVPN搭建VXLAN隧道

bgp 100

 peer 173.16.19.100 as-number 100

 peer 173.16.19.100 connect-interface LoopBack0

 peer 173.16.19.200 as-number 100

 peer 173.16.19.200 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 173.16.19.100 enable

  peer 173.16.19.200 enable

 

#

 

 

#S10510上創建bgp 

q

#S10510X的配置

q

# graceful-restart 平滑重啟 雙機

#

bgp 100

# graceful-restart

 

 peer 173.16.19.80 as-number 100

 peer 173.16.19.80 connect-interface LoopBack0

 peer 173.16.19.90 as-number 100

 peer 173.16.19.90 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  undo policy vpn-target

  peer 173.16.19.80 enable

  peer 173.16.19.80 reflect-client

  peer 173.16.19.90 enable

  peer 173.16.19.90 reflect-client

 

 

# leaf設備

 

根據用戶側以太網服務實例的報文匹配規則創建IPL上的AC時,

用戶側以太網服務實例配置的報文匹配規則隻能為匹配報文的外層VLAN tagencapsulation s-vid vlan-id)、

匹配不攜帶VLAN tag的所有報文(encapsulation untagged),且AC的接入模式必須為VLAN模式。

采用VXLAN ID映射方式生成IPL上動態AC的報文匹配規則,AC的接入模式必須為VLAN模式。

#

#在接口上配置與vsi服務集綁定 使接受到vid 10的報文交給 vpna

interface GigabitEthernet1/0/3

 port link-mode bridge

 port link-type access

 port access vlan 10

 combo enable fiber

 vtep access port

 #

 service-instance 10

  encapsulation s-vid 10

  xconnect vsi vpna

  #

interface GigabitEthernet1/0/4

port link-mode bridge

port link-type access

port access vlan 20

combo enable fiber

vtep access port

 #

 service-instance 20

  encapsulation s-vid 20

  xconnect vsi vpnb

 

#

 

現在可以實現10.1訪問10.2同網段虛擬機互訪

 

 

# VXLAN L3

# leaf

創建IPV4地址族 vpn實例 讓IRB二類學習

 

# RD 無所謂

# vpn名字 這裏是a也無所謂

隻要rt相同就會學習

# vsi 10 20 這裏隔離了 因為vpn名字本地會隔離

#

ip vpn-instance a

 route-distinguisher 1000:1000

 #

 address-family ipv4

 import-route direct

  vpn-target 1000:1000 import-extcommunity

  vpn-target 1000:1000 export-extcommunity

 #

 address-family evpn

  vpn-target 1000:1000 import-extcommunity

  vpn-target 1000:1000 export-extcommunity

#

return

 

sy

# distributed-gateway local開啟分布式網關

 

#

interface Vsi-interface10

 ip binding vpn-instance a

 ip address 192.168.10.254 255.255.255.0

 local-proxy-arp enable

 mac-address 0001-0001-0001

 distributed-gateway local

#

 

#

interface Vsi-interface20

 ip binding vpn-instance a

 local-proxy-arp enable

 ip address 192.168.20.254 255.255.255.0

 mac-address 0002-0002-0002

 distributed-gateway local

#

 

關聯實例 綁定vsi接口

這些都是L2  vni  

vsi vpna

gateway Vsi-interface 10

vsi vpnb

gateway Vsi-interface 20

 

配置L3   vni

這裏UP主覺得多此一舉 華為的直接在ipv4地址族下配置的

這裏  1111 無所謂倆台leaf相同即可

#

interface Vsi-interface8191

 ip binding vpn-instance a

 l3-vni 1000

#

 


這裏配置完成後可以跨網段互訪了,但是需要把EVPN的地址引入到基礎路由然後使普通用戶可以訪問

 

 

[Leaf-1]display evpn route arp

Flags: D - Dynamic   B - BGP      L - Local active

       G - Gateway   S - Static   M - Mapping        I - Invalid

 

VPN instance: a                               Interface: Vsi-interface10

IP address      MAC address     Router MAC      VSI index   Flags

192.168.10.1    9438-94ef-0606  9438-607f-0300  0           DL

192.168.10.2    9438-9959-0806  9438-6238-0400  0           B

192.168.10.254  0001-0001-0001  9438-607f-0300  0           GL

 

VPN instance: a                               Interface: Vsi-interface20

IP address      MAC address     Router MAC      VSI index   Flags

192.168.20.1    9438-9671-0706  9438-607f-0300  1           DL

192.168.20.2    9438-9a70-0906  9438-6238-0400  1           B

192.168.20.254  0002-0002-0002  9438-607f-0300  1           GL

 

[Leaf-1] L

 

這裏是EVPN路由 怎麼引入求告知

 

1 個回答
粉絲:2人 關注:0人

可以在bgp ipv4地址族  配置 import evpn mac-ip

暫無評論

編輯答案

你正在編輯答案

如果你要對問題或其他回答進行點評或詢問,請使用評論功能。

分享擴散:

提出建議

    +

親~登錄後才可以操作哦!

確定

親~檢測到您登陸的賬號未在http://hclhub.h3c.com進行注冊

注冊後可訪問此模塊

跳轉hclhub

你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作

舉報

×

侵犯我的權益 >
對根叔社區有害的內容 >
辱罵、歧視、挑釁等(不友善)

侵犯我的權益

×

泄露了我的隱私 >
侵犯了我企業的權益 >
抄襲了我的內容 >
誹謗我 >
辱罵、歧視、挑釁等(不友善)
騷擾我

泄露了我的隱私

×

您好,當您發現根叔知了上有泄漏您隱私的內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到pub.zhiliao@h3c.com 郵箱,我們會盡快處理。
  • 1. 您認為哪些內容泄露了您的隱私?(請在郵件中列出您舉報的內容、鏈接地址,並給出簡短的說明)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)

侵犯了我企業的權益

×

您好,當您發現根叔知了上有關於您企業的造謠與誹謗、商業侵權等內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到 pub.zhiliao@h3c.com 郵箱,我們會在審核後盡快給您答複。
  • 1. 您舉報的內容是什麼?(請在郵件中列出您舉報的內容和鏈接地址)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)
  • 3. 是哪家企業?(營業執照,單位登記證明等證件)
  • 4. 您與該企業的關係是?(您是企業法人或被授權人,需提供企業委托授權書)
我們認為知名企業應該坦然接受公眾討論,對於答案中不準確的部分,我們歡迎您以正式或非正式身份在根叔知了上進行澄清。

抄襲了我的內容

×

原文鏈接或出處

誹謗我

×

您好,當您發現根叔知了上有誹謗您的內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到pub.zhiliao@h3c.com 郵箱,我們會盡快處理。
  • 1. 您舉報的內容以及侵犯了您什麼權益?(請在郵件中列出您舉報的內容、鏈接地址,並給出簡短的說明)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)
我們認為知名企業應該坦然接受公眾討論,對於答案中不準確的部分,我們歡迎您以正式或非正式身份在根叔知了上進行澄清。

對根叔社區有害的內容

×

垃圾廣告信息
色情、暴力、血腥等違反法律法規的內容
政治敏感
不規範轉載 >
辱罵、歧視、挑釁等(不友善)
騷擾我
誘導投票

不規範轉載

×

舉報說明