华三通过BGP EVPN 实现同租户裸金属二三层网络互通

华三通过BGP EVPN 实现同租户裸金属二三层网络互通

首页枪战射击金属小分队汉化版更新时间:2024-06-07
组网拓扑

说明:

配置互联地址

配置完成后保证直连接口可以相互ping通

CE1配置

l2vpn enable //开启evpn支持 interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # interface GigabitEthernet1/0/1 port link-mode route //路由模式 默认为bridge combo enable fiber ip address 12.1.1.1 255.255.255.0 //配置和CE2的互联地址 interface GigabitEthernet1/0/2 port link-mode route //路由模式 默认为bridge combo enable fiber ip address 13.1.1.1 255.255.255.0 //配置和CE3的互联地址 //配置动态路由协议 ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 12.1.1.1 0.0.0.0 network 13.1.1.1 0.0.0.0 # //配置vpn实例vpna和vpnb ip vpn-instance vpna route-distinguisher 100:1 # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity //配置vpnb实例 ip vpn-instance vpnb route-distinguisher 200:1 # address-family evpn vpn-target 2:2 import-extcommunity vpn-target 2:2 export-extcommunity # //配置互联网地址 interface Vlan-interface1000 ip binding vpn-instance vpna ip address 202.106.0.2 255.255.255.0 # interface GigabitEthernet1/0/3 port link-mode bridge port access vlan 1000 combo enable fiber # ip route-static vpn-instance vpna 0.0.0.0 0 202.106.0.1 //配置到互联网的默认路由CE2配置

l2vpn enable //开启evpn支持 vlan 10 to 30 //创建vlan 20到30 interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # interface GigabitEthernet1/0/1 port link-mode route //路由模式 默认为bridge combo enable fiber ip address 12.1.1.2 255.255.255.0 //配置和CE1的互联地址 //配置动态路由协议 ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 12.1.1.2 0.0.0.0 # CE3配置

l2vpn enable //开启evpn支持 vlan 10 to 1000 //创建vlan 10到1000 interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # interface GigabitEthernet1/0/1 port link-mode route //路由模式 默认为bridge combo enable fiber ip address 13.1.1.3 255.255.255.0 //配置和CE1的互联地址 //配置动态路由协议 ospf 1 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 13.1.1.3 0.0.0.0 #配置CE1 和CE2以及CE3建立 BGP EVPN邻居关系并发布路由

CE1配置为路由反射器,CE2和CE3配置为反射客户端

CE1配置为路由反射器,并配置和CE2以及CE3的BGP EVPN邻居关系

CE1配置BGP EVPN邻居

bgp 100 router-id 1.1.1.1 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack0 peer 3.3.3.3 as-number 100 peer 3.3.3.3 connect-interface LoopBack0 # address-family l2vpn evpn undo policy vpn-target peer 2.2.2.2 enable peer 2.2.2.2 reflect-client peer 3.3.3.3 enable peer 3.3.3.3 reflect-client # ip vpn-instance vpna # address-family ipv4 unicast default-route imported import-route static # returnCE2配置BGP EVPN邻居

bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack0 # address-family l2vpn evpn peer 1.1.1.1 enable # returnCE3配置BGP EVPN邻居

bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack0 # address-family l2vpn evpn peer 1.1.1.1 enable # returnCE1查看BGP EVPN邻居关系

以下代表CE1 已经和CE2 以及CE3建立了bgp EVPN邻居关系

配置L3VNI RD和RT

l3vni可以理解为一个租户,实际上上一个vpn 实例

CE3配置

ip vpn-instance vpna route-distinguisher 100:1 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # ip vpn-instance vpnb route-distinguisher 200:1 # address-family evpn vpn-target 2:2 import-extcommunity vpn-target 2:2 export-extcommunity #CE1配置

ip vpn-instance vpna route-distinguisher 100:1 # address-family ipv4 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # ip vpn-instance vpnb route-distinguisher 200:1 # address-family evpn vpn-target 2:2 import-extcommunity vpn-target 2:2 export-extcommunity #CE2配置

ip vpn-instance vpna route-distinguisher 100:1 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family ipv4 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # address-family evpn vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity # ip vpn-instance vpnb route-distinguisher 200:1 # address-family evpn vpn-target 2:2 import-extcommunity vpn-target 2:2 export-extcommunity #配置VSI关联到虚拟接口

