Docsity

cisco ccnp route study notes, Study notes of Networking

Toggle sidebar
bg1
CCNP ROUTE
EIGRP!4
CCNA Recap!4
RTP!4
Timers!5
EIGRP authentication!5
Neighbor discovery!6
Neighbor table!7
Topology table!8
EIGRP and Frame Relay + other topics!8
Changing the metric!10
Successor and feasible successor!11
Speed up convergence!12
Load balance!13
Route filtering!13
Route summarization!14
Default candidate route!15
OSPF!17
CCNA Summary!17
OSPF packets!19
OSPF neighborship in LAN!20
Types of LSA!21
Database Exchange Process!22
Database Exchange without DR!23
Database Exchange with DR!24
OSPF route selection!24
OSPF Route Filtering!25
Manual summarization!26
Default route!26
OSPF virtual link!28
OSPF neighborship in WAN!29
OSPF and Frame Relay!29
Integrated IS-IS !32
IS-IS metric!32
Short spanning tree, SPT!33
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d

Partial preview of the text

Download cisco ccnp route study notes and more Study notes Networking in PDF only on Docsity!

CCNP ROUTE

EIGRP

CCNA Recap

Like OSPF, EIGRP also recognize other neighbors through Hello (update) messages with

matching criteria. These messages are sent at 224.0.0.10 and both routers need to have 1)

same ASN, 2) reside in the same subnet, 3) same K value, and 4) same authentication.

As soon as these criteria are checked, a router becomes the neighbor. Then, 2 neighbors can

begin exchanging information.

EIGRP has Hello interval and Hold Timer (= OSPF Dead interval) for Hello messages.

EIGRP also have neighbor table (show ip eigrp neighbor), topology table (show ip eigrp

topology), and routing table (show ip route). The neighbor table contain all the possible next-hop

router without knowing anything else about the route (distance-vector).

EIGRP Update messages are send when a router needs to convey topology information to

multiple routers (in case of single router, unicast address is used instead). These messages are

transported using Reliable Transport Protocol (RTP, Cisco proprietary), which can resend packet

if lost.

Update messages can be Full or Partial updates, with full updates (containing the entire

routing table) only send when a router first comes up.

Metric of EIGRP is (by default) based on bandwidth and delay (manually configurable with

ʻbandwidthʼ and ʻdelayʼ interface command) or can include load and reliability, although these

are strongly discouraged for the sake of metric stability.

RD, or AD is the distance from the next-hop router to the destination, while FD is the distance

from this router to the destination. FD is the metric of successor route. Feasible successor

route, on the other hand, MUST HAVE RD LESS THAN FD OF SUCCESSOR ROUTE.

FD = ((10^7 /slowest-bandwidth) + delay) * 256; both can be set with ʻbandwidthʼ and ʻdelayʼ.

When the successor route fails, there are 2 options. If the router has feasible successor, it will

be used. If no feasible successor is present, DUAL algorithm is ran to find a new loop-free route

to the destination and add it to the routing table. The algorithm simply test the current, viable

routes to the destination (like a ping) using a query message and wait for a reply message.

In essence, EIGRP support manual summarization at any router, support multiple routed

protocols (IP, IPX, and AppleTalk), each independent of each other; convergence takes less

than 10 seconds (sometimes even faster). However, EIGRP is Cisco proprietary.

In a routing table entry, (FD/RD)

If IGRP is ran in the same AS as EIGRP, the 2 can automatically redistribute routes.

RTP

You can input either host address or network address for ‘network’ command in EIGRP. EIGRP uses IP protocol type 88.

EIGRP uses protocol-dependent module (PDM), which means different routed protocol’s EIGRP is processed independently. Different tables are maintained. When using RTP, the router needs to know how many other routers exist, so it knows how many acknowledgements to expect. Using the neighbor table, if a multicast is not replied by a neighbor, a unicast copy is send, repeatedly (16 times), until the router gives up and neighbor is removed from the table (declared dead). RTP protocol send packets with sequence number so the latest information can be passed around. Hello and ACK don’t require RTP, while Update, Query and Reply does.

Timers

