Howard,

I both agree with you and not...

I agree with your statement about how difficult the access list is to read
if it's the first time you see it, or if you have been away from it for a
while. An example is shown at the end of this e-mail where I have made to
Pascal programs that does the same, but where the first is hard to read
compared to the second one.

BUT, I am not sure I agree with you about the performance issue. If a host
with address a.b.c.25 is trying to get through, it is a question about
jumping through only one or four access lines, which I believe would make a
difference (maybe not measuable to the human eye).

Here are the two source codes:

--(1)------------------------

Program Dec2Hex1;
Var
  DecVal,H,L : Byte;
  HexStr     : String;
Begin
  DecVal:=185; H:=DecVal div 16; L:=DecVal mod 16;
  HexStr:=Chr(H+48+((H div 10)*7))+Chr(L+48+((L div 10)*7));
  Writeln(HexStr);
End.

--(2)------------------------

Program Dec2Hex2;

Var
  DecVal     : Byte;
  H,L        : Byte;
  HexStr     : String;

  Function DecChar2HexChar ( B : Byte ) : Char;
  {----------------------------------------}
  {-- Converts a four bit integer to a   --}
  {-- ascii character hex value.         --}
  {----------------------------------------}
  {--  3 = 48('0') +  3 = ascii 51('3')  --}
  {-- 14 = 55('7') + 14 = ascii 69('E')  --}
  {----------------------------------------}
  Begin
    Case B of
      0..9   : DecChar2HexChar := Chr(48+B);
      10..15 : DecChar2HexChar := Chr(55+B);
    End;
  End;

Begin

  DecVal := 185;

  H      := DecVal div 16;
  L      := DecVal mod 16;

  HexStr := DecChar2HexChar(H) + DecChar2HexChar(L);

  Writeln(HexStr);

End.

---------------------------

Take care,

Ole

~~~~~~~~~~~~~~~~~~~~~~~~~~
 Ole Drews Jensen
 Systems Network Manager
 CCNA, MCSE, MCP+I
 RWR Enterprises, Inc.
 [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~



-----Original Message-----
From: Howard C. Berkowitz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 04, 2000 9:01 PM
To: [EMAIL PROTECTED]
Subject: Dark side of the puzzle More puzzles - OSPF Network statements


Chuck,

I agree that problems like this do provide practice in masking. 
Let's make very sure, however, not to give the impression that 
minimizing the number of statements -- definitely OSPF network, and 
arguably access lists -- is a good idea for the real world.

Consider the situation when one is called in, at 3AM, to troubleshoot 
a mission-critical network.  And, as you look at the configuration in 
the routers having problems, you find nothing but "cute" statements, 
with no documentation.

Personally, I make a point of having one OSPF network statement for 
each interface I want to speak OSPF.  Much easier to understand, and 
there is no performance advantage to having a lesser number of 
statements.

Even with access lists, I don't try to minimize except when I am 
facing a real performance problem that can't be solved any other way. 
The original Sprint access list that imposed their prefix length 
restrictions, IIRC, was 16 pages long.


>Gee, the recent wildcard mask puzzle was so much fun, let's do it again.
>
>The problem revolves around the OSPF network statement. Given an OSPF
>routing process, what are the fewest number of network statements that will
>incorporate the following networks into the given OSPF process?
>
>For example:
>
>router OSPF 100
>Network a.b.c.d w.x.y.z area 0.0.0.0
>Network b.c.d.e u.v.w.x area 0.0.0.0
>etc
>
>Assume that all networks are in the same area ( for simplicity sake )
>You may also assume ( for simplicity sake ) that the particular interface
on
>which each particular network resides is the first host address on that
>network. For example, on network 10.10.3.0/24, the first host address ( and
>therefore the interface address ) is 10.10.3.1
>
>Networks are as follows:
>
>10.10.3.0 /24
>10.25.17.0 /16
>10.51.100.192 /26
>172.16.0.0 /16
>172.16.100.0 /24
>172.16.210.240 /28
>172.27.32.0 /19
>192.168.0.0 /24
>192.168.1.0 /30
>192.168.207.56 /29
>
>remember - accolades go to the one who can enter all of these networks into
>a single ospf process with the fewest possible network statements.
>
>Have fun!
>
>Chuck
>
>Please check out my new footers for a new age
>1) Altruism
>http://www.thehungersite.com/cgi-bin/WebObjects/HungerSite
>Please help feed hungry people worldwide. A few seconds a day can make a
>difference to many people
>
>2) Shameless Hucksterism
>http://www.certificationzone.com
>An excellent study focal point for all levels of certification, as well as
>the attainment of internetworking expertise. Use my name when you register.
>You get good study material and I get extra time
>
>___________________________________
>UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
>FAQ, list archives, and subscription info: http://www.groupstudy.com
>Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to