CCNP课程实验-05-Comprehensive_Experiment

目录

  • 实验条件
    • 网络拓朴
  • 基础配置实现
    • IGP需求:
      • 1. 根据拓扑所示,配置OSPF和EIGRP
      • 2. 在R3上增加一个网段:33.33.33.0/24 (用Loopback 1模拟) 宣告进EIGRP,并在R3上将EIGRP重分布进OSPF。要求重分布进OSPF后的路由Tag值设置为666,且Cost值能沿传递路径累加。但OSPF区域不能出现33.33.33.0/24这条路由。
      • 3. 在R1上看到34.1.1.0/24路由的管理距离为111。
      • 4. R1和R2之间不需要选举DR、BDR,但需要使用组播更新。
      • 5. 在R2上增加两个网段:22.22.1.0/24,22.22.2.0/24 (用Loopback模拟) 视情况宣告进相关区域。在R2上配置最精确的路由汇总,使得R3能看到汇总路由。
      • 6. Area 0区域为保证安全,开启区域密文认证,密码为SPOTO
      • 7. Area 1区域需尽量减少路由数量,且不允许引入任何外部路由。
    • BGP需求
      • 1. R1和R2采用Loopback 0建立IBGP邻居(AS 12),R3和R4采用Loopback 0建立IBGP邻居(AS 34),R1和R4、R2和R3建立EBGP邻居。
      • 2. R1上增加两个网段:10.10.10.0/24,10.10.11.0/24。R2上增加两个网段:20.20.20.0/24,20.20.21.0/24。将这些网段都宣告进BGP。
      • 3. 配置使得R3、R4的BGP表如图所示
    • IPv6-OSPF需求
      • 1. 采用OSPFv3方式配置,手动设置Router-id为Loopback 0的IPv4地址,区域设计与IPv4相同。各物理接口都需宣告进OSPF。
      • 2. 要求R3能Ping通R4的IPv6 Loopback 0地址。
    • IPv6-BGP需求
      • 1. R1和R2采用Loopback 0建立IBGP邻居,R1和R4、R2和R3建立EBGP邻居。
      • 2. R1上增加一个网段:10:10:10::10/128,R3上增加一个网段:30:30:30::30/128 (用Loopback模拟) 并宣告进BGP。要求R1能从10:10:10::10 Ping通R3的30:30:30::30

实验条件

网络拓朴

在这里插入图片描述
IPv4:
拓扑中的IPv4互联地址段采用:AB.1.1.X/24,其中AB为两台路由器编号组合。例如:R1-R2之间的AB为12,X为路由器编号,如R1的X=1
Loopback 0接口地址格式为:X.X.X.X/32,其中X为路由器编号。
没有特殊要求,不允许使用静态路由。
IPv6:
拓扑中的IPv6互联地址采用:2001:AB::X/64,其中AB为两台路由器编号组合。例如:R1-R2之间的AB为12,X为路由器编号,如R1的X=1
Loopback 0接口地址格式为:X:X:X::X/128,其中X为路由器编号。
没有特殊要求,不允许使用静态路由。

基础配置实现

R1

R1(config-if)#do show run | s interface 
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
interface Ethernet0/0
 ip address 12.1.1.1 255.255.255.0
 no shutdown
interface Ethernet0/1
 ip address 14.1.1.1 255.255.255.0
 no shutdown

R2

R2(config-if)#do show run | s interface
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
interface Ethernet0/0
 ip address 12.1.1.2 255.255.255.0
 no shutdown
interface Ethernet0/1
 ip address 23.1.1.2 255.255.255.0
 no shutdown
R2(config-if)#

R3

R3(config-route-map)#do show run | s interface 
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
interface Loopback1
 ip address 33.33.33.33 255.255.255.0
interface Ethernet0/0
 ip address 34.1.1.3 255.255.255.0
 no shutdown
interface Ethernet0/1
 ip address 23.1.1.3 255.255.255.0
 no shutdown

R4

R4(config-router)#do show run | s interface
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
interface Ethernet0/0
 ip address 34.1.1.4 255.255.255.0
 no shutdown
interface Ethernet0/1
 ip address 14.1.1.4 255.255.255.0
 no shutdown

IGP需求:

1. 根据拓扑所示,配置OSPF和EIGRP

R1

router ospf 100
 router-id 1.1.1.1
interface Ethernet0/0
 ip ospf 100 area 0
