通过测试学习BGP

测试编号

BGP-2-1-2

测试项目

BGP连接建立功能测试

测试依据

RFC1771

测试目的

保证DUT主动建立BGP连接功能测试

测试配置

测试组网

SW1---------------DUT-----------------SW2

      VLAN10      VLAN20

SW1上配置:

VLAN 10:10.0.0.2/24

LOOPBACK 1:1.1.1.1/32

DUT上配置:

VLAN 10:10.0.0.1/24

VLAN 20:20.0.0.1/24

LOOPBACK 9:9.9.9.9/32

SW2上配置:

VLAN 20:20.0.0.2/24

LOOPBACK 2:20.0.0.2/24

测试步骤

1、  首先在DUT上配置bgp进程,配置如下:

#                                                                                

bgp 9                                                                           

 router-id 1.1.1.1                                                               

 undo synchronization                                                            

 peer 10.0.0.2 as-number 9                                                       

#     

然后在SW1上配置BGP进程,配置如下:

#                                                                                

bgp 9                                                                            

 router-id 9.9.9.9                                                               

 undo synchronization                                                            

 peer 10.0.0.1 as-number 9                                                       

#    

等待一段时间在DUT上查看bgp邻居,有结果1

2、  DUT上删除bgp进程

3、  DUT上配置BGP进程,具体配置如下:

#                                                                                

bgp 9                                                                            

 router-id 9.9.9.9                                                               

 undo synchronization                                                            

 peer 20.0.0.2 as-number 2                                                       

#  

SW2上配置BGP进程,具体配置如下:

#                                                                               

bgp 2                                                                            

 router-id 2.2.2.2                                                               

 undo synchronization                                                                                                                 

 peer 20.0.0.1 as-number 9                                                       

#    

等待一段时间在DUT上查看BGP邻居,有结果2

 

预期结果

1、  DUT上查看bgp邻居,邻居能够达到Established状态,参考结果如下:

[DUT-bgp]dis bgp peer                                                            

                                                                                 

 BGP local router ID : 9.9.9.9                                                  

 Local AS number : 9                                                             

 Total number of peers : 1                 Peers in established state :  1      

                                                                                 

  Peer                    AS  MsgRcvd   MsgSent OutQ PrefRcv Up/Down   State     

                                                                                 

  10.0.0.2                 9       22       21     0       0 00:21:24 Established

2DUT上的BGP邻居信息,参考结果如下:

[DUT]dis bgp peer                                                                

                                                                                 

 BGP local router ID : 9.9.9.9                                                   

 Local AS number : 9                                                             

 Total number of peers : 2                 Peers in established state :  2      

                                                                                 

  Peer                     AS  MsgRcvd   MsgSent OutQ PrefRcv Up/Down   State     

                                                                                 

  20.0.0.2                 2        6        6     0       0 00:04:58 Established

//邻居能够达到Established状态

 

备注


 


本文出自 “xluge的博客” 博客,转载请与作者联系!

你可能感兴趣的:(测试,BGP)