cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3270
Views
0
Helpful
2
Replies

bgp and origin codes.

sarahr202
Level 5
Level 5

Hi everybody

Please consider the following:

   R1----egp(bgp)--------R2

R1 routing table:

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks

C       172.16.15.160/30 is directly connected, Serial0/0

C       172.16.15.128/27 is directly connected, Ethernet0/0

C       172.16.15.254/32 is directly connected, Loopback0

C       172.16.15.64/27 is directly connected, Ethernet0/1

router bgp 1

network 172.16.0.0

neighbor 172.16.15.162 remote-as 2

Where  172.16.15.162 is ip address of R2 connected to R1.

R1#show ip bgp

BGP table version is 8, local router ID is 172.16.15.254

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path

*> 172.16.0.0       0.0.0.0                  0         32768 i

The " i"  indicates prefix 172.16.0.0 is learned via network commnad. 

Let check out the bgp routing table on R2

B#show ip bgp

BGP table version is 4, local router ID is 172.16.16.254

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path

*> 172.16.0.0       172.16.15.161            0             0 1 i

Based on origin codes,  we should have gotten" e" not" i" because 172.16.0.0 is learned via egp from R1.

My understanding is origin codes tells us how the route was learned by bgp.  For example " i"  indicates  the route is learned via network command, " ?" indicates the route is redistributedand  "e"  indicates  the toute is learned via egp.

If my understanding is correct, We should have gotten " e"  for 172.16.0.0 as R2 learned this route via egp from R1.

Any input will be greatly appreciated.

thanks and havea good weekend.

2 Accepted Solutions

Accepted Solutions

Hi Sarah,

You are right in your query. However, EGP is a legacy protocol. It was sort of to say that two different AS's communicate with each other. It has faded out.

Exterior Gateway Protocol (EGP) is BGP predecessor.The support for EGP has been removed from IOS, at the same time as IGRP, in the 12.2T train. Therefore support for EGP is not available in 12.3 and up. So, i believe the origin functionality you see also has disappeared.

HTH

Kishore

View solution in original post

Hi,

To add to Kishore answer: the origin code is how the prefix was learnt on R1 and furthermore it can be modified with a route-map. Its only use is in path decision algorithm.

Regards.

Alain

Don't forget to rate helpful posts.

View solution in original post

2 Replies 2

Hi Sarah,

You are right in your query. However, EGP is a legacy protocol. It was sort of to say that two different AS's communicate with each other. It has faded out.

Exterior Gateway Protocol (EGP) is BGP predecessor.The support for EGP has been removed from IOS, at the same time as IGRP, in the 12.2T train. Therefore support for EGP is not available in 12.3 and up. So, i believe the origin functionality you see also has disappeared.

HTH

Kishore

Hi,

To add to Kishore answer: the origin code is how the prefix was learnt on R1 and furthermore it can be modified with a route-map. Its only use is in path decision algorithm.

Regards.

Alain

Don't forget to rate helpful posts.
Review Cisco Networking for a $25 gift card