logo

   上海鸣沃信息科技有限公司Shanghai MingWo Infor  Tec CO., LTD.

  技术文档
您当前所在的位置是:技术文档

配置IPv6 M-LAG Lite示例

2024/10/14 15:06:19

信息内容

配置IPv6 M-LAG Lite示例

适用产品和版本

  • CloudEngine系列交换机V300R020C00或更高版本
  • 如果需要了解软件版本与交换机具体型号的配套信息,请查看硬件中心

组网需求

图1所示,在IPv6网络中,数据中心内部客户希望在接入层实现设备独立,做到控制面隔离以及设备故障隔离,且版本升级不会相互影响的前提下能够双活转发处理。通过配置M-LAG Lite,能够确保多台设备间控制面的解耦,且设备间无须配置心跳链路来同步协议报文即可达到双活转发的目的。

图1 配置IPv6 M-LAG Lite组网图

配置思路

本示例仅包含IPv6 M-LAG Lite的配置,如需配置IPv4&IPv6双协议栈下的M-LAG Lite,请将本示例与配置M-LAG Lite示例结合配置。

采用如下的思路配置:

  1. 配置服务器使用M-LAG Lite方式接入Leaf交换机。

    为了保证Eth-Trunk协商成功,需要保证Leaf1和Leaf2具有相同的LACP系统优先级、Eth-Trunk接口具有相同的接口ID和相同的LACP系统ID。同时,还要求两台Leaf上的Eth-Trunk成员口在LACP协议中的编号不同,以防止LACP协商不成功。

    如果通过支持STP的设备使用跨设备链路聚合(M-LAG Lite)方式接入Leaf交换机,需要在该设备上去使能STP,同时在leaf的下行口上配置stp edged-port enable,否则在该设备上会出现STP震荡。

  2. 配置各个接口的IPv6地址。
  3. 配置Leaf层交换机VLANIF接口相同的IPv6地址和MAC地址,作为服务器的双活网关。
    • Leaf层设备必须是三层网关角色,不能是二层透传设备,即组网部署上实现三层到边。因为如果三层网关设置在Spine设备,服务器以M-LAG Lite方式接入Leaf,那么在Spine网关设备上学习到的服务器的ND表项就会产生两个出口,出现MAC漂移现象,所以服务器以M-LAG Lite方式接入的Leaf层设备必须是组网部署中的三层网关设备。
    • 为实现上述的三层到边,使得服务器到Leaf的流量全部进行三层转发(即使在同一二层域内的流量也进行三层转发),需要在Leaf层交换机上使能ND任意代理。
    • Leaf1和Leaf2配置的网关IPv6地址相同,在Spine上会形成到Leaf的ECMP负载分担。当服务器到Leaf之间的链路发生故障,比如Server1到Leaf1之间的链路故障,双归变为单归时,下行访问Server1的流量可能会因为被ECMP Hash到Leaf1而发生断流。因此,要求Leaf的网关接口能够向路由邻居发布NDP Vlink直连路由,将ND转换的主机路由发布给Spine,然后Leaf上再配置相应的动态路由协议引入直连路由。上述故障发生时,Leaf1上对应Server1的ND表项被删除,NDP Vlink直连路由消失,Spine下行访问Server1的流量转发给Leaf2,保证流量转发正常。
    • 为了保证Server1和Server2的正常互访,Spine学习到Leaf发布的NDP Vlink直连路由后,也需要将此路由发布给其他Leaf。非故障场景下,Leaf上会同时存在ND转换的主机路由(此路由不会被下发到转发表项)以及Spine邻居发布的主机路由,请设置ND转换的主机路由具有较高的优先级,以保证指导转发的是本地的ND表项;当服务器到Leaf之间的链路发生故障,比如Server1到Leaf1之间的链路故障,Leaf1上对应Server1的ND表项被删除,NDP Vlink直连路由消失,Server2访问Server1的流量路径变为:Server2 -> Leaf1 -> Spine1/Spine2 -> Leaf2 -> Server1。
  4. 配置Leaf层与Spine层交换机之间使能路由协议,建立邻居关系。
  5. 配置Leaf层交换机Monitor Link关联上行接口和下行接口,避免因上行链路故障导致用户侧流量无法转发而被丢弃。