CE2配置vsi 10关联到vsi-interface10,并且vsi-interface10 中有两个网段的IP地址,一个是192.168.100.1做为主地址,172.16.100.1做为sub地址

CE2配置

//设置大二层vsi vsi 10 gateway vsi-interface 10 vxlan 10 evpn encapsulation vxlan route-distinguisher 10:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # vsi 20 gateway vsi-interface 20 vxlan 20 evpn encapsulation vxlan route-distinguisher 20:1 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity # //配置大二层vsi的网关地址这里配置了两个也就是这两个地址都是vsi这个大二层的网关地址 interface Vsi-interface10 ip binding vpn-instance vpna ip address 192.168.100.1 255.255.255.0 ip address 172.16.100.1 255.255.255.0 sub mac-address 0001-0001-0001 local-proxy-arp enable distributed-gateway local # interface Vsi-interface20 ip binding vpn-instance vpnb ip address 192.168.200.1 255.255.255.0 mac-address 0002-0002-0002 local-proxy-arp enable distributed-gateway local # //绑定三层VNI interface Vsi-interface30 ip binding vpn-instance vpna l3-vni 100 # interface Vsi-interface40 ip binding vpn-instance vpnb l3-vni 200 # CE3配置

//设置大二层vsi vsi 10 gateway vsi-interface 10 vxlan 10 evpn encapsulation vxlan route-distinguisher 10:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # vsi 20 gateway vsi-interface 20 vxlan 20 evpn encapsulation vxlan route-distinguisher 20:1 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity # //配置大二层vsi的网关地址这里配置了两个也就是这两个地址都是vsi这个大二层的网关地址 interface Vsi-interface10 ip binding vpn-instance vpna ip address 192.168.100.1 255.255.255.0 ip address 172.16.100.1 255.255.255.0 sub mac-address 0001-0001-0001 local-proxy-arp enable distributed-gateway local # interface Vsi-interface20 ip binding vpn-instance vpnb ip address 192.168.200.1 255.255.255.0 mac-address 0002-0002-0002 local-proxy-arp enable distributed-gateway local # //绑定三层VNI interface Vsi-interface30 ip binding vpn-instance vpna l3-vni 100 # interface Vsi-interface40 ip binding vpn-instance vpnb l3-vni 200配置CE2接入

配置PC_4和PC_9 接入vlan 10,属于vpna

配置PC_7接入vlan20,属于租户vpnb

LSW1配置略

CE配置接入

interface GigabitEthernet1/0/2 port link-mode bridge port link-type trunk port trunk permit vlan 1 10 20 combo enable fiber # service-instance 10 encapsulation s-vid 10 xconnect vsi 10 # service-instance 20 encapsulation s-vid 20 xconnect vsi 20 # return 配置CE3接入

配置PC_10 接入vlan 10,属于vpna

配置PC_8 接入VLAN30 属于vpnb

配置PC_5以untag方式接入裸金属服务器,属于租户vpna

LSW2配置略

interface GigabitEthernet1/0/2 port link-mode bridge combo enable fiber # service-instance 10 encapsulation untagged //不封装的数据报放入vsi 10 这个大二层 xconnect vsi 10 # return # return interface GigabitEthernet1/0/4 port link-mode bridge port link-type trunk port trunk permit vlan 1 10 20 30 combo enable fiber # service-instance 10 //实例10 encapsulation s-vid 10 //封装vlan 10 的数据报放入vsi 10 这个大二层 xconnect vsi 10 # service-instance 20 //实例20 encapsulation s-vid 30 //封装vlan 20 的数据报放入vsi 20 这个大二层 xconnect vsi 20 # return 查看BGP EVPN路由CE1查看路由查看BGP EPVN全部路由