interface Ethernet0/1
 ip ospf 100 area 1

R2

router ospf 100
 router-id 2.2.2.2
interface Ethernet0/0
 ip ospf 100 area 0
interface Ethernet0/1
 ip ospf 100 area 2

R3

router ospf 100
 router-id 3.3.3.3
interface Ethernet0/1
 ip ospf 100 area 2
router eigrp 100
 network 3.3.3.3 0.0.0.0
 network 34.1.1.3 0.0.0.0
 eigrp router-id 3.3.3.3

R4

router eigrp 100
 network 4.4.4.4 0.0.0.0
 network 34.1.1.4 0.0.0.0
 eigrp router-id 4.4.4.4
router ospf 100
 router-id 4.4.4.4
interface Ethernet0/1
 ip ospf 100 area 1

2. 在R3上增加一个网段:33.33.33.0/24 (用Loopback 1模拟) 宣告进EIGRP,并在R3上将EIGRP重分布进OSPF。要求重分布进OSPF后的路由Tag值设置为666,且Cost值能沿传递路径累加。但OSPF区域不能出现33.33.33.0/24这条路由。

R3

interface Loopback1
 ip address 33.33.33.33 255.255.255.0

ip prefix-list R3-summary seq 5 permit 33.33.33.0/24
route-map R3-summary deny 10
 match ip address prefix-list R3-summary
route-map R3-summary permit 20
 set tag 666
router ospf 100
 redistribute eigrp 100 metric-type 1 subnets route-map R3-summary

3. 在R1上看到34.1.1.0/24路由的管理距离为111。

R1路由表记录

      34.0.0.0/24 is subnetted, 1 subnets
O E1     34.1.1.0 [111/40] via 12.1.1.2, 00:07:21, Ethernet0/0

在router ospf 配置下,使用distance

access-list 10 permit 34.1.1.0 0.0.0.255
router ospf 100
 distance 111 0.0.0.0 255.255.255.255 10

4. R1和R2之间不需要选举DR、BDR,但需要使用组播更新。

把他们的网络类型修改成P2P,就不需要选举DR/BDR了,
R1

interface Ethernet0/0
 ip ospf network point-to-point

R2

interface Ethernet0/0
 ip ospf network point-to-point

5. 在R2上增加两个网段:22.22.1.0/24,22.22.2.0/24 (用Loopback模拟) 视情况宣告进相关区域。在R2上配置最精确的路由汇总,使得R3能看到汇总路由。

R2

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
interface Loopback1
 ip address 22.22.1.1 255.255.255.0
 
router ospf 100
 network 22.22.1.1 0.0.0.0 area 0
 network 22.22.2.1 0.0.0.0 area 0
 area 0 range 22.22.0.0 255.255.252.0

R3收到了来自2.2.2.2的通告信息

R3#show ip ospf database summary 22.22.0.0

            OSPF Router with ID (3.3.3.3) (Process ID 100)

                Summary Net Link States (Area 2)

  LS age: 1683
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 22.22.0.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x20EA
  Length: 28
  Network Mask: /22
        MTID: 0         Metric: 1 

R3#

6. Area 0区域为保证安全,开启区域密文认证,密码为SPOTO

R1

interface Ethernet0/0
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 SPOTO

R2

interface Ethernet0/0
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 SPOTO

7. Area 1区域需尽量减少路由数量,且不允许引入任何外部路由。

把Area1区域变成末梢区域,就可以实现目的
R1

router ospf 100
 area 1 stub no-summary

R2

router ospf 100
 area 1 stub

BGP需求

1. R1和R2采用Loopback 0建立IBGP邻居(AS 12),R3和R4采用Loopback 0建立IBGP邻居(AS 34),R1和R4、R2和R3建立EBGP邻居。

R1

router bgp 12
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 12
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 14.1.1.4 remote-as 34

R1

router bgp 12
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 12
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 23.1.1.3 remote-as 34

R3

router bgp 34
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 34
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 next-hop-self
 neighbor 23.1.1.2 remote-as 12

R4

router bgp 34
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 34
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self		// IBGP对等体,最好配置上该项,将路由下跳指向自己
 neighbor 14.1.1.1 remote-as 12

2. R1上增加两个网段:10.10.10.0/24,10.10.11.0/24。R2上增加两个网段:20.20.20.0/24,20.20.21.0/24。将这些网段都宣告进BGP。