操作步骤

  1. 配置跨设备LACP模式链路聚合。

    # 配置Leaf1

    <HUAWEI> system-view [~HUAWEI] sysname Leaf1  //修改设备名称为Leaf1 
    [*HUAWEI] commit [~Leaf1] vlan batch 100 [*Leaf1] interface eth-trunk 10 [*Leaf1-Eth-Trunk10] trunkport 100ge 1/0/3 [*Leaf1-Eth-Trunk10] mode lacp-static [*Leaf1-Eth-Trunk10] lacp system-id 00e0-fc00-0000  //在Leaf1与Leaf2上配置相同的LACP系统ID [*Leaf1-Eth-Trunk10] port link-type trunk [*Leaf1-Eth-Trunk10] port trunk pvid vlan 100 [*Leaf1-Eth-Trunk10] port trunk allow-pass vlan 100 [*Leaf1-Eth-Trunk10] quit [*Leaf1] interface eth-trunk 20 [*Leaf1-Eth-Trunk20] trunkport 100ge 1/0/4 [*Leaf1-Eth-Trunk20] mode lacp-static [*Leaf1-Eth-Trunk20] lacp system-id 00e0-fc00-0001  //在Leaf1与Leaf2上配置相同的LACP系统ID
    [*Leaf1-Eth-Trunk20] port link-type trunk [*Leaf1-Eth-Trunk20] port trunk pvid vlan 100 [*Leaf1-Eth-Trunk20] port trunk allow-pass vlan 100 [*Leaf1-Eth-Trunk20] quit [*Leaf1] lacp priority 100  //在Leaf1与Leaf2上配置相同的LACP系统优先级
    [*Leaf1] commit

    # 配置Leaf2

    <HUAWEI> system-view [~HUAWEI] sysname Leaf2  //修改设备名称为Leaf2 
    [*HUAWEI] commit [~Leaf2] vlan batch 100 [*Leaf2] interface eth-trunk 10 [*Leaf2-Eth-Trunk10] trunkport 100ge 1/0/3 [*Leaf2-Eth-Trunk10] mode lacp-static [*Leaf2-Eth-Trunk10] lacp system-id 00e0-fc00-0000  //在Leaf1与Leaf2上配置相同的LACP系统ID [*Leaf2-Eth-Trunk10] lacp port-id-extension enable  //在leaf2上配置Eth-Trunk成员接口编号扩展,使成员接口编号增加32768,以防止出现两台Leaf上的Eth-Trunk成员口在LACP协议中编号相同的情况
    [*Leaf2-Eth-Trunk10] port link-type trunk [*Leaf2-Eth-Trunk10] port trunk pvid vlan 100 [*Leaf2-Eth-Trunk10] port trunk allow-pass vlan 100 [*Leaf2-Eth-Trunk10] quit [*Leaf2] interface eth-trunk 20 [*Leaf2-Eth-Trunk20] trunkport 100ge 1/0/4 [*Leaf2-Eth-Trunk20] mode lacp-static [*Leaf2-Eth-Trunk20] lacp system-id 00e0-fc00-0001  //在Leaf1与Leaf2上配置相同的LACP系统ID
    [*Leaf2-Eth-Trunk20] lacp port-id-extension enable  //在leaf2上配置Eth-Trunk成员接口编号扩展,使成员接口编号增加32768,以防止出现两台Leaf上的Eth-Trunk成员口在LACP协议中编号相同的情况
    [*Leaf2-Eth-Trunk20] port link-type trunk [*Leaf2-Eth-Trunk20] port trunk pvid vlan 100 [*Leaf2-Eth-Trunk20] port trunk allow-pass vlan 100 [*Leaf2-Eth-Trunk20] quit [*Leaf2] lacp priority 100  //在Leaf1与Leaf2上配置相同的LACP系统优先级
    [*Leaf2] commit

  2. 配置接口以及接口的IPv6地址。

    # 配置Spine1

    <HUAWEI> system-view [~HUAWEI] sysname Spine1  //修改设备名称为Spine1 
    [*HUAWEI] commit [~Spine1] interface 100ge 1/0/1 [~Spine1-100GE1/0/1] undo portswitch [*Spine1-100GE1/0/1] port-isolate l3 enable [*Spine1-100GE1/0/1] ipv6 enable  
    [*Spine1-100GE1/0/1] ipv6 address 2001:db8:1::1 64 [*Spine1-100GE1/0/1] quit [*Spine1] interface 100ge 1/0/2 [*Spine1-100GE1/0/2] undo portswitch [*Spine1-100GE1/0/2] port-isolate l3 enable [*Spine1-100GE1/0/2] ipv6 enable [*Spine1-100GE1/0/2] ipv6 address 2001:db8:3::1 64 [*Spine1-100GE1/0/2] quit [*Spine1] commit

    # 配置Spine2

    <HUAWEI> system-view [~HUAWEI] sysname Spine2  //修改设备名称为Spine2 
    [*HUAWEI] commit [~Spine2] interface 100ge 1/0/1 [~Spine2-100GE1/0/1] undo portswitch [*Spine2-100GE1/0/1] port-isolate l3 enable [*Spine2-100GE1/0/1] ipv6 enable [*Spine2-100GE1/0/1] ipv6 address 2001:db8:4::1 64 [*Spine2-100GE1/0/1] quit [*Spine2] interface 100ge 1/0/2 [*Spine2-100GE1/0/2] undo portswitch [*Spine2-100GE1/0/2] port-isolate l3 enable [*Spine2-100GE1/0/2] ipv6 enable [*Spine2-100GE1/0/2] ipv6 address 2001:db8:2::1 64 [*Spine2-100GE1/0/2] quit [*Spine2] commit

    # 配置Leaf1

    [~Leaf1] interface 100ge 1/0/1 [~Leaf1-100GE1/0/1] undo portswitch [*Leaf1-100GE1/0/1] port-isolate l3 enable [*Leaf1-100GE1/0/1] ipv6 enable 
    [*Leaf1-100GE1/0/1] ipv6 address 2001:db8:1::2 64 [*Leaf1-100GE1/0/1] quit [*Leaf1] interface 100ge 1/0/2 [*Leaf1-100GE1/0/2] undo portswitch [*Leaf1-100GE1/0/2] port-isolate l3 enable [*Leaf1-100GE1/0/2] ipv6 enable 
    [*Leaf1-100GE1/0/2] ipv6 address 2001:db8:2::2 64 [*Leaf1-100GE1/0/2] quit [*Leaf1] commit

    # 配置Leaf2

    [~Leaf2] interface 100ge 1/0/1 [~Leaf2-100GE1/0/1] undo portswitch [*Leaf2-100GE1/0/1] port-isolate l3 enable  
    [*Leaf2-100GE1/0/1] ipv6 enable 
    [*Leaf2-100GE1/0/1] ipv6 address 2001:db8:4::2 64 [*Leaf2-100GE1/0/1] quit [*Leaf2] interface 100ge 1/0/2 [*Leaf2-100GE1/0/2] undo portswitch [*Leaf2-100GE1/0/2] port-isolate l3 enable 
    [*Leaf2-100GE1/0/2] ipv6 enable 
    [*Leaf2-100GE1/0/2] ipv6 address 2001:db8:3::2 64 [*Leaf2-100GE1/0/2] quit [*Leaf2] commit

  3. 配置Leaf层交换机VLANIF接口相同的IPv6地址和MAC地址,作为接入服务器的双活网关。

    # 配置Leaf1

    [~Leaf1] interface vlanif 100 [*Leaf1-Vlanif100] ipv6 enable [*Leaf1-Vlanif100] ipv6 address 2001:db8:100::1 64 [*Leaf1-Vlanif100] ipv6 address FE80::300:3EFF:FE11:985 link-local [*Leaf1-Vlanif100] mac-address 0000-5e00-0101 [*Leaf1-Vlanif100] ipv6 nd proxy anyway enable  //使能ND任意代答功能。Leaf捕获服务器发送的NS请求报文后,会使用自己的三层网关接口的接口MAC进行NA应答,这样服务器的上行流量到达Leaf层后,都会进行三层转发
    [*Leaf1-Vlanif100] ipv6 nd delete trigger link-down enable  //使能链路Down时ND表项快速删除功能,当成员端口Down时,该端口下的ND表项就会立即删除
    [*Leaf1-Vlanif100] ipv6 nd direct-route enable   //使能接口发布NDP Vlink直连路由功能,然后通过路由协议引入直连路由,可以将ND转换的主机路由发布给路由邻居,避免在链路故障时形成路由黑洞
    [*Leaf1-Vlanif100] ipv6 nd direct-route preference 1  //配置NDP Vlink直连路由的优先级为1
    [*Leaf1-Vlanif100] ipv6 nd direct-route delay 120   //(可选)为了避免由于IPv6 NDP Vlink直连路由建立慢,但是路由引流快导致的流量丢失问题,可以配置延迟发布IPv6 NDP Vlink直连路由的时间
    [*Leaf1-Vlanif100] quit 
    [*Leaf1] commit

    # 配置Leaf2

    [~Leaf2] interface vlanif 100 [*Leaf2-Vlanif100] ipv6 enable [*Leaf2-Vlanif100] ipv6 address 2001:db8:100::1 64 [*Leaf2-Vlanif100] ipv6 address FE80::300:3EFF:FE11:985 link-local [*Leaf2-Vlanif100] mac-address 0000-5e00-0101 [*Leaf2-Vlanif100] ipv6 nd proxy anyway enable  //使能ND任意代答功能。Leaf捕获服务器发送的NS请求报文后,会使用自己的三层网关接口的接口MAC进行NA应答,这样服务器的上行流量到达Leaf层后,都会进行三层转发
    [*Leaf2-Vlanif100] ipv6 nd delete trigger link-down enable  //使能链路Down时ND表项快速删除功能,当成员端口Down时,该端口下的ND表项就会立即删除
    [*Leaf2-Vlanif100] ipv6 nd direct-route enable   //使能接口发布NDP Vlink直连路由功能,然后通过路由协议引入直连路由,可以将ND转换的主机路由发布给路由邻居,避免在链路故障时形成路由黑洞
    [*Leaf2-Vlanif100] ipv6 nd direct-route preference 1  //配置NDP Vlink直连路由的优先级为1
    [*Leaf2-Vlanif100] ipv6 nd direct-route delay 120    //(可选)为了避免由于IPv6 NDP Vlink直连路由建立慢,但是路由引流快导致的流量丢失问题,可以配置延迟发布IPv6 NDP Vlink直连路由的时间
    [*Leaf2-Vlanif100] quit 
    [*Leaf2] commit

  4. 汇聚层和接入层交换机间配置BGP路由协议,实现三层互通。

    # 配置Spine1

    [~Spine1] bgp 65009 [*Spine1-bgp] router-id 172.16.1.1 [*Spine1-bgp] group leaf external 
    [*Spine1-bgp] peer 2001:db8:1::2 as-number 65020 [*Spine1-bgp] peer 2001:db8:1::2 group leaf [*Spine1-bgp] peer 2001:db8:3::2 as-number 65021 [*Spine1-bgp] peer 2001:db8:3::2 group leaf [*Spine1-bgp] timer keepalive 10 hold 30 [*Spine1-bgp] ipv6-family unicast [*Spine1-bgp-af-ipv6] load-balancing as-path-relax  //路由在形成负载分担时不比较相同长度的AS-Path属性,确保不同Leaf发给Spine的路由可以形成负载分担
    [*Spine1-bgp-af-ipv6] preference 20 200 10 [*Spine1-bgp-af-ipv6] peer 2001:db8:1::2 enable [*Spine1-bgp-af-ipv6] peer 2001:db8:3::2 enable [*Spine1-bgp-af-ipv6] network 2001:db8:1:: 64 [*Spine1-bgp-af-ipv6] network 2001:db8:3:: 64 [*Spine1-bgp-af-ipv6] maximum load-balancing 32 [*Spine1-bgp-af-ipv6] quit [*Spine1-bgp] quit [*Spine1] commit

    # 配置Spine2

    [~Spine2] bgp 65009 [*Spine2-bgp] router-id 172.16.2.1 [*Spine2-bgp] group leaf external 
    [*Spine2-bgp] peer 2001:db8:2::2 as-number 65020 [*Spine2-bgp] peer 2001:db8:2::2 group leaf [*Spine2-bgp] peer 2001:db8:4::2 as-number 65021 [*Spine2-bgp] peer 2001:db8:4::2 group leaf [*Spine2-bgp] timer keepalive 10 hold 30 [*Spine2-bgp] ipv6-family unicast [*Spine2-bgp-af-ipv6] load-balancing as-path-relax  //路由在形成负载分担时不比较相同长度的AS-Path属性,确保不同Leaf发给Spine的路由可以形成负载分担
    [*Spine2-bgp-af-ipv6] preference 20 200 10 [*Spine2-bgp-af-ipv6] peer 2001:db8:2::2 enable [*Spine2-bgp-af-ipv6] peer 2001:db8:4::2 enable [*Spine2-bgp-af-ipv6] network 2001:db8:2:: 64 [*Spine2-bgp-af-ipv6] network 2001:db8:4:: 64 [*Spine2-bgp-af-ipv6] maximum load-balancing 32 [*Spine2-bgp-af-ipv6] quit [*Spine2-bgp] quit [*Spine2] commit

    # 配置Leaf1

    [~Leaf1] bgp 65020 [*Leaf1-bgp] router-id 172.16.3.1 [*Leaf1-bgp] group spine external [*Leaf1-bgp] peer spine as-number 65009  
    [*Leaf1-bgp] peer 2001:db8:1::1 as-number 65009 [*Leaf1-bgp] peer 2001:db8:1::1 group spine [*Leaf1-bgp] peer 2001:db8:2::1 as-number 65009 [*Leaf1-bgp] peer 2001:db8:2::1 group spine [*Leaf1-bgp] timer keepalive 10 hold 30 [*Leaf1-bgp] ipv6-family unicast [*Leaf1-bgp-af-ipv6] preference 20 200 10 [*Leaf1-bgp-af-ipv6] peer 2001:db8:1::1 enable [*Leaf1-bgp-af-ipv6] peer 2001:db8:2::1 enable [*Leaf1-bgp-af-ipv6] network 2001:db8:1:: 64 [*Leaf1-bgp-af-ipv6] network 2001:db8:2:: 64 [*Leaf1-bgp-af-ipv6] network 2001:db8:100:: 64 [*Leaf1-bgp-af-ipv6] import-route direct //引入直连路由学习到的路由信息,可以根据实际组网情况配置路由策略过滤掉非必要的路由
    [*Leaf1-bgp-af-ipv6] maximum load-balancing 32 [*Leaf1-bgp-af-ipv6] quit [*Leaf1-bgp] quit [*Leaf1] commit

    # 配置Leaf2

    [~Leaf2] bgp 65021 [*Leaf2-bgp] router-id 172.16.4.1 [*Leaf2-bgp] group spine external [*Leaf2-bgp] peer spine as-number 65009  
    [*Leaf2-bgp] peer 2001:db8:3::1 as-number 65009 [*Leaf2-bgp] peer 2001:db8:3::1 group spine [*Leaf2-bgp] peer 2001:db8:4::1 as-number 65009 [*Leaf2-bgp] peer 2001:db8:4::1 group spine [*Leaf2-bgp] timer keepalive 10 hold 30 [*Leaf2-bgp] ipv6-family unicast [*Leaf2-bgp-af-ipv6] preference 20 200 10 [*Leaf2-bgp-af-ipv6] peer 2001:db8:3::1 enable [*Leaf2-bgp-af-ipv6] peer 2001:db8:4::1 enable [*Leaf2-bgp-af-ipv6] network 2001:db8:3:: 64 [*Leaf2-bgp-af-ipv6] network 2001:db8:4:: 64 [*Leaf2-bgp-af-ipv6] network 2001:db8:100:: 64 [*Leaf2-bgp-af-ipv6] import-route direct //引入直连路由学习到的路由信息,可以根据实际组网情况配置路由策略过滤掉非必要的路由
    [*Leaf2-bgp-af-ipv6] maximum load-balancing 32 [*Leaf2-bgp-af-ipv6] quit [*Leaf2-bgp] quit [*Leaf2] commit

    本文以Leaf1和Leaf2配置不同AS作为举例说明。对于Leaf1和Leaf2配置相同AS场景,需要增加配置命令peer allow-as-loop,以确保不同Leaf的路由经过Spine后,能将路由发布给对方。

  5. 配置Leaf层交换机Monitor Link组关联上下行接口

    # 配置Leaf1

    [~Leaf1] monitor-link group 1 [*Leaf1-mtlk-group1] port 100ge 1/0/1 uplink [*Leaf1-mtlk-group1] port 100ge 1/0/2 uplink [*Leaf1-mtlk-group1] port eth-trunk 10 downlink 1 [*Leaf1-mtlk-group1] port eth-trunk 20 downlink 2 [*Leaf1-mtlk-group1] timer recover-time 60 [*Leaf1-mtlk-group1] quit [*Leaf1] commit

    # 配置Leaf2

    [~Leaf2] monitor-link group 1 [*Leaf2-mtlk-group1] port 100ge 1/0/1 uplink [*Leaf2-mtlk-group1] port 100ge 1/0/2 uplink [*Leaf2-mtlk-group1] port eth-trunk 10 downlink 1 [*Leaf2-mtlk-group1] port eth-trunk 20 downlink 2 [*Leaf2-mtlk-group1] timer recover-time 60 [*Leaf2-mtlk-group1] quit [*Leaf2] commit