[CE1]dis bgp l2vpn evpn BGP local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - dampened, h - history s - suppressed, S - stale, i - internal, e - external a - additional-path Origin: i - IGP, e - EGP, ? - incomplete Total number of routes from all PEs: 16 Route distinguisher: 10:1 Total number of routes: 6 * >i Network : [2][0][48][42c0-7436-0406][32][192.168.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][44fe-1e9a-0906][32][172.16.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [3][0][32][2.2.2.2]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [3][0][32][3.3.3.3]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 20:1 Total number of routes: 4 * >i Network : [2][0][48][4494-e07c-0706][32][192.168.200.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [3][0][32][2.2.2.2]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [3][0][32][3.3.3.3]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 100:1(vpna) Total number of routes: 9 * >i Network : [2][0][48][42c0-7436-0406][32][192.168.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][44fe-1e9a-0906][32][172.16.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [5][0][0][0.0.0.0]/80 NextHop : 127.0.0.1 LocPrf : PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: ? * >i Network : [5][0][24][172.16.100.0]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * i Network : [5][0][24][172.16.100.0]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [5][0][24][192.168.100.0]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * i Network : [5][0][24][192.168.100.0]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 200:1(vpnb) Total number of routes: 4 * >i Network : [2][0][48][4494-e07c-0706][32][192.168.200.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [5][0][24][192.168.200.0]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * i Network : [5][0][24][192.168.200.0]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i 查看BGP EPVN Type5类型路由

[CE1]dis bgp l2vpn evpn route-type ip-prefix BGP local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - dampened, h - history s - suppressed, S - stale, i - internal, e - external a - additional-path Origin: i - IGP, e - EGP, ? - incomplete Total number of routes from all PEs: 6 Route distinguisher: 100:1(vpna) Total number of routes: 5 * > Network : [5][0][0][0.0.0.0]/80 NextHop : 127.0.0.1 LocPrf : PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: ? * >i Network : [5][0][24][172.16.100.0]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * i Network : [5][0][24][172.16.100.0]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [5][0][24][192.168.100.0]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * i Network : [5][0][24][192.168.100.0]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 200:1(vpnb) Total number of routes: 2 * >i Network : [5][0][24][192.168.200.0]/80 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * i Network : [5][0][24][192.168.200.0]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i [CE1]查看BGP EPVN Type2路由

[CE1]dis bgp l2vpn evpn route-type mac-ip BGP local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - dampened, h - history s - suppressed, S - stale, i - internal, e - external a - additional-path Origin: i - IGP, e - EGP, ? - incomplete Total number of routes from all PEs: 7 Route distinguisher: 10:1 Total number of routes: 5 * >i Network : [2][0][48][42c0-7436-0406][32][192.168.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][0][0.0.0.0]/104 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][44fe-1e9a-0906][32][172.16.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 20:1 Total number of routes: 2 * >i Network : [2][0][48][4494-e07c-0706][32][192.168.200.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 100:1(vpna) Total number of routes: 4 * >i Network : [2][0][48][42c0-7436-0406][32][192.168.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][44fe-1e9a-0906][32][172.16.100.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 200:1(vpnb) Total number of routes: 2 * >i Network : [2][0][48][4494-e07c-0706][32][192.168.200.100]/136 NextHop : 2.2.2.2 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i [CE1]查看vpna租户路由表

[CE1]dis ip routing-table vpn-instance vpna Destinations : 19 Routes : 19 Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/0 Static 60 0 202.106.0.1 Vlan1000 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 172.16.100.0/24 BGP 255 0 2.2.2.2 Vsi30 172.16.100.100/32 BGP 255 0 2.2.2.2 Vsi30 172.16.100.200/32 BGP 255 0 3.3.3.3 Vsi30 192.168.100.0/24 BGP 255 0 2.2.2.2 Vsi30 192.168.100.100/32 BGP 255 0 2.2.2.2 Vsi30 192.168.100.200/32 BGP 255 0 3.3.3.3 Vsi30 202.106.0.0/24 Direct 0 0 202.106.0.2 Vlan1000 202.106.0.0/32 Direct 0 0 202.106.0.2 Vlan1000 202.106.0.2/32 Direct 0 0 127.0.0.1 InLoop0 202.106.0.255/32 Direct 0 0 202.106.0.2 Vlan1000 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 [CE1] 查看vpnb路由租户路由表

[CE1]dis ip routing-table vpn-instance vpnb Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 192.168.200.100/32 BGP 255 0 2.2.2.2 Vsi40 192.168.200.200/32 BGP 255 0 3.3.3.3 Vsi40 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 [CE1] CE2查看路由查看BGP EPVN全部路由

[CE2]dis bgp l2vpn evpn BGP local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - dampened, h - history s - suppressed, S - stale, i - internal, e - external a - additional-path Origin: i - IGP, e - EGP, ? - incomplete Total number of routes from all PEs: 6 Route distinguisher: 10:1 Total number of routes: 6 * > Network : [2][0][48][42c0-7436-0406][32][192.168.100.100]/136 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [2][0][48][44fe-1e9a-0906][32][172.16.100.100]/136 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [3][0][32][2.2.2.2]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [3][0][32][3.3.3.3]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 20:1 Total number of routes: 4 * > Network : [2][0][48][4494-e07c-0706][32][192.168.200.100]/136 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [3][0][32][2.2.2.2]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [3][0][32][3.3.3.3]/80 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 100:1(vpna) Total number of routes: 5 * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [5][0][0][0.0.0.0]/80 NextHop : 1.1.1.1 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: ? * > Network : [5][0][24][172.16.100.0]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [5][0][24][192.168.100.0]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 200:1(vpnb) Total number of routes: 2 * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [5][0][24][192.168.200.0]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i [CE2] 查看BGP EPVN Type5类型路由

[CE2]dis bgp l2vpn evpn route-type ip-prefix BGP local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - dampened, h - history s - suppressed, S - stale, i - internal, e - external a - additional-path Origin: i - IGP, e - EGP, ? - incomplete Total number of routes from all PEs: 1 Route distinguisher: 100:1(vpna) Total number of routes: 3 * >i Network : [5][0][0][0.0.0.0]/80 NextHop : 1.1.1.1 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: ? * > Network : [5][0][24][172.16.100.0]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [5][0][24][192.168.100.0]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 200:1(vpnb) Total number of routes: 1 * > Network : [5][0][24][192.168.200.0]/80 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i [CE2] 查看BGP EPVN Type2类型路由

[CE2]dis bgp l2vpn evpn route-type mac-ip BGP local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - dampened, h - history s - suppressed, S - stale, i - internal, e - external a - additional-path Origin: i - IGP, e - EGP, ? - incomplete Total number of routes from all PEs: 3 Route distinguisher: 10:1 Total number of routes: 4 * > Network : [2][0][48][42c0-7436-0406][32][192.168.100.100]/136 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * > Network : [2][0][48][44fe-1e9a-0906][32][172.16.100.100]/136 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 20:1 Total number of routes: 2 * > Network : [2][0][48][4494-e07c-0706][32][192.168.200.100]/136 NextHop : 0.0.0.0 LocPrf : 100 PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 100:1(vpna) Total number of routes: 2 * >i Network : [2][0][48][42c0-bd1a-0506][32][192.168.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i * >i Network : [2][0][48][4604-450c-0a06][32][172.16.100.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i Route distinguisher: 200:1(vpnb) Total number of routes: 1 * >i Network : [2][0][48][4495-01aa-0806][32][192.168.200.200]/136 NextHop : 3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : NULL MED : 0 Path/Ogn: i [CE2]查看vpna租户路由表

[CE2]dis ip routing-table vpn-instance vpna Destinations : 19 Routes : 19 Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/0 BGP 255 0 1.1.1.1 Vsi30 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 172.16.100.0/24 Direct 0 0 172.16.100.1 Vsi10 172.16.100.0/32 Direct 0 0 172.16.100.1 Vsi10 172.16.100.1/32 Direct 0 0 127.0.0.1 InLoop0 172.16.100.200/32 BGP 255 0 3.3.3.3 Vsi30 172.16.100.255/32 Direct 0 0 172.16.100.1 Vsi10 192.168.100.0/24 Direct 0 0 192.168.100.1 Vsi10 192.168.100.0/32 Direct 0 0 192.168.100.1 Vsi10 192.168.100.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.100.200/32 BGP 255 0 3.3.3.3 Vsi30 192.168.100.255/32 Direct 0 0 192.168.100.1 Vsi10 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 [CE2]查看vpnb租户路由表

[CE2]dis ip routing-table vpn-instance vpnb Destinations : 13 Routes : 13 Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 192.168.200.0/24 Direct 0 0 192.168.200.1 Vsi20 192.168.200.0/32 Direct 0 0 192.168.200.1 Vsi20 192.168.200.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.200.200/32 BGP 255 0 3.3.3.3 Vsi40 192.168.200.255/32 Direct 0 0 192.168.200.1 Vsi20 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 [CE2] 测试连通性

从PC_4访问PC_5

源地址192.168.100.100 目的地址192.168.100.200裸金属服务器 二层互通

从PC_4访问PC_10

源地址192.168.100.100 目的地址172.16.100.200 三层互通

从PC_4访问外网地址

查看全文
大家还看了
也许喜欢
更多游戏

Copyright © 2024 妖气游戏网 www.17u1u.com All Rights Reserved