EIGRP may sometimes fail to recognize the down state of a neighbor; in this situation, the Hold Timer (15 s for LAN, 60 s for Frame Relay, and 180 s for slow WAN links) is the mechanism to recognize the problem. Other than Hold Timer, EIGRP may also implement Bidirectional Forwarding Detection (BFD) to recognize failure of links. In EIGRP, the Hello Interval and Hold Timer may change on a per-interface basis by applying ‘(config-if)#ip hello-interval eigrp ASN TIMER’ or ‘(config-if)#ip hold-time eigrp ASN TIMER’, where TIMER is the value you would like to configure the timer. Changing the hold time doesn’t change the hello time. If 2 routers (in a neighbor relationship) has different Hello and Hold Timer, with R1 having the smaller values, R2 MUST have a Hello Timer less than R1’s Hold Timer. This way, before R1’s Hold Timer expires, R2 will be able to send Hello messages to R1, to maintain their neighbor relationship. However, if the timer values differ, and R2 has a Hello Timer greater than R1’s Hold Timer, the neighborship continues to fail and recover, flapping routes in and out of routing table. ‘show ip eigrp interface TYPE NUMBER detail’ expose the Hello Timer, but remaining Hold Timer is displayed in ‘show ip eigrp neighbors’. It’s suggested that Hello interval and Hold timer should be set in a 1:3 ratio.

EIGRP authentication

EIGRP authentication is based on PSK generating a MD5 digest, Hello messages are authenticated, this means if authentication fails, neighbor will not be formed. To configure authentication, you need to create a key chain and enable it:

  1. Create authentication/key chain by ‘(config)#key chain NAME’; this name doesn’t have to match for neighbors and contain many keys in one chain.
  2. Create one or more keys using ‘key NUMBER’, where NUMBER is used to identify which key to use; again, this doesn’t have to match for neighbors.
  3. Define key value (password) with ‘key-string PASSWORD’; the value MUST match.
  4. (optional) define lifetime for both sending and accepting each key string with ‘accept- lifetime start-time {infinite | END_TIME | duration SECONDS}’ or ‘send-lifetime start- time {infinite | END_TIME | duration SECONDS}’. This means the key value is only valid for some time instead of all the time.
  5. Enable MD5 authentication with ‘(config-if)#ip authentication mode eigrp ASN md5'.
  6. Then choose key chain to use with ‘(config-if)#ip authentication key-chain eigrp ASN NAME’, where NAME is the name of the key chain. NOTE: when you send EIGRP message, the key with lowest key number is used.

Requirement EIGRP OSPF The routers must be able to send/receive IP packets to one another. Yes Yes Interfaces’ primary (not secondary) IP addresses must be in same subnet. Yes Yes Must not be passive on the connected interface. Yes Yes Must use the same ASN (EIGRP) or process-ID (OSPF) on the router configuration command. Yes No Hello interval/timer, plus either the Hold (EIGRP) or Dead (OSPF) timer, must match. No Yes Must pass neighbor authentication (if configured). Yes Yes Must be in same area. N/A Yes IP MTU must match. No Yes K-values (used in metric calculation) must match. Yes N/A Router IDs must be unique. No[1] Yes You can change the way EIGRP configures its metric by changing some constants (value that don’t change throughout the equation) by ‘(config-router)#metric weights’ command. Mismatched k-value between neighbors prevent routers from becoming neighbors, mismatch will be logged when using ‘show ip protocols’. In ‘show ip protocols’, ‘gateway’ in ‘Routing information source’ displays the interface that connects to the network advertised by ‘network’ command. This doesn’t include the loopback interface. Loopback interface will not have any peers. ‘metric holddown’ enables hold down timer as loop-avoidance measure ‘metric maximum-hops’ enable infinite hop count as loop-avoidance measure, maximum configurable hops is 255 RID is used in EIGRP to identify routers; duplicated RID will not prevent neighborship. ‘show ip eigrp traffic’ display statistics regarding EIGRP messages send/received. ‘show ip eigrp accounting’ display EIGRP RID and ASN

Neighbor table

