zoukankan      html  css  js  c++  java
  • H3C OSPF配置2发布聚合路由配置举例

    1.组网需求

    ·     Switch A和Switch B位于AS 200内,AS 200内使用OSPF作为IGP协议。

    ·     Switch C、Switch D和Switch E位于AS 100内,AS 100内使用OSPF作为IGP协议。

    ·     Switch B和Switch C之间建立EBGP连接,配置BGP引入OSPF和直连路由,配置OSPF进程引入BGP路由。

    ·     为了减小Switch A的路由表规模,在Switch B上配置路由聚合,只发布聚合后的路由10.0.0.0/8。

       

    2.配置步骤

      1)配置OSPF

      SW A  

    [SwitchA] router id 11.2.1.2
    [SwitchA] ospf
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255

      SW B  

    [SwitchB] router id 11.2.1.1
    [SwitchB] ospf
    [SwitchB-ospf-1] area 0
    [SwitchB-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255

      SW C  

    [SwitchC] router id 11.1.1.2
    [SwitchC] ospf
    [SwitchC-ospf-1] area 0
    [SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255

      SW D  

    [SwitchD] router id 10.3.1.1
    [SwitchD] ospf
    [SwitchD-ospf-1] area 0
    [SwitchD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchD-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255

      SW E  

    [SwitchE] router id 10.4.1.1
    [SwitchE] ospf
    [SwitchE-ospf-1] area 0
    [SwitchE-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [SwitchE-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255

      2)配置BGP,引入OSPF和直连路由

      SW B  

    [SwitchB] bgp 200
    [SwitchB-bgp-default] peer 11.1.1.2 as 100
    [SwitchB-bgp-default] address-family ipv4 unicast
    [SwitchB-bgp-default-ipv4] peer 11.1.1.2 enable
    [SwitchB-bgp-default-ipv4] import-route ospf
    [SwitchB-bgp-default-ipv4] import-route direct

      SW C  

    [SwitchC] bgp 100
    [SwitchC-bgp-default] peer 11.1.1.1 as 200
    [SwitchC-bgp-default] address-family ipv4 unicast
    [SwitchC-bgp-default] peer 11.1.1.1 enable
    [SwitchC-bgp-default-ipv4] import-route ospf
    [SwitchC-bgp-default-ipv4] import-route direct

      3)在Switch B和Switch C上配置OSPF引入BGP路由  

    [SwitchB] ospf
    [SwitchB-ospf-1] import-route bgp  # 在Switch B上配置OSPF引入BGP路由。  
    [SwitchC] ospf
    [SwitchC-ospf-1] import-route bgp  # 在Switch C上配置OSPF引入BGP路由。

      查看SW A的路由信息  

    [SwitchA] display ip routing-table
    Destinations : 16        Routes : 16
    Destination/Mask    Proto  Pre  Cost         NextHop         Interface
    
    0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0
    10.1.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100
    10.2.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100
    10.3.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100
    10.4.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100
    11.2.1.0/24         Direct 0    0            11.2.1.2        Vlan100
    11.2.1.0/32         Direct 0    0            11.2.1.2        Vlan100
    11.2.1.2/32         Direct 0    0            127.0.0.1       InLoop0
    11.2.1.255/32       Direct 0    0            11.2.1.2        Vlan100
    127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0
    127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0
    127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0
    127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0
    224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0
    224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0
    255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

      4)在Switch B上配置路由聚合,只发布聚合路由10.0.0.0/8。

      [SwitchB-ospf-1] asbr-summary 10.0.0.0 8

      查看Switch A的路由表信息  

    [SwitchA] display ip routing-table
    Destinations : 13        Routes : 13
    Destination/Mask    Proto  Pre  Cost         NextHop         Interface
    0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 10.0.0.0/8 O_ASE2 150 1 11.2.1.1 Vlan100 11.2.1.0/24 Direct 0 0 11.2.1.2 Vlan100 11.2.1.0/32 Direct 0 0 11.2.1.2 Vlan100 11.2.1.2/32 Direct 0 0 127.0.0.1 InLoop0 11.2.1.255/32 Direct 0 0 11.2.1.2 Vlan100 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

      可以看出,路由10.1.1.0/24、10.2.1.0/24、10.3.1.0/24、10.4.1.0/24已经聚合为一条路由10.0.0.0/8。

    看看天上,于是我去了满是风雪的地方
  • 相关阅读:
    Python函数参数学习笔记
    Python基础笔记
    winform碎片
    常用sql语句
    《零基础入门学习Python》学习过程笔记【021匿名函数】
    统计下边这个长字符串中各个字符出现的次数并找到小甲鱼送给大家的一句话
    《零基础入门学习Python》学习过程笔记【020函数的局部变量和全全局变量内部函数和闭包】
    编写一个函数,分别统计出传入字符串参数(可能不止一个参数)的英文字母,空格,数字和其他字符的个数
    写一个函数,判断一个字符串是否为回文联
    《零基础入门学习Python》学习过程笔记【019函数返回值问题】
  • 原文地址:https://www.cnblogs.com/xinghen1216/p/15657051.html
Copyright © 2011-2022 走看看