BGP之BGP联邦综合实验

news2024/11/13 12:13:57

目录

BGP联邦综合实验

实验图

网段划分

基础配置

路由配置

启动AS2中的ospf--- IGP协议

        检测IGP

 启动AS之间的BGP

        测试

发布R1路由

修改:下一跳解决上述问题

解决水平分割

发布R8路由

测试

AS2内部环回路由信息互相访问

配置空接口

发布静态路由

测试

存在问题:

解决办法:

解决:环回地址192.168.2.0 /24不能在任何协议中宣告

BGP联邦综合实验

实验图

网段划分

已知整个AS2的IP地址为172.16..0.0/16

        172.16.0.0/16 ---- 172.16.2.0/24 ---- R2 

                                     172.16.3.0/24 ---- R3

                                     172.16.4.0/24 ---- R4 

                                     172.16.5.0/24 ---- R5 

                                     172.16.6.0/24 ---- R6 

                                     172.16.7.0/24 ---- R7

                                     172.16.0.0/24 ---- P2P

                                     172.16.1.0/24 ---- MA -----172.16.1.0/29 ----- R2-R3

                                                                              172.16.1.8/29 ----- R2-R4

                                                                              172.16.1.16/29 ----- R3-R4

                                                                              172.16.1.24/29 ----- R4-R7

                                                                              172.16.1.32/29 ----- R5-R6

                                                                              172.16.1.40/29 ----- R6-R7

                                                                              172.16.1.48/29

                                                                                     ......

基础配置

R1

[R1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.0.0.1/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.1/24       up         up(s)     
LoopBack1                         10.0.0.1/24          up         up(s)     
NULL0                             unassigned           up         up(s)     

R2

[R2]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.0.0.2/24          up         up        
GigabitEthernet0/0/1              172.16.1.1/29        up         up        
GigabitEthernet0/0/2              172.16.1.9/29        up         up        
LoopBack0                         172.16.2.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     

R3

[R3]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.2/29        up         up        
GigabitEthernet0/0/1              172.16.1.17/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.3.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     

R4

[R4]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.18/29       up         up        
GigabitEthernet0/0/1              172.16.1.25/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.4.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
[R4]

R5

[R5]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.10/29       up         up        
GigabitEthernet0/0/1              172.16.1.33/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.5.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     

R6

[R6]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.34/29       up         up        
GigabitEthernet0/0/1              172.16.1.41/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.6.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     

R7

[R7]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.42/29       up         up        
GigabitEthernet0/0/1              172.16.1.26/29       up         up        
GigabitEthernet0/0/2              78.0.0.1/24          up         up        
LoopBack0                         172.16.7.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     

R8

[R8]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              78.0.0.2/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.2.1/24       up         up(s)     
LoopBack1                         11.0.0.1/24          up         up(s)     
NULL0                             unassigned           up         up(s)  

路由配置

启动AS2中的ospf--- IGP协议

R2

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]a 0	
[R2-ospf-1]a 0
[R2-ospf-1-area-0.0.0.0]netwo	
[R2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]

R3

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255

注意:

        其他R4R5,R6,R7,R8类似

        检测IGP

R2

[R2]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 9        Routes : 10       

OSPF routing table status : <Active>
         Destinations : 9        Routes : 10

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

    172.16.1.16/29  OSPF    10   2           D   172.16.1.2      GigabitEthernet
0/0/1
    172.16.1.24/29  OSPF    10   3           D   172.16.1.2      GigabitEthernet
0/0/1
    172.16.1.32/29  OSPF    10   2           D   172.16.1.10     GigabitEthernet
0/0/2
    172.16.1.40/29  OSPF    10   3           D   172.16.1.10     GigabitEthernet
0/0/2
     172.16.3.1/32  OSPF    10   1           D   172.16.1.2      GigabitEthernet
0/0/1
     172.16.4.1/32  OSPF    10   2           D   172.16.1.2      GigabitEthernet
0/0/1
     172.16.5.1/32  OSPF    10   1           D   172.16.1.10     GigabitEthernet
0/0/2
     172.16.6.1/32  OSPF    10   2           D   172.16.1.10     GigabitEthernet
0/0/2
     172.16.7.1/32  OSPF    10   3           D   172.16.1.10     GigabitEthernet
0/0/2
                    OSPF    10   3           D   172.16.1.2      GigabitEthernet
