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

本站点使用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所示,4台设备分属不同两个AS,要求在尽量简化配置的情况下,实现两个AS之间的互通。

图10-24  配置BGP4+路由反射器组网图

配置思路

采用如下的思路配置BGP4+路由反射:

  1. 通过配置BGP4+基本功能,实现BGP邻居间的互通。

  2. 通过配置SwitchC为路由反射器,可以使得SwitchB和SwitchD之间不需要建立IBGP连接,达到简化配置的目的。

操作步骤

  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:0:1::1/64
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ipv6 enable
    [SwitchA-Vlanif20] ipv6 address fc00:0:0:0:10::1/96
    [SwitchA-Vlanif20] quit

  3. 配置BGP4+基本功能

    # 配置SwitchA。

    [SwitchA] bgp 100
    [SwitchA-bgp] router-id 10.1.1.1
    [SwitchA-bgp] peer fc00:0:0:0:10::2 as-number 200
    [SwitchA-bgp] ipv6-family unicast
    [SwitchA-bgp-af-ipv6] peer fc00:0:0:0:10::2 enable
    [SwitchA-bgp-af-ipv6] network fc00:0:0:0:1:: 64
    [SwitchA-bgp-af-ipv6] network fc00:0:0:0:10:: 96
    [SwitchA-bgp-af-ipv6] quit

    # 配置SwitchB。

    [SwitchB] bgp 200
    [SwitchB-bgp] router-id 10.2.2.2
    [SwitchB-bgp] peer fc00:0:0:0:10::1 as-number 100
    [SwitchB-bgp] peer fc00:0:0:0:11::1 as-number 200
    [SwitchB-bgp] ipv6-family unicast
    [SwitchB-bgp-af-ipv6] peer fc00:0:0:0:10::1 enable
    [SwitchB-bgp-af-ipv6] peer fc00:0:0:0:11::1 enable
    [SwitchB-bgp-af-ipv6] network fc00:0:0:0:10:: 96
    [SwitchB-bgp-af-ipv6] network fc00:0:0:0:11:: 96
    [SwitchB-bgp-af-ipv6] quit
    [SwitchB-bgp] quit

    # 配置SwitchC。

    [SwitchC] bgp 200
    [SwitchC-bgp] router-id 10.3.3.3
    [SwitchC-bgp] peer fc00:0:0:0:11::2 as-number 200
    [SwitchC-bgp] peer fc00:0:0:0:12::2 as-number 200
    [SwitchC-bgp] ipv6-family unicast
    [SwitchC-bgp-af-ipv6] peer fc00:0:0:0:11::2 enable
    [SwitchC-bgp-af-ipv6] peer fc00:0:0:0:12::2 enable
    [SwitchC-bgp-af-ipv6] network fc00:0:0:0:11:: 96
    [SwitchC-bgp-af-ipv6] network fc00:0:0:0:12:: 96
    [SwitchC-bgp-af-ipv6] quit

    # 配置SwitchD。

    [SwitchD] bgp 200
    [SwitchD-bgp] router-id 10.4.4.4
    [SwitchD-bgp] peer fc00:0:0:0:12::1 as-number 200
    [SwitchD-bgp] ipv6-family unicast
    [SwitchD-bgp-af-ipv6] peer fc00:0:0:0:12::1 enable
    [SwitchD-bgp-af-ipv6] network fc00:0:0:0:12:: 96
    [SwitchD-bgp-af-ipv6] quit
    [SwitchD-bgp] quit

  4. 配置路由反射器

    # 配置SwitchC作为路由反射器,SwitchB和SwitchD它的两个客户机。

    [SwitchC-bgp] ipv6-family unicast
    [SwitchC-bgp-af-ipv6] peer fc00:0:0:0:11::2 reflect-client
    [SwitchC-bgp-af-ipv6] peer fc00:0:0:0:12::2 reflect-client

    # 查看SwitchB的路由表。

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

    # 查看SwitchD的路由表。

    [SwitchD] display bgp ipv6 routing-table
    
     BGP Local router ID is 10.4.4.4
     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
     *>i Network  : FC00:0:0:1::                             PrefixLen : 64     
         NextHop  : FC00:0:0:10::1                           LocPrf    : 100       
         MED      : 0                                        PrefVal   : 0         
         Label    : 
         Path/Ogn : 100  i
     *>i Network  : FC00:0:0:10::                            PrefixLen : 96     
         NextHop  : FC00:0:0:11::2                           LocPrf    : 100       
         MED      : 0                                        PrefVal   : 0         
         Label    : 
         Path/Ogn : i
     *>i Network  : FC00:0:0:11::                            PrefixLen : 96     
         NextHop  : FC00:0:0:12::1                           LocPrf    : 100       
         MED      : 0                                        PrefVal   : 0         
         Label    : 
         Path/Ogn : i
     *>  Network  : FC00:0:0:12::                            PrefixLen : 96     
         NextHop  : ::                                       LocPrf    :          
         MED      : 0                                        PrefVal   : 0         
         Label    : 
         Path/Ogn : i
       i
         NextHop  : FC00:0:0:12::1                           LocPrf    : 100       
         MED      : 0                                        PrefVal   : 0         
         Label    : 
         Path/Ogn : i

    从路由表中可以看到,SwitchD和SwitchB从SwitchC那里学到了SwitchA通告的路由。

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    ipv6
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ipv6 enable
     ipv6 address FC00:0:0:1::1/64
    #
    interface Vlanif20
     ipv6 enable
     ipv6 address FC00:0:0:10::1/96
    #
    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 100
     router-id 10.1.1.1
     peer FC00:0:0:10::2 as-number 200
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:1:: 64
      network FC00:0:0:10:: 96
      peer FC00:0:0:10::2 enable
    #
    return
  • SwitchB的配置文件

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

    #
    sysname SwitchC
    #
    ipv6
    #
    vlan batch 30 40
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address FC00:0:0:11::1/96
    #
    interface Vlanif40
     ipv6 enable
     ipv6 address FC00:0:0:12::1/96
    #
    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 30
    #
    bgp 200
     router-id 10.3.3.3
     peer FC00:0:0:11::2 as-number 200
     peer FC00:0:0:12::2 as-number 200
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:11:: 96
      network FC00:0:0:12:: 96
      peer FC00:0:0:11::2 enable
      peer FC00:0:0:11::2 reflect-client
      peer FC00:0:0:12::2 enable
      peer FC00:0:0:12::2 reflect-client
    #
    return
  • SwitchD的配置文件

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

文档编号:EDOC1000141402

浏览量:22841

下载量:1349

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