爆款云主机2核4G限时秒杀,88元/年起!
查看详情

活动

天翼云最新优惠活动,涵盖免费试用,产品折扣等,助您降本增效!
热门活动
  • 618智算钜惠季 爆款云主机2核4G限时秒杀,88元/年起!
  • 免费体验DeepSeek,上天翼云息壤 NEW 新老用户均可免费体验2500万Tokens,限时两周
  • 云上钜惠 HOT 爆款云主机全场特惠,更有万元锦鲤券等你来领!
  • 算力套餐 HOT 让算力触手可及
  • 天翼云脑AOne NEW 连接、保护、办公,All-in-One!
  • 中小企业应用上云专场 产品组合下单即享折上9折起,助力企业快速上云
  • 息壤高校钜惠活动 NEW 天翼云息壤杯高校AI大赛,数款产品享受线上订购超值特惠
  • 天翼云电脑专场 HOT 移动办公新选择,爆款4核8G畅享1年3.5折起,快来抢购!
  • 天翼云奖励推广计划 加入成为云推官,推荐新用户注册下单得现金奖励
免费活动
  • 免费试用中心 HOT 多款云产品免费试用,快来开启云上之旅
  • 天翼云用户体验官 NEW 您的洞察,重塑科技边界

智算服务

打造统一的产品能力,实现算网调度、训练推理、技术架构、资源管理一体化智算服务
智算云(DeepSeek专区)
科研助手
  • 算力商城
  • 应用商城
  • 开发机
  • 并行计算
算力互联调度平台
  • 应用市场
  • 算力市场
  • 算力调度推荐
一站式智算服务平台
  • 模型广场
  • 体验中心
  • 服务接入
智算一体机
  • 智算一体机
大模型
  • DeepSeek-R1-昇腾版(671B)
  • DeepSeek-R1-英伟达版(671B)
  • DeepSeek-V3-昇腾版(671B)
  • DeepSeek-R1-Distill-Llama-70B
  • DeepSeek-R1-Distill-Qwen-32B
  • Qwen2-72B-Instruct
  • StableDiffusion-V2.1
  • TeleChat-12B

应用商城

天翼云精选行业优秀合作伙伴及千余款商品,提供一站式云上应用服务
进入甄选商城进入云市场创新解决方案
办公协同
  • WPS云文档
  • 安全邮箱
  • EMM手机管家
  • 智能商业平台
财务管理
  • 工资条
  • 税务风控云
企业应用
  • 翼信息化运维服务
  • 翼视频云归档解决方案
工业能源
  • 智慧工厂_生产流程管理解决方案
  • 智慧工地
建站工具
  • SSL证书
  • 新域名服务
网络工具
  • 翼云加速
灾备迁移
  • 云管家2.0
  • 翼备份
资源管理
  • 全栈混合云敏捷版(软件)
  • 全栈混合云敏捷版(一体机)
行业应用
  • 翼电子教室
  • 翼智慧显示一体化解决方案

合作伙伴

天翼云携手合作伙伴,共创云上生态,合作共赢
天翼云生态合作中心
  • 天翼云生态合作中心
天翼云渠道合作伙伴
  • 天翼云代理渠道合作伙伴
天翼云服务合作伙伴
  • 天翼云集成商交付能力认证
天翼云应用合作伙伴
  • 天翼云云市场合作伙伴
  • 天翼云甄选商城合作伙伴
天翼云技术合作伙伴
  • 天翼云OpenAPI中心
  • 天翼云EasyCoding平台
天翼云培训认证
  • 天翼云学堂
  • 天翼云市场商学院
天翼云合作计划
  • 云汇计划
天翼云东升计划
  • 适配中心
  • 东升计划
  • 适配互认证

开发者

开发者相关功能入口汇聚
技术社区
  • 专栏文章
  • 互动问答
  • 技术视频
资源与工具
  • OpenAPI中心
开放能力
  • EasyCoding敏捷开发平台
培训与认证
  • 天翼云学堂
  • 天翼云认证
魔乐社区
  • 魔乐社区

支持与服务

为您提供全方位支持与服务,全流程技术保障,助您轻松上云,安全无忧
文档与工具
  • 文档中心
  • 新手上云
  • 自助服务
  • OpenAPI中心
定价
  • 价格计算器
  • 定价策略
基础服务
  • 售前咨询
  • 在线支持
  • 在线支持
  • 工单服务
  • 建议与反馈
  • 用户体验官
  • 服务保障
  • 客户公告
  • 会员中心
增值服务
  • 红心服务
  • 首保服务
  • 客户支持计划
  • 专家技术服务
  • 备案管家

了解天翼云

天翼云秉承央企使命,致力于成为数字经济主力军,投身科技强国伟大事业,为用户提供安全、普惠云服务
品牌介绍
  • 关于天翼云
  • 智算云
  • 天翼云4.0
  • 新闻资讯
  • 天翼云APP
基础设施
  • 全球基础设施
  • 信任中心
最佳实践
  • 精选案例
  • 超级探访
  • 云杂志
  • 分析师和白皮书
  • 天翼云·创新直播间
市场活动
  • 2025智能云生态大会
  • 2024智算云生态大会
  • 2023云生态大会
  • 2022云生态大会
  • 天翼云中国行
