华为IS-IS+BGP大型综合实验!!实验较复杂,观看要有准备!!!

文章目录

  • 前言
  • 一:环境
      • 1.1:环境介绍
      • 1.2:实验目的
      • 1.3:实验拓扑图
  • 二:实验配置
      • 2.1:先配置所有路由的IP地址
      • 2.2:通过ISIS配置将AS内部的直连和环回口路由宣告
      • 2.3:通过配置BGP协议将所有的用户业务路由宣告
      • 2.4:通过配置路由反射器实现市内、省内路由互通
      • 2.5:通过建立EBGP邻居实现全省和互联网路由互传
  • 三:实验总结
      • 3.1:配置IS-IS的方法
      • 3.2:IBGP建立邻居关系
      • 3.3:EBGP建立邻居关系
      • 3.4:下一跳优化
      • 3.5:配置路由反射器

前言

  • 本次实验很大,很复杂,如果想认真看请做好时间准备
  • 本次实验涉及到的知识点有:IS-IS配置,BGP邻居关系的建立,BGP下一跳的优化,路由反射器的配置等
  • 有疑问请留言或者私聊我

一:环境

1.1:环境介绍

  • eNSP软件
  • 8台路由器,分为基层,市干核心,省干核心,国干核心路由

1.2:实验目的

  • 通过ISIS配置将AS内部的直连和环回口路由宣告
  • 通过配置BGP协议将所有的用户业务路由宣告
  • 通过配置路由反射器实现市内、省内路由互通
  • 通过建立EBGP邻居实现全省和互联网路由互传

1.3:实验拓扑图

  • 华为IS-IS+BGP大型综合实验!!实验较复杂,观看要有准备!!!_第1张图片

二:实验配置

2.1:先配置所有路由的IP地址

  • '//以R8为例,使用相同方法配置所有路由IP地址'
    sys	'//进入系统视图'
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sysn R8	'//修改名称为R8'
    [R8]int g0/0/0	'//进入接口'
    [R8-GigabitEthernet0/0/0]ip add 78.0.0.2 30	'//添加IP地址'
    [R8-GigabitEthernet0/0/0]un sh	'//保存'
    [R8-GigabitEthernet0/0/0]int g0/0/1	'//进入接口'
    [R8-GigabitEthernet0/0/1]ip add 48.0.0.2 30	'//添加IP地址'
    [R8-GigabitEthernet0/0/1]un sh	'//保存'
    [R8-GigabitEthernet0/0/1]int loo 0	'//进入回环接口'
    [R8-LoopBack0]ip address 8.8.8.8 32	'//添加IP地址'
    [R8-LoopBack0]q	'//退出'
    [R8]dis ip int b	'//查看接口IP地址情况'
    *down: administratively down
    !down: FIB overload down
    ^down: standby
    (l): loopback
    (s): spoofing
    (d): Dampening Suppressed
    The number of interface that is UP in Physical is 4
    The number of interface that is DOWN in Physical is 8
    The number of interface that is UP in Protocol is 4
    The number of interface that is DOWN in Protocol is 8
    
    Interface                         IP Address/Mask      Physical   Protocol  
    Ethernet0/0/0                     unassigned           down       down      
    Ethernet0/0/1                     unassigned           down       down      
    GigabitEthernet0/0/0              78.0.0.2/30          up         up        
    GigabitEthernet0/0/1              48.0.0.2/30          up         up        
    GigabitEthernet0/0/2              unassigned           down       down      
    GigabitEthernet0/0/3              unassigned           down       down      
    LoopBack0                         8.8.8.8/32           up         up(s)     
    NULL0                             unassigned           up         up(s)     
    Serial0/0/0                       unassigned           down       down      
    Serial0/0/1                       unassigned           down       down      
    Serial0/0/2                       unassigned           down       down      
    Serial0/0/3                       unassigned           down       down  
    

