(4)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

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不得不说的运维故事

你的赞是我的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值