Pages

network cisco ccna gns3 certification arteq

network cisco ccna gns3 certification arteq
a network runs through it

Search insearchofthecert

Sunday, December 30, 2012

policing v shaping...

PfR (the pie in the sky)

http://www.netcraftsmen.net/component/content/article/68-network-infrastructure/669-understanding-performance-routing-pt-1.html


In a nutshell, PfR is an alternative way of routing packets. Ordinarily, we use routing protocols to determine the shortest loop-free path from source to destination -- that is, in fact, the primary goal of all routing protocols: to find the shortest (i.e., fewest number of router hops) loop-free path to the destination. Since many protocols use link bandwidth as the way to determine cost, most of the time the shortest path is also the highest bandwidth path to the destination.
Sometimes, the highest bandwidth path is not the best one. The highest bandwidth path can be experiencing congestion – perhaps it is overloaded. Or, the highest bandwidth path can be experiencing a fault that limits throughput or drops packets.
Instead of selecting the shortest path, PfR selects a path based on the performance of the path. PfR can measure parameters such as delay, throughput, loss and reachability, among others, to select the best performing path, and route packets accordingly. PfR can respond to transient events or ‘soft errors’, such as temporary congestion, and route traffic through an alternate path.


watching brian dennis on PfR, ine youtube video...

 http://www.youtube.com/watch?v=2h3nTKpXacY

merely watching it as an introduction, however i was struck by a couple of statements...  

the first of which equated multicast with anycast... if you noticed in the last post, according to rfc 4921, the two are fundamentally different...

as per the rfc, an anycast address is indistinguishable from a unicast but what sets the anycast apart is that it is assigned to more than one node...

a multicast is assigned to multiple nodes as well, but the difference ends there... 
a multicast is used for transmission to select groups, and uses all 1's at the beginning of the address, or f's...


the other comment had to do with policing/shaping...  they are very different ideas...  policing will drop traffic exceeding the max agreed rate; shaping queues the excess traffic for retransmission resulting in a smoothing out of traffic over time as opposed to simply dropping the oversubsciption...

see below for an excellent graphic and explanation...

http://www.cisco.com/en/US/tech/tk543/tk545/technologies_tech_note09186a00800a3a25.shtml

Policing Versus Shaping

The following diagram illustrates the key difference. Traffic policing propagates bursts. When the traffic rate reaches the configured maximum rate, excess traffic is dropped (or remarked). The result is an output rate that appears as a saw-tooth with crests and troughs. In contrast to policing, traffic shaping retains excess packets in a queue and then schedules the excess for later transmission over increments of time. The result of traffic shaping is a smoothed packet output rate.
policevsshape-a.gif
Shaping implies the existence of a queue and of sufficient memory to buffer delayed packets, while policing does not. Queueing is an outbound concept; packets going out an interface get queued and can be shaped. Only policing can be applied to inbound traffic on an interface. Ensure that you have sufficient memory when enabling shaping. In addition, shaping requires a scheduling function for later transmission of any delayed packets. This scheduling function allows you to organize the shaping queue into different queues. Examples of scheduling functions are Class Based Weighted Fair Queuing (CBWFQ) and Low Latency Queuing (LLQ). 

  

v6 anycast v. multicast...

 https://tools.ietf.org/html/rfc4291#page-13

  2.6. Anycast Addresses

An IPv6 anycast address is an address that is assigned to more than one interface (typically belonging to different nodes), with the property that a packet sent to an anycast address is routed to the "nearest" interface having that address, according to the routing protocols' measure of distance. Anycast addresses are allocated from the unicast address space, using any of the defined unicast address formats. Thus, anycast addresses are syntactically indistinguishable from unicast addresses. When a unicast address is assigned to more than one interface, thus turning it into an anycast address, the nodes to which the address is assigned must be explicitly configured to know that it is an anycast address.
 
 

2.7. Multicast Addresses

An IPv6 multicast address is an identifier for a group of interfaces (typically on different nodes). An interface may belong to any number of multicast groups. Multicast addresses have the following format: | 8 | 4 | 4 | 112 bits | +------ -+----+----+---------------------------------------------+ |11111111|flgs|scop| group ID | +--------+----+----+---------------------------------------------+ binary 11111111 at the start of the address identifies the address as being a multicast address.

