配置华为交换机动态路由接入M-LAG示例

适用产品和版本

CE16800、CE6881、CE6820、CE6863、CE6863E、CE5881、CE6881K、CE6881E、CE6863K系列交换机V200R020C00或更高版本。

CE12800、CE8850EI、CE8861EI、CE8868EI、CE6856HI、CE6857EI、CE6857E、CE6857F、CE6857F、CE6865EI、CE6865E、CE8850E-32CQ-EI、CE6870EI系列交换机V200R021C00或更高版本。

如果需要了解软件版本与交换机具体型号的配套信息,请查看硬件查询工具

组网需求

图1-22所示,SwitchB和SwitchC组成M-LAG系统,SwitchB和SwitchC的M-LAG端口支持动态路由协议,用户在SwitchA上配置动态路由通过三层路由方式接入到M-LAG系统。

图1-22 配置动态路由接入M-LAG组网图
表1-18 数据准备表

设备名称

接口编号

VLAN及IP地址

对接设备及接口编号

SwitchA

 

Eth-Trunk 10

  • 10GE1/0/1
  • 10GE1/0/2
  • 10GE1/0/3
  • 10GE1/0/4

VLAN 100:IPv4地址 10.100.0.2/24

VLAN 101:IPv6地址 2001:DB8:101::2/64

VLAN 102:IPv4地址 10.102.0.2/24

VLAN 103:IPv6地址 2001:DB8:103::2/64

SwitchB:Eth-Trunk 10

  • 10GE1/0/2
  • 10GE1/0/3

SwitchC:Eth-Trunk 10

  • 10GE1/0/2
  • 10GE1/0/3

SwitchB

 

 

管理网口

10.200.1.1/24

-

10GE1/0/1

IP地址:192.168.1.1/24

IPv6地址:2001:DB8:1::1/64

SwitchD:10GE1/0/1

Eth-Trunk 1

  • 10GE1/0/4
  • 10GE1/0/5

-

SwitchC:Eth-Trunk 1

  • 10GE1/0/4
  • 10GE1/0/5

Eth-Trunk 10

  • 10GE1/0/2
  • 10GE1/0/3

VLAN 100:IPv4地址 10.100.0.1/24

M-LAG IPv4地址 10.100.0.3/24

VLAN 101:IPv6地址 2001:DB8:101::1/64

M-LAG Link-local地址 FE80:1000::1

VLAN 102:IPv4地址 10.102.0.1/24

M-LAG IPv4地址 10.102.0.3/24

VLAN 103:IPv6地址 2001:DB8:103::1/64

M-LAG IPv6地址 2001:DB8:103::3/64

SwitchA:Eth-Trunk 10

  • 10GE1/0/1
  • 10GE1/0/2

LoopBack 1

10.2.2.2/32

-

LoopBack 2

10.3.3.3/32

-

SwitchC

 

 

管理网口

10.200.2.1/24

-

10GE1/0/1

192.168.2.1/24

2001:DB8:2::1/64

SwitchD:10GE1/0/2

Eth-Trunk 1

  • 10GE1/0/4
  • 10GE1/0/5

-

SwitchB:Eth-Trunk 1

  • 10GE1/0/4
  • 10GE1/0/5

Eth-Trunk 10

  • 10GE1/0/2
  • 10GE1/0/3

VLAN 100:

IPv4地址 10.100.0.1/24

M-LAG IPv4地址 10.100.0.4/24

VLAN 101:

IPv6地址 2001:DB8:101::1/64

M-LAG Link-local地址 FE80:1000::2

VLAN 102:

IPv4地址 10.102.0.1/24

M-LAG IPv4地址 10.102.0.4/24

VLAN 103:

IPv6地址 2001:DB8:103::1/64

M-LAG IPv6地址 2001:DB8:103::4/64

SwitchA:Eth-Trunk 10

  • 10GE1/0/3
  • 10GE1/0/4

LoopBack 1

10.2.2.2/32

-

LoopBack 2

10.4.4.4/32

-

SwitchD

10GE1/0/1

192.168.1.2/24

2001:DB8:1::2/64

SwitchB:10GE1/0/1

10GE1/0/2

192.168.2.2/24

2001:DB8:2::2/64

SwitchC:10GE1/0/1

LoopBack 1

10.1.1.1/32

-

配置思路

采用如下的思路配置:

  1. 配置SwitchA、SwitchB、SwitchC建立M-LAG系统。
    • 配置SwitchB和SwitchC的V-STP。
    • 配置SwitchB和SwitchC的DFS Group并绑定管理网口的IP地址。
    • 配置SwitchB和SwitchC之间的peer-link链路。
    • 配置SwitchB和SwitchC的M-LAG成员接口,SwitchA的Eth-Trunk接口。
    • 配置SwitchB和SwitchC的Monitor Link功能。

      Monitor Link将上行接口和下行接口关联,避免因上行链路故障导致用户侧流量无法转发而丢弃。

  2. 配置OSPF接入M-LAG。
    • 配置SwitchB、SwitchC、SwitchD的路由协议OSPF,实现网络三层互通。
    • 配置SwitchB和SwitchC的动态路由OSPF接入M-LAG的IPv4地址。

      SwitchB和SwitchC上需要配置不一样的M-LAG IPv4地址,否则会导致路由协议邻居建立不起来。

    • 配置SwitchA和M-LAG成员设备建立动态路由OSPF的IP地址。
  3. 配置OSPFv3接入M-LAG。
    • 配置SwitchB、SwitchC、SwitchD的路由协议OSPFv3,实现网络三层互通。
    • 配置SwitchB和SwitchC的动态路由OSPFv3接入M-LAG的Link-local地址。

      SwitchB和SwitchC上需要配置不一样的M-LAG Link-local地址,否则会导致路由协议邻居建立不起来。

    • 配置SwitchA和M-LAG成员设备建立动态路由OSPFv3的IPv6地址。
  4. 配置BGP接入M-LAG。
    • 配置SwitchB、SwitchC、SwitchD的路由协议BGP,实现网络三层互通。
    • 配置SwitchB和SwitchC的动态路由BGP接入M-LAG的IPv4地址。

      SwitchB和SwitchC上需要配置不一样的M-LAG IPv4地址,否则会导致路由协议邻居建立不起来。

    • 配置SwitchA和M-LAG成员设备(SwitchB、SwitchC)建立动态路由BGP的对等体。
  5. 配置BGP4+接入M-LAG。
    • 配置SwitchB、SwitchC、SwitchD的路由协议BGP4+,实现网络三层互通。
    • 配置SwitchB和SwitchC的动态路由BGP接入M-LAG的IPv6地址。

      SwitchB和SwitchC上需要配置不一样的M-LAG IPv6地址,否则会导致路由协议邻居建立不起来。

    • 配置SwitchA和M-LAG成员设备(SwitchB、SwitchC)建立动态路由BGP4+的对等体和引入路由。

