Re: IP Prefix-list Question

From: Sundar Palaniappan (sundarp@gmail.com)
Date: Tue Mar 29 2005 - 13:08:51 GMT-3


Lee,

Are you using the following prefix-list.

ip prefix-list cisco permit 192.54.1.0/24
ip prefix-list cisco permit 192.54.2.0/24
ip prefix-list cisco permit 192.54.4.0/23 ge 24 le 24

First two statments precisely match 1 & 2 networks. 3rd statement
matches 4 & 5. ge & le 24 allows only if the subnet mask is exactly 24
bits and any longer/shorter mask is denied.

See the output below:

R2#show ip bgp sum
BGP router identifier 20.20.2.2, local AS number 200
BGP table version is 7, main routing table version 7
6 network entries using 606 bytes of memory
6 path entries using 288 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 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 978 total bytes of memory
BGP activity 6/0 prefixes, 6/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
20.20.12.13 4 100 5 4 1 0 0 00:00:01 6
R2#
00:11:02: %BGP-5-ADJCHANGE: neighbor 20.20.12.13 Up show ip bgp sum
BGP router identifier 20.20.2.2, local AS number 200
BGP table version is 7, main routing table version 7
6 network entries using 606 bytes of memory
6 path entries using 288 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 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 978 total bytes of memory
BGP activity 6/0 prefixes, 6/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
20.20.12.13 4 100 5 4 1 0 0 00:00:02 6
R2#show ip bgp
BGP table version is 7, local router ID is 20.20.2.2
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.54.1.0 20.20.12.13 0 0 100 i
*> 192.54.2.0 20.20.12.13 0 0 100 i
*> 192.54.4.0 20.20.12.13 0 0 100 i
*> 192.54.5.0 20.20.12.13 0 0 100 i
*> 192.54.21.0 20.20.12.13 0 0 100 i
*> 192.54.22.0 20.20.12.13 0 0 100 i
R2#config t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip prefix-list cisco permit 192.54.1.0/24
R2(config)#ip prefix-list cisco permit 192.54.2.0/24
R2(config)#ip prefix-list cisco permit 192.54.4.0/23 ge 24 le 24
R2(config)#router bgp 200
R2(config-router)#nei 20.20.12.13 prefix-list cisco in
R2(config-router)#^Z
R2#clear ip b
00:12:17: %SYS-5-CONFIG_I: Configured from console by consolegp * soft
R2#show ip bgp sum
BGP router identifier 20.20.2.2, local AS number 200
BGP table version is 9, main routing table version 9
6 network entries using 606 bytes of memory
4 path entries using 192 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 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 882 total bytes of memory
BGP activity 6/0 prefixes, 6/2 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
20.20.12.13 4 100 7 6 7 0 0 00:01:25 4
R2#show ip bgp
BGP table version is 9, local router ID is 20.20.2.2
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.54.1.0 20.20.12.13 0 0 100 i
*> 192.54.2.0 20.20.12.13 0 0 100 i
*> 192.54.4.0 20.20.12.13 0 0 100 i
*> 192.54.5.0 20.20.12.13 0 0 100 i

HTH,
Sundar Palaniappan

