注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 [业内传闻]今天,7月25日..
 帮助

CCNP-31 BGP 1


2007-12-04 21:41:39
 标签:网络 cisco CCNP BGP   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://loveme23.blog.51cto.com/7891/53577

CCNP-31 BGP 1

实验拓扑:

实验要求:R1属于AS 65500中的一台路由器,R2-4属于AS 65000中的路由器,在AS 65000中使用的事OSPF路由协议,R1R2配置成为EBGP PEERR2R4之间配置成为IBGP PEER
试验目的:掌握基本的EBGPIBGP的配置和传递路由需要的条件,能够使用showdebug来解决简单的问题。

试验配置:
R1
R1(config)#int f0/0
R1(config-if)#ip add 10.1.1.1 255.255.255.0
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#int f1/0
R1(config-if)#exit
R1(config)#int f1/0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#no shu
R1(config-if)#no keepalive
R1(config-if)#exit
 
R2
R2(config)#int f0/0
R2(config-if)#ip add 10.1.1.2 255.255.255.0
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#int f1/0
R2(config-if)#ip add 192.1.1.1 255.255.255.0
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#int loop0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#exit
R2(config)#int loop1
R2(config-if)#ip add 172.16.2.1 255.255.255.0
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#router ospf 100  
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 0.0.0.0 0.0.0.0 a 0
R2(config-router)#exit
 
R3
R3(config)#int f1/0
R3(config-if)#ip add 192.1.1.2 255.255.255.0
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int f0/0
R3(config-if)#ip add 193.1.1.1 255.255.255.0
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int loop0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#exit
R3(config)#router ospf 100
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 0.0.0.0 0.0.0.0 a 0
R3(config-router)#exit
 
R4
R4(config)#int f0/0
R4(config-if)#ip add 193.1.1.2 255.255.255.0
R4(config-if)#no shu
R4(config-if)#exit
R4(config)#int f1/0
R4(config-if)#ip add 172.16.3.1 255.255.255.0
R4(config-if)#no shu
R4(config-if)#no keepalive
R4(config-if)#exit
R4(config)#int loop0
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R4(config-if)#exit
R4(config)#router ospf 100
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 0.0.0.0 0.0.0.0 a 0
R4(config-router)#exit
基本的链路层和OSPF配置完成了,上面用红色标记的部分是因为那个接口没有连接任何设备,我们用它来模拟内部网络,如果与接口没有活动的连接,那么接口就会down掉,使用no keepalive命令来取消检测活动连接,使之一直保持在UP状态。
下面我们开始BGP的配置,如下:
R1(config)#int loop0
R1(config-if)#ip add 1.1.1.1 255.255.255.0//loopback接口和OSPF中的作用一样,用作router-id
R1(config-if)#exit
R1(config)#router bgp 65500 //65500AS
R1(config-router)#neighbor 10.1.1.2 remote-as 65000 //指定邻居
R1(config-router)#network 172.16.1.0 mask 255.255.255.0 //宣告网段
 
R2(config)#router bgp 65000
R2(config-router)#neighbor 10.1.1.1 remote-as 65500
R2(config-router)#neighbor 4.4.4.4 remote-as 65000
R2(config-router)#neighbor 4.4.4.4 update-source loop0
R2(config-router)#network 192.1.1.0
R2(config-router)#network 172.16.2.0 mask 255.255.255.0
 
R4(config)#router bgp 65000
R4(config-router)#neighbor 2.2.2.2 remote-as 65000
R4(config-router)#neighbor 2.2.2.2 update-source loopback 0
R4(config-router)#network 172.16.3.0 mask 255.255.255.0
R4(config-router)#network 193.1.1.0
R4(config-router)#exit
BGP的配置和其他路由协议差不多,也需要在全局模式下使用router bgp xxx命令,只不过后面的数字表示的是AS号,BGP的邻居需要管理员人工指定,并且要表明邻居所在的AS,在EBGP PEER情况下,neighbor后面的ip地址一般为直连的对端接口的IP地址,这是因为BGP有一个一跳的属性限制,可以修改,不过不建议这样做,不过在IBGP PEER的配置中,neighbor后面的ip地址的要求就没有这么严格了,只要可达的IP地址都可以,在这里我们一般使用LOOPBACK接口的IP地址作为更新源,因为loopback接口有一个永远不会down的特性,并且在多条路经的时候,用loopback地址作为更新源地址可以实现冗余(BGP不能实现负载均衡,他只选择最优的路径写入路由表!),update-source loopback 0指明更新源为loopback口,这条命令需要在使用loopback接口作为更新源的对等体路由器都要配置!
最后使用network命令宣告需要发布的路由,这里BGPv4支持VLSMCIDR,所以BGP在更新一条路有的时候需要写出掩码,默认的是主网络的掩码,可以使用mask选项来配置掩码。
BGPEIGRP,OSPF,ISIS一样都有三张表,邻居表,BGP路由表和IP路由表,下面我们来看看BGP的邻居表:
R2#show ip bgp neighbors
BGP neighbor is 4.4.4.4,  remote AS 65000, internal link  //IBGP邻居
  BGP version 4, remote router ID 4.4.4.4  //BGP版本,邻居路由ID
  BGP state = Established, up for 00:03:56  //邻居状态Established
  Last read 00:00:55, last write 00:00:55, 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 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                2          2
    Keepalives:             6          6
    Route Refresh:          0          0
    Total:                  9          9
  Default minimum time between advertisement runs is 0 seconds
 
 For address family: IPv4 Unicast
  BGP table version 8, neighbor version 8/0
 Output queue size : 0
  Index 2, Offset 0, Mask 0x4
  2 update-group member
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               3          2 (Consumes 104 bytes)
    Prefixes Total:                 3          2
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          2
    Used as multipath:            n/a          0
 
                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:              2        n/a
    Total:                                2          0
  Number of NLRIs in the update sent: max 2, min 1
 
  Connections established 1; dropped 0
  Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0           
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 255
Local host: 2.2.2.2, Local port: 14692
Foreign host: 4.4.4.4, Foreign port: 179
 
Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)
 