The neighbor table include:

  • Layer 3 address of neighbor + interface from which Hello (of that neighbor) is heard
  • Hold timer + Uptime (how long since the router first heard about neighbor)
  • Sequence number (of last packet send and received from neighbor)
  • Packets in Queue (high value indicate network congestion)
  • Retransmission timeout, RTO (time before retransmitting packet, if ack hasn't received) In RIP, one-sided static neighborship will not cause problem reaching other routers. It has format of ‘(config-router)#neighbor IP_ADD’. Static neighbor Passive-interface Static neighbor + passive-interface RIP OSPF IS-IS EIGRP Multi + Unicast Not send/receive Unicast Unicast No send/no receive/no advertised None Not send/not receive Unicast Not send/not receive None
  • Smooth round trip time, or SRTT (take for a packet to take round trip)

Topology table

The topology table include:

  • Status of route (active or passive) + Status of Reply (whether the Query has a Reply)
  • Status of Query (if send, another field that track) + status of update (has update been sent)
  • Prefixes, masks, interface, next-hop, feasible + advertised distance for every non-looping route to remote networks. These information are obtained through Update messages received When a route disappears, the router also contact its neighbors through Update message. Query messages began to diffuse throughout the AS, but if no routes are found, the entry id deleted from the routing and topology table.

EIGRP and Frame Relay + other topics

In frame relay, neighborship can only form between 2 routers with PVC connecting them. In multiprotocol label switching (MPLS) VPN (Layer 3 service, perform routing), each customer edge (CE) router is connected to MPLS at a provide edge (PE) router and forms a EIGRP neighborship. PE routers communicate with each other using MP-BGP. In Metropolitan Ethernet (MetroE), routers connect each other using Ethernet links and see each as in a big VLAN. This technology uses Virtual Private Wire Service (VPWS) for point- to-point topologies, and Virtual Private LAN Service (VPLS) for multipoint topologies. EIGRP neighborship can be form between all routers. Hello (5) Update (1) Query (3) Reply (4) ACK Request No RTP RTP RTP RTP RTP No RTP Multi/Uni-cast Multi/Uni-cast Multicast Unicast Unicast Multi/Unicast Neighbor initialization, Hello(A), Hello(B), Update(B), ACK(A), Update(A), ACK(B) Update and ACK are used to exchange data topology, where Update contains the topology information; ACK acknowledges the receipt of Update, it’s just an EIGRP packet with no data and non-zero acknowledgement number. Update include: 1) prefix, 2) prefix length, 3) metric factor, and 4) non-metrics (MTU and hop count). Note: MTU is used to tracked the minimum MTU you can use on the path. Request packets are used to get specific information from one or more neighbors and are used in route server applications. Version: 0 or 1 [4 bits] OPCode: 1 (Update), 3 (Query), 4 (Reply), or 5 (Hello) [4 bits] Checksum [24 bits] Flags [32 bits]Flags [32 bits]Flags [32 bits] Sequence: used by RTP [32 bits]Sequence: used by RTP [32 bits]Sequence: used by RTP [32 bits] Acknowledgment [32 bits]Acknowledgment [32 bits]Acknowledgment [32 bits] Autonomous System Number [32 bits]Autonomous System Number [32 bits]Autonomous System Number [32 bits] Type Length Values, or TLVs [32 bits]Type Length Values, or TLVs [32 bits]Type Length Values, or TLVs [32 bits]