ccie quick ref...



before i even begin to read a new text, i build an anki deck from the glossary... i was disappointed that the doyle books do not contain one...

for me this is important as it familiarizes me with the subject matter i will encounter, and there will be no surprises upon reading the book... it also gives me a good indicator of what i don't know...

there is a constant in the pursuit of this thing; namely that it will never end... there is comfort in that...

i used to work with a guy who upon hearing that when i was not at work i spent all my time studying the vastness that is this, he'd scoff and tell me to get a hobby...  it is better to keep it to oneself, i thought...  that guy referred to himself as an engineer; i scoffed at that so we were even...

this pursuit is maddening, and often lonely... when you've struggled with a particularly difficult concept for a while, and you finally break through, there is no reward, no trumpets, no celebration, more a feeling of relief than anything else that that obstacle is over, and the realization many more lie ahead...

about that ccie quick reference from cisco press... towards the end there are sections on implementation... while i was reading through them i had a peculiar feeling of being there before... the terrifying moment came when i went back to earlier chapters for a sanity check... i was correct...  some of the same text was repeated verbatim in that later part...

although repetition gives rise to retention, i didn't expect a scrape from one end of the book to another...

of course, this won't stop me from reading it many more times...

by the way, the glossary for odom's ccie is about about 500 terms deep...

bgp prefers ebgp...

that seems counterintuitive...

at first blush one would think the opposite is true...

arteq, you say, forsooth...

but soft reconfiguration, what light through yonder window breaks...


the answer is staring you in the face...

it is a question of believability...

from the mouth of madness: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml

Administrative distance - This is the measure of trustworthiness of the source of the route. If a router learns about a destination from more than one routing protocol, administrative distance is compared and the preference is given to the routes with lower administrative distance. In other words, it is the believability of the source of the route.

don't look at me; i didn't make this shit up...

hex, and big numbers...

65000 decimal equals FD-E8 in hex...

why?

65000 is a good number because:

http://www.bgp4.as/

A unique AS number (ASN) is allocated to each AS for use in BGP routing. The numbers are assigned by IANA and the Regional Internet Registries (RIR), the same authorities that allocate IP addresses. There are public numbers, which may be used on the Internet and range from 1 to 64511, and private numbers from 64512 to 65535, which can be used within an organization.

0 to 65535 is 65536 total numbers

and 2 to the 16th equals  65536

and 2 to the 15th equals 32768 which is a number dear to your heart...

and so on...  powers of 2 are not the enemy...
back to 65000...

in hex the rightmost place holder is units or 0-9 ABCDEF (10 - 15) comprising a total 16 numbers because hex is a base 16 number system...

to the left of the units place holder is the 16's place holder...

hex AC is 10*16 + 12*1 or 172...

to the left of the 16's place holder is the 16*16 place holder or 256...

and you love 256... you seeing a pattern here?

to the left of the 256 place holder is the 4096 place holder because 16 times 256 is 4096... every consecutive place holder to the left is again multiplied by 16...

so FD-E8 is...

time to break out the calculator:

F times 4096 + D times 256 + E times 16 + 1 times 8


 ta da...


you can applaud if you want to...



Thursday, December 27, 2012

frame me...

i've begun actually to enjoy jerking around with frame lately... it takes more effort to avoid it...


hub and spoke... ip only... the interfaces ping because they are in the same subnet...

R1#sh run int s2/0
Building configuration...

Current configuration : 227 bytes
!
interface Serial2/0
 ip address 10.1.1.1 255.255.255.0
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay map ip 10.1.1.3 103 broadcast
 frame-relay map ip 10.1.1.2 102 broadcast
 no frame-relay inverse-arp


R2#sh run int s2/0
Building configuration...

Current configuration : 217 bytes
!
interface Serial2/0
 ip address 10.1.1.2 255.255.255.0
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay map ip 10.1.1.1 202 broadcast
 frame-relay map ip 10.1.1.3 202
 no frame-relay inverse-arp


R3#sh run int s2/0
Building configuration...

Current configuration : 217 bytes
!
interface Serial2/0
 ip address 10.1.1.3 255.255.255.0
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay map ip 10.1.1.2 303
 frame-relay map ip 10.1.1.1 303 broadcast
 no frame-relay inverse-arp


R3#trace 10.1.1.2
Type escape sequence to abort.
Tracing the route to 10.1.1.2
VRF info: (vrf in name/id, vrf out name/id)
  1 10.1.1.1 28 msec 36 msec 20 msec
  2 10.1.1.2 32 msec *  48 msec


the ip ospf interface command gives you a lot of flexibility with the topology...
choose your weapons...

R1(config)#router ospf 1
R1(config-router)#netw 10.1.1.0 0.0.0.255 area 0
R1(config-router)#netw 1.1.1.0 0.0.0.255 area 0


R2(config)#router ospf 1
R2(config-router)#netw 10.1.1.0 0.0.0.255 area 0
R2(config-router)#netw 2.2.2.0 0.0.0.255 area 0
R2(config-router)#end


R3(config)#router ospf 1
R3(config-router)#netw 10.1.1.0 0.0.0.255 area 0
R3(config-router)#netw 3.3.3.0 0.0.0.255 area 0


note: you'll get no adjacencies until you declare the interface network types...

once ip ospf network point-to-multipoint is placed on the interfaces, you have a happy ospf situation...

R3#sh ip route | b Gate
Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/65] via 10.1.1.1, 00:02:11, Serial2/0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/129] via 10.1.1.1, 00:02:11, Serial2/0
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.3.3.0/24 is directly connected, Loopback0
L        3.3.3.3/32 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Serial2/0
O        10.1.1.1/32 [110/64] via 10.1.1.1, 00:02:11, Serial2/0
O        10.1.1.2/32 [110/128] via 10.1.1.1, 00:02:11, Serial2/0
L        10.1.1.3/32 is directly connected, Serial2/0


R3#sh ip ospf int
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Loopback interface is treated as a stub Host
Serial2/0 is up, line protocol is up
  Internet Address 10.1.1.3/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           64        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1
  Suppress hello for 0 neighbor(s)


the loopbacks show up as loopbacks... make them networks with ip ospf network point-to-point

R1#sh ip ospf int lo0
Loopback0 is up, line protocol is up
  Internet Address 1.1.1.1/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT


the points network types have no dr/bdr (point-to-point and multipoint)

R1#sh ip ospf neigh

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:01:58    10.1.1.2        Serial2/0
3.3.3.3           0   FULL/  -        00:01:47    10.1.1.3        Serial2/0


so there is no need to worry over ospf priority on the spokes...

R2#sh ip ospf neigh

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:01:53    10.1.1.1        Serial2/0


now make an ipv6 tunnel between r2 and r3...

R3#sh run int tun0
Building configuration...

Current configuration : 118 bytes
!
interface Tunnel0
 no ip address
 ipv6 address 2001::3/64
 tunnel source 10.1.1.3
 tunnel destination 10.1.1.2


R3#ping 2001::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/32/40 ms



change the tunnel mode to ipv6ip...


note the encapsulation type...

quote of the day... kevin wallace...

kevin wallace on bgp preference...

nothing new here, but always good to review...

1. BGP prefers the path with the highest weight. Note that the BGP weight parameter is a Cisco-specific parameter.

2. BGP prefers the path with the highest local preference value.

3. BGP prefers the path originated by BGP on the local router.

4. BGP prefers the path with the shortest autonomous system.

5. BGP prefers the path with the lowest origin type. (NOTE: IGP < EGP
  < INCOMPLETE.)

6. BGP prefers the path with the lowest multi-exit discriminator (MED).

7. BGP prefers eBGP paths over iBGP paths.

8. BGP prefers the path with the lowest IGP metric to the BGP next-hop.

9. BGP prefers the path that points to a BGP router with the lowest BGP router ID.

Wednesday, December 26, 2012

repost minus 256...

this has eclipsed all others for amount of hits, and rightly so...  i wrote and posted this on the internet back in 2004...

pre-req's

comfort with binary to decimal conversion

comfort with exponents of 2, ie. 2 to the x = ?

comfort with the three classful boundaries...

the thing about ccna and all it's variants, on up through ccie is that you can count on the numbers... if you are afraid of the numbers and their various permutations and calculations, then all of this will be difficult at best...

this site was created for the ccent/ccna candidate... anything more advanced than that is gravy...

if you do a search in the search bar for ccna, you will find over a hundred posts directly related to ccna... and don't forget the hex tutorials...

there is safety in numbers...


the minus 256 technique
this presupposes knowledge of binary and ip addressing conventions
rule 1. remember that the first octet only ever designates the class
of ip, ie. a b or c
rule 2. the first octet that contains a zero bit, is always the octet
where the action occurs, ie, 255.255.255.0, calculation happens in 4th
octet; or 255.255.0.0, calculation happens in third octet; or
255.255.248.0, calculation occurs in 3rd octet, and so on.
rule 3. see rule number 1. The first octet always tells you the class
of address no matter the octet where subnetting occurs.  Subnetting
calculation always happens in the octet of the ip address that the
subnet mask designates with its first instance of less than 255, or
more simply, the first instance of a zero bit.
therefore, given 172.16.10.10 mask of 255.255.248.0, we know that the
calculation will happen in the ip's 3rd octet.  The mask designates
that with 248.  it is imperative that this is understood.
another way of looking at it in the above example is; the octet in the
subnet mask with the first instance of less than 255, or the first
zero bit, is the multiplier.
rule 4.  when the multiplier (first zero bit octet or octet with first
instance of less than 255) is determined always subtract it from 256
to determine the ranges.
ie. 256-248=8, hence 8 is the multiplier.
using 172.16.10.10 with 255.255.248.0, it is determined that we have a
class b address 172, our calculation must happen in the 3rd octet, and
we must subtract 256 from 248 to get 8.
the rest is academic:
the multiplier ( has determined our first subnet range
8 16 24 32 40, etc
the first range (excepting the use of subnet zero) begins with 8 and
ends with 15, the second range begins with 16 and ends with 31, next
range begins with 32, and so on up to 255.
Important: there are 256 numbers total comprising the range 0-255,
including the zero.
in the ip 172.16.10.10 /21 (notice the use of bit count; this equals
248 as well.  to determine the number to subtract from 256 in  bit
count form, you need to add the bits...
1st octet 8 bits, second octet 8 bits, third octet 5 bits, hence 8 + 8
+ 5 =/21 or 248 or
172.16.10.10 /21 = 172.16.10.10 255.255.248.0
our calculation takes place in the octet designated by the first
instance of a zero, or in our example, /21 or 255.255.248.0.  we
determine that 10 is the number occupying the third octet in our
example, and our multiplier has determined the first possible subnet
is 8 (excepting subnet zero)
so, since 10 falls between 8 and 15 (16 begins the next subnet or
network), our valid range for the address has been determined.
8    16   32...
9    17
14   30
15   31
so our octet 3 number, which is 10 in the example, can only fall
between the range of 8 (the  network), 9 our first valid host, 14 our
last valid host, and 15 which is the broadcast address for the network
our number ten resides in.
if we changed our third octet number to 172.16.20.10 /21 or
255.255.248.0, we know that our calculation still takes place in the
3rd octet, but the number 20 falls between the network 16, the
broadcast 31, and within the valid range of hosts which is 17-30...
one more example:
192.168.100.100 255.255.255.192
the class of address is C
the action takes place in octet 4
subtract 192 from 256 which equals 64 and we can determine the
network, the broadcast and the valid range of hosts because 64 is our
multiplier
hence:
64     128    192
65     129    193
126    190    254
127    191    255
our number in octet 4 is 100, our number 100 falls between 64 (the
first network) and 128 (the second network).  the subnet address is
192.168.100.64
   the first valid host is 192.168.100.65
   the last valid host in the range is 192.168.100.126
   and the broadcast address is 192.168.100.127
it takes a little time and effort, and a lot of practice, but you'll
eventually be able to do it without paper.