Event Timers (current time is 0xF62D8):
Timer          Starts    Wakeups            Next
Retrans             6          0             0x0
TimeWait            0          0             0x0
AckHold             7          6             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
DeadWait            0          0             0x0
 
iss: 4085729406  snduna: 4085729684  sndnxt: 4085729684     sndwnd:  16107
irs:  975868670  rcvnxt:  975868940  rcvwnd:      16115  delrcvwnd:    269
 
SRTT: 178 ms, RTTO: 1209 ms, RTV: 1031 ms, KRTT: 0 ms
minRTT: 212 ms, maxRTT: 428 ms, ACK hold: 200 ms
Flags: active open, nagle
IP Precedence value : 6
 
Datagrams (max data segment is 536 bytes):
Rcvd: 8 (out of order: 0), with data: 7, total data bytes: 269
Sent: 15 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 7, total data bytes: 277
         
BGP neighbor is 10.1.1.1,  remote AS 65500, external link  //EBGP邻居
  BGP version 4, remote router ID 1.1.1.1
  BGP state = Established, up for 00:05:00
  Last read 00:00:00, last write 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 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                3          1
    Keepalives:             7          7
    Route Refresh:          0          0
    Total:                 11          9
  Default minimum time between advertisement runs is 30 seconds
 
 For address family: IPv4 Unicast
  BGP table version 8, neighbor version 8/0
 Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  1 update-group member
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               4          1 (Consumes 52 bytes)
    Prefixes Total:                 4          1
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          1
    Used as multipath:            n/a          0
 
                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:              1        n/a
    Total:                                1          0
  Number of NLRIs in the update sent: max 2, min 1
 
  Connections established 1; dropped 0
  Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0           
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
Local host: 10.1.1.2, Local port: 179
Foreign host: 10.1.1.1, Foreign port: 14828
 
Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)
 
Event Timers (current time is 0xF658C):
Timer          Starts    Wakeups            Next
Retrans            11          0             0x0
TimeWait            0          0             0x0
AckHold             9          2             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
DeadWait            0          0             0x0
 
iss:  300025546  snduna:  300025871  sndnxt:  300025871     sndwnd:  16060
irs: 1734736732  rcvnxt: 1734736963  rcvwnd:      16154  delrcvwnd:    230
 
SRTT: 251 ms, RTTO: 796 ms, RTV: 545 ms, KRTT: 0 ms
minRTT: 24 ms, maxRTT: 412 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
IP Precedence value : 6
 
Datagrams (max data segment is 1460 bytes):
Rcvd: 19 (out of order: 0), with data: 9, total data bytes: 230
Sent: 13 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 10, total data bytes: 324
以上为R2BGP邻居信息,详细的说明了邻居的状态和一些参数。
(其他BGP路由器的邻居表略)
然后查看BGP路由表:
R1#show ip bgp
BGP table version is 6, 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
*> 172.16.1.0/24    0.0.0.0                  0         32768 i
*> 172.16.2.0/24    10.1.1.2                 0             0 65000 i
*> 172.16.3.0/24    10.1.1.2                               0 65000 i
*> 192.1.1.0        10.1.1.2                 0             0 65000 i
*> 193.1.1.0        10.1.1.2                               0 65000 i
 
