所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

S1720, S2700, S5700, S6720 V200R010C00 配置指南-IP单播路由

本文档介绍了设备支持的IP单播路由相关配置。主要内容包括IP路由概述,静态路由、RIP、RIPng、OSPF、OSPFv3、IS-IS(IPv4)、IS-IS(IPv6)、BGP、路由策略以及策略路由的基本原理和配置过程,并提供相关的配置案例。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置BGP4+基本功能示例

配置BGP4+基本功能示例

组网需求

图1所示,有自治系统65008和65009,其中SwitchA属于自治系统65008,SwitchB、SwitchC、SwitchD属于自治系统65009,要求使用BGP4+协议来交换自治系统之间的路由信息。

说明:

请确保该场景下互联接口的STP处于未使能状态。因为在使能STP的环形网络中,如果用交换机的VLANIF接口构建三层网络,会导致某个端口被阻塞,从而导致三层业务不能正常运行。

图10-18  配置BGP4+基本组网图

配置思路

采用如下的思路配置BGP4+的基本功能:

  1. SwitchB、SwitchC和SwitchD间配置IBGP连接。

  2. SwitchA和SwitchB之间配置EBGP连接。

操作步骤

  1. 配置接口所属VLAN

    # 配置SwitchA。SwitchB、SwitchC和SwitchD的配置与SwitchA类似。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 10 20
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type trunk
    [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type trunk
    [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet0/0/2] quit
    

  2. 使能IPv6转发能力,配置各接口的IPv6地址。

    # 配置SwitchA。SwitchB、SwitchC和SwitchD的配置与SwitchA类似。

    [SwitchA] ipv6
    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ipv6 enable
    [SwitchA-Vlanif10] ipv6 address fc00:0:0:8::1/64
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ipv6 enable
    [SwitchA-Vlanif20] ipv6 address fc00:0:0:100::2/64
    [SwitchA-Vlanif20] quit

  3. 配置IBGP

    # 配置SwitchB。

    [SwitchB] bgp 65009
    [SwitchB-bgp] router-id 10.2.2.2
    [SwitchB-bgp] peer fc00:0:0:91::2 as-number 65009
    [SwitchB-bgp] peer fc00:0:0:93::2 as-number 65009
    [SwitchB-bgp] ipv6-family unicast
    [SwitchB-bgp-af-ipv6] peer fc00:0:0:91::2 enable
    [SwitchB-bgp-af-ipv6] peer fc00:0:0:93::2 enable
    [SwitchB-bgp-af-ipv6] network fc00:0:0:91:: 64
    [SwitchB-bgp-af-ipv6] network fc00:0:0:93:: 64
    [SwitchB-bgp-af-ipv6] quit
    [SwitchB-bgp] quit

    # 配置SwitchC。

    [SwitchC] bgp 65009
    [SwitchC-bgp] router-id 10.3.3.3
    [SwitchC-bgp] peer fc00:0:0:93::1 as-number 65009
    [SwitchC-bgp] peer fc00:0:0:92::2 as-number 65009
    [SwitchC-bgp] ipv6-family unicast
    [SwitchC-bgp-af-ipv6] peer fc00:0:0:93::1 enable
    [SwitchC-bgp-af-ipv6] peer fc00:0:0:92::2 enable
    [SwitchC-bgp-af-ipv6] network fc00:0:0:93:: 64
    [SwitchC-bgp-af-ipv6] network fc00:0:0:92:: 64
    [SwitchC-bgp-af-ipv6] quit
    [SwitchC-bgp] quit

    # 配置SwitchD。

    [SwitchD] bgp 65009
    [SwitchD-bgp] router-id 10.4.4.4
    [SwitchD-bgp] peer fc00:0:0:91::1 as-number 65009
    [SwitchD-bgp] peer fc00:0:0:92::1 as-number 65009
    [SwitchD-bgp] ipv6-family unicast
    [SwitchD-bgp-af-ipv6] peer fc00:0:0:91::1 enable
    [SwitchD-bgp-af-ipv6] peer fc00:0:0:92::1 enable
    [SwitchD-bgp-af-ipv6] network fc00:0:0:92:: 64
    [SwitchD-bgp-af-ipv6] network fc00:0:0:91:: 64
    [SwitchD-bgp-af-ipv6] quit
    [SwitchD-bgp] quit

  4. 配置EBGP

    # 配置SwitchA。

    [SwitchA] bgp 65008
    [SwitchA-bgp] router-id 10.1.1.1
    [SwitchA-bgp] peer fc00:0:0:100::1 as-number 65009
    [SwitchA-bgp] ipv6-family unicast
    [SwitchA-bgp-af-ipv6] peer fc00:0:0:100::1 enable
    [SwitchA-bgp-af-ipv6] network fc00:0:0:100:: 64
    [SwitchA-bgp-af-ipv6] network fc00:0:0:8:: 64
    [SwitchA-bgp-af-ipv6] quit
    [SwitchA-bgp] quit

    # 配置SwitchB。

    [SwitchB] bgp 65009
    [SwitchB-bgp] peer fc00:0:0:100::2 as-number 65008
    [SwitchB-bgp] ipv6-family unicast
    [SwitchB-bgp-af-ipv6] peer fc00:0:0:100::2 enable
    [SwitchB-bgp-af-ipv6] network fc00:0:0:100:: 64
    [SwitchB-bgp-af-ipv6] quit
    [SwitchB-bgp] quit

    # 查看BGP4+对等体的连接状态。

    [SwitchB] display bgp ipv6 peer
    
     BGP local router ID : 10.2.2.2
     Local AS number : 65009
     Total number of peers : 3                 Peers in established state : 3
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
    
      FC00:0:0:91::2  4 65009        8        9     0 00:05:37 Established       2
      FC00:0:0:93::2  4 65009        2        2     0 00:00:09 Established       2
      FC00:0:0:100::2 4 65008        9        7     0 00:05:38 Established       1

    可以看出,SwitchB其他Switch的BGP4+连接均已建立。

    # 显示SwitchA的路由表。

    [SwitchA] display bgp ipv6 routing-table
    
     BGP Local router ID is 10.1.1.1
     Status codes: * - valid, > - best, d - damped,
                   h - history,  i - internal, s - suppressed, S - Stale
                   Origin : i - IGP, e - EGP, ? - incomplete
    
    
     Total Number of Routes: 5
     *>  Network  : FC00:0:0:91::                            PrefixLen : 64
         NextHop  : FC00:0:0:100::1                          LocPrf    :
         MED      : 0                                        PrefVal   : 0
         Label    :
         Path/Ogn : 65009 i
     *>  Network  : FC00:0:0:92::                            PrefixLen : 64
         NextHop  : FC00:0:0:100::1                          LocPrf    :
         MED      :                                          PrefVal   : 0
         Label    :
         Path/Ogn : 65009 i
     *>  Network  : FC00:0:0:93::                            PrefixLen : 64
         NextHop  : FC00:0:0:100::1                          LocPrf    :
         MED      : 0                                        PrefVal   : 0
         Label    :
         Path/Ogn : 65009 i
     *>  Network  : FC00:0:0:100::                           PrefixLen : 64
         NextHop  : ::                                       LocPrf    :
         MED      : 0                                        PrefVal   : 0
         Label    :
         Path/Ogn : i
    
         NextHop  : FC00:0:0:100::1                          LocPrf    :
         MED      : 0                                        PrefVal   : 0
         Label    :
         Path/Ogn : 65009 i                                  

    从路由表可以看出,SwitchA到了AS65009中的路由。AS65008和AS65009可以相互交换路由信息。

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    ipv6
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ipv6 enable
     ipv6 address FC00:0:0:8::1/64
    #
    interface Vlanif20
     ipv6 enable
     ipv6 address FC00:0:0:100::2/64
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    bgp 65008
     router-id 10.1.1.1
     peer FC00:0:0:100::1 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:8:: 64
      network FC00:0:0:100:: 64
      peer FC00:0:0:100::1 enable
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    ipv6
    #
    vlan batch 20 30 40
    #
    interface Vlanif20
     ipv6 enable
     ipv6 address FC00:0:0:100::1/64
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address FC00:0:0:93::1/64
    #
    interface Vlanif40
     ipv6 enable
     ipv6 address FC00:0:0:91::1/64
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    bgp 65009
     router-id 10.2.2.2
     peer FC00:0:0:91::2 as-number 65009
     peer FC00:0:0:93::2 as-number 65009
     peer FC00:0:0:100::2 as-number 65008
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:91:: 64
      network FC00:0:0:93:: 64
      network FC00:0:0:100:: 64
      peer FC00:0:0:91::2 enable
      peer FC00:0:0:93::2 enable
      peer FC00:0:0:100::2 enable
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    ipv6
    #
    vlan batch 30 50
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address FC00:0:0:93::2/64
    #
    interface Vlanif50
     ipv6 enable
     ipv6 address FC00:0:0:92::1/64
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    bgp 65009
     router-id 10.3.3.3
     peer FC00:0:0:92::2 as-number 65009
     peer FC00:0:0:93::1 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:92:: 64
      network FC00:0:0:93:: 64
      peer FC00:0:0:92::2 enable
      peer FC00:0:0:93::1 enable
    #
    return
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    ipv6
    #
    vlan batch 40 50
    #
    interface Vlanif40
     ipv6 enable
     ipv6 address FC00:0:0:91::2/64
    #
    interface Vlanif50
     ipv6 enable
     ipv6 address FC00:0:0:92::2/64
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    bgp 65009
     router-id 10.4.4.4
     peer FC00:0:0:91::1 as-number 65009
     peer FC00:0:0:92::1 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:91:: 64
      network FC00:0:0:92:: 64
      peer FC00:0:0:91::1 enable
      peer FC00:0:0:92::1 enable
    #
    return
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000141402

浏览量:22228

下载量:1343

平均得分:
本文档适用于这些产品
相关文档
相关版本
分享
上一页 下一页