For instance, A and B are connected to C at C’s multipoint interface over Frame Relay. A and B do not have a PVC link between them, and all routers are using EIGRP. EIGRP neighborship will not be formed between A and B because no Hellos can be send. To make things worse, A and B can’t learn each other’s subnet due to split horizon. A simple solution is to configure ‘(config-subif)#no ip split-horizon eigrp ASN’ on the multipoint interface. If you are using RIP, use ‘(config-subif)#no ip split-horizon’ instead. You can confirm your configuration using ‘show interface’ or ‘debug ip eigrp’ commands. Another problem for EIGRP in Frame Relay in the inability to multicast Hello messages since Frame Relay block broadcast and multicast by default. A router can only generate all the Update messages and encapsulate each with a unicast address. For a network with many links, this may add much overhead to traffic. By default, a router consumes at most 50% bandwidth for EIGRP traffic, you can adjust this with ‘(config-if)#ip bandwidth-percent eigrp ASN PERCENT’ or (config-subif)#; the command HAS to be set in both mode. This way, the messages are buffered, then send out. Suggestion: set the bandwidth of PtP link as the CIR of the PVC Suggestion: the bandwidth MUST match for 2 routers connecting the same PVC When you have multiple PVCs, treat each one as PtP, meaning assign different bandwidth to each other. In multipoint interface, the ‘bandwidth’ is equally divided over all links Set the bandwidth of multipoint link as number of PVC * lowest CIR. Since the total bandwidth is divided to share between the number of links, EIGRP traffic is calculated based on individual rate. E.g A and B are multilinked at C, which has total bandwidth of 2000 Kbps, if EIGRP is configured to take 30% of the traffic, then A has (2000 / 2) * 30% = 300 Kbps for EIGRP traffic. It’s possible for PVCs to work even if the total amount of CIR is greater than the access rate. In frame relay, the excess traffic will be queued (if excess traffic is local) and if excess traffic occurs in Know that ‘bandwidth’ is set per sub/interface (you can set a PVC/subinterface), so the value has a maximum.

Changing the metric

EIGRP metric can be changed by changing 1) its interface bandwidth, 2) its interface delay,

  1. changing K-values, and 4) adding metric using offset-lists. When changing the metric factors of EIGRP, it is recommended that delay is changed instead of bandwidth since ‘bandwidth’ effect many other factors as well (include SNMP statistics, QoS, utilization, etc). Default setting is listed on the left: When setting total bandwidth of PVCs to be greater than the access rate, PVCs can forward normally when traffic is not heavy. But when each PVC is reaching its limit, packets will begin to be dropped or the traffic has to slow down (with BECN and FECN in Frame Relay) Interface Bandwidth (Kbps) Delay (Microseconds) Serial 1544 2000 GigibitE 1,000,000 10 FastE 100,000 100 Ethernet 10,000 1000

Frame relay and Metro Ethernet installation often use an access link and have PVCs with total CIR greater than the clock rate. In MetroE, shaping is typically applied when you are not using the entire link. Note that this shaping applies to the entire router, not to its PVCs individually. Another way you can influence the metric is by changing the K-values with ‘metric weight 0 K1 K2 K3 K4 K5’ whereas Kn are replaced with its value. By default, K1 = K3 = 1 and K = K4 = K5 = 0. Changing K2, K4, or K5’s value include load and reliability in the calculation, thus may cause route flapping and other problems. Offset list allow an engineer to add a value called offset, to FD of selected routes (by the ACL). ‘(config-router)#offset-list {ACL_NO | ACL_NAME} {in | out} OFFSET INTERFACE_TYPE INTERFACE_NUMBER’, Interface type and number is optional since the router can match the network for all the routes it receives. ACL indicate the network/subnet to be searched by permitting it and interface type number is where the ACL will be searched. The ACL must be a standard/named ACL. You will see the offset in action when you use ‘show ip eigrp topology’ (+ specific route) the FD and (FD/RD) will be different, whereas FD is the FD before offset and (FD/RD) is the FD after offset.

Successor and feasible successor

Last section discussed how to change the metric calculations, this section discuss how to converge faster. EIGRP uses the concept of successor and feasible successor, whereas successors are placed into the routing table and feasible successor, and the feasible successor runs DUAL to check if it’s loop-free. NOTE: feasible successor’s FD MUST BE LESS THAN (NOT EQUAL TO) successor’s RD. To verify feasible successor of a route, use ‘show ip eigrp topology’ or ‘show ip eigrp topology all-links’. However, if no FS is present when successor fails, DUAL is ran to discover a loop-free route; this is called going alive on a route. Routes for which the router has a non-loop successor route and no failure has yet occurred remains in a passive state. Routes for which the successor route fails, with no feasible successor routes, move to an active state. In this state,

  • The route is designated with A in ‘show ip eigrp topology’ command.
  • Query messages are send to every neighbor except the failed neighbor (also known as the successor route), asking for a route to that specific subnet.
  • Neighbors that consider themselves being passive for that subnet (have route to that subnet and is active and loop-free) will 1) not forward Query messages, and 2) send a Reply message to tell the original router about the route.
  • Neighbors that are active (do not have a route to that subnet) 1) flood Query messages to all its neighbors, 2) waiting for its neighbors Reply message (indicating some neighbors know about the subnet). The routers waits for all the Reply messages from the neighboring routers, then send a Reply back to the original router. If no routes can be found, an ‘unreachable’ message is send.
  • The original router then decide which path it will choose and confirm whether it’s loop-free or not.

