1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > vxlan专题---第四章配置分布式网关部署方式的华为VXLAN示例-外部路由type5

vxlan专题---第四章配置分布式网关部署方式的华为VXLAN示例-外部路由type5

时间:2021-02-16 03:09:58

相关推荐

vxlan专题---第四章配置分布式网关部署方式的华为VXLAN示例-外部路由type5

本次华为vxlan实验采用eve-ng 5.0模拟器,使用华为CE12800、AR1000v、思科接入交换机两台。关于两个数据中心大二层互通、跨三层互通,已经在第二章和第三章讲解了。本次注意说明vxlan网络与非vxlan(互联网)如何互通。

1、ar100v模拟互联网区域

2、ce03作为spine和Border 作为外部引入,通告整个vlan中。

前言:

Type5路由——IP前缀路由

该类型路由的IP Prefix Length和IP Prefix字段既可以携带主机IP地址,也可以携带网段地址:

•当携带主机IP地址时,该类型路由在VXLAN控制平面中的作用与IRB类型路由是一样的,主要用于分布式网关场景中的主机IP路由通告。

•当携带网段地址时,通过传递该类型路由,可以实现VXLAN网络中的主机访问外部网络。

1、拓扑图

2、配置

2.1互联网的ar路由互联

inter g1/0/2 ip binding vpn-instance Aip address 43.1.1.3 255.255.255.0#

2.2创建vpn实例几三层vni

ip vpn-instance A ipv4-familyroute-distinguisher 3:4vpn-target 10:10 export-extcommunity evpnvpn-target 10:10 import-extcommunity evpnvxlan vni 55#

注意vpn-target是evpn

2.3 配置默认路由

ip route-static vpn-instance A 0.0.0.0 0.0.0.0 43.1.1.4ip route-static vpn-instance A 11.1.1.0 255.255.255.0 43.1.1.4

2.4 evpn发布前缀路由type5

bgp 100 instance evpn1router-id 3.3.3.3peer 1.1.1.1 as-number 100peer 1.1.1.1 connect-interface LoopBack0peer 2.2.2.2 as-number 100peer 2.2.2.2 connect-interface LoopBack0ipv4-family vpn-instance Adefault-route importednetwork 0.0.0.0import-route staticadvertise l2vpn evpn#

在bgp vpn族引入默认路由,并发布到evpn中。

整体配置

<CE03>dis cu !Software Version V200R005C10SPC607B607!Last configuration was updated at -07-05 08:50:02+00:00!Last configuration was saved at -07-05 09:11:25+00:00#sysname CE03#device board 17 board-type CE-MPUBdevice board 1 board-type CE-LPUE#evpn-overlay enable#ip vpn-instance Aipv4-familyroute-distinguisher 3:4vpn-target 10:10 export-extcommunity evpnvpn-target 10:10 import-extcommunity evpnvxlan vni 55#ip binding vpn-instance Aip address 43.1.1.3 255.255.255.0##interface LoopBack0ip address 3.3.3.3 255.255.255.255#interface Nve1source 3.3.3.3#interface NULL0#bgp 100 instance evpn1router-id 3.3.3.3peer 1.1.1.1 as-number 100peer 1.1.1.1 connect-interface LoopBack0peer 2.2.2.2 as-number 100peer 2.2.2.2 connect-interface LoopBack0#l2vpn-family evpnundo policy vpn-targetpeer 1.1.1.1 enablepeer 1.1.1.1 reflect-clientpeer 2.2.2.2 enablepeer 2.2.2.2 reflect-client#ipv4-family vpn-instance Adefault-route importednetwork 0.0.0.0import-route staticadvertise l2vpn evpn#ospf 10 router-id 3.3.3.3area 0.0.0.0network 3.3.3.3 0.0.0.0network 13.1.1.3 0.0.0.0network 23.1.1.3 0.0.0.0#ip route-static vpn-instance A 0.0.0.0 0.0.0.0 43.1.1.4ip route-static vpn-instance A 11.1.1.0 255.255.255.0 43.1.1.4

3、验证

ce3上查看前缀路由

[~CE03]dis bgp instance evpn1 evpn all routing-table ?inclusive-route Inclusive Multicast Routemac-route MAC Advertisement Routepeer Peer routersprefix-routeIP-prefix routesstatistics Statistics of route|Matching output>Redirect the output to a file>>Redirect the output to a file in append mode<cr> [~CE03]dis bgp instance evpn1 evpn all routing-table pr[~CE03]dis bgp instance evpn1 evpn all routing-table prefix-route Local AS number : 100BGP Local router ID is 3.3.3.3Status codes: * - valid, > - best, d - damped, x - best external, a - add path,h - history, i - internal, s - suppressed, S - StaleOrigin : i - IGP, e - EGP, ? - incompleteEVPN address family:Number of Ip Prefix Routes: 3Route Distinguisher: 3:4Network(EthTagId/IpPrefix/IpPrefixLen) NextHop*> 0:0.0.0.0:0 0.0.0.0*0.0.0.0*> 0:11.1.1.0:24 0.0.0.0EVPN-Instance __RD_1_3_4__:Number of Ip Prefix Routes: 3Network(EthTagId/IpPrefix/IpPrefixLen) NextHop*> 0:0.0.0.0:0 0.0.0.0*0.0.0.0*> 0:11.1.1.0:24 0.0.0.0

ce1上查看路由

[~CE01]dis ip routing-table vpn-instance AProto: Protocol Pre: PreferenceRoute Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route------------------------------------------------------------------------------Routing Table : ADestinations : 9 Routes : 9 Destination/Mask Proto Pre Cost Flags NextHop Interface0.0.0.0/0 IBGP 255 0 RD 3.3.3.3 VXLAN11.1.1.0/24 IBGP 255 0 RD 3.3.3.3 VXLAN172.16.1.0/24 Direct 0 0 D 172.16.1.254 Vbdif2.16.1.254/32 Direct 0 0 D 127.0.0.1 Vbdif2.16.1.255/32 Direct 0 0 D 127.0.0.1 Vbdif2.168.1.0/24 Direct 0 0 D 192.168.1.254 Vbdif10192.168.1.254/32 Direct 0 0 D 127.0.0.1 Vbdif10192.168.1.255/32 Direct 0 0 D 127.0.0.1 Vbdif10255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0[~CE01]

pc测试

es from 11.1.1.1 icmp_seq=2 ttl=61 time=4.781 ms84 bytes from 11.1.1.1 icmp_seq=3 ttl=61 time=5.231 ms84 bytes from 11.1.1.1 icmp_seq=4 ttl=61 time=6.456 ms84 bytes from 11.1.1.1 icmp_seq=5 ttl=61 time=5.092 msVPCS> trace 11.1.1.1trace to 11.1.1.1, 8 hops max, press Ctrl+C to stop1 192.168.1.254 13.446 ms 5.638 ms 3.441 ms2* * *3 43.1.1.4 9.715 ms 5.565 ms 5.492 ms4 *11.1.1.1 8.536 ms (ICMP type:3, code:3, Destination port unreachable)VPCS> ping 11.1.1.184 bytes from 11.1.1.1 icmp_seq=1 ttl=61 time=7.009 ms84 bytes from 11.1.1.1 icmp_seq=2 ttl=61 time=8.312 ms84 bytes from 11.1.1.1 icmp_seq=3 ttl=61 time=6.321 ms84 bytes from 11.1.1.1 icmp_seq=4 ttl=61 time=5.202 ms84 bytes from 11.1.1.1 icmp_seq=5 ttl=61 time=6.477 msVPCS>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。