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

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

提示

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

升级

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

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

配置BGP联盟示例

组网需求

图1所示,AS200中有多台BGP交换机,现需要减少IBGP的连接数。

说明:

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

图10-25  配置联盟组网图

配置思路

采用如下的思路配置BGP联盟:

  1. 在AS200中各交换机上配置BGP联盟,现将设备划分为3个子自治系统:AS65001、AS65002和AS65003。其中AS65001内的三台交换机建立IBGP全连接,实现减少IBGP的连接数的需求。

操作步骤

  1. 配置各接口所属的VLAN

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 10 20 30 40 60
    [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
    [SwitchA] interface gigabitethernet 0/0/3
    [SwitchA-GigabitEthernet0/0/3] port link-type trunk
    [SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 30
    [SwitchA-GigabitEthernet0/0/3] quit
    [SwitchA] interface gigabitethernet 0/0/4
    [SwitchA-GigabitEthernet0/0/4] port link-type trunk
    [SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 40
    [SwitchA-GigabitEthernet0/0/4] quit
    [SwitchA] interface gigabitethernet 0/0/5
    [SwitchA-GigabitEthernet0/0/5] port link-type trunk
    [SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 60
    [SwitchA-GigabitEthernet0/0/5] quit
    

    SwitchB、SwitchC、SwitchD、SwitchE、SwitchF的配置同SwitchA(略)

  2. 配置各VLANIF接口的IP地址

    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ip address 10.1.1.1 24
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ip address 10.1.2.1 24
    [SwitchA-Vlanif20] quit
    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] ip address 10.1.3.1 24
    [SwitchA-Vlanif30] quit
    [SwitchA] interface vlanif 40
    [SwitchA-Vlanif40] ip address 10.1.4.1 24
    [SwitchA-Vlanif40] quit
    [SwitchA] interface vlanif 60
    [SwitchA-Vlanif60] ip address 192.168.1.1 24
    [SwitchA-Vlanif60] quit

    SwitchB、SwitchC、SwitchD、SwitchE、SwitchF的配置同SwitchA(略)

  3. 配置BGP联盟

    # 配置SwitchA。

    [SwitchA] bgp 65001
    [SwitchA-bgp] router-id 172.16.1.1
    [SwitchA-bgp] confederation id 200
    [SwitchA-bgp] confederation peer-as 65002 65003
    [SwitchA-bgp] peer 10.1.1.2 as-number 65002 
    [SwitchA-bgp] peer 10.1.2.2 as-number 65003
    [SwitchA-bgp] ipv4-family unicast 
    [SwitchA-bgp-af-ipv4] peer 10.1.1.2 next-hop-local
    [SwitchA-bgp-af-ipv4] peer 10.1.2.2 next-hop-local 
    [SwitchA-bgp-af-ipv4] quit
    [SwitchA-bgp] quit

    # 配置SwitchB。

    [SwitchB] bgp 65002
    [SwitchB-bgp] router-id 172.16.2.2
    [SwitchB-bgp] confederation id 200
    [SwitchB-bgp] confederation peer-as 65001 65003
    [SwitchB-bgp] peer 10.1.1.1 as-number 65001
    [SwitchB-bgp] quit

    # 配置SwitchC。

    [SwitchC] bgp 65003
    [SwitchC-bgp] router-id 172.16.3.3
    [SwitchC-bgp] confederation id 200
    [SwitchC-bgp] confederation peer-as 65001 65002
    [SwitchC-bgp] peer 10.1.2.1 as-number 65001
    [SwitchC-bgp] quit

  4. 配置AS65001内的IBGP连接

    # 配置SwitchA。

    [SwitchA] bgp 65001
    [SwitchA-bgp] peer 10.1.3.2 as-number 65001
    [SwitchA-bgp] peer 10.1.4.2 as-number 65001
    [SwitchA-bgp] ipv4-family unicast
    [SwitchA-bgp-af-ipv4] peer 10.1.3.2 next-hop-local
    [SwitchA-bgp-af-ipv4] peer 10.1.4.2 next-hop-local
    [SwitchA-bgp-af-ipv4] quit 

    # 配置SwitchD。

    [SwitchD] bgp 65001
    [SwitchD-bgp] router-id 172.16.4.4
    [SwitchD-bgp] peer 10.1.3.1 as-number 65001
    [SwitchD-bgp] peer 10.1.5.2 as-number 65001 
    [SwitchD-bgp] quit

    # 配置SwitchE。

    [SwitchE] bgp 65001
    [SwitchE-bgp] router-id 172.16.5.5
    [SwitchE-bgp] peer 10.1.4.1 as-number 65001
    [SwitchE-bgp] peer 10.1.5.1 as-number 65001 
    [SwitchE-bgp] quit

  5. 配置AS100和AS200之间的EBGP连接

    # 配置SwitchA。

    [SwitchA] bgp 65001
    [SwitchA-bgp] peer 192.168.1.2 as-number 100 
    [SwitchA-bgp] quit

    # 配置SwitchF。

    [SwitchF] bgp 100
    [SwitchF-bgp] router-id 172.16.6.6 
    [SwitchF-bgp] peer 192.168.1.1 as-number 200 
    [SwitchF-bgp] ipv4-family unicast 
    [SwitchF-bgp-af-ipv4] network 10.0.1.0 255.255.255.0
    [SwitchF-bgp-af-ipv4] quit
    [SwitchF-bgp] quit

  6. 查看配置结果

    # 查看SwitchB的BGP路由表。

    [SwitchB] display bgp routing-table
     
     BGP Local router ID is 172.16.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: 1
     
         Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
     
     *>i  10.0.1.0/24        10.1.1.1        0          100        0      (65001) 100i
    [SwitchB] display bgp routing-table 10.0.1.0
    
    BGP local router ID : 172.16.2.2
     Local AS number : 65002
     Paths:   1 available, 1 best, 1 select
     BGP routing table entry information of 10.0.1.0/24:
     From: 10.1.1.1 (172.16.1.1)
     Route Duration: 00h01m22s
     Relay IP Nexthop: 0.0.0.0
     Relay IP Out-Interface: Vlanif10
     Original nexthop: 10.1.1.1
     Qos information : 0x0
     AS-path (65001) 100, origin igp, MED 0, localpref 100, pref-val 0, valid, external-confed, best,select, active, pre 255
     Not advertised to any peer yet
     

    # 查看SwitchD的BGP路由表。

    [SwitchD] display bgp routing-table
     
     BGP Local router ID is 172.16.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: 1
         Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
     
     *>i  10.0.1.0/24        10.1.3.1        0          100        0      100i
    [SwitchD] display bgp routing-table 10.0.1.0
     
     BGP local router ID : 172.16.4.4
     Local AS number : 65001
     Paths:   1 available, 1 best, 1 select
     BGP routing table entry information of 10.0.1.0/24:
     From: 10.1.3.1 (172.16.1.1)
     Route Duration: 00h18m34s
     Relay IP Nexthop: 0.0.0.0
     Relay IP Out-Interface: Vlanif30
     Original nexthop: 10.1.3.1
     Qos information : 0x0
     AS-path 100, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, best,select, active, pre 255
     Not advertised to any peer yet
    

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 10 20 30 40 60
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
    #
    interface Vlanif20
     ip address 10.1.2.1 255.255.255.0
    #
    interface Vlanif30
     ip address 10.1.3.1 255.255.255.0
    #
    interface Vlanif40
     ip address 10.1.4.1 255.255.255.0
    #
    interface Vlanif60
     ip address 192.168.1.1 255.255.255.0
    #
    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
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface GigabitEthernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface GigabitEthernet0/0/5
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    bgp 65001
     router-id 172.16.1.1
     confederation id 200
     confederation peer-as 65002 65003
     peer 10.1.1.2 as-number 65002
     peer 10.1.2.2 as-number 65003
     peer 10.1.3.2 as-number 65001
     peer 10.1.4.2 as-number 65001
     peer 192.168.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.1.2 enable
      peer 10.1.1.2 next-hop-local
      peer 10.1.2.2 enable
      peer 10.1.2.2 next-hop-local
      peer 10.1.3.2 enable
      peer 10.1.3.2 next-hop-local
      peer 10.1.4.2 enable
      peer 10.1.4.2 next-hop-local
      peer 192.168.1.2 enable
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    bgp 65002
     router-id 172.16.2.2
     confederation id 200
     confederation peer-as 65001 65003
     peer 10.1.1.1 as-number 65001
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.1.1 enable
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 10.1.2.2 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    bgp 65003
     router-id 172.16.3.3
     confederation id 200
     confederation peer-as 65001 65002
     peer 10.1.2.1 as-number 65001
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.2.1 enable
    #
    return
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 30 50
    #
    interface Vlanif30
     ip address 10.1.3.2 255.255.255.0
    #
    interface Vlanif50
     ip address 10.1.5.1 255.255.255.0
    #
    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 50
    #
    bgp 65001
     router-id 172.16.4.4
     peer 10.1.3.1 as-number 65001
     peer 10.1.5.2 as-number 65001
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.3.1 enable
      peer 10.1.5.2 enable
    #
    return
  • SwitchE的配置文件

    #
    sysname SwitchE
    #
    vlan batch 40 50
    #
    interface Vlanif40
     ip address 10.1.4.2 255.255.255.0
    #
    interface Vlanif50
     ip address 10.1.5.2 255.255.255.0
    #
    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 65001
     router-id 172.16.5.5
     peer 10.1.4.1 as-number 65001
     peer 10.1.5.1 as-number 65001
     #
     ipv4-family unicast
      undo synchronization
      peer 10.1.4.1 enable
      peer 10.1.5.1 enable
    #
    return
  • SwitchF的配置文件

    #
    sysname SwitchF
    #
    vlan batch 60 70
    #
    interface Vlanif60
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif70
     ip address 10.0.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 70
    #
    bgp 100
     router-id 172.16.6.6
     peer 192.168.1.1 as-number 200
     #
     ipv4-family unicast
      undo synchronization  
      network 10.0.1.0 255.255.255.0
      peer 192.168.1.1 enable
    #          
    return
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000141402

浏览量:28100

下载量:1386

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