检查配置结果

  • 查看设备的Eth-Trunk信息,查看M-LAG Lite已与服务器协商成功,端口状态为Up。

    [~Leaf1] display eth-trunk 10 Eth-Trunk10's state information is:
    Local:
    LAG ID: 10                      Working Mode: Static
    Preempt Delay: Disabled         Hash Arithmetic: profile default
    System Priority: 100            System ID: 00e0-fc00-0000
    Least Active-linknumber: 1      Max Active-linknumber: 32 
    Operating Status: up            Number Of Up Ports In Trunk: 1
    Timeout Period: Slow
    PortKeyMode: Auto          
    --------------------------------------------------------------------------------
    ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
    100GE1/0/3             Selected 100GE    32768   1      2625    10111100  1     
    
    Partner:
    --------------------------------------------------------------------------------
    ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
    100GE1/0/3             32768    00e0-fc12-2401  32768   1      2625    10111100 
    [~Leaf1] display eth-trunk 20 Eth-Trunk20's state information is:
    Local:
    LAG ID: 20                      Working Mode: Static
    Preempt Delay: Disabled         Hash Arithmetic: profile default
    System Priority: 100            System ID: 00e0-fc00-0001
    Least Active-linknumber: 1      Max Active-linknumber: 32 
    Operating Status: up            Number Of Up Ports In Trunk: 1
    Timeout Period: Slow 
    PortKeyMode: Auto         
    --------------------------------------------------------------------------------
    ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
    100GE1/0/4             Selected 100GE    32768   2      5185    10111100  1     
    
    Partner:
    --------------------------------------------------------------------------------
    ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
    100GE1/0/4             32768    00e0-fc39-8b01  32768   1      5185    10111100
  • 查看Server1和Server2是否可以互通。

    # 配置Server1和Server2的IPv6地址分别为2001:db8:100::2/64和2001:db8:100::3/64。

    # 配置完成后,Server1和Server2之间可以互相Ping通。