R1

interface Loopback1
 ip address 10.10.10.1 255.255.255.0
interface Loopback2
 ip address 10.10.11.1 255.255.255.0

router bgp 12
 network 10.10.10.0 mask 255.255.255.0
 network 10.10.11.0 mask 255.255.255.0

R2

interface Loopback3
 ip address 20.20.20.1 255.255.255.0
interface Loopback4
 ip address 20.20.21.1 255.255.255.0
 
router bgp 12
 network 20.20.20.0 mask 255.255.255.0
 network 20.20.21.0 mask 255.255.255.0

3. 配置使得R3、R4的BGP表如图所示

R3
在这里插入图片描述
现在的R3BGP路由如下图

     Network          Next Hop            Metric LocPrf Weight Path
 * i  10.10.10.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                               0 12 i
 * i  10.10.11.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                               0 12 i
 * i  20.20.20.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                 0             0 12 i
 * i  20.20.21.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                 0             0 12 i

R4
在这里插入图片描述
现在的R4BGP路由如下图

     Network          Next Hop            Metric LocPrf Weight Path
 * i  10.10.10.0/24    3.3.3.3                  0    100      0 12 i
 *>                    14.1.1.1                 0             0 12 i
 *>   10.10.11.0/24    14.1.1.1                 0             0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>   20.20.20.0/24    14.1.1.1                               0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>   20.20.21.0/24    14.1.1.1                               0 12 i
 * i                   3.3.3.3                  0    100      0 12 i

比较得出结果
R3:不同点

     Network          Next Hop            Metric LocPrf Weight Path
 * i  10.10.10.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                               0 12 i
1. 这两条的Path值有改动,从10.10.10.0EBGPAS-PATH
2. 下一跳地址为4.4.4.4的路由要成为最优路径,LocalPrf值要设置为200
3. 缺少一条20.20.20.0/23的路由。

1 .先修改R4上通告过来的AS-Path,可以从R1-R4-in 方向进行修改。可以同时修改local-preference值。AS-PATH值只能在EBGP通告的时候,才可以修改, 因此需要在R4上接收的时候,就要修改PATH值,
R4

ip prefix-list bgp seq 5 permit 10.10.10.0/24

route-map R1-R4-in permit 10			// R1-R4-in方向的,进来的10.10.10.0/24路由
 match ip address prefix-list bgp
 set as-path prepend 5 6 7 8			// AS-PATH添加5,6,7,8
route-map R1-R4-in permit 20

// R4-R3-out方向的,出去的10.10.10.0/24路由,
// 要在相同的AS区域内,报文才可以传递PATH-Attribute属性,Local-preference, 也可以在R3上配置,R4-R3-in方向进行修改。
route-map R4-R3-out permit 10
 match ip address prefix-list bgp
 set local-preference 200
route-map R4-R3-out permit 20

router bgp 34
 neighbor 14.1.1.1 route-map R1-R4-in in
 neighbor 3.3.3.3  route-map R4-R3-out out

R4 BGP路由表结果展示
可见PATH值已修改。

R4(config-router)#do show ip bgp
BGP table version is 27, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>   10.10.10.0/24    14.1.1.1                 0             0 5 6 7 8 12 i
 *>   10.10.11.0/24    14.1.1.1                 0             0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>   20.20.20.0/24    14.1.1.1                               0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>   20.20.21.0/24    14.1.1.1                               0 12 i
 * i                   3.3.3.3                  0    100      0 12 i

R3 BGP路由表结果展示
可见PATH值、LocalPrf值都已修改,虽然AS-PATH变长(越短优先),但是因为localprf值越大越优先。所以4.4.4.4这一条的10.10.10.0路由成为最优路径。

R3(config-router)#do show ip bgp
BGP table version is 21, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  10.10.10.0/24    4.4.4.4                  0    200      0 5 6 7 8 12 i
 *                     23.1.1.2                               0 12 i
 * i  10.10.11.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                               0 12 i
 * i  20.20.20.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                 0             0 12 i
 * i  20.20.21.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                 0             0 12 i
  1. 修改23.1.1.2通告过来的路由的AS-PATH值。
    在R3上配置, R2-R3-in方向进行配置AS-PATH,因为R2-R3之间是EBGP,所以可以修改AS-PATH
    R3
ip prefix-list bgp10 seq 5 permit 10.10.10.0/24