is heard back, the neighborship is still working, if no reply is heard back, the neighborship is destroyed.

Load balance

When you are using load balancing, whether equal cost or not, actually speed up convergence so that one link going down, the other just working as normal. ‘(config-router)#maximum-paths NO’, with a default of 4 routes (in older routers, 6 is max, while in new routers, max is above 16), configures the number of EIGRP routes to use, then, depending on whether unequal cost load balance is used, ‘variance’ command takes place (variance 1 disables unequal sharing; max 128). These commands can be verified by ‘show ip protocols’. In EIGRP, unequal sharing traffic is distributed equally so different-speed link are assigned different load. WARNING: in a latency sensitive environment, setting ‘variance’ too high can cause lost of data. When routes have been added to the routing table, the router can 1) send the traffic proportionally, lower metric routes take more packets, or 2) all traffic is send over the lowest-metric route, other routes are just there for faster convergence.

Route filtering

This method enables the engineer to decide which routes are advertised in an EIGRP update; this also decrease the size of the routing table. This is done with ‘(config- router)#distribute-list’ command and 1) ACL, 2) prefix list, or 3) route maps. Here is complete command: ‘distribute-list {ACL_NO | ACL_NAME} in [type_NO]’ ‘distribute-list {ACL_NO | ACL_NAME} out [INT | ROUTE_PRO | ASN] When performing route filtering with ACL, permit statements allow route to be advertised, while deny statement filters the route. This is done with ‘distribute-list ACL_NO {in | out} [INT_TYPE INT_NO]’, whereas interface can be omitted to apply the ACL to all the interfaces’ inbound or outbound traffic. If only routes from 10.0.0.0/25 are allowed, 10.0.0.0/24 actually fit. ‘gateway’ keyword can be used to allow/filter routes to that specific interface. Prefix list examine both (a range of) prefix and (a range of) prefix length. Prefix list is more flexible than standard ACL and operate much faster than ACL. Prefix = route prefix = subnet number = network address | Prefix length = subnet mask A prefix list is created in global configuration and has a sequence number to be edited. The command looks like ‘(config)#ip prefix-list NAME [seq NO] {deny | permit PREFIX/PREFIX LENGTH} [ge VALUE] [le VALUE]’ 1- A route’s prefix HAS to be within the range implied by prefix/prefix length. 2- The route’s subnet mask MUST match ranges of prefixes implied by PREFIX-LENGTH, ge, and le parameters. ge(greater-than-or-equal-to) and le(less-than-or-equal-to) parameters are optionally. NOTE: ge MUST be greater than the set prefix length, while le MUST be less than 32

Parameter Equation Example Neither Prefix-length = CIDR ip prefix list permit 10.0.0.0/8, CIDR = 8 Both ge < CIDR ≤ le ge = 10, le = 13, CIDR = 11, 12, 13 Only ge ge < CIDR ≤ 32 ge = 28, CIDR = 29, 30, 31, 32 Only le Prefix-length ≤ CIDR ≤ le le = 10, prefix-length = 8, CIDR = 8, 9, 10 Permit 0.0.0.0/0 le 32 (in prefix list) = permit any (ACL) Deny 0.0.0.0/0 ge 30 le 30 -> denies any route with /30 CIDR E.g (config-router)#distribute-list prefix R1 out -> where R1 is the name of prefix list. Route maps provide logic similar to if/then/else in programming language. A single route map has one or more route-map commands in it, and routers process route-map commands in sequential orders based on sequence numbers (added automatically or manually). Each command has underlying matching parameters configured with ‘match’ command. To match all routes, simply omit ‘match’ command. Earlier entries have more precedence over later ones. Route maps have commands like ‘route-map samplename deny 10’, then ‘match ip address prefix-list ABC’ or ‘match ip address 1’. This causes subnets that matches the criteria of ACL 1 or prefix-list ABC to be discarded. For instance, if 192.168.1.0/24 (in prefix-list ABC) is permitted by the prefix list, its route will not show up because route maps have denied it. ‘show route-map’ will display related statistics. Here are some important points:

  • route-map commands with the permit option either cause a route to be allowed through (if matched by the match command) or remain in the list of routes to be examined by the next route-map clause.
  • route-map commands with the deny option either filter the route (if matched by the match command) or remain in the list of routes to be examined by the next route-map clause.
  • If a clause’s match commands refer to an ACL or prefix list, and the ACL or prefix list matches a route with the deny action, the route is not necessarily filtered. Instead, it just means that route does not match that particular match command and can then be considered by the next route-map clause.
  • The route-map command includes an implied deny all clause at the end; to configure a permit all, use the route-map command, with a permit action, but without a match command.

