• 使用华为eNSP组网试验⑹-组建基于BGP的网络


      BGP(Border Gateway Protocol -- 边界网关协议)是一种在自治系统之间动态交换路由信息、具有丰富的路由控制机制、稳定而安全的路由协议,一般部署在骨干(主要、核心)路由器。

      BGP适用于大中型网络的组建,在很多企业当中都有应用。

      一般情况下,企业的网络当中不会只是简单地使用一种网络协议,都会混杂着启用很多的网络协议并且根据需求进行逻辑隔离,也可以在一种协议当中引用另外一种协议的部分网络资源。

      BGP分为 EBGP(External/Exterior BGP)和 IBGP(Internal/Interior BGP),这是按照运行方式来划分的。EBGP运行于不同AS之间,IBGP运行于同一AS内部。
      为了防止AS间所产生的环路,当BGP设备接收EBGP对等体发送的路由时,会将带有本地AS号的路由丢弃;而为了防止AS内部所产生的环路,BGP设备不将从IBGP对等体学到的路由通告给其他IBGP对等体,并与所有IBGP对等体建立全连接。为了解决IBGP对等体的连接数量太多的问题,BGP有路由反射器和 BGP 联盟。

      比如,企业当中有办公网络、物联网、视频监控网络等,在这样的情况下为了节约网络硬件,办公、自动化、视频都在同一个网络设备上但进行了分割,办公网使用OSPF、自动化和视频使用BGP,三个网络分开互不影响,根据需要可以设定路由来完成特殊的应用。

      BGP组网略微复杂一点,根据组建需求配置参数略微多,BGP需要学习的内容很多。

      一、常用查询的命令

      ①display bgp routing-table 

      ②refresh bgp all export

      ③display ip interface brief

      ④display bgp peer

      ⑤display ip routing-table protocol bgp

      二、试验图

      三、试验结果

      四、配置

      Router3配置:

    1. sysname Router3
    2. #
    3. snmp-agent local-engineid 800007DB03000000000000
    4. snmp-agent
    5. #
    6. clock timezone China-Standard-Time minus 08:00:00
    7. #
    8. portal local-server load flash:/portalpage.zip
    9. #
    10. drop illegal-mac alarm
    11. #
    12. undo info-center enable
    13. #
    14. wlan ac-global carrier id other ac id 0
    15. #
    16. set cpu-usage threshold 80 restore 75
    17. #
    18. aaa
    19. authentication-scheme default
    20. authorization-scheme default
    21. accounting-scheme default
    22. domain default
    23. domain default_admin
    24. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
    25. local-user admin service-type http
    26. #
    27. firewall zone Local
    28. priority 15
    29. #
    30. interface GigabitEthernet0/0/0
    31. ip address 200.200.1.1 255.255.255.252
    32. #
    33. interface GigabitEthernet0/0/1
    34. ip address 200.200.9.2 255.255.255.252
    35. #
    36. interface GigabitEthernet0/0/2
    37. #
    38. interface NULL0
    39. #
    40. interface LoopBack0
    41. ip address 4.4.4.4 255.255.255.255
    42. #
    43. bgp 100
    44. peer 200.200.1.2 as-number 200
    45. #
    46. ipv4-family unicast
    47. undo synchronization
    48. network 4.4.4.4 255.255.255.255
    49. network 192.168.1.0
    50. network 200.200.1.0 255.255.255.252
    51. network 200.200.9.0
    52. network 200.200.9.0 255.255.255.252
    53. import-route static
    54. peer 200.200.1.2 enable
    55. #
    56. ip route-static 192.168.0.0 255.255.0.0 200.200.9.1
    57. #
    58. user-interface con 0
    59. authentication-mode password
    60. user-interface vty 0 4
    61. user-interface vty 16 20
    62. #
    63. wlan ac
    64. #
    65. return

      Router1配置:

    1. sysname Router1
    2. #
    3. snmp-agent local-engineid 800007DB03000000000000
    4. snmp-agent
    5. #
    6. clock timezone China-Standard-Time minus 08:00:00
    7. #
    8. portal local-server load flash:/portalpage.zip
    9. #
    10. drop illegal-mac alarm
    11. #
    12. undo info-center enable
    13. #
    14. wlan ac-global carrier id other ac id 0
    15. #
    16. set cpu-usage threshold 80 restore 75
    17. #
    18. aaa
    19. authentication-scheme default
    20. authorization-scheme default
    21. accounting-scheme default
    22. domain default
    23. domain default_admin
    24. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
    25. local-user admin service-type http
    26. #
    27. firewall zone Local
    28. priority 15
    29. #
    30. interface GigabitEthernet0/0/0
    31. ip address 200.200.2.5 255.255.255.252
    32. #
    33. interface GigabitEthernet0/0/1
    34. ip address 200.200.1.2 255.255.255.252
    35. #
    36. interface GigabitEthernet0/0/2
    37. #
    38. interface NULL0
    39. #
    40. interface LoopBack0
    41. ip address 2.2.2.2 255.255.255.255
    42. #
    43. bgp 200
    44. peer 200.200.1.1 as-number 100
    45. peer 200.200.2.6 as-number 200
    46. #
    47. ipv4-family unicast
    48. undo synchronization
    49. network 200.200.2.5 255.255.255.255
    50. peer 200.200.1.1 enable
    51. peer 200.200.2.6 enable
    52. peer 200.200.2.6 next-hop-local
    53. #
    54. user-interface con 0
    55. authentication-mode password
    56. user-interface vty 0 4
    57. user-interface vty 16 20
    58. #
    59. wlan ac
    60. #
    61. return

      Router0配置:

    1. sysname Router0
    2. #
    3. snmp-agent local-engineid 800007DB03000000000000
    4. snmp-agent
    5. #
    6. clock timezone China-Standard-Time minus 08:00:00
    7. #
    8. portal local-server load flash:/portalpage.zip
    9. #
    10. drop illegal-mac alarm
    11. #
    12. undo info-center enable
    13. #
    14. wlan ac-global carrier id other ac id 0
    15. #
    16. set cpu-usage threshold 80 restore 75
    17. #
    18. aaa
    19. authentication-scheme default
    20. authorization-scheme default
    21. accounting-scheme default
    22. domain default
    23. domain default_admin
    24. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
    25. local-user admin service-type http
    26. #
    27. firewall zone Local
    28. priority 15
    29. #
    30. interface GigabitEthernet0/0/0
    31. ip address 200.200.2.6 255.255.255.252
    32. #
    33. interface GigabitEthernet0/0/1
    34. ip address 200.200.3.9 255.255.255.252
    35. #
    36. interface GigabitEthernet0/0/2
    37. #
    38. interface NULL0
    39. #
    40. interface LoopBack0
    41. ip address 1.1.1.1 255.255.255.255
    42. #
    43. bgp 200
    44. peer 200.200.2.5 as-number 200
    45. peer 200.200.3.10 as-number 200
    46. #
    47. ipv4-family unicast
    48. undo synchronization
    49. network 200.200.2.4 255.255.255.252
    50. network 200.200.3.8 255.255.255.252
    51. peer 200.200.2.5 enable
    52. peer 200.200.2.5 reflect-client
    53. peer 200.200.3.10 enable
    54. peer 200.200.3.10 reflect-client
    55. #
    56. user-interface con 0
    57. authentication-mode password
    58. user-interface vty 0 4
    59. user-interface vty 16 20
    60. #
    61. wlan ac
    62. #
    63. return

      Router2配置:

    1. sysname Router2
    2. #
    3. snmp-agent local-engineid 800007DB03000000000000
    4. snmp-agent
    5. #
    6. clock timezone China-Standard-Time minus 08:00:00
    7. #
    8. portal local-server load flash:/portalpage.zip
    9. #
    10. drop illegal-mac alarm
    11. #
    12. undo info-center enable
    13. #
    14. wlan ac-global carrier id other ac id 0
    15. #
    16. set cpu-usage threshold 80 restore 75
    17. #
    18. aaa
    19. authentication-scheme default
    20. authorization-scheme default
    21. accounting-scheme default
    22. domain default
    23. domain default_admin
    24. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
    25. local-user admin service-type http
    26. #
    27. firewall zone Local
    28. priority 15
    29. #
    30. interface GigabitEthernet0/0/0
    31. ip address 200.200.3.10 255.255.255.252
    32. #
    33. interface GigabitEthernet0/0/1
    34. ip address 200.200.4.13 255.255.255.252
    35. #
    36. interface GigabitEthernet0/0/2
    37. #
    38. interface NULL0
    39. #
    40. interface LoopBack0
    41. ip address 3.3.3.3 255.255.255.255
    42. #
    43. bgp 200
    44. peer 200.200.3.9 as-number 200
    45. peer 200.200.4.14 as-number 300
    46. #
    47. ipv4-family unicast
    48. undo synchronization
    49. network 3.3.3.3 255.255.255.255
    50. network 200.200.3.8 255.255.255.252
    51. network 200.200.4.12 255.255.255.252
    52. peer 200.200.3.9 enable
    53. peer 200.200.3.9 next-hop-local
    54. peer 200.200.4.14 enable
    55. #
    56. user-interface con 0
    57. authentication-mode password
    58. user-interface vty 0 4
    59. user-interface vty 16 20
    60. #
    61. wlan ac
    62. #
    63. return

      Router4配置:

    1. sysname Router4
    2. #
    3. snmp-agent local-engineid 800007DB03000000000000
    4. snmp-agent
    5. #
    6. clock timezone China-Standard-Time minus 08:00:00
    7. #
    8. portal local-server load flash:/portalpage.zip
    9. #
    10. drop illegal-mac alarm
    11. #
    12. undo info-center enable
    13. #
    14. wlan ac-global carrier id other ac id 0
    15. #
    16. set cpu-usage threshold 80 restore 75
    17. #
    18. aaa
    19. authentication-scheme default
    20. authorization-scheme default
    21. accounting-scheme default
    22. domain default
    23. domain default_admin
    24. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
    25. local-user admin service-type http
    26. #
    27. firewall zone Local
    28. priority 15
    29. #
    30. interface GigabitEthernet0/0/0
    31. ip address 200.200.4.14 255.255.255.252
    32. #
    33. interface GigabitEthernet0/0/1
    34. ip address 200.200.19.2 255.255.255.252
    35. #
    36. interface GigabitEthernet0/0/2
    37. #
    38. interface NULL0
    39. #
    40. interface LoopBack0
    41. ip address 5.5.5.5 255.255.255.255
    42. #
    43. bgp 300
    44. peer 200.200.4.13 as-number 200
    45. #
    46. ipv4-family unicast
    47. undo synchronization
    48. network 5.5.5.5 255.255.255.255
    49. network 172.16.1.0 255.255.255.0
    50. network 200.200.19.0 255.255.255.252
    51. import-route static
    52. peer 200.200.4.13 enable
    53. #
    54. ip route-static 176.16.0.0 255.255.0.0 200.200.19.1
    55. #
    56. user-interface con 0
    57. authentication-mode password
    58. user-interface vty 0 4
    59. user-interface vty 16 20
    60. #
    61. wlan ac
    62. #
    63. return

  • 相关阅读:
    Javascript核心技术的基础语法
    flutter问题汇总
    React组件通信:如何优雅地实现组件间的数据传递
    比较两个数组内容是否相同
    刷题笔记20——各种顺序的二叉树构造
    多线程查询,效率翻倍
    数据结构(超详细讲解!!)第二十一节 特殊矩阵的压缩存储
    细胞穿膜肽TAT/血管肽Angiopep/靶向多肽cRGD偶联TIO2二氧化钛纳米粒(TiO2-Angiopep)
    《入门级-Cocos2dx4.0 塔防游戏开发》---第十课:游戏中餐单设置
    Linux Centos系统 磁盘分区和文件系统管理 (深入理解)
  • 原文地址:https://blog.csdn.net/dawn0718/article/details/133673610