// R2-R3-in方向的,进来的10.10.10.0/24路由
route-map R2-R3-in permit 10
 match ip address prefix-list bgp10
 set as-path prepend last-as 4	// AS-PATH,重复最后一个AS号
route-map R2-R3-in permit 20

router bgp 34
 neighbor 23.1.1.2 route-map R2-R3-in in

R3 BGP路由表结果展示
可见PATH值已修改。

R3(config-router)#do show ip bgp
BGP table version is 21, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  10.10.10.0/24    4.4.4.4                  0    200      0 5 6 7 8 12 i
 *                     23.1.1.2                               0 12 12 12 12 12 i
 * i  10.10.11.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                               0 12 i
 * i  20.20.20.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                 0             0 12 i
 * i  20.20.21.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                 0             0 12 i

R4 BGP路由表结果展示
然而R4上并没有收到来自3.3.3.3的,关于10.10.10.0,AS-PATH是12 12 12 12 12 i的记录, 这是因为在R3上,这条记录他不是Best,所以不会被转发给其它IBGP

R4(config-router)#do show ip bgp
BGP table version is 27, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>   10.10.10.0/24    14.1.1.1                 0             0 5 6 7 8 12 i
 *>   10.10.11.0/24    14.1.1.1                 0             0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>   20.20.20.0/24    14.1.1.1                               0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>   20.20.21.0/24    14.1.1.1                               0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
  1. 缺少了20.20.20.0/23路由记录,要添加这条路由信息
    这条记录子网掩码比较短,因此是经过聚合的,综合分析R3,R4图片中的路由信息可得到。 R3有收到R4的聚合路由通告信息。而从R2收到的路由是24位子网掩码的。因此,聚合路由的是R1路由器。且在R4路由器上并没有收到来自R1的24长度的路由,所以可以确定聚合时,只通告汇总路由,不通告明细路由
    所以在R1配置如下
router bgp 12
 aggregate-address 20.20.20.0 255.255.254.0 as-set summary-only // summary-only 只通告汇总路由

R3 BGP路由表结果展示
达成图片所要求的路由表效果

R3(config-router)#do show ip bgp
BGP table version is 34, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  10.10.10.0/24    4.4.4.4                  0    200      0 5 6 7 8 12 i
 *                     23.1.1.2                               0 12 12 12 12 12 i
 * i  10.10.11.0/24    4.4.4.4                  0    100      0 12 i
 *>                    23.1.1.2                               0 12 i
 *>   20.20.20.0/24    23.1.1.2                 0             0 12 i	// R2通告而来
 * i  20.20.20.0/23    4.4.4.4                  0    100      0 12 i	// R3只通告汇总路由。并且长度24的明细路由
 *>                    23.1.1.2                               0 12 i
 *>   20.20.21.0/24    23.1.1.2                 0             0 12 i

R4 BGP路由表结果展示
达成图片所要求的路由表效果

R4(config-router)#do show ip bgp
BGP table version is 30, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>   10.10.10.0/24    14.1.1.1                 0             0 5 6 7 8 12 i
 *>   10.10.11.0/24    14.1.1.1                 0             0 12 i
 * i                   3.3.3.3                  0    100      0 12 i
 *>i  20.20.20.0/24    3.3.3.3                  0    100      0 12 i	// R3通告而来
 * i  20.20.20.0/23    3.3.3.3                  0    100      0 12 i	// R3通告(adv-router为1.1.1.1的汇总路由)和R2的24长度的路由
 *>                    14.1.1.1                 0             0 12 i	// R1只通告汇总路由
 *>i  20.20.21.0/24    3.3.3.3                  0    100      0 12 i

IPv6-OSPF需求

1. 采用OSPFv3方式配置,手动设置Router-id为Loopback 0的IPv4地址,区域设计与IPv4相同。各物理接口都需宣告进OSPF。

2. 要求R3能Ping通R4的IPv6 Loopback 0地址。

R1

interface Loopback0
 ipv6 address 1:1:1:1::1/128
 ipv6 enable
 ospfv3 100 ipv6 area 0
interface Ethernet0/0
 ipv6 address 2001:12::1/64
 ipv6 enable
 ipv6 ospf 100 area 0
interface Ethernet0/1
 ipv6 address 2001:14::1/64
 ipv6 enable
 ospfv3 100 ipv6 area 1