On Tue, 29 Mar 2005 16:48:04 +0100, Lee Donald
<Lee.Donald@t-systems.co.uk> wrote:
> Guys,
>
> I have tried this and it only lets subnets 4 & 5 in ?
>
> Also I was after the methlogy behind it so I can work it out for myself, you
> just telling me the answer is only part of it.
>
> I don't quite understand the /23 and the le 24 ge 24 bits ?
>
>
> -----Original Message-----
> From: Dillon Yang [mailto:gzdillon@hotmail.com]
> Sent: 29 March 2005 16:41
> To: Sundar Palaniappan
> Cc: Group Study
> Subject: Re: IP Prefix-list Question
>
> Yes, Sundar:
>
> The task is just the SIX routes!
> so feel free.
> I think you'd not overthink the unknown subnet as 3, 6, 7.
> Any expert advice?
>
> HTH
> dillon
>
> ----- Original Message -----
> From: "Sundar Palaniappan" <sundarp@gmail.com>
> To: "Philippe Couture" <philippecouture@gmail.com>
> Cc: <ccielab@groupstudy.com>; <Lee.Donald@t-systems.co.uk>
> Sent: Tuesday, March 29, 2005 11:28 PM
> Subject: Re: IP Prefix-list Question
>
> > Dillon,
> >
> > You are allowing subnets 3, 6, 7 that aren't part of the requirment.
> >
> > Lee's requirement is minimum number of lines to be used. Your solution
> > would be correct if only one line is to be used to accomplish that.
> >
> > Not sure if Cisco would consider your solution correct.
> >
> > --Sundar Palaniappan
> >
> >
> > On Tue, 29 Mar 2005 10:23:04 -0500, Sundar Palaniappan
> > <sundarp@gmail.com> wrote:
> > > My bad.
> > >
> > > Last statement should be,
> > >
> > > ip prefix-list cisco permit 192.54.4.0/23 ge 24 le 24
> > >
> > > What you are doing is, you are permiting everything after
> > > 192.54.4.0/23 but the subnet mask has to be 24 bits always.
> > >
> > > If you don't use le 24 then you are allowing prefixes with shorter
> > > mask i.e .25, .26 etc to be advertised.
> > >
> > > In the lab, I wouldn't take a chance and just nail it down.
> > >
> > > HTH,
> > > Sundar Palaniappan
> > >
> > >
> > > On Tue, 29 Mar 2005 10:03:43 -0500, Philippe Couture
> > > <philippecouture@gmail.com> wrote:
> > > > Sundar,
> > > >
> > > > Wouldn't the third line need to be "ip prefix-list cisco permit
> > > > 192.54.4.0/23 ge 24" ?
> > > >
> > > > I could be wrong but I think that since you don't care about the 24th
> > > > bit (i.e. you want to match .4 and .5), you would use a mask length of
> > > > 23, and the "ge 24" says to use prefix lengths of 24 or more. If you
> > > > want to really only allow 24 and nothing longer, you would also need
> > > > to add "le 24".
> > > >
> > > > Phil
> > > >
> > > >
> > > > On Tue, 29 Mar 2005 09:54:59 -0500, Sundar Palaniappan
> > > > <sundarp@gmail.com> wrote:
> > > > > Lee,
> > > > >
> > > > > Or you could you configure
> > > > >
> > > > > ip prefix-list cisco permit 192.54.1.0/24
> > > > > ip prefix-list cisco permit 192.54.2.0/24
> > > > > ip prefix-list cisco permit 192.54.4.0/24 ge 23
> > > > >
> > > > > Either way you need 3 statements atleast.
> > > > >
> > > > > HTH,
> > > > > Sundar Palaniappan
> > > > >
> > > > > On Tue, 29 Mar 2005 15:19:12 +0100, Lee Donald
> > > > > <Lee.Donald@t-systems.co.uk> wrote:
> > > > > > I'm having trouble understanding IP Prefix-lists can anybody
> clarify this
> > > > > > for me?
> > > > > >
> > > > > > I have this question; use a prefix list with the minimum amount of
> lines to
> > > > > > allow 1,2,4,5 networks in.
> > > > > >
> > > > > > 192.54.1.0/24
> > > > > >
> > > > > > 192.54.2.0/24
> > > > > >
> > > > > > 192.54.4.0/24
> > > > > >
> > > > > > 192.54.5.0/24
> > > > > >
> > > > > > 192.54.21.0/24
> > > > > >
> > > > > > 192.54.22.0/24
> > > > > >
> > > > > > I have 3 lines, 2 denying 21, and 22, the other allowing
> everything.
> > > > > >
> > > > > > Is this the minimum?, if not why not?
> > > > > >
> > > > > > Thanks in advance for your help.
> > > > > >
> > > > > > Regards
> > > > > >
> > > > > > Lee Donald.
> > > > > >
> > > > > >
> _______________________________________________________________________
> > > > > > Subscription information may be found at:
> > > > > > http://www.groupstudy.com/list/CCIELab.html
> > > > >
> > > > >
> _______________________________________________________________________
> > > > > Subscription information may be found at:
> > > > > http://www.groupstudy.com/list/CCIELab.html
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sun Apr 03 2005 - 17:56:54 GMT-3