BGP实验

Posted ‘朱砂痣’、

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BGP实验相关的知识,希望对你有一定的参考价值。

要求:

操作思路:先配好两台路由的接口地址以及回环地址,然后RIP一下自己所在的网段

之后的话就是BGP创建

rip 

v 2

network 

undo summary

router id

bgp 100

peer 对方的ip(这里是对方的回环地址) as-number 

peer 对方的ip(这里是对方的回环地址)connect-interface LoopBack 0

network  ip   子网(自己路由器的信息)

话不多说,直接上手

R1配置:

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 30
[R1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.

[R1-GigabitEthernet0/0/0]int loo 0//配置3个回环口ip/子网
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]q
[R1]int loo 1
[R1-LoopBack1]ip add 3.0.0.1 24
[R1-LoopBack1]int loo 2
[R1-LoopBack2]ip add 4.0.0.1 24
[R1-LoopBack2]q

[R1]rip 1//创建rip
[R1-rip-1]v 2	
[R1-rip-1]network 2.0.0.0 		
[R1-rip-1]network 12.0.0.0
[R1-rip-1]undo summary 

//**[R1-rip-1]router id 1.1.1.1//BGP
Info: Router ID has been modified, please reset the relative protocols manually 
to update the Router ID.
[R1]bgp 100

[R1-bgp]peer 222 as-number 100
Error: The peer-group does not exist.
[R1-bgp]dis th
[V200R003C00]
#
bgp 100
 #
 ipv4-family unicast
  undo synchronization
#
return
[R1-bgp]undo bgp 100
                 ^
Error:Too many parameters found at '^' position.
[R1-bgp]undo bgp 
[R1-bgp]dis th
[V200R003C00]
#
bgp 100
 #
 ipv4-family unicast
  undo synchronization
#
return**//
必须退出rip然后添加bgp
[R1-bgp]q
[R1]router id 1.1.1.1	
[R1]bgp 100
[R1-bgp]p	
[R1-bgp]peer 2.2.2.2 as-number 100	
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R1-bgp]network 1.1.1.1 32//自己路由器的信息
[R1-bgp]q
[R1]rip 1
[R1-rip-1]network 1.0.0.0
[R1-rip-1]q
[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]netw	
[R1-rip-1]network 3.0.0.0	
[R1-rip-1]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]net	
[R1-rip-1]network 4.0.0.0

R2配置:

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 30
[R2-GigabitEthernet0/0/0]
[R2-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]int loo 0
[R2-LoopBack0]ip add 2.2.2.2 32
[R2-LoopBack0]q
[R2]ri	
[R2]rip 1
[R2-rip-1]v 2	
[R2-rip-1]network 1.0.0.0
[R2-rip-1]network 12.0.0.0	
[R2-rip-1]undo summary 

[R2-rip-1]q
[R2]rou	
[R2]router id 2.2.2.2
Info: Router ID has been modified, please reset the relative protocols manually 
to update the Router ID.
[R2]b	
[R2]bgp 100
[R2-bgp]network 12.0.0.0	
[R2-bgp]peer 1.1.1.1 as-number 100
[R2-bgp]peer 1.1.1.1 connect-interface loo	
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]net	
[R2-bgp]network 2.2.2.2 32//自己路由器回环地址以及子网掩码
[R2-bgp]q
[R2]ping 12.0.0.1
  PING 12.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 12.0.0.1: bytes=56 Sequence=1 ttl=255 time=60 ms
    Reply from 12.0.0.1: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 12.0.0.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 12.0.0.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 12.0.0.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 12.0.0.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/30/60 ms

[R2]ping 1.1.1.1
  PING 1.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 1.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/20/30 ms

[R2]ping 3.0.0.1
  PING 3.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 3.0.0.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 3.0.0.1: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 3.0.0.1: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 3.0.0.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 3.0.0.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 3.0.0.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/26/30 ms


[R2]ping 4.0.0.0
  PING 4.0.0.0: 56  data bytes, press CTRL_C to break
    Reply from 4.0.0.1: bytes=56 Sequence=1 ttl=255 time=20 ms
    Reply from 4.0.0.1: bytes=56 Sequence=2 ttl=255 time=40 ms
    Reply from 4.0.0.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 4.0.0.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 4.0.0.1: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 4.0.0.0 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/22/40 ms

 

以上是关于BGP实验的主要内容,如果未能解决你的问题,请参考以下文章

BGP RR反射器理论实验,BGP联盟详解 纯干货!

# 大小型网络构建-BGP加实验验证

ISIS 综合实验;BGP 实验

BGP初步配置实验

30-高级路由:BGP汇总:实验一

47-高级路由:BGP 镜子实验