Route summarization

Route summarization differs from route filtering in that it reduce the routing table size BUT do not affect the reach-ability of the route; EIGRP automatically summarize at classful network boundary, but support manual summarization in every router. Route summarization reduces the Query Scope, this means unnecessary Query messages are not flooded. Tradeoffs: cause suboptimal routing Packets destined for inaccessible subnets included in the traffic

There are many ways to configure default candidate routes in EIGRP, which the router will choose the best to be the default route. However, if you don’t wish to advertise this route as a default route, but still advertise it, use ‘default-information {in | out} [ACL_NO]’ command or ‘no default-information allowed in’ command to disable default routes from that ASN and treat them as normal routes. There 4 ways to create a default candidate route

  1. Define a ‘ip route 0.0.0.0 0.0.0.0’ followed by the next-hop router or exit interface (such as ‘null0’). Then advertise this route by ‘network 0.0.0.0’ (if this route fail, an Update will be sent). The route will be shown as internal EIGRP route.
  2. If defined with ‘ip route 0.0.0.0 0.0.0.0’ followed by next hop, then advertised with ‘redistribute static’, the route shows as an external EIGRP route (EX).
  3. ‘ip route 0.0.0.0 0.0.0.0’ + ‘eigrp stub static’ (optionally with ‘eigrp stub redistributed’ if not included in ‘network’) = candidate default internal EIGRP route.
  4. Use a summary route as a default route by ‘ip summary-address eigrp ASN 0.0.0. 0.0.0.0’ then advertise it, this default route will be shown as internal EIGRP route.
  5. Flag an existing route to a classful network (because the subnet mask should be the same in all networks). Then advertise as the default route by ‘ip default-network NET_ADD’ command. Only an interface needs to participate in EIGRP for advertisement of this route, and that interface doesn’t have to include the classful route. It’s recommended to use a virtual interface if you don’t use a full classful network address between your Internet router and ISP router. A routing protocol is not required. You can only use ‘no default-information [allowed] {in | out}’

OSPF

CCNA Summary

Link state routing protocols include OSPF and IS-IS. Routers using OSPF is identified by a

Router ID (RID) in the entry of Link-state database (LSDB). RID has the same format as an IP

address, which can be automatically selected, or manually set. RID can be configured by

1)use ʻrouter-idʼ + RID after ʻrouter OSPFʼ + P_ID.

2)If above step no used, any loopback (always up/up virtual interface) address [ʻinterface

loopbackʼ + number, then ʻip addressʼ command] with the highest numeric IP address is used.

3)If above steps are not used, the router picks the highest IP address (out of all its up/up

interfaces)

RID is chosen when the IOS is initially loaded. New, better address WONʼT take over after

OSPF is restarted by ʻclear ip ospf processʼ then ʻreloadʼ the router.

After OSPF RID has chosen and interfaces come up, this router become neighbors with other

routers if they are connected to the SAME subnet. To discover OSPF neighbors, an OSPF send

Hello packets out 224.0.0.5 and IP protocol type 89. LSAs are send out 224.0.0.

To form a neighbor relationship, both routers must have these criteria match:

  • Subnet mask and subnet number (network address)
  • Hello (10 sec by default) and dead (= 4* Hello) interval; if dead timer is up, a router is marked