操作步骤

  1. 配置SwitchA、SwitchB、SwitchC建立M-LAG系统。
    1. 配置SwitchB和SwitchC的V-STP。

       

      # 配置SwitchB。SwitchC的配置与SwitchB类似,这里不再赘述。

      <HUAWEI> system-view
      [~HUAWEI] sysname SwitchB
      [*HUAWEI] commit
      [~SwitchB] stp mode rstp
      [*SwitchB] stp v-stp enable
      [*SwitchB] commit

       

    2. 配置SwitchB和SwitchC的DFS Group并绑定管理网口的IP地址。

       

      SwitchB和SwitchC管理网口需要保证能够三层互通。

      # 配置SwitchB。SwitchC的配置与SwitchB类似,这里不再赘述。

      [~SwitchB] dfs-group 1
      [*SwitchB-dfs-group-1] source ip 10.200.1.1
      [*SwitchB-dfs-group-1] quit
      [*SwitchB] commit

       

    3. 配置SwitchB和SwitchC之间的peer-link链路。

       

      # 配置SwitchB。SwitchC的配置与SwitchB类似,这里不再赘述。

      [~SwitchB] interface eth-trunk 1
      [*SwitchB-Eth-Trunk1] mode lacp-static
      [*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/4
      [*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/5
      [*SwitchB-Eth-Trunk1] peer-link 1
      [*SwitchB-Eth-Trunk1] quit
      [*SwitchB] commit

       

    4. 配置SwitchB和SwitchC的M-LAG成员接口,SwitchA的Eth-Trunk接口。

       

      # 配置SwitchB。SwitchC的配置与SwitchB类似,这里不再赘述。

      [~SwitchB] interface eth-trunk 10
      [*SwitchB-Eth-Trunk10] mode lacp-static
      [*SwitchB-Eth-Trunk10] port link-type trunk
      [*SwitchB-Eth-Trunk10] lacp mixed-rate link enable
      [*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/2
      [*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/3
      [*SwitchB-Eth-Trunk10] dfs-group 1 m-lag 1
      [*SwitchB-Eth-Trunk10] quit
      [*SwitchB] commit

      # 配置SwitchA。

      <HUAWEI> system-view
      [~HUAWEI] sysname SwitchA
      [*HUAWEI] commit
      [~SwitchA] interface eth-trunk 10
      [*SwitchA-Eth-Trunk10] mode lacp-static
      [*SwitchA-Eth-Trunk10] port link-type trunk
      [*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/1 to 1/0/4
      [*SwitchA-Eth-Trunk10] quit
      [*SwitchA] commit

       

    5. 配置SwitchB和SwitchC的Monitor Link功能。

       

      # 配置SwitchB。SwitchC的配置与SwitchB类似,这里不再赘述。

      [~SwitchB] monitor-link group 1
      [*SwitchB-mtlk-group1] port 10ge 1/0/1 uplink
      [*SwitchB-mtlk-group1] port eth-trunk 10 downlink 1
      [*SwitchB-mtlk-group1] quit
      [*SwitchB] commit

       

  2. 配置OSPF接入M-LAG。
    1. 配置SwitchB、SwitchC、SwitchD的路由协议OSPF,实现网络三层互通。

       

      # 配置SwitchB。SwitchC和SwitchD的配置与SwitchB类似,这里不再赘述。配置OSPF时,注意需要发布32位Loopback接口地址。

      [~SwitchB] interface loopback 1
      [*SwitchB-LoopBack1] ip address 10.2.2.2 32
      [*SwitchB-LoopBack1] quit
      [*SwitchB] interface loopback 2
      [*SwitchB-LoopBack2] ip address 10.3.3.3 32
      [*SwitchB-LoopBack2] quit
      [*SwitchB] interface 10ge 1/0/1
      [*SwitchB-10GE1/0/1] undo portswitch
      [*SwitchB-10GE1/0/1] ip address 192.168.1.1 24
      [*SwitchB-10GE1/0/1] quit
      [*SwitchB] ospf 1 router-id 11.1.1.1
      [*SwitchB-ospf-1] area 0
      [*SwitchB-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.0
      [*SwitchB-ospf-1-area-0.0.0.0] network 10.3.3.3 0.0.0.0
      [*SwitchB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
      [*SwitchB-ospf-1-area-0.0.0.0] quit
      [*SwitchB-ospf-1] quit
      [*SwitchB] commit

      OSPF成功配置后,SwitchB、SwitchC、SwitchD之间可通过OSPF协议发现对方的Loopback接口的IP地址,并能互相ping通。

       

    2. 配置SwitchB和SwitchC的动态路由OSPF接入M-LAG的IPv4地址。

       

      # 配置SwitchB。

      [~SwitchB] vlan 100
      [*SwitchB-vlan100] quit
      [*SwitchB] interface vlanif 100
      [*SwitchB-Vlanif100] ip address 10.100.0.1 255.255.255.0
      [*SwitchB-Vlanif100] m-lag ip address 10.100.0.3 255.255.255.0
      [*SwitchB-Vlanif100] ospf source sub-address 10.100.0.3
      [*SwitchB-Vlanif100] mac-address 0000-5e00-0101
      [*SwitchB-Vlanif100] quit
      [*SwitchB] commit
      [~SwitchB] interface eth-trunk 10
      [*SwitchB-Eth-Trunk10]port trunk allow-pass vlan 100
      [*SwitchB-Eth-Trunk10]quit
      [*SwitchB] commit
      [~SwitchB] ospf
      [~SwitchB-ospf-1] area 0
      [~SwitchB-ospf-1-area-0.0.0.0] network 10.100.0.0 0.0.0.255
      [*SwitchB-ospf-1-area-0.0.0.0] quit
      [*SwitchB-ospf-1] quit
      [*SwitchB] commit

      # 配置SwitchC。

      [~SwitchC] vlan 100
      [*SwitchC-vlan100] quit
      [*SwitchC] interface vlanif 100
      [*SwitchC-Vlanif100] ip address 10.100.0.1 255.255.255.0
      [*SwitchC-Vlanif100] m-lag ip address 10.100.0.4 255.255.255.0
      [*SwitchC-Vlanif100] ospf source sub-address 10.100.0.4
      [*SwitchC-Vlanif100] mac-address 0000-5e00-0101
      [*SwitchC-Vlanif100] quit
      [*SwitchC] commit
      [~SwitchC] interface eth-trunk 10
      [*SwitchC-Eth-Trunk10]port trunk allow-pass vlan 100
      [*SwitchC-Eth-Trunk10]quit
      [~SwitchC] ospf
      [~SwitchC-ospf-1] area 0
      [~SwitchC-ospf-1-area-0.0.0.0] network 10.100.0.0 0.0.0.255
      [*SwitchC-ospf-1-area-0.0.0.0] quit
      [*SwitchC-ospf-1] quit
      [*SwitchC] commit

       

    3. 配置SwitchA和M-LAG成员设备建立动态路由OSPF的IP地址。

       

      # 配置SwitchA。

      [~SwitchA] vlan 100
      [*SwitchA-vlan100] quit
      [*SwitchA] interface vlanif 100
      [*SwitchA-Vlanif100] ip address 10.100.0.2 255.255.255.0
      [*SwitchA-Vlanif100] quit
      [*SwitchA] commit
      [~SwitchA] interface eth-trunk 10
      [*SwitchA-Eth-Trunk10]port trunk allow-pass vlan 100
      [*SwitchA-Eth-Trunk10]quit
      [*SwitchA] ospf 1 router-id 11.4.4.4
      [*SwitchA-ospf-1] area 0
      [*SwitchA-ospf-1-area-0.0.0.0] network 10.100.0.0 0.0.0.255
      [*SwitchA-ospf-1-area-0.0.0.0] quit
      [*SwitchA-ospf-1] quit
      [*SwitchA] commit

       

  3. 配置OSPFv3接入M-LAG。
    1. 配置SwitchB、SwitchC、SwitchD的路由协议OSPFv3,实现网络三层互通。

       

      # 配置SwitchB。SwitchC和SwitchD的配置与SwitchB类似,这里不再赘述。

      [~SwitchB] interface 10ge 1/0/1
      [*SwitchB-10GE1/0/1] ipv6 enable
      [*SwitchB-10GE1/0/1] ipv6 address 2001:db8:1::1/64
      [*SwitchB-10GE1/0/1] quit
      [*SwitchB] ospfv3 1 
      [*SwitchB-ospfv3-1] router-id 10.12.12.12
      [*SwitchB-ospfv3-1] area 0
      [*SwitchB-ospfv3-1-area-0.0.0.0] quit
      [*SwitchB-ospfv3-1] quit
      [*SwitchB] commit
      [~SwitchB] interface 10ge 1/0/1
      [*SwitchB-10GE1/0/1] ospfv3 1 area 0
      [*SwitchB-10GE1/0/1] quit
      [*SwitchB] commit

      OSPFv3成功配置后,SwitchB、SwitchC、SwitchD之间可以建立OSPFv3邻居,且状态为Full。

      [~SwitchD] display ospfv3 peer                                              
      OSPFv3 Process (1)                                                              
      Total number of peer(s): 2                                                      
       Peer(s) in full state: 2                                                       
      OSPFv3 Area (0.0.0.0)                                                           
      Neighbor ID      Pri State            Dead Time  Interface          Instance ID 
      10.12.12.12        1 Full/Backup      00:00:37   10GE1/0/1             0        
      10.14.14.14        1 Full/DROther     00:00:38   10GE1/0/2             0

       

    2. 配置SwitchB和SwitchC的动态路由OSPFv3接入M-LAG的Link-local地址。

       

      # 配置SwitchB。

      [~SwitchB] vlan 101
      [*SwitchB-vlan101] quit
      [*SwitchB] interface vlanif 101
      [*SwitchB-Vlanif101] ipv6 enable
      [*SwitchB-Vlanif101] ipv6 address 2001:db8:101::1/64
      [*SwitchB-Vlanif101] ospfv3 1 area 0.0.0.0
      [*SwitchB-Vlanif101] mac-address 0000-5e00-0102
      [*SwitchB-Vlanif101] m-lag ipv6 address FE80:1000::1 link-local
      [*SwitchB-Vlanif101] quit
      [*SwitchB] commit
      [~SwitchB] interface eth-trunk 10
      [*SwitchB-Eth-Trunk10]port trunk allow-pass vlan 101
      [*SwitchB-Eth-Trunk10]quit
      [*SwitchB] commit

      # 配置SwitchC。

      [~SwitchC] vlan 101
      [*SwitchC-vlan101] quit
      [*SwitchC] interface vlanif 101
      [*SwitchC-Vlanif101] ipv6 enable
      [*SwitchC-Vlanif101] ipv6 address 2001:db8:101::1/64
      [*SwitchC-Vlanif101] ospfv3 1 area 0.0.0.0
      [*SwitchC-Vlanif101] mac-address 0000-5e00-0102
      [*SwitchC-Vlanif101] m-lag ipv6 address FE80:1000::2 link-local
      [*SwitchC-Vlanif101] quit
      [*SwitchC] commit
      [~SwitchC] interface eth-trunk 10
      [*SwitchC-Eth-Trunk10]port trunk allow-pass vlan 101
      [*SwitchC-Eth-Trunk10]quit
      [*SwitchC] commit

       

    3. 配置SwitchA和M-LAG成员设备建立动态路由OSPFv3的IP地址。

       

      # 配置SwitchA。

      [~SwitchA] ospfv3 1 
      [*SwitchA-ospfv3-1] router-id 10.15.15.15
      [*SwitchA-ospfv3-1] area 0
      [*SwitchA-ospfv3-1-area-0.0.0.0] quit
      [*SwitchA-ospfv3-1] quit
      [*SwitchA] commit
      [~SwitchA] vlan 101
      [*SwitchA-vlan101] quit
      [*SwitchA] interface vlanif 101
      [*SwitchA-Vlanif101] ipv6 enable
      [*SwitchA-Vlanif101] ipv6 address 2001:db8:101::2/64
      [*SwitchA-Vlanif101] ospfv3 1 area 0.0.0.0
      [*SwitchA-Vlanif101] quit
      [*SwitchA] commit
      [~SwitchA] interface eth-trunk 10
      [*SwitchA-Eth-Trunk10]port trunk allow-pass vlan 101
      [*SwitchA-Eth-Trunk10]quit
      [*SwitchA] commit

       

  4. 配置BGP接入M-LAG。
    1. 配置SwitchB、SwitchC、SwitchD的路由协议BGP,实现网络三层互通。

       

      # 配置SwitchB的BGP对等体。

      [~SwitchB] bgp 100 
      [*SwitchB-bgp] router-id 11.12.12.12
      [*SwitchB-bgp] peer 192.168.1.2 as-number 200
      [*SwitchB-bgp] quit
      [*SwitchB] commit

      # 配置SwitchC的BGP对等体。

      [~SwitchC] bgp 100 
      [*SwitchC-bgp] router-id 11.14.14.14
      [*SwitchC-bgp] peer 192.168.2.2 as-number 200
      [*SwitchC-bgp] quit
      [*SwitchC] commit

      # 配置SwitchD的BGP对等体。

      [~SwitchD] bgp 200 
      [*SwitchD-bgp] router-id 11.13.13.13
      [*SwitchD-bgp] peer 192.168.1.1 as-number 100
      [*SwitchD-bgp] peer 192.168.2.1 as-number 100
      [*SwitchD-bgp] quit
      [*SwitchD] commit

      BGP成功配置后,SwitchB、SwitchC、SwitchD之间可以建立BGP邻居,且状态为Established。

      [~SwitchD] display bgp peer                                         
       Status codes: * - Dynamic
       BGP local router ID        : 11.13.13.13
       Local AS number            : 200
       Total number of peers      : 2
       Peers in established state : 2
       Total number of dynamic peers : 0
      
        Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv           
        192.168.1.1     4         100        3        3     0 00:00:45 Established    0            
        192.168.2.1     4         100        7        7     0 00:03:52 Established    0

       

    2. 配置SwitchA、SwitchB和SwitchC的动态路由BGP接入M-LAG的IPv4地址。

       

      # 配置SwitchB。

      [~SwitchB] vlan 102
      [*SwitchB-vlan102] quit
      [*SwitchB] interface vlanif 102
      [*SwitchB-Vlanif102] ip address 10.102.0.1 255.255.255.0
      [*SwitchB-Vlanif102] m-lag ip address 10.102.0.3 255.255.255.0
      [*SwitchB-Vlanif102] mac-address 0000-5e00-0103 
      [*SwitchB-Vlanif102] quit
      [*SwitchB] commit
      [~SwitchB] interface eth-trunk 10
      [*SwitchB-Eth-Trunk10]port trunk allow-pass vlan 102
      [*SwitchB-Eth-Trunk10]quit
      [*SwitchB] commit

      # 配置SwitchC。

      [~SwitchC] vlan 102
      [*SwitchC-vlan102] quit
      [*SwitchC] interface vlanif 102
      [*SwitchC-Vlanif102] ip address 10.102.0.1 255.255.255.0
      [*SwitchC-Vlanif102] m-lag ip address 10.102.0.4 255.255.255.0
      [*SwitchC-Vlanif102] mac-address 0000-5e00-0103 
      [*SwitchC-Vlanif102] quit
      [*SwitchC] commit
      [~SwitchC] interface eth-trunk 10
      [*SwitchC-Eth-Trunk10]port trunk allow-pass vlan 102
      [*SwitchC-Eth-Trunk10]quit
      [*SwitchC] commit

      # 配置SwitchA。

      [~SwitchA] vlan 102
      [*SwitchA-vlan102] quit
      [*SwitchA] interface vlanif 102
      [*SwitchA-Vlanif102] ip address 10.102.0.2 255.255.255.0 
      [*SwitchA-Vlanif102] quit
      [*SwitchA] commit
      [~SwitchA] interface eth-trunk 10
      [*SwitchA-Eth-Trunk10]port trunk allow-pass vlan 102
      [*SwitchA-Eth-Trunk10]quit
      [*SwitchA] commit

       

    3. 配置SwitchA和M-LAG成员设备(SwitchB、SwitchC)建立动态路由BGP的对等体。

       

      # 配置SwitchA。

      [~SwitchA] bgp 100 
      [*SwitchA-bgp] router-id 11.15.15.15
      [*SwitchA-bgp] peer 10.102.0.3 as-number 100 
      [*SwitchA-bgp] peer 10.102.0.4 as-number 100

      # 配置SwitchB。

      [~SwitchB] bgp 100
      [~SwitchB-bgp] peer 10.102.0.2 as-number 100 
      [*SwitchB-bgp] peer 10.102.0.2 connect-interface Vlanif102 10.102.0.3

      # 配置SwitchC。

      [~SwitchC] bgp 100
      [~SwitchC-bgp] peer 10.102.0.2 as-number 100 
      [*SwitchC-bgp] peer 10.102.0.2 connect-interface Vlanif102 10.102.0.4

       

  5. 配置BGP4+接入M-LAG。
    1. 配置SwitchB、SwitchC、SwitchD的路由协议BGP4+,实现网络三层互通。

       

      # 配置SwitchB的BGP4+对等体和引入路由。

      [~SwitchB] bgp 100 
      [~SwitchB-bgp]peer 2001:db8:1::2 as-number 200
      [*SwitchB-bgp]ipv6-family unicast
      [*SwitchB-bgp-af-ipv6] peer 2001:db8:1::2 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchB-bgp-af-ipv6] network 2001:db8:1::2 64
      [*SwitchB-bgp-af-ipv6] quit
      [*SwitchB-bgp] quit
      [*SwitchB] commit

      # 配置SwitchC的BGP4+对等体和引入路由。

      [~SwitchC] bgp 100 
      [~SwitchC-bgp]peer 2001:db8:2::2 as-number 200
      [*SwitchC-bgp]ipv6-family unicast
      [*SwitchC-bgp-af-ipv6] peer 2001:db8:2::2 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchC-bgp-af-ipv6] network 2001:db8:2::2 64
      [*SwitchC-bgp-af-ipv6] quit
      [*SwitchC-bgp] quit
      [*SwitchC] commit

      # 配置SwitchD的BGP4+对等体和引入路由。

      [~SwitchD] bgp 200 
      [~SwitchD-bgp]peer 2001:db8:1::1 as-number 100
      [*SwitchD-bgp]peer 2001:db8:2::1 as-number 100
      [*SwitchD-bgp]ipv6-family unicast
      [*SwitchD-bgp-af-ipv6] peer 2001:db8:1::1 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchD-bgp-af-ipv6] peer 2001:db8:2::1 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchD-bgp-af-ipv6] network 2001:db8:1::1 64
      [*SwitchD-bgp-af-ipv6] network 2001:db8:2::1 64
      [*SwitchD-bgp-af-ipv6] quit
      [*SwitchD-bgp] quit
      [*SwitchD] commit

      BGP4+成功配置后,SwitchB、SwitchC、SwitchD之间可以建立BGP4+邻居,且状态为Established。

      [~SwitchD] display bgp ipv6 peer                                         
       Status codes: * - Dynamic
       BGP local router ID        : 11.13.13.13
       Local AS number            : 200
       Total number of peers      : 2
       Peers in established state
       Total number of dynamic peers : 0                                                                                                
        Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv                                               
        2001:db8:1::1   4         100        4        4     0 00:00:19 Established        1
        2001:db8:2::1   4         100        4        4     0 00:00:18 Established        1

       

    2. 配置SwitchB和SwitchC的动态路由BGP4+接入M-LAG的IPv6地址。

       

      # 配置SwitchB。

      [~SwitchB] vlan 103
      [*SwitchB-vlan103] quit  
      [*SwitchB] interface vlanif 103
      [*SwitchB-Vlanif103] ipv6 enable
      [*SwitchB-Vlanif103] ipv6 address 2001:db8:103::1/64
      [*SwitchB-Vlanif103] mac-address 0000-5e00-0104 
      [*SwitchB-Vlanif103] m-lag ipv6 address 2001:db8:103::3
      [*SwitchB-Vlanif103] quit
      [*SwitchB] commit
      [~SwitchB] interface eth-trunk 10
      [*SwitchB-Eth-Trunk10]port trunk allow-pass vlan 103
      [*SwitchB-Eth-Trunk10]quit
      [*SwitchB] commit

      # 配置SwitchC。

      [~SwitchC] vlan 103
      [*SwitchC-vlan103] quit  
      [*SwitchC] interface vlanif 103
      [*SwitchC-Vlanif103] ipv6 enable
      [*SwitchC-Vlanif103] ipv6 address 2001:db8:103::1/64
      [*SwitchC-Vlanif103] mac-address 0000-5e00-0104 
      [*SwitchC-Vlanif103] m-lag ipv6 address 2001:db8:103::4
      [*SwitchC-Vlanif103] quit
      [*SwitchC] commit
      [~SwitchC] interface eth-trunk 10
      [*SwitchC-Eth-Trunk10]port trunk allow-pass vlan 103
      [*SwitchC-Eth-Trunk10]quit
      [*SwitchC] commit

      # 配置SwitchA。

      [~SwitchA] vlan 103
      [*SwitchA-vlan103] quit  
      [*SwitchA] interface vlanif 103
      [*SwitchA-Vlanif103] ipv6 enable
      [*SwitchA-Vlanif103] ipv6 address 2001:db8:103::2/64
      [*SwitchA-Vlanif103] quit
      [*SwitchA] commit
      [~SwitchA] interface eth-trunk 10
      [*SwitchA-Eth-Trunk10]port trunk allow-pass vlan 103
      [*SwitchA-Eth-Trunk10]quit
      [*SwitchA] commit

       

    3. 配置SwitchA和M-LAG成员设备(SwitchB、SwitchC)建立动态路由BGP4+的对等体和引入路由。

       

      # 配置SwitchA。

      [~SwitchA] bgp 100
      [~SwitchA-bgp] peer 2001:db8:103::3 as-number 100 
      [*SwitchA-bgp] peer 2001:db8:103::4 as-number 100
      [*SwitchA-bgp] ipv6-family unicast
      [*SwitchA-bgp-af-ipv6] peer 2001:db8:103::3 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchA-bgp-af-ipv6] peer 2001:db8:103::4 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchA-bgp-af-ipv6] quit
      [*SwitchA-bgp] quit
      [*SwitchA] commit

      # 配置SwitchB。

      [~SwitchB] bgp 100
      [~SwitchB-bgp] peer 2001:db8:103::2 as-number 100 
      [*SwitchB-bgp] peer 2001:db8:103::2 connect-interface Vlanif 103 2001:db8:103::3
      [*SwitchB-bgp] ipv6-family unicast
      [*SwitchB-bgp-af-ipv6] peer 2001:db8:103::2 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchB-bgp-af-ipv6] quit
      [*SwitchB-bgp] quit
      [*SwitchB] commit

      # 配置SwitchC。

      [~SwitchC] bgp 100
      [~SwitchC-bgp] peer 2001:db8:103::2 as-number 100 
      [*SwitchC-bgp] peer 2001:db8:103::2 connect-interface Vlanif 103 2001:db8:103::4
      [*SwitchC-bgp] ipv6-family unicast
      [*SwitchC-bgp-af-ipv6] peer 2001:db8:103::2 enable
      Warning: This operation will reset the peer session. Continue? [Y/N]:y
      [*SwitchC-bgp-af-ipv6] quit
      [*SwitchC-bgp] quit
      [*SwitchC] commit

       

  6. 验证配置结果

     

    • 执行命令display dfs-group 1 m-lag,查看M-LAG的相关信息。

      # 查看DFS Group编号为1的M-LAG信息。

      [~SwitchB] display dfs-group 1 m-lag
      *                : Local node
      Heart beat state : OK
      Node 1 *
        Dfs-Group ID   : 1
        Priority       : 100
        Address        : ip address 10.200.1.1
        State          : Master
        Causation      : -
        System ID      : 0025-9e95-7c11
        SysName        : SwitchB
        Version        :V200R020C00
        Device Type    :CE16800
      Node 2
        Dfs-Group ID   : 1
        Priority       : 100
        Address        : ip address 10.200.2.1
        State          : Backup
        Causation      : -
        System ID      : 0025-9e95-7c31
        SysName        : SwitchC
        Version        :V200R020C00
        Device Type    :CE16800

      # 查看SwitchB上的M-LAG信息。

      [~SwitchB] display dfs-group 1 node 1 m-lag brief
      * - Local node
      
      M-Lag ID     Interface      Port State    Status                Consistency-check
             1     Eth-Trunk 10   Up            active(*)-active      --
      
      Failed reason:
          1 -- Relationship between vlan and port is inconsistent
          2 -- STP configuration under the port is inconsistent
          3 -- STP port priority configuration is inconsistent
          4 -- LACP mode of M-LAG is inconsistent
          5 -- M-LAG configuration is inconsistent
          6 -- The number of M-LAG members is inconsistent

      # 查看SwitchC上的M-LAG信息。

      [~SwitchC] display dfs-group 1 node 2 m-lag brief
      * - Local node
      
      M-Lag ID     Interface      Port State    Status                Consistency-check
             1     Eth-Trunk 10   Up            active(*)-active      --
      
      Failed reason:
          1 -- Relationship between vlan and port is inconsistent
          2 -- STP configuration under the port is inconsistent
          3 -- STP port priority configuration is inconsistent
          4 -- LACP mode of M-LAG is inconsistent
          5 -- M-LAG configuration is inconsistent
          6 -- The number of M-LAG members is inconsistent 
    • 在SwitchB、SwitchC、SwitchA上执行display ospf peer brief命令,可查看到OSPF中各邻居的信息。

      # 查看SwitchB上的OSPF邻居信息。

      [~SwitchB] display ospf peer brief
              OSPF Process 1 with Router ID 11.1.1.1                    
                        Peer Statistic Information   
        Total number of peer(s): 3                                                       
        Peer(s) in full state: 3   
        ----------------------------------------------------------------------------
        Area Id         Interface                  Neighbor id      State
        0.0.0.0         10GE1/0/1                  11.3.3.3         Full
        0.0.0.0         Vlanif100                  11.2.2.2         Full  
        0.0.0.0         Vlanif100                  11.4.4.4         Full

      # 查看SwitchC上的OSPF邻居信息。

      [~SwitchC] display ospf peer brief
              OSPF Process 1 with Router ID 11.2.2.2                    
                        Peer Statistic Information   
        Total number of peer(s): 3                                                       
        Peer(s) in full state: 3   
        ----------------------------------------------------------------------------
        Area Id         Interface                  Neighbor id      State
        0.0.0.0         10GE1/0/1                  11.3.3.3         Full
        0.0.0.0         Vlanif100                  11.1.1.1         Full  
        0.0.0.0         Vlanif100                  11.4.4.4         Full

      # 查看SwitchA上的OSPF邻居信息。

      [~SwitchA] display ospf peer brief
              OSPF Process 1 with Router ID 11.4.4.4                    
                        Peer Statistic Information   
        Total number of peer(s): 2                                                       
        Peer(s) in full state: 2   
        ----------------------------------------------------------------------------
        Area Id         Interface                  Neighbor id      State
        0.0.0.0         Vlanif100                  11.1.1.1         Full  
        0.0.0.0         Vlanif100                  11.2.2.2         Full
    • 在SwitchB、SwitchC、SwitchA上执行display ospfv3 peer命令,可查看到OSPFv3中各邻居的信息。

      # 查看SwitchB上的OSPFv3邻居信息。
      [~SwitchB] display ospfv3 peer                                           
      OSPFv3 Process (1)                                                              
      Total number of peer(s): 3                                                      
       Peer(s) in full state: 3                                                       
      OSPFv3 Area (0.0.0.0)                                                           
      Neighbor ID      Pri State            Dead Time  Interface          Instance ID 
      10.13.13.13        1 Full/Backup      00:00:37   10GE1/0/1             0        
      10.14.14.14        1 Full/DROther     00:00:38   Vlanif101             0        
      10.15.15.15        1 Full/DR          00:00:40   Vlanif101             0

      # 查看SwitchC上的OSPFv3邻居信息。

      [~SwitchC] display ospfv3 peer                                           
      OSPFv3 Process (1)                                                              
      Total number of peer(s): 3                                                      
       Peer(s) in full state: 3                                                       
      OSPFv3 Area (0.0.0.0)                                                           
      Neighbor ID      Pri State            Dead Time  Interface          Instance ID 
      10.13.13.13        1 Full/DR          00:00:37   10GE1/0/1             0        
      10.12.12.12        1 Full/DROther     00:00:38   Vlanif101             0        
      10.15.15.15        1 Full/DR          00:00:40   Vlanif101             0

      # 查看SwitchA上的OSPFv3邻居信息。

      [~SwitchA]display ospfv3 peer                                           
      OSPFv3 Process (1)                                                              
      Total number of peer(s): 2                                                      
       Peer(s) in full state: 2                                                       
      OSPFv3 Area (0.0.0.0)                                                           
      Neighbor ID      Pri State            Dead Time  Interface          Instance ID         
      10.14.14.14        1 Full/DROther     00:00:38   Vlanif101             0        
      10.12.12.12        1 Full/Backup      00:00:40   Vlanif101             0
    • 在SwitchB、SwitchC、SwitchA上执行display bgp peer命令,可查看到BGP中各邻居的信息。

      # 查看SwitchB上的BGP邻居信息。

      [~SwitchB] display bgp peer                                                                    
       Status codes: * - Dynamic                                                                                                          
       BGP local router ID        : 11.12.12.12                                                                                           
       Local AS number            : 100                                                                                                   
       Total number of peers      : 2                                                                                                     
       Peers in established state : 2                                                                                                     
       Total number of dynamic peers : 0                                                                                                  
      
        Peer                             V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv                              
        10.102.0.2                       4         100       30       30     0 00:24:37 Established        0                  
        192.168.1.2                      4         200       64       66     0 00:54:13 Established        0            

      # 查看SwitchC上的BGP邻居信息。

      [~SwitchC] display bgp peer                                                           
       Status codes: * - Dynamic                 
       BGP local router ID        : 11.14.14.14   
       Local AS number            : 100    
       Total number of peers      : 59  
       Peers in established state : 2    
       Total number of dynamic peers : 0  
      
        Peer                             V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv 
        10.102.0.2                       4         100       34       33     0 00:26:56 Established        0                  
        192.168.2.2                      4         200       71       72     0 00:59:44 Established        0 

      # 查看SwitchA上的BGP邻居信息。

      [~SwitchA] display bgp peer 
      2020-07-07 21:06:02.443
       Status codes: * - Dynamic 
       BGP local router ID        : 11.15.15.15
       Local AS number            : 100
       Total number of peers      : 2                                                                                                   
       Peers in established state : 2                                                                                                     
       Total number of dynamic peers : 0                                                                                                  
      
        Peer                             V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv
        10.102.0.3                       4         100       29       29     0 00:23:22 Established        0
        10.102.0.4                       4         100       29       30     0 00:23:18 Established        0
    • 在SwitchB、SwitchC、SwitchA上执行display bgp ipv6 peer命令,可查看到BGP4+中各邻居的信息。

      # 查看SwitchB上的BGP4+邻居信息。

      [~SwitchB] display bgp ipv6 peer                                                            
       Status codes: * - Dynamic
       BGP local router ID        : 11.12.12.12
       Local AS number            : 100
       Total number of peers      : 2
       Peers in established state : 2
       Total number of dynamic peers : 0
      
        Peer                             V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv                              
        2001:DB8:1::2                    4         200       61       61     0 00:50:07 Established        2 
        2001:DB8:103::2                  4         100        5        6     0 00:02:18 Established        0 

      # 查看SwitchC上的BGP4+邻居信息。

      [~SwitchC] display bgp ipv6 peer                                                            
       Status codes: * - Dynamic
       BGP local router ID        : 11.14.14.14
       Local AS number            : 100
       Total number of peers      : 2
       Peers in established state : 2
       Total number of dynamic peers : 0
      
        Peer                             V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv
        2001:DB8:2::2                    4         200       76       75     0 01:03:13 Established        2 
        2001:DB8:103::2                  4         100       21       22     0 00:15:55 Established        0 

      # 查看SwitchA上的BGP4+邻居信息。

      [~SwitchA] display bgp ipv6 peer   
       Status codes: * - Dynamic
       BGP local router ID        : 11.15.15.15
       Local AS number            : 100
       Total number of peers      : 2
       Peers in established state : 2
       Total number of dynamic peers : 0
      
        Peer                             V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv
        2001:DB8:103::3                  4         100        7        7     0 00:03:02 Established        1 
        2001:DB8:103::4                  4         100        7        6     0 00:02:33 Established        1 

     

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 100 to 103
    #                                                                               
    ospfv3 1                                                                        
     router-id 10.15.15.15                                                          
     area 0.0.0.0          
    #
    interface Vlanif100
     ip address 10.100.0.2 255.255.255.0
    #
    interface Vlanif101
     ipv6 enable
     ipv6 address 2001:DB8:101::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif102 
     ip address 10.102.0.2 255.255.255.0
    #                                                                                      
    interface Vlanif103
     ipv6 enable
     ipv6 address 2001:DB8:103::2/64
    #
    interface Eth-Trunk10
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100 101 102 103
     mode lacp-static
     lacp mixed-rate link enable
    #
    interface 10GE1/0/1
     eth-trunk 10
    #
    interface 10GE1/0/2
     eth-trunk 10
    #
    interface 10GE1/0/3
     eth-trunk 10
    #
    interface 10GE1/0/4
     eth-trunk 10
    #
    bgp 100
     router-id 11.15.15.15 
     peer 10.102.0.3 as-number 100
     peer 10.102.0.4 as-number 100
     peer 2001:DB8:103::3 as-number 100
     peer 2001:DB8:103::4 as-number 100
     #
     ipv4-family unicast
      peer 10.102.0.3 enable
      peer 10.102.0.4 enable
     # 
     ipv6-family unicast
      peer 2001:DB8:103::3 enable
      peer 2001:DB8:103::4 enable
    #
    ospf 1 router-id 11.4.4.4
     area 0.0.0.0
      network 10.100.0.0 0.0.0.255
    #
    return
  • SwitchB的配置文件

    #
    sysname Leaf
    #
    dfs-group 1
     source ip 10.200.1.1
    #
    vlan batch 100 to 103
    #
    stp mode rstp
    stp v-stp enable
    #
    ospfv3 1                                                                        
     router-id 10.12.12.12                                                            
     area 0.0.0.0
    #
    interface Vlanif100
     ip address 10.100.0.1 255.255.255.0
     ospf source sub-address 10.100.0.3
     mac-address 0000-5e00-0101
     m-lag ip address 10.100.0.3 255.255.255.0
    #
    interface Vlanif101                                                             
     ipv6 enable                                                                    
     ipv6 address 2001:DB8:101::1/64                                                   
     ospfv3 1 area 0.0.0.0                                                          
     mac-address 0000-5e00-0102                                                     
     m-lag ipv6 address FE80:1000::1 link-local
    #
    interface Vlanif102                                                             
     ip address 10.102.0.1 255.255.255.0                                                                                        
     mac-address 0000-5e00-0103                                                     
     m-lag ip address 10.102.0.3 255.255.255.0
    #
    interface Vlanif103
     ipv6 enable
     ipv6 address 2001:DB8:103::1/64
     mac-address 0000-5e00-0104
     m-lag ipv6 address 2001:DB8:103::3 
    #
    interface Eth-Trunk1
     mode lacp-static
     peer-link 1
    #
    interface Eth-Trunk10
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100 101 102 103
     mode lacp-static
     lacp mixed-rate link enable
     dfs-group 1 m-lag 1
    #
    interface 10GE1/0/1
     undo portswitch
     ipv6 enable
     ip address 192.168.1.1 255.255.255.0
     ipv6 address 2001:DB8:1::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/0/2
     eth-trunk 10
    #
    interface 10GE1/0/3
     eth-trunk 10
    #
    interface 10GE1/0/4
     eth-trunk 1
    #
    interface 10GE1/0/5
     eth-trunk 1
    #
    interface LoopBack1
     ip address 10.2.2.2 255.255.255.255
    #
    interface LoopBack2
     ip address 10.3.3.3 255.255.255.255
    #
    monitor-link group 1
     port 10ge 1/0/1 uplink
     port eth-trunk 10 downlink 1
    #
    bgp 100
     router-id 11.12.12.12
     peer 10.102.0.2 as-number 100
     peer 10.102.0.2 connect-interface Vlanif102 10.102.0.3                                                    
     peer 192.168.1.2 as-number 200
     peer 2001:DB8:1::2 as-number 200
     peer 2001:DB8:103::2 as-number 100
     peer 2001:DB8:103::2 connect-interface Vlanif103 2001:DB8:103::3
     #
     ipv4-family unicast
      peer 10.102.0.2 enable                                                                             
      peer 192.168.1.2 enable
    #
     ipv6-family unicast
      network 2001:DB8:1:: 64
      peer 2001:DB8:1::2 enable
      peer 2001:DB8:103::2 enable
    #
    ospf 1 router-id 11.1.1.1
     area 0.0.0.0
      network 10.2.2.2 0.0.0.0
      network 10.3.3.3 0.0.0.0
      network 10.100.0.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    dfs-group 1
     source ip 10.200.2.1
    #
    vlan batch 100 to 103
    #
    stp mode rstp
    stp v-stp enable
    #                                                                               
    ospfv3 1                                                                        
     router-id 10.14.14.14                                                          
     area 0.0.0.0 
    #
    interface Vlanif100
     ip address 10.100.0.1 255.255.255.0
     ospf source sub-address 10.100.0.4
     mac-address 0000-5e00-0101
     m-lag ip address 10.100.0.4 255.255.255.0
    #
    interface Vlanif101
     ipv6 enable
     ipv6 address 2001:db8:101::1/64
     ospfv3 1 area 0.0.0.0
     mac-address 0000-5e00-0102
     m-lag ipv6 address FE80:1000::2 link-local
    #
    interface Vlanif102
     ip address 10.102.0.1 255.255.255.0
     mac-address 0000-5e00-0103
     m-lag ip address 10.102.0.4 255.255.255.0
    #
    interface Vlanif103
     ipv6 enable
     ipv6 address 2001:DB8:103::1/64  
     mac-address 0000-5e00-0104
     m-lag ipv6 address 2001:DB8:103::4 
    #
    interface Eth-Trunk1
     mode lacp-static
     peer-link 1
    #
    interface Eth-Trunk10
     port link-type trunk
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100 101 102 103
     mode lacp-static
     lacp mixed-rate link enable
     dfs-group 1 m-lag 1
    #
    interface 10GE1/0/1
     undo portswitch
     ipv6 enable
     ip address 192.168.2.1 255.255.255.0
     ipv6 address 2001:db8:2::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/0/2
     eth-trunk 10
    #
    interface 10GE1/0/3
     eth-trunk 10
    #
    interface 10GE1/0/4
     eth-trunk 1
    #
    interface 10GE1/0/5
     eth-trunk 1
    #
    interface LoopBack1
     ip address 10.2.2.2 255.255.255.255
    #
    interface LoopBack2
     ip address 10.4.4.4 255.255.255.255
    #
    monitor-link group 1
     port 10ge 1/0/1 uplink
     port eth-trunk 10 downlink 1
    #
    bgp 100
     router-id 11.14.14.14                        
     peer 10.102.0.2 as-number 100
     peer 10.102.0.2 connect-interface Vlanif102 10.102.0.4
     peer 192.168.2.2 as-number 200
     peer 2001:DB8:2::2 as-number 200                  
     peer 2001:DB8:103::2 as-number 100     
     peer 2001:DB8:103::2 connect-interface Vlanif103 2001:DB8:103::4
     #
     ipv4-family unicast
      peer 10.102.0.2 enable
      peer 192.168.2.2 enable
     #
     ipv6-family unicast
      network 2001:DB8:2:: 64
      peer 2001:DB8:2::2 enable                                                                               
      peer 2001:DB8:103::2 enable  
    #
    ospf 1 router-id 11.2.2.2
     area 0.0.0.0
      network 10.2.2.2 0.0.0.0
      network 10.4.4.4 0.0.0.0
      network 10.100.0.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • SwitchD的配置文件

    #
    sysname SwitchD
    #                                                                               
    ospfv3 1                                                                        
     router-id 10.13.13.13                                                          
     area 0.0.0.0
    #
    interface 10GE1/0/1
     undo portswitch
     ipv6 enable
     ip address 192.168.1.2 255.255.255.0
     ipv6 address 2001:db8:1::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/0/2
     undo portswitch
     ipv6 enable
     ip address 192.168.2.2 255.255.255.0
     ipv6 address 2001:db8:2::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface LoopBack1
     ip address 10.1.1.1 255.255.255.255
    #
    bgp 200
     router-id 11.13.13.13
     peer 192.168.1.1 as-number 100
     peer 192.168.2.1 as-number 100
     peer 2001:db8:1::1 as-number 100
     peer 2001:db8:2::1 as-number 100 
     #
     ipv4-family unicast
      peer 192.168.1.1 enable
      peer 192.168.2.1 enable
     #
     ipv6-family unicast
      network 2001:db8:1:: 64
      network 2001:db8:2:: 64
      peer 2001:db8:1::1 enable                                                                                                   
      peer 2001:db8:2::1 enable
    #
    ospf 1 router-id 11.3.3.3
     area 0.0.0.0
      network 10.1.1.1 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  •  
 
posted @ 2024-04-08 21:55  技术颜良  阅读(3)  评论(0编辑  收藏  举报