天翼云
  • 活动
  • 智算服务
  • 产品
  • 解决方案
  • 应用商城
  • 合作伙伴
  • 开发者
  • 支持与服务
  • 了解天翼云
      • 文档
      • 控制中心
      • 备案
      • 管理中心

      数据中心-HCIE DC分布式网关综合实验

      首页 知识中心 云计算 文章详情页

      数据中心-HCIE DC分布式网关综合实验

      2023-04-24 11:28:08 阅读次数:145

      vxlan分布式网关场景

      ​​https://support.huawei.com/hedex/hdx.do?docid=EDOC1100101225&lang=zh&idPath=24030814%7C21782165%7C21782236%7C22318638%7C7542409​​

      实验拓扑

      数据中心-HCIE DC分布式网关综合实验

      实验规划

      互联地址规划

      1. CE互联地址10.1.XY.0/24网段,编号小在前,即CE1-CE3为10.1.13.0/24;
      2. Gateway Leaf与防火墙三个互联段如图所示,防火墙地址取小;
      3. CE1和CE2为RR,只需创建用于构建evpn邻居的LoopBack0地址100.1.1.0/32;
      4. CE3-CE6为Leaf,除了LoopBack0外还需创建LoopBack1地址10.1.1.0/32作为vtep的源地址;
      5. 防火墙通过主备方式部署,主备协商地址为1.1.1.0/30;
      6. Gateway Leaf与ISP互联地址分别为211.1.1.0/30和212.1.1.0/30;
      7. ISP创建LoopBack8地址8.8.8.8/32模拟外网。

      业务地址规划

      1. 租户A为vlan10和vlan20,地址分别为10.0.10.0/24和10.0.20.0/24;
      2. 租户B为vlan30和vlan40,地址分别为10.0.30.0/24和10.0.40.0/24;
      3. AR2为telnet的server设备,地址为10.0.10.10/24;
      4. AR3为ftp的server设备,地址为10.0.40.10/24;

      BD/VNI/RD/RT规划

      1. vlan10→BD10→VNI10→RD10:1→RT10:1→eRT10:100
      2. vlan20→BD20→VNI20→RD10:2→RT10:2→eRT10:100
      3. vlan30→BD30→VNI30→RD10:3→RT10:3→eRT10:200
      4. vlan40→BD40→VNI40→RD10:4→RT10:4→eRT10:200
      5. vpnA→RD10:100→eVPN RT10:100→VNI15
      6. vpnB→RD10:200→eVPN RT10:200→VNI25

      实验需求

      1. Underlay使用OSPF协议互相学习路由;
      2. 使用100.1.1.0/32作为源地址构建iBGP eVPN邻居;
      3. vxlan隧道使用10.1.1.0/32作为vtep源地址;
      4. VPN实例/BD域/地址等相关参数按照规划配置;
      5. 各个租户业务地址允许访问外网8.8.8.8;
      6. 外网服务器8.8.8.8允许使用telnet访问AR2;
      7. 外网服务器8.8.8.8允许使用ftp登录AR3;
      8. 允许AR2通过ftp登录AR3;
      9. 允许AR3通过telnet访问AR2。

      实验步骤

      路由器

      ISP

      interface GigabitEthernet0/0/0
      ip address 211.1.1.1 255.255.255.0
      #
      interface GigabitEthernet0/0/1
      ip address 212.1.1.1 255.255.255.0
      #
      interface LoopBack8
      ip address 8.8.8.8 255.255.255.255
      #
      ip route-static 202.1.1.0 255.255.255.240 211.1.1.2
      ip route-static 202.1.1.0 255.255.255.240 212.1.1.2
      #

      AR2

      interface GigabitEthernet0/0/0
      ip address 10.0.10.10 255.255.255.0
      #
      ip route-static 0.0.0.0 0.0.0.0 10.0.10.254
      #
      user-interface vty 0 4
      authentication-mode password
      user privilege level 15
      set authentication password cipher Admin@123

      AR3

      ftp server enable
      #
      aaa
      local-user ftp password cipher Admin@123
      local-user ftp privilege level 15
      local-user ftp ftp-directory flash:
      local-user ftp service-type ftp
      interface GigabitEthernet0/0/0
      ip address 10.0.40.10 255.255.255.0
      #
      ip route-static 0.0.0.0 0.0.0.0 10.0.40.253
      #
      user-interface vty 0 4
      authentication-mode aaa
      user privilege level 15
      #

      地址配置

      略

      OSPF配置

      略 网络类型改为P2P

      邻居与路由的验证

      [CE1]display ospf peer brief 
      OSPF Process 1 with Router ID 11.1.1.1
      Peer Statistic Information
      Total number of peer(s): 4
      Peer(s) in full state: 4
      -----------------------------------------------------------------------------
      Area Id Interface Neighbor id State
      0.0.0.0 GE1/0/0 33.1.1.1 Full
      0.0.0.0 GE1/0/1 44.1.1.1 Full
      0.0.0.0 GE1/0/2 55.1.1.1 Full
      0.0.0.0 GE1/0/3 66.1.1.1 Full
      -----------------------------------------------------------------------------

      [CE2]display ospf peer brief
      OSPF Process 1 with Router ID 22.1.1.1
      Peer Statistic Information
      Total number of peer(s): 4
      Peer(s) in full state: 4
      -----------------------------------------------------------------------------
      Area Id Interface Neighbor id State
      0.0.0.0 GE1/0/0 33.1.1.1 Full
      0.0.0.0 GE1/0/1 44.1.1.1 Full
      0.0.0.0 GE1/0/2 55.1.1.1 Full
      0.0.0.0 GE1/0/3 66.1.1.1 Full
      -----------------------------------------------------------------------------

       

      [CE3]display ospf routing

      OSPF Process 1 with Router ID 33.1.1.1

      Routing for Network
      ------------------------------------------------------------------------------
      Destination Cost Type Next-Hop AdvRouter Area
      10.1.1.3/32 0 Direct 10.1.1.3 33.1.1.1 0.0.0.0
      10.1.1.4/32 2 Stub 10.1.23.2 44.1.1.1 0.0.0.0
      10.1.1.4/32 2 Stub 10.1.13.1 44.1.1.1 0.0.0.0
      10.1.1.5/32 2 Stub 10.1.23.2 55.1.1.1 0.0.0.0
      10.1.1.5/32 2 Stub 10.1.13.1 55.1.1.1 0.0.0.0
      10.1.1.6/32 2 Stub 10.1.23.2 66.1.1.1 0.0.0.0
      10.1.1.6/32 2 Stub 10.1.13.1 66.1.1.1 0.0.0.0
      10.1.13.0/24 1 Direct 10.1.13.3 33.1.1.1 0.0.0.0
      10.1.14.0/24 2 Stub 10.1.13.1 11.1.1.1 0.0.0.0
      10.1.15.0/24 2 Stub 10.1.13.1 11.1.1.1 0.0.0.0
      10.1.16.0/24 2 Stub 10.1.13.1 11.1.1.1 0.0.0.0
      10.1.23.0/24 1 Direct 10.1.23.3 33.1.1.1 0.0.0.0
      10.1.24.0/24 2 Stub 10.1.23.2 22.1.1.1 0.0.0.0
      10.1.25.0/24 2 Stub 10.1.23.2 22.1.1.1 0.0.0.0
      10.1.26.0/24 2 Stub 10.1.23.2 22.1.1.1 0.0.0.0
      100.1.1.1/32 1 Stub 10.1.13.1 11.1.1.1 0.0.0.0
      100.1.1.2/32 1 Stub 10.1.23.2 22.1.1.1 0.0.0.0
      100.1.1.3/32 0 Direct 100.1.1.3 33.1.1.1 0.0.0.0
      100.1.1.4/32 2 Stub 10.1.23.2 44.1.1.1 0.0.0.0
      100.1.1.4/32 2 Stub 10.1.13.1 44.1.1.1 0.0.0.0
      100.1.1.5/32 2 Stub 10.1.23.2 55.1.1.1 0.0.0.0
      100.1.1.5/32 2 Stub 10.1.13.1 55.1.1.1 0.0.0.0
      100.1.1.6/32 2 Stub 10.1.23.2 66.1.1.1 0.0.0.0
      100.1.1.6/32 2 Stub 10.1.13.1 66.1.1.1 0.0.0.0

      Total Nets: 18
      Intra Area: 18 Inter Area: 0 ASE: 0 NSSA: 0

      [CE6]display ospf routing

      OSPF Process 1 with Router ID 66.1.1.1

      Routing for Network
      ------------------------------------------------------------------------------
      Destination Cost Type Next-Hop AdvRouter Area
      10.1.1.3/32 2 Stub 10.1.26.2 33.1.1.1 0.0.0.0
      10.1.1.3/32 2 Stub 10.1.16.1 33.1.1.1 0.0.0.0
      10.1.1.4/32 2 Stub 10.1.26.2 44.1.1.1 0.0.0.0
      10.1.1.4/32 2 Stub 10.1.16.1 44.1.1.1 0.0.0.0
      10.1.1.5/32 2 Stub 10.1.26.2 55.1.1.1 0.0.0.0
      10.1.1.5/32 2 Stub 10.1.16.1 55.1.1.1 0.0.0.0
      10.1.1.6/32 0 Direct 10.1.1.6 66.1.1.1 0.0.0.0
      10.1.13.0/24 2 Stub 10.1.16.1 11.1.1.1 0.0.0.0
      10.1.14.0/24 2 Stub 10.1.16.1 11.1.1.1 0.0.0.0
      10.1.15.0/24 2 Stub 10.1.16.1 11.1.1.1 0.0.0.0
      10.1.16.0/24 1 Direct 10.1.16.6 66.1.1.1 0.0.0.0
      10.1.23.0/24 2 Stub 10.1.26.2 22.1.1.1 0.0.0.0
      10.1.24.0/24 2 Stub 10.1.26.2 22.1.1.1 0.0.0.0
      10.1.25.0/24 2 Stub 10.1.26.2 22.1.1.1 0.0.0.0
      10.1.26.0/24 1 Direct 10.1.26.6 66.1.1.1 0.0.0.0
      100.1.1.1/32 1 Stub 10.1.16.1 11.1.1.1 0.0.0.0
      100.1.1.2/32 1 Stub 10.1.26.2 22.1.1.1 0.0.0.0
      100.1.1.3/32 2 Stub 10.1.26.2 33.1.1.1 0.0.0.0
      100.1.1.3/32 2 Stub 10.1.16.1 33.1.1.1 0.0.0.0
      100.1.1.4/32 2 Stub 10.1.26.2 44.1.1.1 0.0.0.0
      100.1.1.4/32 2 Stub 10.1.16.1 44.1.1.1 0.0.0.0
      100.1.1.5/32 2 Stub 10.1.26.2 55.1.1.1 0.0.0.0
      100.1.1.5/32 2 Stub 10.1.16.1 55.1.1.1 0.0.0.0
      100.1.1.6/32 0 Direct 100.1.1.6 66.1.1.1 0.0.0.0

      Total Nets: 18
      Intra Area: 18 Inter Area: 0 ASE: 0 NSSA: 0

      IBGP eVPN配置

      CE1-CE6

      evpn-overlay enable    //全局使能EVPN作为VXLAN的控制平面

      CE1

      bgp 1
      router-id 11.1.1.1
      peer 100.1.1.3 as-number 1
      peer 100.1.1.3 connect-interface LoopBack0
      peer 100.1.1.4 as-number 1
      peer 100.1.1.4 connect-interface LoopBack0
      peer 100.1.1.5 as-number 1
      peer 100.1.1.5 connect-interface LoopBack0
      peer 100.1.1.6 as-number 1
      peer 100.1.1.6 connect-interface LoopBack0
      #
      ipv4-family unicast
      peer 100.1.1.3 enable
      peer 100.1.1.3 reflect-client
      peer 100.1.1.4 enable
      peer 100.1.1.4 reflect-client
      peer 100.1.1.5 enable
      peer 100.1.1.5 reflect-client
      peer 100.1.1.6 enable
      peer 100.1.1.6 reflect-client
      #
      l2vpn-family evpn
      undo policy vpn-target //两台RR设备记得关闭对接收的VPN路由或者标签进行RT过滤
      peer 100.1.1.3 enable
      peer 100.1.1.3 advertise irb
      peer 100.1.1.3 reflect-client
      peer 100.1.1.4 enable
      peer 100.1.1.4 advertise irb
      peer 100.1.1.4 reflect-client
      peer 100.1.1.5 enable
      peer 100.1.1.5 advertise irb
      peer 100.1.1.5 reflect-client
      peer 100.1.1.6 enable
      peer 100.1.1.6 advertise irb
      peer 100.1.1.6 reflect-client
      #

      CE2

      bgp 1
      router-id 22.1.1.1
      peer 100.1.1.3 as-number 1
      peer 100.1.1.3 connect-interface LoopBack0
      peer 100.1.1.4 as-number 1
      peer 100.1.1.4 connect-interface LoopBack0
      peer 100.1.1.5 as-number 1
      peer 100.1.1.5 connect-interface LoopBack0
      peer 100.1.1.6 as-number 1
      peer 100.1.1.6 connect-interface LoopBack0
      #
      ipv4-family unicast
      peer 100.1.1.3 enable
      peer 100.1.1.3 reflect-client
      peer 100.1.1.4 enable
      peer 100.1.1.4 reflect-client
      peer 100.1.1.5 enable
      peer 100.1.1.5 reflect-client
      peer 100.1.1.6 enable
      peer 100.1.1.6 reflect-client
      #
      l2vpn-family evpn
      undo policy vpn-target
      peer 100.1.1.3 enable
      peer 100.1.1.3 advertise irb
      peer 100.1.1.3 reflect-client
      peer 100.1.1.4 enable
      peer 100.1.1.4 advertise irb
      peer 100.1.1.4 reflect-client
      peer 100.1.1.5 enable
      peer 100.1.1.5 advertise irb
      peer 100.1.1.5 reflect-client
      peer 100.1.1.6 enable
      peer 100.1.1.6 advertise irb
      peer 100.1.1.6 reflect-client
      #

      CE3

      bgp 1
      router-id 33.1.1.1
      peer 100.1.1.1 as-number 1
      peer 100.1.1.1 connect-interface LoopBack0
      peer 100.1.1.2 as-number 1
      peer 100.1.1.2 connect-interface LoopBack0
      #
      ipv4-family unicast
      peer 100.1.1.1 enable
      peer 100.1.1.2 enable
      #
      l2vpn-family evpn
      policy vpn-target
      peer 100.1.1.1 enable
      peer 100.1.1.1 advertise irb
      peer 100.1.1.2 enable
      peer 100.1.1.2 advertise irb
      #

      CE4

      bgp 1
      router-id 44.1.1.1
      peer 100.1.1.1 as-number 1
      peer 100.1.1.1 connect-interface LoopBack0
      peer 100.1.1.2 as-number 1
      peer 100.1.1.2 connect-interface LoopBack0
      #
      ipv4-family unicast
      peer 100.1.1.1 enable
      peer 100.1.1.2 enable
      #
      l2vpn-family evpn
      policy vpn-target
      peer 100.1.1.1 enable
      peer 100.1.1.1 advertise irb
      peer 100.1.1.2 enable
      peer 100.1.1.2 advertise irb
      #

      CE5

      bgp 1
      router-id 55.1.1.1
      peer 100.1.1.1 as-number 1
      peer 100.1.1.1 connect-interface LoopBack0
      peer 100.1.1.2 as-number 1
      peer 100.1.1.2 connect-interface LoopBack0
      #
      ipv4-family unicast
      peer 100.1.1.1 enable
      peer 100.1.1.2 enable
      #
      l2vpn-family evpn
      policy vpn-target
      peer 100.1.1.1 enable
      peer 100.1.1.1 advertise irb
      peer 100.1.1.2 enable
      peer 100.1.1.2 advertise i

      CE6

      bgp 1
      router-id 66.1.1.1
      peer 100.1.1.1 as-number 1
      peer 100.1.1.1 connect-interface LoopBack0
      peer 100.1.1.2 as-number 1
      peer 100.1.1.2 connect-interface LoopBack0
      #
      ipv4-family unicast
      peer 100.1.1.1 enable
      peer 100.1.1.2 enable
      #
      l2vpn-family evpn
      policy vpn-target
      peer 100.1.1.1 enable
      peer 100.1.1.1 advertise irb
      peer 100.1.1.2 enable
      peer 100.1.1.2 advertise irb
      #

      查看eVPN邻居关系

      [CE1]display bgp evpn peer 
      BGP local router ID : 11.1.1.1
      Local AS number : 1
      Total number of peers : 4
      Peers in established state : 4

      Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
      100.1.1.3 4 1 4 5 0 00:00:31 Established 0
      100.1.1.4 4 1 4 4 0 00:00:20 Established 0
      100.1.1.5 4 1 4 4 0 00:00:09 Established 0
      100.1.1.6 4 1 4 5 0 00:00:01 Established 0

      [CE2]display bgp evpn peer
      BGP local router ID : 22.1.1.1
      Local AS number : 1
      Total number of peers : 4
      Peers in established state : 4

      Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
      100.1.1.3 4 1 4 5 0 00:00:46 Established 0
      100.1.1.4 4 1 4 4 0 00:00:33 Established 0
      100.1.1.5 4 1 4 4 0 00:00:23 Established 0
      100.1.1.6 4 1 4 5 0 00:00:15 Established 0

      配置BD域

      CE3-CE6

      bridge-domain 10
      vxlan vni 10
      evpn
      route-distinguisher 10:1
      vpn-target 10:1 export-extcommunity
      vpn-target 10:100 export-extcommunity //用于把vxlan主机路由通过eVPN传递
      vpn-target 10:1 import-extcommunity
      #
      bridge-domain 20
      vxlan vni 20
      evpn
      route-distinguisher 10:2
      vpn-target 10:2 export-extcommunity
      vpn-target 10:100 export-extcommunity
      vpn-target 10:2 import-extcommunity
      #
      bridge-domain 30
      vxlan vni 30
      evpn
      route-distinguisher 10:3
      vpn-target 10:3 export-extcommunity
      vpn-target 10:200 export-extcommunity
      vpn-target 10:3 import-extcommunity
      #
      bridge-domain 40
      vxlan vni 40
      evpn
      route-distinguisher 10:4
      vpn-target 10:4 export-extcommunity
      vpn-target 10:200 export-extcommunity
      vpn-target 10:4 import-extcommunity
      #

      配置VPN实例

      CE3-CE6

      ip vpn-instance A
      ipv4-family
      route-distinguisher 10:100
      vpn-target 10:100 export-extcommunity evpn
      vpn-target 10:100 import-extcommunity evpn
      vxlan vni 15
      #
      ip vpn-instance B
      ipv4-family
      route-distinguisher 10:200
      vpn-target 10:200 export-extcommunity evpn
      vpn-target 10:200 import-extcommunity evpn
      vxlan vni 25
      #

      配置业务接入

      CE3/CE4

      interface GE1/0/2
      undo shutdown
      #
      interface GE1/0/2.10 mode l2
      encapsulation dot1q vid 10
      bridge-domain 10
      #
      interface GE1/0/2.20 mode l2
      encapsulation dot1q vid 20
      bridge-domain 20
      #
      interface GE1/0/2.30 mode l2
      encapsulation dot1q vid 30
      bridge-domain 30
      #
      interface GE1/0/2.40 mode l2
      encapsulation dot1q vid 40
      bridge-domain 40
      #

      配置业务网关

      CE3

      interface Vbdif10
      ip binding vpn-instance A
      ip address 10.0.10.254 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #
      interface Vbdif20
      ip binding vpn-instance A
      ip address 10.0.20.254 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #
      interface Vbdif30
      ip binding vpn-instance B
      ip address 10.0.30.254 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #
      interface Vbdif40
      ip binding vpn-instance B
      ip address 10.0.40.254 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #

      CE4

      interface Vbdif10
      ip binding vpn-instance A
      ip address 10.0.10.253 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #
      interface Vbdif20
      ip binding vpn-instance A
      ip address 10.0.20.253 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #
      interface Vbdif30
      ip binding vpn-instance B
      ip address 10.0.30.253 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #
      interface Vbdif40
      ip binding vpn-instance B
      ip address 10.0.40.253 255.255.255.0
      arp distribute-gateway enable
      arp collect host enable
      #

      配置VXLAN隧道

      CE3

      interface Nve1
      source 10.1.1.3
      vni 10 head-end peer-list protocol bgp
      vni 20 head-end peer-list protocol bgp
      vni 30 head-end peer-list protocol bgp
      vni 40 head-end peer-list protocol bgp
      #

      CE4

      interface Nve1
      source 10.1.1.4
      vni 10 head-end peer-list protocol bgp
      vni 20 head-end peer-list protocol bgp
      vni 30 head-end peer-list protocol bgp
      vni 40 head-end peer-list protocol bgp
      #

      CE5

      interface Nve1
      source 10.1.1.5
      vni 10 head-end peer-list protocol bgp
      vni 20 head-end peer-list protocol bgp
      vni 30 head-end peer-list protocol bgp
      vni 40 head-end peer-list protocol bgp
      #

      CE6

      interface Nve1
      source 10.1.1.6
      vni 10 head-end peer-list protocol bgp
      vni 20 head-end peer-list protocol bgp
      vni 30 head-end peer-list protocol bgp
      vni 40 head-end peer-list protocol bgp
      #

      查看VXLAN隧道

      [CE4]display vxlan peer 
      Number of peers : 12
      Vni ID Source Destination Type Out Vni ID
      -------------------------------------------------------------------------------
      10 10.1.1.4 10.1.1.3 dynamic 10
      10 10.1.1.4 10.1.1.5 dynamic 10
      10 10.1.1.4 10.1.1.6 dynamic 10
      20 10.1.1.4 10.1.1.3 dynamic 20
      20 10.1.1.4 10.1.1.5 dynamic 20
      20 10.1.1.4 10.1.1.6 dynamic 20
      30 10.1.1.4 10.1.1.3 dynamic 30
      30 10.1.1.4 10.1.1.5 dynamic 30
      30 10.1.1.4 10.1.1.6 dynamic 30
      40 10.1.1.4 10.1.1.3 dynamic 40
      40 10.1.1.4 10.1.1.5 dynamic 40
      40 10.1.1.4 10.1.1.6 dynamic 40
      [CE4]display vxlan tunnel
      Number of vxlan tunnel : 3
      Tunnel ID Source Destination State Type Uptime
      -----------------------------------------------------------------------------------
      4026531841 10.1.1.4 10.1.1.3 up dynamic 00:02:18
      4026531842 10.1.1.4 10.1.1.5 up dynamic 00:02:06
      4026531843 10.1.1.4 10.1.1.6 up dynamic 00:01:59

      [CE5]display vxlan peer
      Number of peers : 12
      Vni ID Source Destination Type Out Vni ID
      -------------------------------------------------------------------------------
      10 10.1.1.5 10.1.1.3 dynamic 10
      10 10.1.1.5 10.1.1.4 dynamic 10
      10 10.1.1.5 10.1.1.6 dynamic 10
      20 10.1.1.5 10.1.1.3 dynamic 20
      20 10.1.1.5 10.1.1.4 dynamic 20
      20 10.1.1.5 10.1.1.6 dynamic 20
      30 10.1.1.5 10.1.1.3 dynamic 30
      30 10.1.1.5 10.1.1.4 dynamic 30
      30 10.1.1.5 10.1.1.6 dynamic 30
      40 10.1.1.5 10.1.1.3 dynamic 40
      40 10.1.1.5 10.1.1.4 dynamic 40
      40 10.1.1.5 10.1.1.6 dynamic 40
      [CE5]display vxlan tunnel
      Number of vxlan tunnel : 3
      Tunnel ID Source Destination State Type Uptime
      -----------------------------------------------------------------------------------
      4026531841 10.1.1.5 10.1.1.3 up dynamic 00:02:50
      4026531842 10.1.1.5 10.1.1.4 up dynamic 00:02:42
      4026531843 10.1.1.5 10.1.1.6 up dynamic 00:02:31

      查看eVPN路由

      [CE5]display ip routing-table vpn-instance A protocol bgp 
      Proto: Protocol Pre: Preference
      Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
      ------------------------------------------------------------------------------
      A Routing Table : BGP
      Destinations : 4 Routes : 4

      BGP routing table status : <Active>
      Destinations : 4 Routes : 4

      Destination/Mask Proto Pre Cost Flags NextHop Interface

      10.0.10.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.10.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN
      10.0.20.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.20.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN

      BGP routing table status : <Inactive>
      Destinations : 0 Routes : 0
      [CE5]display ip routing-table vpn-instance B protocol bgp
      Proto: Protocol Pre: Preference
      Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
      ------------------------------------------------------------------------------
      B Routing Table : BGP
      Destinations : 4 Routes : 4

      BGP routing table status : <Active>
      Destinations : 4 Routes : 4

      Destination/Mask Proto Pre Cost Flags NextHop Interface

      10.0.30.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.30.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN
      10.0.40.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.40.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN

      BGP routing table status : <Inactive>
      Destinations : 0 Routes : 0

      [CE6]display ip routing-table vpn-instance A protocol bgp
      Proto: Protocol Pre: Preference
      Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
      ------------------------------------------------------------------------------
      A Routing Table : BGP
      Destinations : 4 Routes : 4

      BGP routing table status : <Active>
      Destinations : 4 Routes : 4

      Destination/Mask Proto Pre Cost Flags NextHop Interface

      10.0.10.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.10.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN
      10.0.20.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.20.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN

      BGP routing table status : <Inactive>
      Destinations : 0 Routes : 0
      [CE6]display ip routing-table vpn-instance B protocol bgp
      Proto: Protocol Pre: Preference
      Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
      ------------------------------------------------------------------------------
      B Routing Table : BGP
      Destinations : 4 Routes : 4

      BGP routing table status : <Active>
      Destinations : 4 Routes : 4

      Destination/Mask Proto Pre Cost Flags NextHop Interface

      10.0.30.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.30.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN
      10.0.40.1/32 IBGP 255 0 RD 10.1.1.3 VXLAN
      10.0.40.2/32 IBGP 255 0 RD 10.1.1.4 VXLAN

      BGP routing table status : <Inactive>
      Destinations : 0 Routes : 0

      配置防火墙与geteway leaf接口

      fw1

      vlan batch 100 200 110
      #
      interface Eth-Trunk1
      trunkport GigabitEthernet 1/0/0
      trunkport GigabitEthernet 1/0/1
      portswitch
      port link-type trunk
      port trunk allow-pass vlan 100 110 200
      #

      fw2

      vlan batch 100 200 110
      #
      interface Eth-Trunk1
      trunkport GigabitEthernet 1/0/0
      trunkport GigabitEthernet 1/0/1
      portswitch
      port link-type trunk
      port trunk allow-pass vlan 100 110 200
      #

      CE5

      vlan batch 100 200 110
      #
      interface GE1/0/2
      undo shutdown
      #
      interface GE1/0/3
      undo shutdown
      #
      interface Eth-Trunk1
      trunkport GE 1/0/2
      trunkport GE 1/0/3
      port link-type trunk
      port trunk allow-pass vlan 100 110 200
      #

      CE6

      vlan batch 100 200 110
      #
      interface GE1/0/2
      undo shutdown
      #
      interface GE1/0/3
      undo shutdown
      #
      interface Eth-Trunk1
      trunkport GE 1/0/2
      trunkport GE 1/0/3
      port link-type trunk
      port trunk allow-pass vlan 100 110 200
      #

      配置主备防火墙

      FW1

      interface GigabitEthernet1/0/2
      undo shutdown
      ip address 1.1.1.1 255.255.255.252
      #
      firewall zone dmz
      add interface GigabitEthernet1/0/2
      #
      hrp mirror config enable
      hrp interface GigabitEthernet1/0/2 remote 1.1.1.2
      hrp base config enable
      hrp mirror session enable
      hrp nat resource primary-group
      hrp standby config enable
      undo hrp preempt
      hrp track interface Eth-Trunk1
      hrp enable

      FW2

      interface GigabitEthernet1/0/2
      undo shutdown
      ip address 1.1.1.2 255.255.255.252
      #
      firewall zone dmz
      add interface GigabitEthernet1/0/2
      #
      hrp mirror config enable
      hrp standby-device
      hrp interface GigabitEthernet1/0/2 remote 1.1.1.2
      hrp base config enable
      hrp mirror session enable
      hrp nat resource primary-group
      hrp standby config enable
      undo hrp preempt
      hrp track interface Eth-Trunk1
      hrp enable

      配置防火墙与gateway leaf互联

      CE5

      interface Vlanif100
      ip binding vpn-instance A
      ip address 10.1.100.2 255.255.255.252
      #
      interface Vlanif110
      ip address 10.1.110.2 255.255.255.252
      #
      interface Vlanif200
      ip binding vpn-instance B
      ip address 10.1.200.2 255.255.255.252
      #

      CE6

      interface Vlanif100
      ip binding vpn-instance A
      ip address 10.1.100.2 255.255.255.252
      #
      interface Vlanif110
      ip address 10.1.110.2 255.255.255.252
      #
      interface Vlanif200
      ip binding vpn-instance B
      ip address 10.1.200.2 255.255.255.252
      #

      FW

      vsys enable
      #
      vsys name A
      assign vlan 100
      #
      vsys name B
      assign vlan 200
      #
      interface Vlanif100
      ip binding vpn-instance A
      ip address 10.1.100.1 255.255.255.252
      #
      interface Vlanif110
      ip address 10.1.110.1 255.255.255.252
      service-manage ping permit
      #
      interface Vlanif200
      ip binding vpn-instance B
      ip address 10.1.200.1 255.255.255.252
      #
      switch vsys A
      #
      interface Vlanif 100
      service-manage ping permit
      #
      switch vsys B
      #
      interface Vlanif 200
      service-manage ping permit
      #

      配置防火墙与GATEWAY LEAF的路由

      CE5

      ip route-static 0.0.0.0 0 211.1.1.1
      ip route-static vpn-instance A 0.0.0.0 0 10.1.100.1
      ip route-static vpn-instance B 0.0.0.0 0 10.1.200.1
      #
      bgp 1
      #
      ipv4-family vpn-instance A
      import-route static
      advertise l2vpn evpn //将VPN实例IP路由发布给EVPN实例
      #
      ipv4-family vpn-instance B
      import-route static
      advertise l2vpn evpn
      #

      CE6

      ip route-static 0.0.0.0 0.0.0.0 212.1.1.1
      ip route-static vpn-instance A 0.0.0.0 0.0.0.0 10.1.100.1
      ip route-static vpn-instance B 0.0.0.0 0.0.0.0 10.1.200.1
      #
      bgp 1
      #
      ipv4-family vpn-instance A
      import-route static
      advertise l2vpn evpn
      #
      ipv4-family vpn-instance B
      import-route static
      advertise l2vpn evpn
      #

      FW

      ip route-static 0.0.0.0 0 10.1.110.2

      配置防火墙让租户访问外网

      根墙
      firewall zone trust
      add interface Virtual-if0
      #
      firewall zone untrust
      add interface Vlanif110
      #
      security-policy
      rule name trust-untrust
      source-zone trust
      destination-zone untrust
      action permit
      rule name untrust-trust
      source-zone untrust
      destination-zone trust
      action permit
      #
      //把公网指派给不同虚墙
      vsys name A
      assign global-ip 202.1.1.1 202.1.1.6 free
      #
      vsys name B 2
      assign global-ip 202.1.1.9 202.1.1.14 free
      #
      //根墙充当路由器,把NAT公网地址引流到不同虚墙
      firewall import-flow public 202.1.1.0 202.1.1.7 vpn-instance A
      firewall import-flow public 202.1.1.8 202.1.1.15 vpn-instance B
      #
      虚墙A
      ip route-static 0.0.0.0 0.0.0.0 public
      ip route-static 10.0.10.0 255.255.255.0 10.1.100.2
      ip route-static 10.0.20.0 255.255.255.0 10.1.100.2
      #
      firewall zone trust
      add interface Vlanif100
      #
      firewall zone untrust
      add interface Virtual-if1
      #
      nat address-group net1 0
      mode pat
      section 0 202.1.1.1 202.1.1.2
      #
      nat address-group net2 1
      mode pat
      section 0 202.1.1.3 202.1.1.4
      #
      nat-policy
      rule name net1
      source-zone trust
      destination-zone untrust
      source-address range 10.0.10.1 10.0.10.5
      destination-address 8.8.8.8 mask 255.255.255.255
      action source-nat address-group net1
      rule name net2
      source-zone trust
      destination-zone untrust
      source-address range 10.0.20.1 10.0.20.5
      destination-address 8.8.8.8 mask 255.255.255.255
      action source-nat address-group net2
      #
      security-policy
      rule name internet
      source-zone trust
      destination-zone untrust
      source-address range 10.0.10.1 10.0.10.5
      source-address range 10.0.20.1 10.0.20.5
      destination-address 8.8.8.8 mask 255.255.255.255
      action permit
      #
      虚墙B
      ip route-static 0.0.0.0 0.0.0.0 public
      ip route-static 10.0.30.0 255.255.255.0 10.1.200.2
      ip route-static 10.0.40.0 255.255.255.0 10.1.200.2
      #
      firewall zone trust
      add interface Vlanif200
      #
      firewall zone untrust
      add interface Virtual-if2
      #
      nat address-group net3 2
      mode pat
      section 0 202.1.1.9 202.1.1.10
      #
      nat address-group net4 3
      mode pat
      section 0 202.1.1.11 202.1.1.12
      #
      nat-policy
      rule name net3
      source-zone trust
      destination-zone untrust
      source-address range 10.0.30.1 10.0.30.5
      action source-nat address-group net3
      rule name net4
      source-zone trust
      destination-zone untrust
      source-address range 10.0.40.1 10.0.40.5
      action source-nat address-group net4
      #
      security-policy
      rule name internet
      source-zone trust
      destination-zone untrust
      source-address range 10.0.30.1 10.0.30.5
      source-address range 10.0.40.1 10.0.40.5
      destination-address 8.8.8.8 mask 255.255.255.255
      action permit
      #
      版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/u_11555417/5606039,作者:羊草,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。

      上一篇:nutanix超融合部署案例

      下一篇:大数据环境搭建(二):分布式环境搭建

      相关文章

      2023-03-20 09:38:52

      docker网络故障之网络阻塞

      故障情形今天接到项目上开发人员的问题反馈,客户有一台虚机在安装完docker之后,启动一些docker容器服务时,发现这些容器服务无法正常启动。通过tail -f /var/log/messages查看系统log,发现系统一直在报错,主要内

      2023-03-20 09:38:52
      docker
      查看更多
      推荐标签

      作者介绍

      天翼云小翼
      天翼云用户

      文章

      33561

      阅读量

      5267141

      查看更多

      热门标签

      系统 测试 用户 分布式 Java java 计算机 docker 代码 数据 服务器 数据库 源码 管理 python
      查看更多

      相关产品

      弹性云主机

      随时自助获取、弹性伸缩的云服务器资源

      天翼云电脑(公众版)

      便捷、安全、高效的云电脑服务

      对象存储

      高品质、低成本的云上存储服务

      云硬盘

      为云上计算资源提供持久性块存储

      • 7*24小时售后
      • 无忧退款
      • 免费备案
      • 专家服务
      售前咨询热线
      400-810-9889转1
      关注天翼云
      • 旗舰店
      • 天翼云APP
      • 天翼云微信公众号
      服务与支持
      • 备案中心
      • 售前咨询
      • 智能客服
      • 自助服务
      • 工单管理
      • 客户公告
      • 涉诈举报
      账户管理
      • 管理中心
      • 订单管理
      • 余额管理
      • 发票管理
      • 充值汇款
      • 续费管理
      快速入口
      • 天翼云旗舰店
      • 文档中心
      • 最新活动
      • 免费试用
      • 信任中心
      • 天翼云学堂
      云网生态
      • 甄选商城
      • 渠道合作
      • 云市场合作
      了解天翼云
      • 关于天翼云
      • 天翼云APP
      • 服务案例
      • 新闻资讯
      • 联系我们
      热门产品
      • 云电脑
      • 弹性云主机
      • 云电脑政企版
      • 天翼云手机
      • 云数据库
      • 对象存储
      • 云硬盘
      • Web应用防火墙
      • 服务器安全卫士
      • CDN加速
      热门推荐
      • 云服务备份
      • 边缘安全加速平台
      • 全站加速
      • 安全加速
      • 云服务器
      • 云主机
      • 智能边缘云
      • 应用编排服务
      • 微服务引擎
      • 共享流量包
      更多推荐
      • web应用防火墙
      • 密钥管理
      • 等保咨询
      • 安全专区
      • 应用运维管理
      • 云日志服务
      • 文档数据库服务
      • 云搜索服务
      • 数据湖探索
      • 数据仓库服务
      友情链接
      • 中国电信集团
      • 189邮箱
      • 天翼企业云盘
      • 天翼云盘
      ©2025 天翼云科技有限公司版权所有 增值电信业务经营许可证A2.B1.B2-20090001
      公司地址:北京市东城区青龙胡同甲1号、3号2幢2层205-32室
      • 用户协议
      • 隐私政策
      • 个人信息保护
      • 法律声明
      备案 京公网安备11010802043424号 京ICP备 2021034386号