HCIP之BGP基础实验

简介: 除R5的5.5.5.0环回外,其他所有的环回均可以互相访问

实验要求

image.png

除R5的5.5.5.0环回外,其他所有的环回均可以互相访问


实验拓扑a5f4e79ff5f74d7ab37c1cb1188a2ca9.png

R2、3、4里面用OSPF

R2

<r2>display  ospf peer brief 
         OSPF Process 1 with Router ID 2.2.2.2
                  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/1             3.3.3.3          Full        
 ----------------------------------------------------------------------------
<r2>

R3

<r3>display ospf peer brief 
         OSPF Process 1 with Router ID 3.3.3.3
                  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.0          GigabitEthernet0/0/1             4.4.4.4          Full        
 ----------------------------------------------------------------------------
<r3>

R4

<r4>display  ospf peer brief 
         OSPF Process 1 with Router ID 4.4.4.4
                  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             3.3.3.3          Full        
 ----------------------------------------------------------------------------
<r4>

R1、2、3、4、5的bgp配置

R1

[r1-bgp]display this 
[V200R003C00]
#
bgp 1
 router-id 1.1.1.1
 peer 12.1.1.2 as-number 2 
 #
 ipv4-family unicast
  undo synchronization
  deterministic-med
  network 1.1.1.0 255.255.255.0 
  peer 12.1.1.2 enable
#
return

R2

[r2-bgp]display th
[V200R003C00]
#
bgp 2
 router-id 2.2.2.2
 peer 3.3.3.3 as-number 2 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 4.4.4.4 as-number 2 
 peer 4.4.4.4 connect-interface LoopBack0
 peer 12.1.1.1 as-number 1 
 #
 ipv4-family unicast
  undo synchronization
  network 2.2.2.0 255.255.255.0 
  peer 3.3.3.3 enable
  peer 3.3.3.3 next-hop-local 
  peer 4.4.4.4 enable
  peer 4.4.4.4 next-hop-local 
  peer 12.1.1.1 enable
#
return

R3

[r3-bgp]display th 
[V200R003C00]
#
bgp 2
 router-id 3.3.3.3
 peer 2.2.2.2 as-number 2 
 peer 2.2.2.2 connect-interface LoopBack0
 peer 4.4.4.4 as-number 2 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 3.3.3.0 255.255.255.0 
  peer 2.2.2.2 enable
  peer 4.4.4.4 enable
#
return

R4

[r4-bgp]display th
[V200R003C00]
#
bgp 2
 router-id 4.4.4.4
 peer 2.2.2.2 as-number 2 
 peer 2.2.2.2 connect-interface LoopBack0
 peer 3.3.3.3 as-number 2 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 5.5.5.5 as-number 3 
 peer 5.5.5.5 ebgp-max-hop 2 
 peer 5.5.5.5 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 4.4.4.0 255.255.255.0 
  peer 2.2.2.2 enable
  peer 2.2.2.2 next-hop-local 
  peer 3.3.3.3 enable
  peer 3.3.3.3 next-hop-local 
  peer 5.5.5.5 enable
#
return

R5

[r5-bgp]display th
[V200R003C00]
#
bgp 3
 router-id 5.5.5.5
 peer 4.4.4.4 as-number 2 
 peer 4.4.4.4 ebgp-max-hop 2 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 99.1.1.0 255.255.255.0 
  peer 4.4.4.4 enable
#
return

测试

除了5.5.5.0 /24环回其他环回都可以通

<r1>ping -a 1.1.1.1 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=30 ms
  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/28/30 ms
<r1>ping -a 1.1.1.1 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=20 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=20 ms
  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/30/40 ms
<r1>ping  -a 1.1.1.1 4.4.4.4
  PING 4.4.4.4: 56  data bytes, press CTRL_C to break
    Reply from 4.4.4.4: bytes=56 Sequence=1 ttl=253 time=40 ms
    Reply from 4.4.4.4: bytes=56 Sequence=2 ttl=253 time=20 ms
    Reply from 4.4.4.4: bytes=56 Sequence=3 ttl=253 time=40 ms
    Reply from 4.4.4.4: bytes=56 Sequence=4 ttl=253 time=40 ms
    Reply from 4.4.4.4: bytes=56 Sequence=5 ttl=253 time=40 ms
  --- 4.4.4.4 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/36/40 ms
<r1>ping -a 1.1.1.1 99.1.1.1
  PING 99.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 99.1.1.1: bytes=56 Sequence=1 ttl=252 time=60 ms
    Reply from 99.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 ms
    Reply from 99.1.1.1: bytes=56 Sequence=3 ttl=252 time=30 ms
    Reply from 99.1.1.1: bytes=56 Sequence=4 ttl=252 time=60 ms
    Reply from 99.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms
  --- 99.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/48/60 ms


相关文章
|
网络协议 网络架构
【HCIP】15.MPLS基础
【HCIP】15.MPLS基础
87 1
|
网络协议 网络虚拟化 网络架构
【HCIP】12.BGP基础
【HCIP】12.BGP基础
55 0
|
6月前
|
网络协议
HCIP5实验(BGP)
HCIP5实验(BGP)
38 1
|
6月前
|
负载均衡 网络协议 安全
【计网·湖科大·思科】实验七 路由信息协议RIP、开放最短路径优先协议OSPF、边界网关协议BGP
【计网·湖科大·思科】实验七 路由信息协议RIP、开放最短路径优先协议OSPF、边界网关协议BGP
136 2
|
网络协议 安全 网络架构
【HCIP】07.OSPF特殊区域及其他特性
【HCIP】07.OSPF特殊区域及其他特性
64 1
|
网络虚拟化
HCIP VLAN实验
实验要求
61 0
|
网络协议
HCIP第三天ospf星型和全连实验
R1/4/5 使用全连所有接口工作方式为broadcast;DR/BDR将默认自动选举成功 R1
56 0
|
网络协议
HCIP路由策略实验
拓扑图 IP已经配好
56 0
|
网络协议
hcip中BGP的综合实验
hcip中BGP的综合实验
79 0
|
Shell 数据安全/隐私保护 网络架构
CCNA-NAT协议(理论与实验练习)
CCNA-NAT协议(理论与实验练习)
135 0
CCNA-NAT协议(理论与实验练习)