R2#show ip bgp
BGP table version is 8, local router ID is 172.16.2.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
*> 172.16.1.0/24    10.1.1.1                 0             0 65500 i
*> 172.16.2.0/24    0.0.0.0                  0         32768 i
r>i172.16.3.0/24    4.4.4.4                  0    100      0 i
*> 192.1.1.0        0.0.0.0                  0         32768 i
r>i193.1.1.0        4.4.4.4                  0    100      0 i
 
R4#show ip bgp
BGP table version is 7, 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
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*>i172.16.1.0/24    10.1.1.1                 0    100      0 65500 i
*>i172.16.2.0/24    2.2.2.2                  0    100      0 i
*> 172.16.3.0/24    0.0.0.0                  0         32768 i
r>i192.1.1.0        2.2.2.2                  0    100      0 i
*> 193.1.1.0        0.0.0.0                  0         32768 i
上面的输出解释:
*号表示存在的网络;
>号表示最佳路径;
前面的i表示通过IBGP学到的路由;
前面的r表示写入到路由信息库失败的路由,可以通过命令show ip bgp rib-failure查看失败原因;
NextHop表示下一跳;
Metric用来表示MED属性;
LocPrf用来表示本地优先级,默认为100
Weightcisco专有的一个属性,如果这条路由是自己产生的,Weight32768,如果是从邻居学到的Weight0
PathBGPAS PATH属性,用来表示经过的AS
这里有的前面标记为r的原因是:在写入路由表的时候,ospf同样也有到达该目的地的路由,所以管理距离小的就写入路由表,IBGP的管理距离为200OSPF的为120,所以使用OSPF的路由。
BGP table version is 7表示BGP的路由表经过了7次的交换和学习路由。
最后查看一下IP路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 3 subnets
C       172.16.1.0 is directly connected, FastEthernet1/0
B       172.16.2.0 [20/0] via 10.1.1.2, 00:03:07
B       172.16.3.0 [20/0] via 10.1.1.2, 00:02:25
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
B    193.1.1.0/24 [20/0] via 10.1.1.2, 00:01:55
B    192.1.1.0/24 [20/0] via 10.1.1.2, 00:03:07
 
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/2] via 192.1.1.2, 00:07:05, FastEthernet1/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/3] via 192.1.1.2, 00:07:05, FastEthernet1/0
     172.16.0.0/24 is subnetted, 3 subnets
B       172.16.1.0 [20/0] via 10.1.1.1, 00:04:15
C       172.16.2.0 is directly connected, Loopback1
O       172.16.3.0 [110/3] via 192.1.1.2, 00:07:05, FastEthernet1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
O    193.1.1.0/24 [110/2] via 192.1.1.2, 00:07:05, FastEthernet1/0
C    192.1.1.0/24 is directly connected, FastEthernet1/0
 
R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 193.1.1.1, 00:11:10, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/2] via 193.1.1.1, 00:11:10, FastEthernet0/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
     172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
B       172.16.1.0/24 [200/0] via 10.1.1.1, 00:07:52
B       172.16.2.0/24 [200/0] via 2.2.2.2, 00:07:52
C       172.16.3.0/24 is directly connected, FastEthernet1/0
O       172.16.2.1/32 [110/3] via 193.1.1.1, 00:11:10, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O       10.1.1.0 [110/3] via 193.1.1.1, 00:11:10, FastEthernet0/0
C    193.1.1.0/24 is directly connected, FastEthernet0/0
O    192.1.1.0/24 [110/2] via 193.1.1.1, 00:11:11, FastEthernet0/0
上面用红色标记的是从BGP学到的路由,下面我们来在R4ping测试一下:
R4#p 172.16.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
R4#p 10.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 276/352/408 ms
R4#p 10.1.1.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/205/260 ms
R4#p 172.16.2.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 168/245/356 ms
172.16.1.1不通,为什么呢?我们debug ip icmp来观察一下:
R4#debug ip icmp
ICMP packet debugging is on
R4#p 172.16.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
U
*Mar  1 00:17:47.947: ICMP: dst (193.1.1.2) host unreachable rcv from 193.1.1.1.U
*Mar  1 00:17:50.051: ICMP: dst (193.1.1.2) host unreachable rcv from 193.1.1.1.U
Success rate is 0 percent (0/5)
R4#
*Mar  1 00:17:52.167: ICMP: dst (193.1.1.2) host unreachable rcv from 193.1.1.1
收到193.1.1.1的目标不可达错误消息,我们到R3上查看一下路由表:
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/2] via 192.1.1.1, 00:07:54, FastEthernet1/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/2] via 193.1.1.2, 00:07:54, FastEthernet0/0
     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
O       172.16.3.0/24 [110/2] via 193.1.1.2, 00:07:54, FastEthernet0/0
O       172.16.2.1/32 [110/2] via 192.1.1.1, 00:07:54, FastEthernet1/0
     10.0.0.0/24 is subnetted, 1 subnets