0/0/1

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

R3

[R3]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 9        Routes : 10       

OSPF routing table status : <Active>
         Destinations : 9        Routes : 10

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.8/29  OSPF    10   2           D   172.16.1.1      GigabitEthernet
0/0/0
    172.16.1.24/29  OSPF    10   2           D   172.16.1.18     GigabitEthernet
0/0/1
    172.16.1.32/29  OSPF    10   3           D   172.16.1.1      GigabitEthernet
0/0/0
    172.16.1.40/29  OSPF    10   3           D   172.16.1.18     GigabitEthernet
0/0/1
     172.16.2.1/32  OSPF    10   1           D   172.16.1.1      GigabitEthernet
0/0/0
     172.16.4.1/32  OSPF    10   1           D   172.16.1.18     GigabitEthernet
0/0/1
     172.16.5.1/32  OSPF    10   2           D   172.16.1.1      GigabitEthernet
0/0/0
     172.16.6.1/32  OSPF    10   3           D   172.16.1.1      GigabitEthernet
0/0/0
                    OSPF    10   3           D   172.16.1.18     GigabitEthernet
0/0/1
     172.16.7.1/32  OSPF    10   2           D   172.16.1.18     GigabitEthernet
0/0/1

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

 启动AS之间的BGP

R1

[R1]bgp 1
[R1-bgp]ro	
[R1-bgp]router-id 1.1.1.1
[R1-bgp]pe	
[R1-bgp]peer 12.0.0.2 as	
[R1-bgp]peer 12.0.0.2 as-number 2
[R1-bgp]

R2

[R2]bgp 64512 ---- 有联邦存在的时候写联邦AS号
[R2-bgp]router-id 2.2.2.2
[R2-bgp]confederation id 2 --- 告诉大AS号为2
[R2-bgp]confederation peer-as 64513 --- 指定EBGP对等体关系的AS号
[R2-bgp]peer 12.0.0.1 as-number 1 
[R2-bgp]peer 172.16.3.1 as-number 64512 --- 建立 R2 与 R3 的IGP对等体关系
[R2-bgp]peer 172.16.3.1 connect-interface LoopBack 0
[R2-bgp]peer 172.16.5.1 as-number 64513 --- 建立 R2 与 R5 的非直连建邻
[R2-bgp]peer 172.16.5.1 connect-interface LoopBack 0
[R2-bgp]peer 172.16.5.1 ebgp-max-hop --- 将ttl值修改 

R3

[R3]bgp 64512
[R3-bgp]router-id 3.3.3.3
[R3-bgp]confederation id 2
[R3-bgp]peer 172.16.2.1 as-number 64512
[R3-bgp]peer 172.16.2.1 connect-interface LoopBack 0
[R3-bgp]peer 172.16.4.1 as-number 64512
[R3-bgp]peer 172.16.4.1 connect-interface LoopBack 0

R4

[R4]bgp 64512
[R4-bgp]router-id 4.4.4.4
[R4-bgp]confederation id 2
[R4-bgp]confederation peer-as 64513
[R4-bgp]peer 172.16.3.1 as 64512
[R4-bgp]peer 172.16.3.1 connect-interface LoopBack 0
[R4-bgp]peer 172.16.7.1 as 64513
[R4-bgp]peer 172.16.7.1 connect-interface LoopBack 0
[R4-bgp]peer 172.16.7.1 ebgp-max-hop 

注意:

        R5与R4类似,R6与R3类似,R7与R2类似

R8

[R8]bgp 3
[R8-bgp]router-id 8.8.8.8
[R8-bgp]peer 78.0.0.1 as 2
[R8-bgp]

        测试

R2
[R2]display bgp peer 

 BGP local router ID : 2.2.2.2
 Local AS number : 64512
 Total number of peers : 3		  Peers in established state : 3

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  12.0.0.1        4           1       19       19     0 00:17:28 Established    
   0
  172.16.3.1      4       64512       14       16     0 00:12:21 Established    
   0
  172.16.5.1      4       64513        8       10     0 00:06:11 Established    
   0

R3
[R3]display bgp peer 

 BGP local router ID : 3.3.3.3
 Local AS number : 64512
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  172.16.2.1      4       64512       14       14     0 00:12:49 Established    
   0
  172.16.4.1      4       64512       11       14     0 00:09:49 Established    
   0
