From: JamesGEF (jamesgef@sympatico.ca)
Date: Thu Nov 13 2003 - 11:37:35 GMT-3
Jonathan, thanks for the great help.
Seem to have missed that little paragraph in the book.
James
----- Original Message -----
From: "Jonathan V Hays" <jhays@jtan.com>
To: "'JamesGEF'" <jamesgef@sympatico.ca>; <ccielab@groupstudy.com>
Sent: Thursday, November 13, 2003 9:02 AM
Subject: RE: BGP Communities
> from Doyle, Volume II, Page 278:
>
> set community 400:50
> set community 0x1900032
> set community 26214450
>
> All these commands specify a 32-bit number in which the first 16 bits is
> 400 in decimal and the second 16 bits is 50 in decimal.
> ---
>
> So the basic problem is how to convert each of these to binary. Using
> the Windows scientific calculator (which is what you have available on
> the CCIE Lab exam):
>
> 400:50 in binary
> 110010000:110010
> adding the leading zeros to give 32 bits
> 0000000110010000:0000000000110010
> and removing the colon divider
> 00000001100100000000000000110010
>
> 0x1900032 in binary
> if you know your hex digits you can just type them out
> 0001 1001 0000 0000 0000 0011 0010
> remove the spaces between the hex digits
> 0001100100000000000000110010
> add leading zeros to give 32 bits
> 00000001100100000000000000110010
>
> 26214450 in binary
> (direct conversion from decimal to binary)
> 1100100000000000000110010
> adding leading zeros to give 32 bits
> 00000001100100000000000000110010
>
> You can copy and paste the results of each of the three calculations
> underneath each other to verify they are the same. Converting in the
> opposite direction is just a matter of dividing the 32-bit binary number
> up into groups of 4 hex digits or two 16 bit halves on each side of the
> colon.
>
> Now, for the sake of thoroughness, let's take your example.
>
> 100:2000 in binary
> 1100100:11111010000
> add leading zeros to give 32 bits
> 0000000001100100:0000011111010000
> remove the colon
> 00000000011001000000011111010000
>
> 0x6407d0 in binary
> 0110 0100 0000 0111 1101 0000
> remove the spaces between the hex digits
> (or you could just type the hex digits into the calculator and convert)
> 011001000000011111010000
> add leading zeros to give 32 bits
> 00000000011001000000011111010000
>
> 6555600 in binary
> 11001000000011111010000
> add leading zeros to give 32 bits
> 00000000011001000000011111010000
>
> Copy and paste all three results below each other and you will see they
> are the same.
>
> HTH,
>
> Jonathan
>
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> JamesGEF
> Sent: Thursday, November 13, 2003 8:24 AM
> To: ccielab@groupstudy.com
> Subject: BGP Communities
>
>
> I'm doing some exercises in Doyle's book on BGP. In regards to
> communities, I
> don't see how to calculate community values from the AA:NN format to
> decimal
> or binary.
>
> For example, the AA:NN value is 100:2000. How does it calculate 6555600
> as
> the decimal value and 0x6407d0 as its hex value?
>
> James
>
> _______________________________________________________________________
> Please help support GroupStudy by purchasing your study materials from:
> http://shop.groupstudy.com
>
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Please help support GroupStudy by purchasing your study materials from:
> http://shop.groupstudy.com
>
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Fri Dec 12 2003 - 12:29:11 GMT-3