首页 > 其他 > 详细

CCNP(BSCI)实验:BGP之配置IBGP邻居

时间:2020-09-28 13:18:30      阅读:47      评论:0      收藏:0      [点我收藏+]
技术分享图片
预配置
int lo0
ip add 1.1.1.1 255.255.255.0
int s2/1
ip add 12.0.0.1 255.255.255.0
no sh
router os 11
net 0.0.0.0 0.0.0.0 a 0
//全网段宣告,只为了IBGP实验

int s2/1
ip add 12.0.0.2 255.255.255.0
no sh
int s2/2
ip add 23.0.0.2 255.255.255.0
no sh
router os 11
net 0.0.0.0 0.0.0.0 a 0

int s2/1
ip add 23.0.0.3 255.255.255.0
no sh
router os 11
net 0.0.0.0 0.0.0.0 a 0
实验过程:使用loopback口建立R1和R3的IBGP邻居
R1(config)#router bgp 123
R1(config-router)#neighbor 3.3.3.3 remote-as 123
R1(config-router)#neighbor 3.3.3.3 update-source lo0
R1(config-router)#end

R3(config)#router bgp 123
R3(config-router)#neighbor 1.1.1.1 remote-as 123
R3(config-router)#neighbor1.1.1.1 update-source lo0
R3(config-router)#end
第二步:查看R1和R3的邻居建立的情况
R1#sh ip b s
BGP router identifier 1.1.1.1, local AS number 123
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.3.3.3 4 123 4 4 1 0 0 00:00:06 0

R3#sh ip b s
BGP router identifier 3.3.3.3, local AS number 123
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 123 4 4 1 0 0 00:00:18 0
第三步:查看一下R1上邻居
R1#sh ip
*Nov 26 22:12:39.711: %SYS-5-CONFIG_I: Configured from console by console
R1#sh ip b n
BGP neighbor is 3.3.3.3, remote AS 123, internal link
//邻居的router-id as号 邻居状态(这里为 IBGP)
BGP version 4, remote router ID 3.3.3.3
BGP state = Established, up for 00:02:00
Last read 00:00:00, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 1
OutQ depth is 0
Sent Rcvd
Opens: 2 2
Notifications: 0 0
Updates: 0 0
Keepalives: 10 9
Route Refresh: 0 0
Total: 12 11
Default minimum time between advertisement runs is 5 seconds

For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 0 0
Prefixes Total: 0 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 0
Used as multipath: n/a 0

Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Total: 0 0
Number of NLRIs in the update sent: max 0, min 0

Connections established 2; dropped 1
Last reset 00:02:27, due to Peer closed the session
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 1.1.1.1, Local port: 20316
Foreign host: 3.3.3.3, Foreign port: 179

Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)

Event Timers (current time is 0x1DE088):
Timer Starts Wakeups Next
Retrans 5 0 0x0
TimeWait 0 0 0x0
AckHold 4 1 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0

iss: 2137836633 snduna: 2137836774 sndnxt: 2137836774 sndwnd: 16244
irs: 1909218231 rcvnxt: 1909218372 rcvwnd: 16244 delrcvwnd: 140

SRTT: 146 ms, RTTO: 1283 ms, RTV: 1137 ms, KRTT: 0 ms
minRTT: 84 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, nagle

Datagrams (max data segment is 536 bytes):
Rcvd: 8 (out of order: 0), with data: 5, total data bytes: 140
Sent: 8 (retransmit: 0, fastretransmit: 0), with data: 5, total data bytes: 140
R1#
第四步:show一下R3的路由表
R3#sh ip rou
……………………
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/129] via 23.0.0.2, 00:05:51, Serial2/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 23.0.0.2, 00:05:51, Serial2/1
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
O 12.0.0.0 [110/128] via 23.0.0.2, 00:05:51, Serial2/1
第五步:将IGP路由引入BGP
R1(config)#router bgp 123
R1(config-router)#net 1.1.1.1 mask 255.255.255.255
R1(config-router)#end
第六步:查看R1BGP表
R1#sh ip b
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
//这里为最优路径

R3#sh ip b
BGP table version is 3, 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
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
r>i1.1.1.1/32 1.1.1.1 0 100 0 i
//这里写入失败,是因为去1.1.1.1由两个路由协议告诉的,它傻了不知道怎么办,于是写入失败,但是路由表中会有一条最优路径,我们来看看
第七步:查看R3的路由表
R3#sh ip rou
………………

1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/129] via 23.0.0.2, 00:12:18, Serial2/1
//这里为ospf提供的一条路由,只是因为它的管理距离小。
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 23.0.0.2, 00:12:18, Serial2/1
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.0.0.0 is directly connected, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
O 12.0.0.0 [110/128] via 23.0.0.2, 00:12:18, Serial2/1

CCNP(BSCI)实验:BGP之配置IBGP邻居

原文:https://blog.51cto.com/starshomes/2538376

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!