[R3]

R4
[R4]display bgp peer 

 BGP local router ID : 4.4.4.4
 Local AS number : 64512
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  172.16.3.1      4       64512       12       12     0 00:10:18 Established    
   0
  172.16.7.1      4       64513        5        7     0 00:03:14 Established    
   0
[R4]

R5
[R5]display bgp peer 

 BGP local router ID : 5.5.5.5
 Local AS number : 64513
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  172.16.2.1      4       64512        9        9     0 00:07:24 Established    
   0
  172.16.6.1      4       64513        8        9     0 00:06:14 Established    
   0
[R5]

R6
[R6]display bgp peer 

 BGP local router ID : 6.6.6.6
 Local AS number : 64513
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  172.16.5.1      4       64513        8        8     0 00:06:25 Established    
   0
  172.16.7.1      4       64513        6        7     0 00:04:36 Established    
   0
[R6]

R7 
[R7]display bgp peer 

 BGP local router ID : 7.7.7.7
 Local AS number : 64513
 Total number of peers : 3		  Peers in established state : 3

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  78.0.0.2        4           3        5        6     0 00:03:29 Established    
   0
  172.16.4.1      4       64512        6        6     0 00:04:07 Established    
   0
  172.16.6.1      4       64513        7        7     0 00:05:01 Established    
   0

R8
[R8]display bgp peer 

 BGP local router ID : 8.8.8.8
 Local AS number : 3
 Total number of peers : 1		  Peers in established state : 1

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  78.0.0.1        4           2        5        5     0 00:03:48 Established    
   0
[R8]

发布R1路由

R1

[R1-bgp]network 10.0.0.0 24
[R1-bgp]display bgp peer 

测试

[R1-bgp]display 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

 *>   10.0.0.0/24        0.0.0.0         0                     0      i


<R2>display bgp routing-table 

 BGP Local router ID is 2.2.2.2 
 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

 *>   10.0.0.0/24        12.0.0.1        0                     0      1i
<R2>


<R3>display bgp routing-table  ---- 收到但不可用

 BGP Local router ID is 3.3.3.3 
 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

   i  10.0.0.0/24        12.0.0.1        0          100        0      1i
<R3>


R3与R5可以收到但不可用,所以R4,R6不能收到,包括后面

修改:下一跳解决上述问题

R2

[R2]bgp 64512
[R2-bgp]peer 172.16.3.1 next-hop-local

[R2-bgp]peer 172.16.5.1 next-hop-local

测试

R3

<R3>display bgp routing-table 

 BGP Local router ID is 3.3.3.3 
 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

 *>i  10.0.0.0/24        172.16.2.1      0          100        0      1i
<R3>

R6

<R6>display bgp routing-table 

 BGP Local router ID is 6.6.6.6 
 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

 *>i  10.0.0.0/24        172.16.2.1      0          100        0      (64512) 1i
<R6>

注意:

        R4收不到,原因:IBGP的水平分割导致

        R6收到,原因:R5与R2为联邦BGP 属于EBGP对等体,EBGP学到的路由信息可以发给自己的IBGP对等体

        R7收不到,原因:IBGP的水平分割

解决水平分割

        设置路由反射器 

R3作为反射指定R2作为客户

[R3]bgp	
[R3]bgp 64512
[R3-bgp]peer 172.16.2.1 reflect-client  --- 指定R2作为客户

测试

<R4>display bgp routing-table 

 BGP Local router ID is 4.4.4.4 
 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

 *>i  10.0.0.0/24        172.16.2.1      0          100        0      1i
<R4>

<R4>display bgp routing-table 10.0.0.0

 BGP local router ID : 4.4.4.4
 Local AS number : 64512
 Paths:   1 available, 1 best, 1 select
 BGP routing table entry information of 10.0.0.0/24:
 From: 172.16.3.1 (3.3.3.3)
 Route Duration: 00h01m23s  
 Relay IP Nexthop: 172.16.1.17
 Relay IP Out-Interface: GigabitEthernet0/0/0
 Original nexthop: 172.16.2.1
 Qos information : 0x0
 AS-path 1, origin igp, MED 0, localpref 100, pref-val 0, valid, internal-confed
, best, select, active, pre 255, IGP cost 2
 Originator:  2.2.2.2
 Cluster list: 3.3.3.3
 Advertised to such 1 peers:
    172.16.7.1
