zoukankan      html  css  js  c++  java
  • BGP(边界网关协议)实验

    实验要求: 1.1.1.1访问5.5.5.5走R1-R2-R4-R5

    5.5.5.5访问1.1.1.1走R5-R4-R3-R1

    一、配置IP

    二、为R2R3R4配置IGP动态路由OSPF

    R2:

    ospf 100

    area 0.0.0.0

    network 12.1.1.0 0.0.0.255

    network 24.1.1.0 0.0.0.255

    R3:

    ospf 100

    area 0.0.0.0

    network 13.1.1.0 0.0.0.255

    network 34.1.1.0 0.0.0.255

    R4:

    ospf 100

    area 0.0.0.0

    network 24.1.1.0 0.0.0.255

    network 45.1.1.0 0.0.0.255

    network 34.1.1.0 0.0.0.255

    配置bgp

    R1:

    bgp 100

      router-id 1.1.1.1

      peer 12.1.1.2 as-number 200

      peer 13.1.1.3 as-number 200

       network 1.1.1.1 255.255.255.255

    R2:

    bgp 200

    router-id 2.2.2.2

      peer 12.1.1.1 as-number 100

      peer 24.1.1.4 as-number 200

      import-route ospf 100

      peer 24.1.1.4 next-hop-local

    R3:

    bgp 200

      router-id 3.3.3.3

      peer 13.1.1.1 as-number 100

      peer 34.1.1.4 as-number 200

      import-route ospf 100

      peer 34.1.1.4 next-hop-local

    R4:

    bgp 200

      router-id 4.4.4.4

      peer 24.1.1.2 as-number 200

      peer 34.1.1.3 as-number 200

      peer 45.1.1.5 as-number 300

      undo synchronization

      import-route ospf 100

      peer 24.1.1.2 next-hop-local

      peer 34.1.1.3 next-hop-local

    R5:

    bgp 300

      router-id 5.5.5.5

      peer 45.1.1.4 as-number 200

      network 5.5.5.5 255.255.255.255

    配置选路规则

    R2:

    route-policy shang permit node 10  (shang为名字,可以自己设置)

    apply local-preference 222

    bgp 200

    peer 12.1.1.1 route-policy shang export

    R3

    route-policy xie permit node 10  (xia为名字,可以自己设置)

    apply local-preference 222

    bgp 200

    peer 34.1.1.4 route-policy xie export

  • 相关阅读:
    POJ1149 最大流经典建图PIG
    POJ1149 最大流经典建图PIG
    POJ3322滚箱子游戏(不错)
    POJ3322滚箱子游戏(不错)
    UVA11020 优势人群(multiset)
    UVA11020 优势人群(multiset)
    UVA11019KMP(二维矩阵匹配出现次数)
    UVA11019KMP(二维矩阵匹配出现次数)
    LA3942字典树+递推
    LA3942字典树+递推
  • 原文地址:https://www.cnblogs.com/ccshi/p/13140260.html
Copyright © 2011-2022 走看看