Cisco – Local in show ip bgp output

bgpcisco

What does Local mean in this output?

R4#show ip bgp 10.6.0.0/24  
BGP routing table entry for 10.6.0.0/24, version 19  
Paths: (1 available, best #1, table Default-IP-Routing-Table)  
  Advertised to update-groups:  
        2  
  **Local**    192.168.0.6 (metric 156160) from 192.168.0.5 (192.168.0.5)  
      Origin IGP, metric 0, localpref 100, valid, internal, best  
      Originator: 192.168.0.6, Cluster list: 192.168.0.5

Best Answer

The Local keyword highlighted in your question means the prefix is sourced locally in that router's AS (i.e. there is no AS path).

Consider two configurations, where the routers have a BGP session with each other, and DEN-EDGE-01 is announcing 10.204.1.1/32.

Announce:10.204.1.1/32
DEN-EDGE-01----------------DEN-EDGE-02
172.16.1.203               172.16.1.204

Peering within the same ASN: Local keyword shown

DEN-EDGE-01 in AS100 is configured to send 10.204.1.1...

router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 10.204.1.1 mask 255.255.255.255
 ! Send 10.204.1.1 to DEN-EDGE-02
 neighbor 172.16.2.204 remote-as 100
 no auto-summary

DEN-EDGE-02 in AS100 is configured with...

router bgp 100
 no synchronization
 bgp log-neighbor-changes
 ! Just receive routes from DEN-EDGE-01
 neighbor 172.16.2.203 remote-as 100
 no auto-summary
!

When I receive 10.204.1.1 on DEN-EDGE-02, there is no AS-path, only Local

DEN-EDGE-02#sh ip bgp 10.204.1.1
BGP routing table entry for 10.204.1.1/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Not advertised to any peer
  Local   <------------
    172.16.2.203 from 172.16.2.203 (172.16.2.203)
      Origin IGP, metric 0, localpref 100, valid, internal, best
DEN-EDGE-02#

Peering with a different ASN: AS path shown

Now we reconfigure both routers... one in AS100 and the other in AS200. DEN-EDGE-01 in AS100 is configured to send 10.204.1.1...

router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 10.204.1.1 mask 255.255.255.255
 ! Send 10.204.1.1 to DEN-EDGE-02
 neighbor 172.16.2.204 remote-as 200
 no auto-summary

DEN-EDGE-02 in AS200 is configured with...

router bgp 200
 no synchronization
 bgp log-neighbor-changes
 ! Just receive routes from DEN-EDGE-01
 neighbor 172.16.2.203 remote-as 100
 no auto-summary
!

When I receive 10.204.1.1 on DEN-EDGE-02, now we see a real AS-path, because DEN-EDGE-01 is in a different AS.

DEN-EDGE-02#sh ip bgp 10.204.1.1
BGP routing table entry for 10.204.1.1/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Not advertised to any peer
  100   <------------
    172.16.2.203 from 172.16.2.203 (172.16.2.203)
      Origin IGP, metric 0, localpref 100, valid, external, best
DEN-EDGE-02#