<R4>

同理R6作为反射指定R7或R5作为客户

[R6]bgp 64513
[R6-bgp]peer 172.16.7.1 reflect-client 

测试

[R7]display bgp routing-table

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


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

 *>i  10.0.0.0/24        172.16.2.1      0          100        0      (64512) 1i
 * i                     172.16.2.1      0          100        0      (64512) 1i
[R7]

收到两条一样的,R6反射一条,R4收到反射R7

<R8>display bgp routing-table 

 BGP Local router ID is 8.8.8.8 
 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

 *>   10.0.0.0/24        78.0.0.1                              0      2 1i
<R8>

目前R1发送路由已经完全做通

发布R8路由

[R8]bgp  3
[R8-bgp]network 11.0.0.0 24

测试

[R7]display bgp routing-table 

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


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

 *>i  10.0.0.0/24        172.16.2.1      0          100        0      (64512) 1i
 * i                     172.16.2.1      0          100        0      (64512) 1i
 *>   11.0.0.0/24        78.0.0.2        0                     0      3i
[R7]

因为下一跳的地址为78.0.0.2 所以R4与R6收不到路由信息,解决办法:修改为本地路由信息

[R7]bgp 64513
[R7-bgp]peer 172.16.6.1 next-hop-local
[R7-bgp]peer 172.16.4.1 next-hop-local
[R7-bgp]
<R1>display 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: 2
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.0.0.0/24        0.0.0.0         0                     0      i
 *>   11.0.0.0/24        12.0.0.2                              0      2 3i
<R1>

因为发送路由信息以及互通,所以R1与R8路由已经可以互相访问

AS2内部环回路由信息互相访问

        路由聚合

进行路由汇总:

        172.16.2.0/24

        172.16.3.0/24

        172.16.4.0/24

        172.16.5.0/24

        172.16.6.0/24

        172.16.7.0/24 ----- 172.16.0.0 / 21

配置空接口

[R2]ip route-static 172.16.0.0 21 NULL 0

[R2]display ip routing-table protocol static 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
         Destinations : 1        Routes : 1        Configured Routes : 1

Static routing table status : <Active>
         Destinations : 1        Routes : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.0.0/21  Static  60   0           D   0.0.0.0         NULL0

Static routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R2]

发布静态路由

[R2]bgp 64512
[R2-bgp]network 172.16.0.0 21

[R2-bgp]display bgp routing-table 

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


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

 *>   10.0.0.0/24        12.0.0.1        0                     0      1i
 *>i  11.0.0.0/24        172.16.7.1      0          100        0      (64513) 3i
 *>   172.16.0.0/21      0.0.0.0         0                     0      i
[R2-bgp]

测试

[R1]display 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: 3
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.0.0.0/24        0.0.0.0         0                     0      i
 *>   11.0.0.0/24        12.0.0.2                              0      2 3i
 *>   172.16.0.0/21      12.0.0.2        0                     0      2i
[R1]

<R7>display bgp routing-table 

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


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

 *>i  10.0.0.0/24        172.16.2.1      0          100        0      (64512) 1i
 * i                     172.16.2.1      0          100        0      (64512) 1i
 *>   11.0.0.0/24        78.0.0.2        0                     0      3i
 *>i  172.16.0.0/21      172.16.2.1      0          100        0      (64512)i
 * i                     172.16.2.1      0          100        0      (64512)i
<R7>

<R8>display bgp routing-table 

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


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

 *>   10.0.0.0/24        78.0.0.1                              0      2 1i
 *>   11.0.0.0/24        0.0.0.0         0                     0      i
 *>   172.16.0.0/21      78.0.0.1                              0      2i
<R8>

目前已完成整个网络所有设备的环回都可以互相访问

存在问题:

        如果R8发送172.16.0.1(路由黑洞)发送给R7,最终被R2丢掉会使得黑洞在AS2内部占用从而浪费资源

解决办法:


[R7]ip route-static 172.16.0.0 21 NULL 0
[R7]bgp 64513
[R7-bgp]network 172.16.0.0 21
[R7-bgp]

解决:环回地址192.168.2.0 /24不能在任何协议中宣告

        制作GRE隧道