down and converge.

  • OSPF area ID (Cisco suggest ≤ 50 routers in an area; AID ranges from 0 to 4,294,967,295.)
  • Value of stub area flag
  • Authentication password (if there is one)

When discover other neighbors, the routers run SPF algorithm to fill their routing table. In the

beginning, both Router A and B are Down. If router A receives Router Bʼs Hello message (with

Router A not on the list of neighbors) and decide that Router B can be a neighbor (all criteria

meet), Router A adds Router B to the list of OSPF neighbor (a field in the Hello message) [this is

initialization]; this is two-way state for neighbors.

Neighbors are kept track in a routerʼs neighbor database; use ʻshow ip ospf neighborʼ

command.

After both routers (in a link) recognize others, they began exchange their LSDB, which MUST

be the same for routers forming neighborship. The exchange of LSDB is done differently for

different topologies; in CCNA, only PtP and broadcast are considered. The topology of the

routers can be manually set with ʻip ospf networkʼ following the type.

PtP topology refers to 2 routers that are directly connected (or the subnet has only 2 routers) to

each other. In this case, LSDBs are DIRECTLY advertised and updated between the routers

until they both become fully adjacent.

On the other hand, if you were to exchange information for 10 routers on the same subnet, you

would be overwhelmed with the load of the traffic. In this case (multiple routers on the same

subnet), you need a Designated Router (DR) that act as the boss that distribute the information

Step 3. Configure one or more network ip-address wildcard-mask area area-id router subcommands, with any matched interfaces being added to the listed area. Step 4. (Optional) Change the interface Hello using (config-if)# ip ospf hello-interval time and Dead intervals with (config-if)# ip ospf dead-interval time Retransmit (for LSA if no acknowledgement is heard) interval with (config-if)#ip ospf retransmit-interval TIME Step 5. (Optional) Impact routing choices by tuning interface costs as follows: a. Configure costs directly using the ip ospf cost value interface subcommand. b. Change interface bandwidths using the bandwidth value interface subcommand. c. Change the numerator in the formula to calculate the cost based on the interface bandwidth, using the auto-cost reference-bandwidth value router subcommand. Step 6. (Optional) Configure OSPF authentication: a. On a per-interface basis using the ip ospf authentication interface subcommand. b. For all interfaces in an area using the area authentication router subcommand. Step 7. (Optional) Configure support for multiple equal-cost routes using the maximum-paths number router subcommand.

ʻshow ip ospf interfaceʼ command list more detailed information about each interface.

OSPF, by default, load-balance over 4 equal-cost paths; but it can support up to 16 routes by

configuration. This is also true for EIGRP

OSPF packets

