021A-BGP实验

一、AR1和AR2的配置

在这里插入图片描述

[AR1]dis ip interface brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.1.1.1/24          up         up           
LoopBack0                         1.1.1.1/32           up         up(s)     
LoopBack10                        11.11.11.11/32       up         up(s)     

[AR2]dis ip interface brief 

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.1.1.2/24          up         up        
GigabitEthernet0/0/1              23.1.1.2/24          up         up        
GigabitEthernet0/0/2              24.1.1.2/24          up         up        
LoopBack0                         2.2.2.2/32           up         up(s)     
NULL0  

[AR1]dis current-configuration configuration bgp          
#
bgp 100                                  // bgp进程号100,一个路由器只能有一个进程号,第二个bgp进程配置不上去
 router-id 1.1.1.1
 peer 2.2.2.2 as-number 200                 //bgp邻居为loopback0 区域号为AR2的区域
 peer 2.2.2.2 ebgp-max-hop 255              //下一跳为多跳,
 peer 2.2.2.2 connect-interface LoopBack0   //连接AR2的AR1接口未loopback0接口
 #
 ipv4-family unicast
  undo synchronization
  network 11.0.0.0 
  network 11.11.11.0 255.255.255.0 
  network 11.11.11.11 255.255.255.255      //进行路由精确宣告
  peer 2.2.2.2 enable
#
return

[AR2]dis current-configuration configuration bgp
#
bgp 200
 router-id 2.2.2.2
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 ebgp-max-hop 255 
 peer 1.1.1.1 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 1.1.1.1 enable
#
return

[AR1]dis bgp routing-table 

 BGP Local router ID is 1.1.1.1 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 1
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   11.11.11.11/32     0.0.0.0         0                     0      i
[AR1]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 10       Routes : 10       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  Direct  0    0           D   127.0.0.1       LoopBack0
        2.2.2.2/32  Static  60   0          RD   12.1.1.2        GigabitEthernet0/0/0
    11.11.11.11/32  Direct  0    0           D   127.0.0.1       LoopBack10
       12.1.1.0/24  Direct  0    0           D   12.1.1.1        GigabitEthernet0/0/0
       12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
     12.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0



 *>   11.11.11.11/32     1.1.1.1         0                     0      100i
[
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值