[R1]int t 0/0/0
[R1-Tunnel0/0/0]ip ad	
[R1-Tunnel0/0/0]ip address 99.0.0.1 24 ---- 配置网段
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]tunnel-protocol gre  --- 定义隧道的封装类型
[R1-Tunnel0/0/0]source 10.0.0.1 ---定义封装内容
[R1-Tunnel0/0/0]destination 11.0.0.1
Mar  2 2023 12:18:54-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]
[R8]int t 0/0/0
[R8-Tunnel0/0/0]ip address 99.0.0.2 24
[R8-Tunnel0/0/0]tunnel-protocol gre
[R8-Tunnel0/0/0]source 11.0.0.1
[R8-Tunnel0/0/0]destination 10.0.0.1
Mar  2 2023 12:18:00-08:00 R8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R8-Tunnel0/0/0]
[R8-Tunnel0/0/0]

配置静态路由

[R1]ip route-static 192.168.2.0 24 99.0.0.2
[R8]ip route-static 192.168.1.0 24 99.0.0.1 

测试

[R8]ping -a 192.168.2.1 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=60 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=50 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=50 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/44/60 ms

[R8]

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/384040.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

经典蓝牙Sniff Mode

文章目录IntroductionApplicationSniff Sub-ratingReferenceIntroduction Sniff mode为两个已连接的经典蓝牙设备提供了有效的降低功耗的方法。我们知道&#xff0c;当没有数据需要传输的时候&#xff0c;两个已连接的蓝牙设备之间也需要每两个slots完成一次POLL packet - NUL…

系列九、视图/存储过程/存储函数/触发器

一、视图 1.1、概述 视图&#xff08;View&#xff09;是一种虚拟存在的表。视图中的数据并不在数据库中实际存在&#xff0c;行和列数据来自定义视图的查询中使用的表&#xff0c;并且是在使用视图时动态生成的。 通俗的讲&#xff0c;视图只保存了查询的SQL逻辑&#xff0c;…

pb插入ole控件点击insert+control时自动关闭解决办法

pb插入ole控件点击insert control时pb应用程序自动关闭解决思路 {F2F7F2A6-E582-11D1-89AC-00C04FCAF6E3} {F515306D-0156-11d2-81EA-0000F87557DB} 1、问题现象:当在powerbuilder中插入OLE控件点击insert control时,应用程序自动关闭,如图 在网上查询时有人说是其他…

深度剖析:伊朗钢铁厂入侵路径推测及对钢企数字化安全转型启示

2022年6月27日&#xff0c;名为Gonjeshke Darande的黑客组织声称对隶属于伊朗革命卫队&#xff08;IRGC&#xff09;和伊朗巴斯杰民兵组织&#xff08;Basij&#xff09;的Khouzestan、Mobarakeh、Hormozgan三家钢铁公司开展了网络攻击&#xff0c;致使Khouzestan钢铁厂一台重型…

【论文阅读】Attributed Graph Clustering with Dual Redundancy Reduction(AGC-DRR)

【论文阅读】Attributed Graph Clustering with Dual Redundancy Reduction&#xff08;AGC-DRR&#xff09; 文章目录【论文阅读】Attributed Graph Clustering with Dual Redundancy Reduction&#xff08;AGC-DRR&#xff09;1. 来源2. 动机3. 模型框架4. 方法介绍4.1 基本符…

Linux端口开通

Linux端口开开启有两种方式 firewall方式&#xff08;centos7.*&#xff09;修改iptables&#xff08;centos6.*&#xff09; 一、firewall方式 查看防火墙状态firewall-cmd --state如果返回的是 “not running”&#xff0c;那么需要先开启防火墙&#xff1b; 开启防火墙sy…

Java02 变量和运算符

Java02 变量和运算符 2.1 Java代码的基本格式 //类的定义 修饰符 class 类名{public static void main(String[] args){// 代码System.out.println("Hello World&#xff01;");} }现阶段&#xff0c;可以将一个类理解成Java程序&#xff08;.java文件&#xff09;…

html部分codewhy网课学习笔记

day1 网页显示的过程和服务器 浏览器内核,也称为渲染引擎 head标签描述网页的原数据&#xff0c;如title shifttab是向前缩进 div>ul>li可以快速生成 <div> <ul> <li></li> </ul> </div> 在早期,单标签如<input>也可写为&l…

字节前端架构组工程化代码片段