router ospfv3 100
 router-id 1.1.1.1
 !
 address-family ipv6 unicast
 exit-address-family

R2

R2(config-if)#do show run | s interface 
interface Loopback0
 ipv6 address 2:2:2:2::2/128
 ipv6 enable
 ospfv3 100 ipv6 area 0
interface Ethernet0/0
 ipv6 address 2001:12::2/64
 ipv6 enable
 ospfv3 100 ipv6 area 0
interface Ethernet0/1
 ipv6 address 2001:23::2/64
 ipv6 enable
 ospfv3 100 ipv6 area 2
 
router ospfv3 100
 router-id 2.2.2.2
 !
 address-family ipv6 unicast
 exit-address-family

R3

interface Loopback0
 ipv6 address 3:3:3:3::3/128
 ipv6 enable
 ospfv3 100 ipv6 area 2
interface Ethernet0/0
 ipv6 address 2001:34::3/64
 ipv6 enable
interface Ethernet0/1
 ipv6 address 2001:23::3/64
 ipv6 enable
 ospfv3 100 ipv6 area 2

R4

interface Loopback0
 ipv6 address 4:4:4:4::4/128
 ipv6 enable
 ospfv3 100 ipv6 area 1
interface Ethernet0/1
 ipv6 address 2001:14::4/64
 ipv6 enable
 ospfv3 100 ipv6 area 1

router ospfv3 100
 router-id 4.4.4.4
 !
 address-family ipv6 unicast
 exit-address-family

OSPFv3配置完成之后,R4和R3之间不能直接通信
由R1,R2,R3绕着走。

R4#traceroute 3:3:3:3::3
Type escape sequence to abort.
Tracing the route to 3:3:3:3::3

  1 2001:14::1 1 msec 0 msec 0 msec
  2 2001:12::2 1 msec 0 msec 1 msec
  3 2001:23::3 0 msec 1 msec 0 msec
R4#

测试路由

R3#ping 4:4:4:4::4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4:4:4:4::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R3#

IPv6-BGP需求

1. R1和R2采用Loopback 0建立IBGP邻居,R1和R4、R2和R3建立EBGP邻居。

R1 & R2IBGP邻居

R1#
router bgp 12
 no bgp default ipv4-unicast
 neighbor 2:2:2:2::2 remote-as 12
 neighbor 2:2:2:2::2 update-source Loopback0
 neighbor 2001:14::4 remote-as 34	//R4的EBGP邻居
 !
 address-family ipv6
  neighbor 2:2:2:2::2 activate
  neighbor 2:2:2:2::2 next-hop-self
  neighbor 2001:14::4 activate
 exit-address-family
R2#
router bgp 12
 no bgp default ipv4-unicast
 neighbor 1:1:1:1::1 remote-as 12
 neighbor 1:1:1:1::1 update-source Loopback0
 neighbor 2001:23::3 remote-as 34	//R3的EBGP邻居
 !
 address-family ipv6
  neighbor 1:1:1:1::1 activate
  neighbor 1:1:1:1::1 next-hop-self
  neighbor 2001:23::3 activate
 exit-address-family

R1&R4 EBGP邻居

R4#
router bgp 34
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2001:14::1 remote-as 12	//R1的EBGP邻居
 !
 address-family ipv6
  neighbor 2001:14::1 activate
 exit-address-family

R2&R3 EBGP邻居

R3#
router bgp 34
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 2001:23::2 remote-as 12	//R2的EBGP邻居
 !
 address-family ipv6
  neighbor 2001:23::2 activate
 exit-address-family

IPv6的R3和R4之间并没有IBGP邻居关系
由于OSPFv3路由没有R4-R3之间的直连路由。如果此时在R3和R4之间建立直连路由时。 从R1访问R3时根据BGP选路规则时,选择从R1走到R4时再走到R3时,就有可能发生以下情况。如R1走到R4之后再往下走的时候,由于R4访问R3是通过OSPFv3的选路R4->R1->R2->R3,那么这个时候包又从R4回到R1然后又到R4,就形成了环路

R1#traceroute 30:30:30::30
Type escape sequence to abort.
Tracing the route to 30:30:30::30

  1 2001:14::4 1 msec 0 msec 0 msec
  2 2001:14::1 1 msec 0 msec 0 msec
  3 2001:14::4 0 msec 1 msec * 
  4 2001:14::1 1 msec 1 msec 0 msec
  5 2001:14::4 0 msec *  1 msec
  6 2001:14::1 1 msec 1 msec * 
  7 2001:14::4 1 msec 0 msec * 
  8 2001:14::1 2 msec 0 msec * 
  9 2001:14::4 2 msec 1 msec * 
 10 2001:14::1 1 msec 1 msec * 
 11 2001:14::4 1 msec *  1 msec
 12  * 
    2001:14::1 1 msec * 
 13 2001:14::4 1 msec *  1 msec
 14  * 
    2001:14::1 1 msec * 
 15 2001:14::4 2 msec *  1 msec
 16  * 
    2001:14::1 2 msec * 
 17 2001:14::4 7 msec *  2 msec
 18  * 
    2001:14::1 7 msec * 
 19 2001:14::4 2 msec *  6 msec
 20  * 
    2001:14::1 3 msec * 
 21  *  *  * 
 22  *  *  * 
R1#show ipv route 

2. R1上增加一个网段:10:10:10::10/128,R3上增加一个网段:30:30:30::30/128 (用Loopback模拟) 并宣告进BGP。要求R1能从10:10:10::10 Ping通R3的30:30:30::30

R1

R1#show run | s interface 
interface Loopback1
 ipv6 address 10:10:10::10/128

router bgp 12
 !
 address-family ipv6
  network 10:10:10::10/128	//宣告10段的路由
 exit-address-family

R3

R3#show run | s interface 
interface Loopback1
 ipv6 address 30:30:30::30/128

router bgp 34
 !
 address-family ipv6
  network 30:30:30::30/128	//宣告30段的路由
 exit-address-family

R1从10:10:10::10 Ping通R3的30:30:30::30

R1#ping 30:30:30::30 source 10:10:10::10 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30:30:30::30, timeout is 2 seconds:
Packet sent with a source address of 10:10:10::10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1#

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/286064.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

java工作流详解

什么是工作流? 工作流:两个或两个以上的人,为了共同的目标,连续的以串行或并行的方式去完成某一业务。 业务:工作流所指业务涵盖了与经营相关的活动。 串行或并行:业务中的步骤也许以一步接着一步的方式…

YOLOv8改进:IoU系列篇 | Shape-IoU关注边界框本身的形状和尺度来计算损失 | 2023年12月最新IoU改进

🚀🚀🚀本文改进: 提出了一种新颖的Shape-IoU,小目标检测实现涨点,更加关注边界框本身的形状和尺度来计算损失 🚀🚀🚀YOLOv8改进专栏:http://t.csdnimg.cn/hGhVK 学姐带你学习YOLOv8,从入门到创新,轻轻松松搞定科研; 1.Shape-IoU原理介绍 论文:https://ar…

【ps】如何给人偶添加衣服

使用PS工具扣出人物 使用编辑-变形-操控变型 、

Vue3-27-路由-路径参数的简单使用

什么是路径参数 在路由配置中,可以将【参数】放在【路由路径】中, 从而实现,同一个 路由,同一个组件,因路径参数不同,可以渲染出不同的内容。特点 : 1、当携带不同路径参数的路由相互跳转时&am…

Django Cookie和Session使用(十一)

一、Cookie Cookie具体指一小段信息,它是服务器发送出来存储在浏览器上的一组键值对,下次访问服务器时浏览器会自动携带这些键值对,以便服务器提取有用信息。 Cookie的特性 1、服务器让浏览器进行设置的 2、保存在浏览器本地,…

二叉搜索树介绍以及实现

二叉树无论是在实际运用还是面试题中,都是一种十分热门的数据结构,而二叉搜索树则是进阶版的二叉树,在map和set中也有应用。 什么是二叉搜索树 二叉搜索树又叫二叉排序树,它可以是一颗空树,又或者是有以下三个特点的…

用简单的方式理解串行主从通信方式(适用于LEU与TCC等外部设备之间的通信)

串行通信方式 数据按位序传送,最少需要两根通道(如RS485、CAN总线、以太网)。 优点:成本低,适合远距离通信。 缺点:速度慢、效率低。 注:以上特征为相较于并行通信方式。 主从通信方式 以RS4…

skimage图像处理(全)

文章目录 一、简介二、安装三、模块简介:API reference四、项目实战4.1、2D图像处理4.1.1、打印图像属性4.1.2、读取 / 显示 / 保存图像:skimage.io.imread() skimage.io.imshow() skimage.io.imsave()4.1.3、颜色空间转换:skimage.color.r…

轻松搞定软件开发:找对软件开发公司的流程与注意事项!

随着数字化时代的来临,软件开发在企业和个人生活中扮演着越来越重要的角色,然而,如何找到一家合适的软件开发公司却成为了一个令人头疼的问题。 本文将为你详细解读找软件开发公司的流程,以及在选择过程中需要注意的事项&#xf…

十大排序的个人总结之——冒泡排序、插入排序

同样,这两几乎也是被淘汰了的算法,尽管它们是稳定的,但是时间复杂度没人喜欢,了解一下就好,没啥好说的,注意最后一句话就行了 一,冒泡排序 1. 算法步骤 共n-1趟,谁两敢冒泡就换了…

C++ 不能用作全局变量名或给定 C 语言的链接

错误: C 不能用作全局变量名或给定 C 语言的链接 解决方案: 先抽自己两巴掌。 问问自己main函数作为一个函数,后面有没有添加()? 如果没有,建议再给自己两巴掌。

解决Golang WriteHeader设置后,Content-Type失效的问题

场景 最近笔者在研究web框架过程中,发现了一个响应类型的问题,困扰许久,原因就是设置了响应状态码后,然后设置响应类型为application/json。在实际请求后,响应类型变成了text/plain; charsetutf-8格式。 问题解决&…

梳理Langchain-Chatchat-UI接口文档

在 Langchain-Chatchat v0.1.17 版本及以前是有前后端分离的 Vue 项目的,但是 v0.2.0 后就没有了。所以本文使用的是 Langchain-Chatchat v0.1.17 版本中的 Vue 项目。经过一番折腾终于将 Langchain-Chatchat v0.1.17 版本前端 Vue 接口和 Langchain-Chatchat v0.2.…

YOLOv8改进 | 注意力篇 | ACmix自注意力与卷积混合模型(提高FPS+检测效率)

一、本文介绍 本文给大家带来的改进机制是ACmix自注意力机制的改进版本,它的核心思想是,传统卷积操作和自注意力模块的大部分计算都可以通过1x1的卷积来实现。ACmix首先使用1x1卷积对输入特征图进行投影,生成一组中间特征,然后根…

vim学习记录

目录 历史记录前言相关资料配置windows互换ESC和Caps Lock按键 基本操作替换字符串 历史记录 2024年1月2日, 搭建好框架,开始学习; 前言 vim使用很久了,但是都是一些基本用法,主要是用于配置Linux,进行一些简单的编写文档和程序.没有进行过大型程序开发,没有达到熟练使用的程…

基础算法(8):高精度加减乘除

目录 1.高精度加法 模板: 例题: 2.高精度减法 模板: 例题: 3.高精度乘法 3.1 高精度乘低精度 模板: 例题: 3.2 高精度乘高精度 模板: 例题: ​编辑 4.高精度除法 模…

2024年山东省某市建筑类中级职称评审安利

2024年山东省某市建筑类中级职称评审安利 之所以安利山东烧烤市建筑类中级职称是因为2023年申报评审情况比较乐观。如果你2023年申报评审中级职称不顺利,等1-2年还没下来,可以考虑考虑山东省中级职称申报评审。叙后尘来给你们展开说说山东中级职称申报。…

科普帖:什么是函数即服务 (FaaS)?

您可能听说过SaaS,您可能听说过PaaS和IaaS,但您听说过函数即服务 (FaaS) 吗? FaaS市场正在快速增长。根据Allied Market Research的数据,2018年市场价值30.1亿美元 。预计到2026年,这一数字将增长到240亿美元——这意…

gitee创建仓库

描述 本文章记录了怎么在gitee上创建项目,以及使用vscode提代码到远程呢个仓库,如何创建一个新分支,并将新分支提交到远程仓库。 1、创建远程仓库 在创建远程仓库之前要先进行ssh密钥的设置 (1)打开黑窗口&#xff…

SpringBoot整合多数据源,并支持动态新增与切换

SpringBoot整合多数据源,并支持动态新增与切换 一、概述 在项目的开发过程中,遇到了需要从数据库中动态查询新的数据源信息并切换到该数据源做相应的查询操作,这样就产生了动态切换数据源的场景。为了能够灵活地指定具体的数据库&#xff0…