配置脚本

  • Spine1的配置脚本
    #
    sysname Spine1
    #
    interface 100GE1/0/1
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:1::1/64
     port-isolate l3 enable 
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:3::1/64
     port-isolate l3 enable 
    #
    bgp 65009
     router-id 172.16.1.1 
     timer keepalive 10 hold 30
     group leaf external
     peer 2001:DB8:1::2 as-number 65020
     peer 2001:DB8:1::2 group leaf
     peer 2001:DB8:3::2 as-number 65021
     peer 2001:DB8:3::2 group leaf
     #
     ipv6-family unicast
      preference 20 200 10 
      network 2001:DB8:1:: 64                                                       
      network 2001:DB8:3:: 64 
      maximum load-balancing 32
      peer 2001:DB8:1::2 enable                                                     
      peer 2001:DB8:3::2 enable
      load-balancing as-path-relax
    #
    return
  • Spine2的配置脚本
    #
    sysname Spine2
    #
    interface 100GE1/0/1
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:4::1/64
     port-isolate l3 enable
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:2::1/64
     port-isolate l3 enable
    #
    bgp 65009
     router-id 172.16.2.1 
     timer keepalive 10 hold 30
     group leaf external
     peer 2001:DB8:2::2 as-number 65020
     peer 2001:DB8:2::2 group leaf
     peer 2001:DB8:4::2 as-number 65021
     peer 2001:DB8:4::2 group leaf
     #
     ipv6-family unicast
      preference 20 200 10 
      network 2001:DB8:2:: 64                                                       
      network 2001:DB8:4:: 64   
      maximum load-balancing 32
      peer 2001:DB8:2::2 enable                                                     
      peer 2001:DB8:4::2 enable
      load-balancing as-path-relax
    #
    return
  • Leaf1的配置脚本
    #
    sysname Leaf1
    #
    vlan batch 100
    #
    lacp priority 100
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2001:DB8:100::1/64
     ipv6 address FE80::300:3EFF:FE11:985 link-local
     mac-address 0000-5e00-0101
     ipv6 nd proxy anyway enable ipv6 nd delete trigger link-down enable
     ipv6 nd direct-route enable
     ipv6 nd direct-route delay 120
     ipv6 nd direct-route preference 1
    #
    interface Eth-Trunk10
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
     mode lacp-static
     lacp system-id 00e0-fc00-0000
    #
    interface Eth-Trunk20
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
     mode lacp-static
     lacp system-id 00e0-fc00-0001
    #
    interface 100GE1/0/1
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:1::2/64
     port-isolate l3 enable 
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:2::2/64
     port-isolate l3 enable
    #
    interface 100GE1/0/3
     eth-trunk 10
    #
    interface 100GE1/0/4
     eth-trunk 20
    #
    monitor-link group 1
     port 100GE1/0/1 uplink
     port 100GE1/0/2 uplink
     port Eth-Trunk10 downlink 1
     port Eth-Trunk20 downlink 2
     timer recover-time 60
    #
    bgp 65020
     router-id 172.16.3.1 
     timer keepalive 10 hold 30
     group spine external
     peer spine as-number 65009
     peer 2001:DB8:1::1 as-number 65009
     peer 2001:DB8:1::1 group spine
     peer 2001:DB8:2::1 as-number 65009
     peer 2001:DB8:2::1 group spine
     #
     ipv6-family unicast
      preference 20 200 10 
      network 2001:DB8:1:: 64
      network 2001:DB8:2:: 64
      network 2001:DB8:100:: 64
      import-route direct 
      maximum load-balancing 32
      peer 2001:DB8:1::1 enable
      peer 2001:DB8:2::1 enable
    #
    return
  • Leaf2的配置脚本
    #
    sysname Leaf2
    #
    vlan batch 100
    #
    lacp priority 100
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2001:DB8:100::1/64
     ipv6 address FE80::300:3EFF:FE11:985 link-local
     mac-address 0000-5e00-0101
     ipv6 nd proxy anyway enable ipv6 nd delete trigger link-down enable
     ipv6 nd direct-route enable
     ipv6 nd direct-route delay 120
     ipv6 nd direct-route preference 1
    #
    interface Eth-Trunk10
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
     mode lacp-static
     lacp system-id 00e0-fc00-0000
     lacp port-id-extension enable 
    #
    interface Eth-Trunk20
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
     mode lacp-static
     lacp system-id 00e0-fc00-0001
     lacp port-id-extension enable 
    #
    interface 100GE1/0/1
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:4::2/64
     port-isolate l3 enable 
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:3::2/64
     port-isolate l3 enable
    #
    interface 100GE1/0/3
     eth-trunk 10
    #
    interface 100GE1/0/4
     eth-trunk 20
    #
    monitor-link group 1
     port 100GE1/0/1 uplink
     port 100GE1/0/2 uplink
     port Eth-Trunk10 downlink 1
     port Eth-Trunk20 downlink 2
     timer recover-time 60
    #
    bgp 65021
     router-id 172.16.4.1 
     timer keepalive 10 hold 30
     group spine external
     peer spine as-number 65009
     peer 2001:DB8:3::1 as-number 65009
     peer 2001:DB8:3::1 group spine
     peer 2001:DB8:4::1 as-number 65009
     peer 2001:DB8:4::1 group spine
     #
     ipv6-family unicast
      preference 20 200 10 
      network 2001:DB8:3:: 64
      network 2001:DB8:4:: 64
      network 2001:DB8:100:: 64                                                     
      import-route direct
      maximum load-balancing 32
      peer 2001:DB8:3::1 enable
      peer 2001:DB8:4::1 enable
    #
    return
[←]配置分布式网关部署方式的IPv6 VXLAN示例 [→]华为交换机S12700系配置BGP/MPLS IP VPN示例

                                                                                                   沪ICP备11005944号| 网站所有©上海鸣沃信息科技有限公司

华为防火墙 华为交换机 华为无线 华为路由器 华为租赁 H3C交换机 H3C防火墙 H3C无线 H3C路由器 H3C租赁 思科交换机 思科防火墙 思科无线 思科路由器 思科租赁  CISCO交换机租赁 CISCO防火墙租赁