
基本拓撲是使用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
#配置跟S10510的bgp對等體 建立連接 使用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 tag(encapsulation 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路由 怎麼引入求告知
(0)
親~登錄後才可以操作哦!
確定你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作
舉報
×
侵犯我的權益
×
侵犯了我企業的權益
×
抄襲了我的內容
×
原文鏈接或出處
誹謗我
×
對根叔社區有害的內容
×
不規範轉載
×
舉報說明
暫無評論