如何使用交互式的命令行工具下载项目模板 这部分代码实现了一个用户交互的 GitHub 模板下载工具。首先你需要在github上创建一个项目&#xff0c;然后使用下面介绍的代码就可以用命令行拉取到本地&#xff0c;并解压了。 它使用 enquirer 库提示用户输入仓库的创建者、名称、…

npm版本过低造成的各种问题汇总及升级方法

npm does not support Node.js 这个是因为npm和Node.js的版本不合适&#xff0c;版本对照表在这里&#xff1a;https://nodejs.org/zh-cn/download/releases/ 查看node和npm的版本&#xff1a; node -v npm -v试图装一个npm&#xff0c;结果报错&#xff1a;TypeError: Canno…

C++面向对象之多态性

文章目录C面向对象之多态性1.静态多态2.动态多态3.多态的好处3.1使用方法4.纯虚函数5.虚析构与纯虚析构5.1问题5.2解决6.其他知识点7.代码8.测试结果8.1父类中无虚函数&#xff0c;父类的指针指向子类对象&#xff0c;将调用父类中的函数&#xff0c;无法调用子类中的重写函数&…

Qt入门基础

目录 一 学习Qt的动机 二 创建第一个Qt程序 关于main.cpp QApplication Widget 关于对象树 关于Widget常用的API return a.exec() 一 学习Qt的动机 我在学习了C之后&#xff0c;想做图形化界面。实现前后端的交互。这时候就可以利用Qt进行编程。 二 创建第一个Qt程序 Qt…

【RocketMQ】消息的存储

Broker对消息的处理 BrokerController初始化的过程中&#xff0c;调用registerProcessor方法注册了处理器&#xff0c;在注册处理器的代码中可以看到创建了处理消息发送的处理器对象SendMessageProcessor&#xff0c;然后将其注册到远程服务中&#xff1a; public class Brok…

哨声吹响,与世界杯相关的欺诈也在激增

2022 年世界杯已经开始&#xff0c;通过虚假流媒体网站与彩票针对足球迷的诈骗激增。近日&#xff0c;Zscaler 发现与世界杯相关的新注册域名有所增加&#xff0c;尽管并非都是恶意的&#xff0c;也是值得警惕的。 流量趋势 随着世界杯的开赛&#xff0c;从 11 月 21 日流媒体…

Python set集合全部操作方法

文章目录一. 介绍1. 创建set集合2. 判断元素是否在集合内3. 集合推导式(Set comprehension)二. 集合基本操作1. add&#xff08;&#xff09;添加单个元素2. update&#xff08;&#xff09;添加列表&#xff0c;元组&#xff0c;字典等整体数据3. remove ( ) 移除元素&#xf…

PACS三维影像后处理系统源码 PACS源码

PACS源码 PACS3D影像后处理系统源码 一、系统概述&#xff1a; ​基于VC MSSQL开发的一套三甲医院医学影像PACS系统源码&#xff0c;集成3D影像后处理功能&#xff0c;包括三维多平面重建、三维容积重建、三维表面重建、三维虚拟内窥镜、最大/小密度投影、心脏动脉钙化分析等…

mysql数据库之视图

视图&#xff08;view&#xff09;是一种虚拟的存在&#xff0c;视图中的数据并不在数据库中实际存在&#xff0c;行和列数据来自定义视图的查询中使用的表&#xff0c;并且是在使用视图时动态生成的。 通俗的讲&#xff0c;视图之保存了查询的sql逻辑&#xff0c;不保存查询结…

【C语言】函数指针和指针函数

文章目录[TOC](文章目录)前言概述函数指针定义&#xff1a;使用&#xff1a;回调函数指针函数前言 今天学一下函数指针 提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 概述 函数指针&#xff1a;是一个指向函数的指针&#xff0c;在内存空间中存放的…

关于小程序内存在违规内容的处理警告

遇到了问题&#xff0c;就记录一下解决过程吧 小程序涉及提供在线观看视频服务&#xff0c;请补充文娱-视频广场类目&#xff1b; 我们的小程序做了一个类似抖音上下滑动观看视频的页面&#xff0c;被警告了&#xff0c;查看了文档&#xff0c; https://developers.weixin.qq.…

C语言程序-计算闰年平年

#include <stdio.h> int main() { int year ,month,day,i1; printf("欢迎使用本程序&#xff0c;使用愉快\n") ; while(i<10){ printf("请输入您需要计算的年\n"); scanf("%d",&year); printf("…