Monday, March 21, 2011

AS Path Prepending Quick Shot


RT1#
00:00:48: %BGP-5-ADJCHANGE: neighbor 12.12.12.2 Up
RT1#
RT1#sh ip bgp summary
BGP router identifier 192.168.1.1, local AS number 65001
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4 65002       8       7        4    0    0 00:02:20        2
RT1#
RT1#sh ip bgp
BGP table version is 4, local router ID is 192.168.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      0.0.0.0                  0         32768 i
*> 192.168.2.0      12.12.12.2               0             0 65002 i
*> 192.168.3.0      12.12.12.2                             0 65002 65003 i
RT1#

RT2#
00:00:40: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Up
00:00:46: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up
RT2#
RT2#sh ip bgp summary
BGP router identifier 192.168.2.1, local AS number 65002
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4 65001       7       8        4    0    0 00:02:34        1
23.23.23.3      4 65003       7       8        4    0    0 00:02:41        1
RT2#
RT2#sh ip bgp
BGP table version is 4, local router ID is 192.168.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      12.12.12.1               0             0 65001 i
*> 192.168.2.0      0.0.0.0                  0         32768 i
*> 192.168.3.0      23.23.23.3               0             0 65003 i
RT2#

RT3#
00:00:41: %BGP-5-ADJCHANGE: neighbor 23.23.23.2 Up
RT3#
RT3#sh ip bgp summary
BGP router identifier 192.168.3.1, local AS number 65003
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
23.23.23.2      4 65002       8       7        4    0    0 00:02:58        2
RT3#
RT3#sh ip bgp
BGP table version is 4, local router ID is 192.168.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      23.23.23.2                             0 65002 65001 i
*> 192.168.2.0      23.23.23.2               0             0 65002 i
*> 192.168.3.0      0.0.0.0                  0         32768 i
RT3#


RT2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT2(config)#router bgp 65002
RT2(config-router)#neighbor 23.23.23.3 route-map PREPEND-AS out
RT2(config-router)#exit
RT2(config)#route-map PREPEND-AS
RT2(config-route-map)#set ?
  as-path           Prepend string for a BGP AS-path attribute
  automatic-tag     Automatically compute TAG value
  comm-list         set BGP community list (for deletion)
  community         BGP community attribute
  dampening         Set BGP route flap dampening parameters
  default           Set default information
  extcommunity      BGP extended community attribute
  interface         Output interface
  ip                IP specific information
  level             Where to import route
  local-preference  BGP local preference path attribute
  metric            Metric value for destination routing protocol
  metric-type       Type of metric for destination routing protocol
  mpls-label        Set MPLS label for prefix
  nlri              BGP NLRI type
  origin            BGP origin code
  tag               Tag value for destination routing protocol
  traffic-index     BGP traffic classification number for accounting
  weight            BGP weight for routing table

RT2(config-route-map)#set as-path ?
  prepend  Prepend to the as-path
  tag      Set the tag as an AS-path attribute

RT2(config-route-map)#set as-path prepend ?
  <1-65535>  AS number
  last-as    Prepend last AS to the as-path
  

RT2(config-route-map)#set as-path prepend last-as ?
  <1-10>  number of last-AS prepends

RT2(config-route-map)#set as-path prepend last-as 1
RT2(config-route-map)#end
RT2#
RT2#sh ip bgp summary
BGP router identifier 192.168.2.1, local AS number 65002
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4 65001       8       9        4    0    0 00:03:53        1
23.23.23.3      4 65003       8       9        4    0    0 00:04:00        1
RT2#
RT2#clear ip bgp 23.23.23.3 out
RT2#sh ip bgp summary
BGP router identifier 192.168.2.1, local AS number 65002
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4 65001       9      10        4    0    0 00:04:04        1
23.23.23.3      4 65003       9      12        4    0    0 00:04:11        1
RT2#

RT3#sh ip bgp summary
BGP router identifier 192.168.3.1, local AS number 65003
BGP table version is 5, main routing table version 5
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 240 bytes of memory
3 BGP AS-PATH entries using 72 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 759 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
23.23.23.2      4 65002      12       9        5    0    0 00:04:16        2
RT3#
RT3#sh ip bgp
BGP table version is 5, local router ID is 192.168.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      23.23.23.2                             0 65002 65001 65001 i
*> 192.168.2.0      23.23.23.2               0             0 65002 i
*> 192.168.3.0      0.0.0.0                  0         32768 i
RT3#


RT2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT2(config)#route-map PREPEND-AS
RT2(config-route-map)#set as-path prepend 100
RT2(config-route-map)#end
RT2#
RT2#sh ip bgp summary
BGP router identifier 192.168.2.1, local AS number 65002
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4 65001      10      11        4    0    0 00:05:27        1
23.23.23.3      4 65003      10      13        4    0    0 00:05:33        1
RT2#
RT2#clear ip bgp 23.23.23.3 out
RT2#sh ip bgp summary
BGP router identifier 192.168.2.1, local AS number 65002
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 675 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4 65001      10      11        4    0    0 00:05:39        1
23.23.23.3      4 65003      10      15        4    0    0 00:05:45        1
RT2#
RT2#sh route-map
route-map PREPEND-AS, permit, sequence 10
  Match clauses:
  Set clauses:
    as-path prepend 100
    as-path prepend last-as 1
  Policy routing matches: 0 packets, 0 bytes
RT2#

RT3#sh ip bgp summary
BGP router identifier 192.168.3.1, local AS number 65003
BGP table version is 7, main routing table version 7
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
3 BGP path attribute entries using 300 bytes of memory
4 BGP AS-PATH entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 843 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
23.23.23.2      4 65002      15      10        7    0    0 00:05:47        2
RT3#
RT3#sh ip bgp
BGP table version is 7, local router ID is 192.168.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      23.23.23.2                             0 65002 100 65001 65001 i
*> 192.168.2.0      23.23.23.2               0             0 65002 100 i
*> 192.168.3.0      0.0.0.0                  0         32768 i
RT3#

4 comments:

  1. Wonderful blog post, Guidelines structures are redesigning well ordered more branches of learning are finding their ways and data of essential things is despite getting http://www.bigdataproviders.net/biggest-big-data-companies/ site and more significant well ordered making the accomplish the once unlimited things.

    ReplyDelete
  2. i love the articles they have the most amazing meanings to complete the blog http://www.providersva.com/internet-providers-services-virginia/. it must have taken a lot of patience for you too post so good

    ReplyDelete
  3. Great post to praise those who are working hard such people deserve respect and much praises http://www.appscomparator.com/musical-ly-vs-vine-apps-comparison/ , if they are willing to help you then we should at least make them feel that they are special

    ReplyDelete
  4. Wonderful article for you to compliments people who find themselves spending so much time this sort of men and women are worthy of admiration and far good remarks http://www.ukraineoutsourcingrates.com/top-it-outsourcing-companies-ranking-in-sumy/, whenever they are going to enable you to and then our nation at the least get them to experience actually particular.

    ReplyDelete