O       10.1.1.0 [110/2] via 192.1.1.1, 00:07:54, FastEthernet1/0
C    193.1.1.0/24 is directly connected, FastEthernet0/0
C    192.1.1.0/24 is directly connected, FastEthernet1/0
没有到172.16.1.0/24的路由,我们来添加一条静态路由:
Ip route 172.16.1.0 255.255.255.0 192.1.1.1
这样我们再到R4Ping 172.16.1.1看看:
R4#p 172.16.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 212/290/408 ms
通了。
其实在一个传输AS中,要求形成一个完全网格的拓扑,就是所有路由器必须都要直连在一起,以防止向在这里出现的中间有一台没有运行BGP的路由器所带来的问题。不过完全网格的限制可以通过其他的手段来解决。
下面我们再来观察一下BGP在建立邻居关系时候的debug信息:
R1#debug ip bgp ipv4 unicast
BGP debugging is on for address family: IPv4 Unicast
R1#clear ip bgp * 
R1#
*Mar  1 00:22:32.907: BGPNSF state: 10.1.1.2 went from nsf_not_active to nsf_not_active
*Mar  1 00:22:32.907: BGP: 10.1.1.2 went from Established to Idle  //状态从Established变为Idle
*Mar  1 00:22:32.907: %BGP-5-ADJCHANGE: neighbor 10.1.1.2 Down User reset
*Mar  1 00:22:32.907: BGP: 10.1.1.2 closing //关闭邻居关系
*Mar  1 00:22:32.911: BGP: 10.1.1.2 went from Idle to Active //状态从Idle变为Active
*Mar  1 00:22:32.919: BGP: 10.1.1.2 open active, local address 10.1.1.1
*Mar  1 00:22:33.055: BGP: 10.1.1.2 went from Active to OpenSent //状态从Active变为OpenSent
*Mar  1 00:22:33.055: BGP: 10.1.1.2 sending OPEN, version 4, my as: 65500, holdtime 180 seconds //发送OPEN消息
*Mar  1 00:22:33.063: BGP: 10.1.1.2 send message type 1, length (incl. header) 45
*Mar  1 00:22:33.175: BGP: 10.1.1.2 rcv message type 1, length (excl. header) 26
*Mar  1 00:22:33.175: BGP: 10.1.1.2 rcv OPEN, version 4, holdtime 180 seconds //收到OPEN消息
*Mar  1 00:22:33.179: BGP: 10.1.1.2 rcv OPEN w/ OPTION parameter len: 16
*Mar  1 00:22:33.179: BGP: 10.1.1.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
*Mar  1 00:22:33.179: BGP: 10.1.1.2 OPEN has CAPABILITY code: 1, length 4
*Mar  1 00:22:33.179: BGP: 10.1.1.2 OPEN has MP_EXT CAP for afi/safi: 1/1
*Mar  1 00:22:33.179: BGP: 10.1.1.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar  1 00:22:33.183: BGP: 10.1.1.2 OPEN has CAPABILITY code: 128, length 0
*Mar  1 00:22:33.183: BGP: 10.1.1.2 OPEN has ROUTE-REFRESH capability(old) for all address-families
*Mar  1 00:22:33.183: BGP: 10.1.1.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar  1 00:22:33.183: BGP: 10.1.1.2 OPEN has CAPABILITY code: 2, length 0
*Mar  1 00:22:33.183: BGP: 10.1.1.2 OPEN has ROUTE-REFRESH capability(new) for all address-families
BGP: 10.1.1.2 rcvd OPEN w/ remote AS 65000
*Mar  1 00:22:33.187: BGP: 10.1.1.2 went from OpenSent to OpenConfirm//状态从OpenSent变为OpenConfirm
*Mar  1 00:22:33.187: BGP: 10.1.1.2 went from OpenConfirm to Established//状态从OpenConfirm变为Established
 
从上面的debug信息我们可以看到BGP的邻居关系的形成经历了Idle--Active--OpenSent--OpenConfirmEstablished这些状态。

实验总结:掌握基本的BGP配置,掌握EBGP/IBGP PEER配置中需要注意的问题和配置方法,并且掌握基本的查看和调试BGP信息和解决简单问题的方法。

本文出自 “★Beckham~23” 博客,请务必保留此出处http://loveme23.blog.51cto.com/7891/53577





    文章评论
 
2007-12-05 10:48:48
配置过程很详细 不错

2007-12-07 10:18:09
顶!
多发啊好东西

2007-12-10 21:39:57
多谢帮顶。。。

2007-12-11 09:45:56
我也来坐坐板凳~ 博主准备什么时候考ccnp呀

2007-12-11 19:37:57
回复:小废物
现在还没打算考,打算学好了直接考IE,嘿嘿。

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: