Sie sind auf Seite 1von 26

notes taken to help study for CCIE...

used Enabling IP Routing with Cisco Routers by


R. Das & K.Chakrabarty, CCIE Routing and Switching by A. Anthony Bruno, as well
as lots of Internet resources. A lot of this stuff is plagarized from the 2 stated sources,
and should be re-worked if ever put into an official publication. A few things were
taken from Pearson's CCNA Routing and Switching 200-101 Complete Video Course.
Table of Contents
OSPF(v2 (ipv4))
Definitions
Network Types
Timer Comparison
Packets
LSAs
Sample OSPF Map
Router ID
States (Cisco?)
Forming an Adjacency
Flapping
Configuring Neighbor Authentication
Plain text
MD5 hash
Metric
Djikstra's Algorithm
Commands and config - ipv4 (Cisco)
Commands and config - ipv6/ospfv3 (Cisco)
Packet details
LSA formats

OSPF(v2 (ipv4))

Link state routing protocol


IP protocol 89

classless (VLSM).

sends partial route updates only when there are changes.

Routes labeled as intra-area, interarea, external Type 1, or external Type 2.

Supports authentication. Plaintext and MD5 (64 bit key).

runs internally in an AS (Autonomous System)

based on Djikstras shortest path first (spf) algorithm.

spf becomes candidate to be injected into router routing table based on


admin distance of other similar routes

link state info calcs optimal path for routing packets

Metric is cost (based on interface bandwidth) by default.

Default (cisco?) admin distance is 110.

every area in the AS has to connect to area 0 (backbone)

RFC2328

multicast 224.0.0.5 - Used to send Hello packets to all OSPF routers on a


network segment

multicast 224.0.0.6 - Used to send OSPF routing info to DR on network


segment.

OSPF does not auto summarize.

Split Horizon by default

TL max 255

relies on IP to carry routing info

Open standard (developed by IETF)

Establish adjacencies with other rtrs

Send recieve Link State Advertisements (LSAs) to/from other routers in an area
- construct link state database from received LSAs

Definitions

Hello - protocol used to discover OSPF neighbors and confirm reachabilty to those
neighbors (also used in election of DR)
Link State Advertisement (LSA) - info rtr snds/recs about net reachability (used to
construct rtr's Link State Database)
Link State Update (LSU) - pkt that carries LSAs
Link State Request (LSR) - Used by rtr to req spec LSA info fr neighbor
Link State Acknowledgement (LSAck) - Used by rtr to conf it rec'ed an LSU
DR (Designated Router)
collects all LSAs and forwards to non-DR routers.
Sends out info on ALLSPFRouters multicast address (224.0.0.5).
Sends out Network LSA (Type 2)

Selected based on OSPF DR interface prio. Def val is 1. Highest prio


determines DR, In case of tie, numericaly highest rtr ID (RID) wins. Rtrs with prio of
0 are not even considered for DR/BDR

prio can be set manually using ipospfpriorityvalue where value - 0255

rtr id can be set manually using routerid<id> command. If not set use
highest loopback int ip addr (currently up). If not loopback - highest ip addr of nonloopback int that currently up.

After initial election finished, new election doesn't occur when new rtr
added to network.

No election on PtoP.

In real life, 1st rtr online becomes DR, unless you reset things
BDR (Backup Designated Router) Takes over for DR if DR fails.
DRothers non DR/BDR routers. Multicast packets to DR & BDR using multicast
address 224.0.0.6 (AllDRouters).
ABR - (Area Border Router) - Connect 2 areas within AS.
ASBR - (Autonomous System Boundary Router) - connects to at least one external
routing process (i.e. not in the OSPF AS)

Neighbors are routers on same link - (known via Hello msgs - to be a neighbor area
hs to be the same, hello and dead timers have to be the same, mtu has to be the same,
have to be on same network/subnet)
Adjacencies
connection between OSPF rtr and DR
neighbors that have exchanged LSUs and Data Description (DD) packets
with no DR and BDR you would need - # of adjacencies = [n * (n-1)] / 2,
where n is number of routers
area - collection of interfaces that are running OSPF
consider multiple areas for hosts and load balancers running OSPF
Other than that consider using single area OSPF design
Flooding Periodic updating of topology and routing table info with LSAs being sent
out.
Stub Area - configured with default external route (0.0.0.0). Doesn't accept external

summary routes (LSA Type 4 or LSA Type 5). A stub area has no routers or areas
beyond it.
Totally Stubby Area - Cisco proprietary. Doesn't accept LSA Types 3, 4, 5. Accepts
default external route (0.0.0.0). Will not accept external summary LSAs.
Not So Stubby Area - Allows for redistribution of routing info. ASBR sends LSA
Type 7 through area. ABR converts to Type 5 LSA.
External type 1 route - metric is sum of redistribution cost plus cost of path to reach
ASBR.
External type 2 route - metric of route at the point of redistribution into OSPF
network.
Virtual Link - Area that is not connected directly to area 0 can be connected through
another area. This should be temporary only (redo areas).

Network Types
Broadcast Network
Point-to-Point - no BDR/DR needed
NBMA (non-broadcast like frame-relay)
must assign dr manually (set other routers prio to 0) - something that
connects via L2 to all
must assign neighbors via neighbor command

Point-to-Multipoint

like nbma but cfg'ed diff - each PVC is treated a separate P-to-P conn

no dr/bdr elect

def hello interval 30 sec

no neighbor command needed


Network Type
Broadcast
P-to-P
NBMA
P-to-Multipoint

Elects DR/BDR
Yes
No
Yes
No

Default Hello Interval


10 seconds
10 seconds
30 seconds
30 seconds

Uses neighbor command


No
No
Yes
No

Timer Comparison
Hello

(RIP-Invalid)
Dead
Holddown
(OSPF-Suspicious) (RIP-Flush)

RIP
30
180 (6x)
OSPF 10 BMA
90 (3x)
30 NBMA
EIGRP 5
60 WAN < 1.544Mbps
STP
2

240 (8x)
120 (4x)

180
5 second delay +
10 seconds Hold
15 (3x)
20 blocking
15 listening
15 learning
forwarding

Packets
Type Description
1
Hello

establishes and maintains neighbor relationships, DR, BR.. Hello


timerEvery 10 seconds on BMA and P-to-P.
30 seconds on NBMA.
Suspicious neighbor relationship at 3 times hello timer.

Dead timer 4 times hello timer.


Database Description describe the contents of the link-state database (overview)
Link State Request
send if rtr finds that parts link-state db are out-of-date
Link State Update
implements flooding of LSAs. Each packet carries collection of
LSAs one hop further from their origin. LSU can contain
multiple LSAs.
Link State
Acks the flooded LSAs. Makes the flooding process reliable.
Acknowledgment

2
3
4

LSAs
(Link State Advertisement) OSPF packetcontaining src, dst, routing info.
Advertised to all OSPF routers in hierarchical area.
Sent inside Link State Update (LSU) packet.
LSA
Type
1

Description
Router-LSAs

Network-LSAs

Summary-LSAs (IP
network)
Summary-LSAs

I am an OSPF rtr and these are my links to the area - 1 for


eac subnet
DR sends this LSA to all fully adjacent rtrs. Lists DR rtr ID
and rtr IDs fully adjacent to the DR
ABRs send summary routes into area for other areas in AS
ASBRs send summary routes into area for other areas not in

5
6
7

(ASBR)
AS-external-LSAs

NSSA External LSA

AS (i.e. using a diff routing protocol


External routes injected into OSPF area
Group membership link entry generated by multicast OSPF
routers
here's another area not in our AS

Sample OSPF Map

Router ID
higher is better - Priority looked at before Router ID
1. router-id command (under router OSPF <pid>)
2. loopback
3. highest active IP addr
priority then router id (highest) determines DR and BDR

States (Cisco?)

Down: No information has been received from anybody on the segment.


Attempt: On non-broadcast multi-access clouds such as Frame Relay and
X.25, this state indicates that no recent information has been received from the
neighbor. An effort should be made to contact the neighbor by sending Hello packets
at the reduced rate PollInterval.

Init: The interface has detected a Hello packet coming from a neighbor but bidirectional communication has not yet been established.

Two-way: There is bi-directional communication with a neighbor. The router


has seen itself in the Hello packets coming from a neighbor. At the end of this stage
the DR and BDR election would have been done. At the end of the 2way stage, routers
will decide whether to proceed in building an adjacency or not. The decision is based
on whether one of the routers is a DR or BDR or the link is a point-to-point or a
virtual link.

Exstart: Routers are trying to establish the initial sequence number that is
going to be used in the information exchange packets. The sequence number insures
that routers always get the most recent information. One router will become the
primary and the other will become secondary. The primary router will poll the
secondary for information.

Exchange: Routers will describe their entire link-state database by sending


database description packets. At this state, packets could be flooded to other interfaces
on the router.

Loading: At this state, routers are finalizing the information exchange. Routers
have built a link-state request list and a link-state retransmission list. Any information
that looks incomplete or outdated will be put on the request list. Any update that is
sent will be put on the retransmission list until it gets acknowledged.

Full: At this state, the adjacency is complete. The neighboring routers are fully
adjacent. Adjacent routers will have a similar link-state database.

may not make it to FULL if

subnet masks don't match

hello/dead timers do not match

network command missing

OSPF Network Types do not match. 5 network types

PtoP

Broadcast

NBMA FR, X25

Point to multipoint (frame relay)


Forming an Adjacency
R1
R2
(r1 boots, r2 already up)
state init
------------Hello----------> state
neighbor list)
state 2way
<-----------Hello----------- state
neighbor to r2 in packet)
state 2way
------------Hello----------> state
neighbor to r1 in packet)
state 2way
<-dr/bdr elect (if needed)-> state
state ExStart <--prim/sec rtrs selected--> state
state Exchange <-db desc packs Exchanged--> state
state Loading <-rtrs query for missing entries->
state full
<--adjacency fully formed--> state

init (r2 not in r1's hello


init (r2 includes r1 as
2way (r1 includes r2 as
2way
ExStart
Exchange
state Loading
full

Flapping
causes area to recalc SPF. minimize by

OSPF schedule Delay - 5 seconds after receiving LSU/LSAs


Hold time - wait minimum of 10 seconds before running another SPF
Configuring Neighbor Authentication
Plain text

int s1/0
ip ospf authentication-key DaSecret
router ospf 1
area 1 authentication
show ip ospf int s 1/0
clear ip ospf process (reset OSPF processes)
show ip ospf neighbor

MD5 hash

int fa 0/0
ip ospf message-digest-key 1 md5 DaSecret2
router ospf 1
area 0 authentication message-digest
show ip ospf int fa 0/0
clear ip ospf process (reset OSPF processes)
show ip ospf neighbor

Metric
OSPF Metric/ref bw - (10^8)/bps or 10mbps
cost (integer) = ref bw/interface bw
don't forget to all all links including final egress link
Fast Ethernet and faster
Ethernet
E1
T1
128 kbps
64 kbps
56 kbps

1
10
48
64
781
1562
1785

can set manually on interface with


ipospfcost<cost>
or
bandwidth<kbps>
showipospfinterface

can modify ref bw using


autocostreferencebandwidth<value>

where <value> = highest bw in network - can only be 16 bit value...be careful of low
end values
shows calc'ed cost not specified?

Djikstra's Algorithm

considers topology and calculates Shortest Path to Destination


Node (or Vertex) - Location in Dijkstra Algorithm Graph
Dijkstra Algorithm Graph - Directed and Weighted

Initially, assumed cost is infinite to other nodes

Edge - weighted connecion between two nodes

taken from Cisco CCNA Routing and Switching 200-120 Complete Video Course until I can

redraw it differently
From Node A's perspective how do I get everywhere...
From Node To Node
B
A
20 via A
C
not connected
20 via A
B
already there
20 via A
D
30 + 30 (A-C-D)
20 via A
E
not connected

C
10 via A
already there
10 via A
not connected
10 via A
20 + 30 (A-C-D)
10 via A
50 + 60 (A-C-E)
10 via A

D
Infinite
20 + 10 (A-C)
30 via C
30 + 20 (A-C)
30 via C
already there
30 via C
40 + 60 (A-C-E)
30 via C

E
Infinite
50 + 10 (A-C)
60 via C
not connected
60 via C
40 + 30 (A-C-D)
60 via C
already there
60 via C

Shortest Path Tree (from A perspective)


A--B
|
C--D
|
E

Commands and config - ipv4 (Cisco)


!
interface Loopback0
ip address 192.168.5.3 255.255.255.255
ip ospf priority 101 (highest prio wins, default is 1, 0 - don't
participate,
bounce int to relearn DR)
interface FastEthernet0/0
ip address 192.168.4.3 255.255.255.0
ip ospf message-digest-key 1 md5 cisco (key for authentication)
!
...
!
router ospf 1 (1 is process id)

log-adjacency-changes
area 0 authentication message-digest
network 192.168.0.0 0.0.7.255 area 0 (wildcard mask)
OR
network 0.0.0.0 255.255.255.255 area 0 (all networks/interfaces)
default-information originate
passive-interface fa0/0 (don't send Hellos/LSAs out this interface)
auto-cost reference-bandwidth 10000 (mbps - default is 10mbps)
router-id x.y.z.a (leaving it off will take highest loopback)
int s 1/0
ip ospf network non-broadcast (or broadcast or point-to-multipoint
or point-to-point (changes timers))
ip ospf hello-interval 30 (manually set timers to force match-up)
(routes won't be learned unless network type is
same)
sh ip protocols
sh ip ospf
sh ip ospf int brief
sh ip ospf interfaces (sh interface ospf detail incl timers - need to match
neighbor)
sh ip ospf int <interface> (shows DR/BDR status)
sh ip ospf neighbor (includes if ospf neighbor rtr is DR or BDR, also
HELLO/DEAD timers)
(has adjacency been formed)
sh ip ospf rib (rtr info base - entries w/ > are injected into rtr ip rting
tbl (global rib))
sh ip route
shows [AdminDistance/Cost(or FD for EIGRP)]
(OI means interarea)
sh ip route ospf (only shows routes learned vi ospf)
debug ip ospf hello
clear ip ospf process (resets ospf)
show ip protocols (shows all routing protocols running and some details)

Commands and config - ipv6/ospfv3 (Cisco)

ipv6 unicast-routing
ipv6 cef (make efficient fwd decisions based on fib and adj table)
int fa 0/0
ipv6 ospf 1 area 0
int fa0/1
ipv6 ospf 1 area 0
int lo0
ipv6 ospf 1 area 0
ipv6 router ospf 1
router-id 1.1.1.1 (can be ipv4)
router ospfv3 1 (1 is process id)
auto-cost reference-bandwidth 10000
passive-interface fa0/0
sh ipv6 route
sh ipv6 int brief

ping 2000:11::1111
traceroute 2000:11::1111
sh ipv6 ospf neighbor
sh ipv6 protocol (rtr id is ipv4 addr)
sh ipv6 ospf int brief
sh ipv6 ospf <interface> (see cost, router id, timers, net type, adjacency
sh ipv6 cef

Packet details
Header

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | Type | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Hello Packet
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 1 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HelloInterval | Options | Rtr Pri |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RouterDeadInterval |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Designated Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Backup Designated Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Neighbor |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

Database description packet


0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 2 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interface MTU | Options |0|0|0|0|0|I|M|MS
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DD sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- -+
| |
+- An LSA Header -+
| |
+- -+
| |
+- -+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

Link State Request


0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 3 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

Link State Update


"...carries a collection of LSAs one hop further from their origin..."
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 4 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| # LSAs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- +-+
| LSAs |
+- +-+
| ... |

Link State Ack


0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 5 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- -+
| |
+- An LSA Header -+
| |
+- -+
| |
+- -+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

LSA formats

"...Each LSA describes a piece of the OSPF routing domain. Every router originates a
router-LSA. In addition, whenever the router is elected Designated Router, it
originates a network-LSA. Other types of LSAs may also be originated (see Section
12.4). All LSAs are then flooded throughout the OSPF routing domain...collection of
LSAs is called the link-state database.
From the link state database, each router constructs a shortest path tree with itself as
root. This yields a routing table...."
LSA header
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | LS type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Router-LSAs
"Each router in an area originates a router-LSA. The LSA describes the state and cost
of the router's links (i.e., interfaces) to the area. All of the router's links to the area
must be described in a single router-LSA. For details concerning the construction of
router-LSAs, see Section 12.4.1."
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 |V|E|B| 0 | # links |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | # TOS | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| TOS | 0 | TOS metric |


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

Network-LSAs (type 2 LSAs)


originated by the network's DR - lists all router IDs attached to the network, including
the DR itself. Generally sent by the DR.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Attached Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

Summary-LSAs
Type 3 LSAs are originated by ABRs to describe inter-area IP destinations (within AS
but outside of particular area). Type 4 LSAs are originated by ASBRs to describe
routes to IP destinations outside of AS.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 3 or 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |

AS-external-LSAs

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 5 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

http://jungar.net/network/OSPF.php
http://www.networksbaseline.in/p/cheat-sheets_12.html

notes taken to help study for CCIE...used Enabling IP Routing with


Cisco Routers by R. Das & K.Chakrabarty, CCIE Routing and
Switching by A. Anthony Bruno, Enhanced Interior Gateway Routing
Protocol (Cisco Document ID: 16406), Pearson's CCNA Routing and
Switching 200-101 Complete Video Course, as well as lots of Internet
resources. A lot of this stuff is plagarized from the stated sources,
and should be re-worked if ever put into an official publication

EIGRP
Table of Contents
EIGRP
Highlights
Concepts
EIGRP Metrics

Default K values
Timer Comparison
Packets
Tables
Type/Length/Value (TLV)
Commands
IPv4 config
AUTHENTICATION
Unequal cost routing
Autosummarization
Passive interface
IPv6 config
Troubleshooting

Highlights
Cisco special...
fast convergence

Scalable

Load balancing over unequal cost links

Classless (VLSM support)

Hybrid routing protocol (distance vector that has link-state


characteristics)

Multicast - 224.0.0.10

IP protocol 88

classless (VLSM).

Neighbors advertise distance to specific network(s)

Default composite metric of bandwidth and delay

Load and reliability and MTU can be factored into metric

Sends partialroute updates only when changes occur,


triggered (onevent), bounded (only send to rtrs that need it)
Support for authentication. MD5. Uses key-chains in config.
By default, equal-cost load balancing; unequal-cost load
balancing with the variance command. variance multiplies by successor
route and than if other meet feasibility condition successor gets unequally cost
loadbalanced.

Admin distance is

90 for EIGRP internal routes

170 for EIGRP external routes

5 for EIGRP summary routes.

110 OSPF

1 STATIC

120 RIP

Supports split horizon, poison-reverse.


Does auto-summary by default (to most common bit).
Sometimes does it wrong. Good idea to disable and do
summarization manually.

multicast packets go to 224.0.0.10

uses DUAL (Diffusing Update Algorithm)

Neighbors advertise distance to specific network(s)


Concepts
Protocol-Dependent Modules - Uses different modules to support
IP, IPX, Appletalk.

Neighbor Discovery and Recovery - Sends/Monitors hello


packets. Rtr builds table with EIGRP neighbor info. If hello not
received within holdtime, neighbor removed from table.
RTP - uses RTP with sequence numbers to ensure reliable
delivery of route updates. Update packets are sent using multicast

address 224.0.0.10. Updates are ack'ed using unicast hello packets


with no data.

DUAL - (Diffusing Update Algorithm) - developed by Dr. J.J.


Garcia Luna-Aceves. Selects best path (successor) and 2nd best
path (feasible successor) to reach destination.

Advertised distance is distanced advertised by 1 router to


another as the cost to get to a specific network

Feasible distance is the lowest calculated metric of path to


reach destination. Distance to EIGRP neightbor plus that neighbor's
advertised distance to a specific network

Feasible route - primary path to dest network, based on best


feasible distance.

Sucessor route - backup path to dest network, based on


feasible distance.

Feasibility Condition - Before route can become Feasible


Successor Route, its Advertised Distance (AD) has to be lower than
FD (Feasible distance) of Successor Route
EIGRP Metrics
bandwidth (K1 default)

big

delay (K3 - default) dogs

reliability (K5)

reall
y

load (K2)

like

mtu

me

Default K values
K1 = 1
K2 = 0

K3 = 1

K4 = 0

K5 = 0

router eigrp 100


metric weight 0 1 1 1 0 0 (last 5 numbers are K values)
(EIGRP neighbors have to have matching K values)

Default Formula 256*(Bw+Delay)


256*((10,000,000/minbwinkbs)+(sumofinterfacedelays/10))
FullFormula
K2*BwK5
256*([K1*Bw++K3*Delay]*[])
(256Load)(Reliability+K4)

Values to right of decimals get dropped during calculation.


Stub routers - hub router contains info, performs routing for all
networks. Spike routers have only enough info to reach hub router.
Timer Comparison

RIP

Hello

(RIP-Invalid) Dead
(OSPF(RIPSuspicious) Flush)

30

180 (6x)

240 (8x) 180

90 (3x)

120 (4x) 5 second


delay +
10 seconds
Hold

OSP 10 BMA
F
30 NBMA

Holddown

EIGR 5
P
60 WAN <
1.544Mbps

15 (3x)

STP 2

20 blocking
15 listening
15 learning
forwarding

Packets

EIGRP
Opcod
e
Description
5

Hello

Multicast to 224.0.0.10. Default timer is (5 seconds (60


seconds on WAN links with 1.544Mbps or less)). Holddown
timer is 3x hello timer

Acknowledgm hello packet with no data. Acks reception of update packet.


ent
Sent to unicast address of sender of update packet.
1

Update

contain routing info of destinations. unicast to newly


discovered neighbors or multicast to 224.0.0.10 when link
or metric changes. Uses RTP.

Query

Multicast to find feasible successors to destination.

Reply

Sent in response to query packets. Unicast to sender of


query in order to provide feasible successor.

IPX, SAP

Tables
neighbor table establish relationship with neighbor
successor is neighbor that can give you best path to destination
feasible distance value of network to successor
reported distance router reports FD to next router
feasible distance = my FD + Reported distance
feasible successor is next best router that can get to destination
based on
feasibility condition reported distance has to be less than my
own feasible
distance through successor
shipeigrpneighbors

interface table
Interfaces participating in eigrp AS
shipeigrpinterfaces

topology table
routes that eigrp knows about

feasible successor goes in here (not in routing table)


2 successors load balancing
shipeigrptopology
shipeigrptopologyalllinks

(will see everything including bad

links)
routing table
Type/Length/Value (TLV)
Taken from http://www.rhyshaden.com/eigrp.htm .
There are a number of TLVs, all of them begin with a 16 bit Type field
and a 16 bit Length field. There then follows a number of fields that
vary depending on the type as given below.

General TLVs

0x0001 - General EIGRP parameters (applies to any


EIGRP packet regardless of protocol)
0x0003 - Sequence (used by Cisco's Reliable

Multicast)

0x0004 - EIGRP software version, the original


version being 0 and the current version being 1 (used by Cisco's
Reliable Multicast)

0x0005 - Next Multicast Sequence (used by Cisco's


Reliable Multicast)

IP TLVs

0x0102 - IP internal routes

0x0103 - IP external routes

AppleTalk TLVs

0x0202 - AppleTalk internal routes

0x0203 - AppleTalk external routes

0x0204 - AppleTalk cable setup

IPX TLVs

0x0302 - IPX internal routes

0x0303 - IPX external routes

Commands
routereigrp[as](ASusedtobe2bytes65335,maynowbe4
bytes(4billion+?))
(oneASdoesn'tplaywithanotherunlessyou
resdistribute)
network[ipsubnettoparticipateinroutingprocclassfulor
classlessifyouleaveoffsubnet]
noautosummary
ipsummaryaddresseigrpASIPAddrMaskeigrpstub[receiveonly|connected
|static|summary]
defaultnetwork<ipaddrorexitinterface>(likedefaultgwforrouter)
redistributeospf<BW><D><R><L><M>
(e.g.redistributeospf10000100255115000)

showipeigrpneighbor
showipv6eigrpneighbor
showipv6eigrpinterfaces
showipeigrptopology
showipv6eigrptopology
showipprotocols(getsinfoabouteigrpandotherroutingprotocols)show
ipv6protocols
showiproute
showipv6route

(Show's route w/ weights advert fr diff rtr IDs)


(FD - Feasible Distance - calc'ed distanced connected)
(RD - Received Distance - Distance recieved from neighbor)
shipeigrptopologyalllinks(willseeallinclbadlinks)
showipprotocols
debugipeigrpevents

IPv4 config
Router One

router eigrp 2000 (The "2000" is the autonomous system - must match on
neighboring routers)
network 172.16.1.0 0.0.0.255
metric weight 0 1 1 1 0 0 (last 5 numbers are K values)
(EIGRP neighbors have to have matching K values)

AUTHENTICATION
key chain DEMO
key 1
key-string DaKEYstring
int fa 0/1
ip authentication key-chain eigrp 100 DEMO
ip authentication mode eigrp 100 md5 (send hash of key string)

Unequal cost routing


Figure variance based on max FD.
FD 1 - 390123
FD 2 - 2304357
variance = roundup(2304357/390123) = 6
router eigrp 100
variance 6
show ip route (will show unequal cost routes in routing table)

Autosummarization
router eigrp 100
auto-summary
doesn't work well with discontinguous networks...

Passive interface
listen but don't advertise
router eigrp 100
passive-interface fa 0/0
show ip protocols (will show passive interfaces)
show ip eigrp neighbors
show ip eigrp interfaces

Router Two
router eigrp 2000
redistribute eigrp 1000 route-map to-eigrp2000
network 172.16.1.0 0.0.0.255
router eigrp 1000
redistribute eigrp 2000 route-map to-eigrp1000
network 10.1.0.0 0.0.255.255

route-map to-eigrp1000
match tag 1000
route-map to-eigrp1000
set tag 2000
route-map to-eigrp2000
match tag 2000
route-map to-eigrp2000
set tag 1000

deny 10
permit 20
deny 10
permit 20

IPv6 config
ipv6 router eigrp 1 (1 is autonomous system)
router-id 1.1.1.1
int lo0
ipv6 eigrp 1 (tell interface to participate in as 1)
int fa 0/1
ipv6 eigrp 1

Troubleshooting
sh ip route (check admin distances and FD)
show ip eigrp topology (FD / advertised distance)
show ip eigrp interfaces
show ip eigrp neighbors
NIT
show ip protocols

http://jungar.net/network/EIGRP.php

Das könnte Ihnen auch gefallen