This is the OSPF header in front of all OSPF packet Version [8 bits] Type: 1=hello, 2=database description, 3= request, 4=update, 5=acknowledgement[8 bits] Packet Length [16 bits] Router ID: don’t change unless reload or interface (of RID) is shut [32 bits]Router ID: don’t change unless reload or interface (of RID) is shut [32 bits]Router ID: don’t change unless reload or interface (of RID) is shut [32 bits] Area IDArea IDArea ID ChecksumChecksum Authentication Type Authentication: only valid for OSPFv2 [64 bits]Authentication: only valid for OSPFv2 [64 bits]Authentication: only valid for OSPFv2 [64 bits] Authentication Type = 0 for null, 1 for plain text, and 2 for MD Hello packet Network Mask: unnumbered and virtual interface = 0.0.0.0 [32 bits]Network Mask: unnumbered and virtual interface = 0.0.0.0 [32 bits]Network Mask: unnumbered and virtual interface = 0.0.0.0 [32 bits]Network Mask: unnumbered and virtual interface = 0.0.0.0 [32 bits] Hello Interval [16 bits] Options: bit 0 (support ToS), bit 1 (support T7 LSA), bit 2 (support MOSPF), bit 3 (support NSSA), bit 4 (support T8 LSA), bit 5 (support Demand Circuit), bit 6 (support Opaque LSA), bit 7 (prevent loop in VPN) [8 bits] Options: bit 0 (support ToS), bit 1 (support T7 LSA), bit 2 (support MOSPF), bit 3 (support NSSA), bit 4 (support T8 LSA), bit 5 (support Demand Circuit), bit 6 (support Opaque LSA), bit 7 (prevent loop in VPN) [8 bits] Options: bit 0 (support ToS), bit 1 (support T7 LSA), bit 2 (support MOSPF), bit 3 (support NSSA), bit 4 (support T8 LSA), bit 5 (support Demand Circuit), bit 6 (support Opaque LSA), bit 7 (prevent loop in VPN) [8 bits] Router Priority [8 bits]Router Priority [8 bits] Router Dead Interval [32 bits] DR RID [32 bits] BDR RID [32 bits]BDR RID [32 bits] Neighbor: RID of all neighbor Hellos [variable] Database Description packets Interface MTU = 0 if virtual link [16 bits] Options: see Options in Hello [8 bits] Flags: bit 0 (master if on), bit 1 (on if there’s more packet in the flow), bit 2 (off if this is the first packet in the flow), bit 3-7 (all off) [8 bits] DBD Sequence Number: master increment to support continuous packet [32 bits]DBD Sequence Number: master increment to support continuous packet [32 bits]DBD Sequence Number: master increment to support continuous packet [32 bits] LSA Header: contain multiple headers, each 20 bytes [variable]LSA Header: contain multiple headers, each 20 bytes [variable]LSA Header: contain multiple headers, each 20 bytes [variable] Link state request Link State Type: LSA type [32 bits] Link State ID: more info for LSA [32 bits]Link State ID: more info for LSA [32 bits] Advertising RID [32 bits] Checksum Authentication Type Link state update

Number of LSAs carried [32 bits] Link State Advertisement [variable]

OSPF neighborship in LAN

All the ‘network’ commands are configured so the most specific wildcard mask is listed first in the configuration file. If area is not specified in ‘network’ command, the closest match to the IP address of that router interface will become the ‘network’ command of that subnet. However, this is not recommended. Hello messages are distributed to interfaces that have meet:

  • Enabled with ‘(config-router)#network PREFIX SUBNET_MASK [area A_ID]’ or ‘(config- if)#ip ospf P_ID area A_ID’
  • Must not have ‘(config-router)#passive-interface INT_TYPE NO’ configured Note: distributing Hello on an interface means OSPF is attempting to find a POTENTIAL neighbor on that interface. By default, Hello sends to broadcast link every 10 s and nonbroadcast link every 30 s OSPF support bidirectional forwarding detection(BFD) using ‘ip ospf dead-interval minimal hello-multiplier’ followed by a number n. This command (also set hello and dead interval) set the dead interval to 1 second, and hello interval to 1/n second. Hello Interval is included in ‘show ip ospf interface’ command. Neighborship will not form between routers with the same RID, however, other routers in the same area may be confused because it sees two routers with the same RID. Note that this router may have only 1 route, although to 2 routers with same RID, so information may be delivered incorrectly. OSPF can’t start without RID. If routers experience a MTU mismatch, they will remain in ‘EXCHANGE’ or ‘INIT’ state forever. MTU can be set ‘ip mtu' or ‘mtu' Router with N neighbors have N SPF tree Interface Area Clear Text MD (config-if)#ip ospf authentication (config-if)#ip ospf authentication-key PASS (config-router)#area A_ID authentication (config-if)#ip ospf authentication-key PASS (config-if)#ip ospf authentication message- digest (config-if)#ip ospf message-digest-key KEY_NO md5 PASS (config-router)#area A_ID authentication message-digest (config-if)#ip ospf message-digest-key KEY_NO md5 PASS Password MUST be less than 16 characters. Key number doesn’t have to match. If both are configured, interface commands take precedence. The type of keys generated can be detected in ‘debug ip ospf adj’ (everything), ‘show ip ospf interface’ (which type of authentication), and ‘show ip ospf neighbor’ (whether a neighbor survived authentication). OSPF don’t support key chains, if there are 2 keys, and every packet wants to used authentication, there will be 2 copies of each packet send. When you have a new key, you must delete the old one to prevent excessive traffic.