2.2:通过ISIS配置将AS内部的直连和环回口路由宣告

  • R1的IS-IS配置

    [R1]isis 1 '//开启isis 1'
    [R1-isis-1]network-entity 49.0001.0010.0100.1001.00	'//宣告NSAP'
    [R1-isis-1]is-level level-1	'//配置IS-IS路由类型'
    [R1-isis-1]q
    [R1]int g0/0/0
    [R1-GigabitEthernet0/0/0]isis en	'//开启isis'
    [R1-GigabitEthernet0/0/0]int g0/0/1
    [R1-GigabitEthernet0/0/1]isis en
    [R1-GigabitEthernet0/0/1]int loo 0
    [R1-LoopBack0]isis en
    
  • R2,R3,R5,R6,R7的IS-IS配置

    '//配置方法同R1'
    '//各路由器的NSAP'
    R2的NSAP为network-entity 49.0001.0010.0100.1001.00
    R3的NSAP为network-entity 49.0000.0010.0100.1001.00
    R5的NSAP为network-entity 49.0001.0010.0100.1001.00
    R6的NSAP为network-entity 49.0001.0010.0100.1001.00
    R7的NSAP为network-entity 49.0000.0010.0100.1001.00
    '//各路由器的ISIS路由类型'
    R2的路由类型为is-level level-1-2
    R3的路由类型为is-level level-2
    R5的路由类型为is-level level-1
    R6的路由类型为is-level level-1-2
    R7的路由类型为is-level level-2
    '//个路由器的接口都要开启isis'
    其中:R3的G0/0/1和R7的G0/0/1接口不需要开启isis
    
  • 若想要R1和R5学习到其它路由信息,我们需要通过路由泄露的方法实现

    [R2]isis 1
    [R2-isis-1]import-route isis level-2 into level-1 
    [R6]isis 1
    [R6-isis-1]import-route isis level-2 into level-1 
    '//此时,R1和R5可以学习到其它路由信息'
    

2.3:通过配置BGP协议将所有的用户业务路由宣告

  • 先配置IBGP协议,先建立邻居关系

  • '//R1与R2、R3、R6、R7建立邻居关系'
    [R1]router id 1.1.1.1	'//宣告router id'
    [R1]bgp 56001	'//开启bgp,56001为所在AS区域号'
    [R1-bgp]peer 2.2.2.2 as-number 56001	'//与AS区域号为56001,ip为2.2.2.2的路由建立邻居关系'
    [R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0	'//与ip2.2.2.2的路由loopback 0接口建立邻居关系'
    [R1-bgp]peer 3.3.3.3 as-number 56001
    [R1-bgp]peer 3.3.3.3 connect-interface LoopBack 0
    [R1-bgp]peer 6.6.6.6 as-number 56001
    [R1-bgp]peer 6.6.6.6 connect-interface LoopBack 0
    [R1-bgp]peer 7.7.7.7 as-number 56001
    [R1-bgp]peer 7.7.7.7 connect-interface LoopBack 0
    [R1-bgp]
    '//R2与R1、R3、R5、R6建立邻居关系'
    [R2]router id 2.2.2.2
    [R2]bgp 56001
    [R2-bgp]peer 1.1.1.1 as-number 56001
    [R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
    [R2-bgp]peer 3.3.3.3 as-number 56001
    [R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
    [R2-bgp]peer 5.5.5.5 as-number 56001
    [R2-bgp]peer 5.5.5.5 connect-interface LoopBack 0
    [R2-bgp]peer 6.6.6.6 as-number 56001
    [R2-bgp]peer 6.6.6.6 connect-interface LoopBack 0
    '//R3与R1、R2、R5、R7建立邻居关系'
    [R3]router id 3.3.3.3
    [R3]bgp 56001
    [R3-bgp]peer 1.1.1.1 as-number 56001
    [R3-bgp]peer 1.1.1.1 connect-interface LoopBack 0
    [R3-bgp]peer 2.2.2.2 as-number 56001
    [R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
    [R3-bgp]peer 5.5.5.5 as-number 56001
    [R3-bgp]peer 5.5.5.5 connect-interface LoopBack 0
    [R3-bgp]peer 7.7.7.7 as-number 56001
    [R3-bgp]peer 7.7.7.7 connect-interface LoopBack 0
    '//R5与R2、R3、R6、R7建立邻居关系'
    [R5]router id 5.5.5.5
    [R5]bgp 56001
    [R5-bgp]peer 2.2.2.2 as-number 56001
    [R5-bgp]peer 2.2.2.2 connect-interface LoopBack 0
    [R5-bgp]peer 3.3.3.3 as-number 56001
    [R5-bgp]peer 3.3.3.3 connect-interface LoopBack 0
    [R5-bgp]peer 6.6.6.6 as-number 56001
    [R5-bgp]peer 6.6.6.6 connect-interface LoopBack 0
    [R5-bgp]peer 7.7.7.7 as-number 56001
    [R5-bgp]peer 7.7.7.7 connect-interface LoopBack 0
    '//R6与R1、R2、R5、R7建立邻居关系'
    [R6]router id 6.6.6.6
    [R6]bgp 56001
    [R6-bgp]peer 1.1.1.1 as-number 56001
    [R6-bgp]peer 1.1.1.1 connect-interface LoopBack 0
    [R6-bgp]peer 2.2.2.2 as-number 56001
    [R6-bgp]peer 2.2.2.2 connect-interface LoopBack 0
    [R6-bgp]peer 5.5.5.5 as-number 56001
    [R6-bgp]peer 5.5.5.5 connect-interface LoopBack 0
    [R6-bgp]peer 7.7.7.7 as-number 56001
    [R6-bgp]peer 7.7.7.7 connect-interface LoopBack 0
    '//R7与R1、R3、R5、R6建立邻居关系'
    [R7]router id 7.7.7.7
    [R7]bgp 56001
    [R7-bgp]peer 1.1.1.1 as-number 56001
    [R7-bgp]peer 1.1.1.1 connect-interface LoopBack 0
    [R7-bgp]peer 3.3.3.3 as-number 56001
    [R7-bgp]peer 3.3.3.3 connect-interface LoopBack 0
    [R7-bgp]peer 5.5.5.5 as-number 56001
    [R7-bgp]peer 5.5.5.5 connect-interface LoopBack 0
    [R7-bgp]peer 6.6.6.6 as-number 56001
    [R7-bgp]peer 6.6.6.6 connect-interface LoopBack 0
    [R7-bgp]dis bgp peer	'//查看邻居关系建立情况,相同命令查看其它路由的邻居关系'
    
     BGP local router ID : 7.7.7.7
     Local AS number : 56001
     Total number of peers : 4		  Peers in established state : 4
    
      Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
    fRcv
    
      1.1.1.1         4       56001        6        6     0 00:04:57 Established    
       0
      3.3.3.3         4       56001        6        6     0 00:04:58 Established    
       0
      5.5.5.5         4       56001        6        6     0 00:04:58 Established    
       0
      6.6.6.6         4       56001        6        6     0 00:04:56 Established    
       0
    
  • 添加并宣告业务网段

  • [R1]int loo 1
    [R1-LoopBack1]ip add 11.0.0.1 30
    [R1-LoopBack1]
    [R1]bgp 56001
    [R1-bgp]net	
    [R1-bgp]network 11.0.0.0 30
    

2.4:通过配置路由反射器实现市内、省内路由互通

  • '//刚刚宣告完毕我们发现R5学习不到此条业务网段,我们通过配置路由反射器来让他学习到'
    [R2]bgp 56001
    [R2-bgp]reflector cluster-id 100
    [R2-bgp]peer 1.1.1.1 reflect-client 
    [R2-bgp]peer 5.5.5.5 reflect-client 
    '//此时R5已经可以学习到这条业务路由了,但是生产环境中我们还需要在R6上配置路由反射器,实现市内路由互通'
    [R6]bgp 56001
    [R6-bgp]reflector cluster-id 100
    [R6-bgp]peer 1.1.1.1 reflect-client 
    [R6-bgp]peer 5.5.5.5 reflect-client 
    '//想要实现省内路由互通,我们需要在R3和R7上配置路由反射器'
    [R3]bgp 56001
    [R3-bgp]reflector cluster-id 200
    [R3-bgp]peer 2.2.2.2 reflect-client 	'//因为R3与R6没有建立邻居关系,所以不需要做R6的反射'
    [R7]bgp 56001
    [R7-bgp]reflector cluster-id 200
    [R7-bgp]peer 6.6.6.6 reflect-client 	'//因为R7与R2没有建立邻居关系,所以不需要做R2的反射'
    '//此时已经实现省内互通'
    

2.5:通过建立EBGP邻居实现全省和互联网路由互传

  • 建立EBGP邻居

    '//先配置静态路由'
    [R3]ip route-static 4.4.4.4 32 34.0.0.2
    [R7]ip route-static 8.8.8.8 32 78.0.0.2
    [R4]ip route-static 3.3.3.3 32 34.0.0.1
    [R8]ip route-static 7.7.7.7 32 78.0.0.1
    '//配置EBGP邻居'
    [R3]bgp 56001
    [R3-bgp]peer 4.4.4.4 as-number 56002
    [R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
    [R3-bgp]peer 4.4.4.4 ebgp-max-hop 2
    [R4]router id  4.4.4.4
    [R4]bgp 56002
    [R4-bgp]peer 3.3.3.3 as-number 56001
    [R4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
    [R4-bgp]peer 3.3.3.3 ebgp-max-hop 2
    [R7]bgp 56001
    [R7-bgp]peer 8.8.8.8 as-number 56002
    [R7-bgp]peer 8.8.8.8 connect-interface LoopBack 0
    [R7-bgp]peer 8.8.8.8 ebgp-max-hop 2
    [R8]router id  8.8.8.8
    [R8]bgp 56002
    [R8-bgp]peer 7.7.7.7 as-number 56001
    [R8-bgp]peer 7.7.7.7 connect-interface LoopBack 0
    [R8-bgp]peer 7.7.7.7 ebgp-max-hop 2
    '//通过使用dis bgp peer命令查看邻居关系'
    [R8-bgp]dis bgp peer
    ...省略内容
    
  • R4添加一条业务网段

    [R4]int loo 1
    [R4-LoopBack1]ip add 44.0.0.1 30
    [R4-LoopBack1]q
    [R4]bgp 56002
    [R4-bgp]net	
    [R4-bgp]network 44.0.0.0 30
    
  • R3和R7做下一跳优化

    [R3-bgp]peer 1.1.1.1 next-hop-local
    [R3-bgp]peer 2.2.2.2 next-hop-local
    [R3-bgp]peer 5.5.5.5 next-hop-local
    [R3-bgp]peer 7.7.7.7 next-hop-local
    [R7-bgp]peer 1.1.1.1 next-hop-local
    [R7-bgp]peer 3.3.3.3 next-hop-local
    [R7-bgp]peer 5.5.5.5 next-hop-local
    [R7-bgp]peer 6.6.6.6 next-hop-local
    '//例如R3做完下一跳优化后,其他邻居路由器查看路由表的时候会发现44.0.0.0的网段下一条变为3.3.3.3'
    
  • 在R1上ping测试44.0.0.1这个业务地址

    '//R4没有回程路由,所以我们需要带源地址pingR4'
    [R1]ping -a 11.0.0.1 44.0.0.1
      PING 44.0.0.1: 56  data bytes, press CTRL_C to break
        Reply from 44.0.0.1: bytes=56 Sequence=1 ttl=253 time=110 ms
        Reply from 44.0.0.1: bytes=56 Sequence=2 ttl=253 time=70 ms
        Reply from 44.0.0.1: bytes=56 Sequence=3 ttl=253 time=70 ms
        Reply from 44.0.0.1: bytes=56 Sequence=4 ttl=253 time=60 ms
        Reply from 44.0.0.1: bytes=56 Sequence=5 ttl=253 time=90 ms
    
      --- 44.0.0.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 60/80/110 ms
    
  • 实验结束

三:实验总结

3.1:配置IS-IS的方法

1、启动IS-IS进程,根据区域规划配置NET地址
2、根据网络结构配置IS-IS路由类型
3、在接口下,将口宣告到IS-IS进程中
[R1]isis 1 '//开启isis 1'
[R1-isis-1]network-entity 49.0001.0010.0100.1001.00	'//宣告NSAP'
[R1-isis-1]is-level level-1	'//配置IS-IS路由类型'
[R1-isis-1]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]isis en	'//开启isis'
'//路由泄露'
isis 1
import-route isis level-2 into level-1

3.2:IBGP建立邻居关系

1、启用BGP,后面跟AS系统号
2、宣告Route-id,建立邻居关系用
3、宣告和谁建立邻居关系,
4、通告BGP路由,(network、import)
[R1]router-id 1.1.1.1
[R1]bgp 100
[R1-bgp] peer 7.7.7.7 as-number 100	
[R1-bgp] peer 7.7.7.7 connect-interface LoopBack 0	
[R1-bgp] network 1.1.1.1 32

3.3:EBGP建立邻居关系

1、配置控制层面静态路由
ip route-static 4.4.4.4 32 34.0.0.2
2、配置EBGP邻居
bgp 56001
peer 4.4.4.4 as-number 56002
peer 4.4.4.4 connect-interface LoopBack 0
peer 4.4.4.4 ebgp-max-hop 2

3.4:下一跳优化

[R3-bgp]peer 1.1.1.1 next-hop-local

3.5:配置路由反射器

bgp 56001
reflector cluster-id 100
peer 1.1.1.1 reflect-client
peer 5.5.5.5 reflect-client
```css
1、配置控制层面静态路由
ip route-static 4.4.4.4 32 34.0.0.2
2、配置EBGP邻居
bgp 56001
peer 4.4.4.4 as-number 56002
peer 4.4.4.4 connect-interface LoopBack 0
peer 4.4.4.4 ebgp-max-hop 2

你可能感兴趣的:(华为网络原理与应用)