0% found this document useful (0 votes)
63 views5 pages

+OSPF Config - v3

The document provides configuration instructions and explanations for configuring dynamic routing using OSPF. It discusses enabling OSPF on an interface with the router ospf command and associating networks with areas. It also covers OSPF concepts like network types, DR/BDR election, LSAs, metrics, and default route origination.

Uploaded by

Norwell Sagun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views5 pages

+OSPF Config - v3

The document provides configuration instructions and explanations for configuring dynamic routing using OSPF. It discusses enabling OSPF on an interface with the router ospf command and associating networks with areas. It also covers OSPF concepts like network types, DR/BDR election, LSAs, metrics, and default route origination.

Uploaded by

Norwell Sagun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CONFIGURE DYNAMIC ROUTES (!!!

(!!! Before configuration make sure all necessary interfaces are “up” and “up” with: R1#show ip interface brief )
R2(config)#router ? (Shows routing protocols)

OSPF

- Destination multicast addresses 224.0.0.6 (on DR+BDR);


- All OSPF Routers (224.0.0.5) – only DR sends its LSAs to the BDR and
DROthers using the destination multicast address 224.0.0.5.

(LSA Type 1-11)

OSPF network types:


- Point-to-point (P-P) - Serial networks (HDLC, PPP) - OSPF state of interface FULL/-- adjacency;
- Broadcast Multiaccess (BMA) - Ethernet - OSPF state of interface 2WAY – FULL/DR, BDR, DROTHER adjacency;
- Nonbroadcast Multiaccess (NBMA) - Frame Relay, ATM, and X.25 networks;
- Point-to-multipoint (P-MP) - Frame Relay, ATM, and X.25 networks;
- Virtual links - Virtual links are a special type of link that can be used in multi-area OSPF. OSPF virtual links are discussed in CCNP.

“Adjacency: Hello Intervals, Dead Intervals and Network Types must be the same!”

Hello Interval Dead Interval = 4 x Hello Interval Removing route from LS Database

10 sec. – BMA + P-P 40 sec. – BMA + P-P Router floods LS Info about down neighbor out all OSPF enabled
interfaces.
30 sec. – NBMA 120 sec. – NBMA

OSPF Hello and Dead intervals can be modified manually using the following interface commands on Adjacency Routers:

Router(config-if)#ip ospf hello-interval 10


Router(config-if)#ip ospf dead-interval 40

OSPF Uses Dijkstra´s SPF Algorithm: because of Flapping link – up and down and
recalculation of SPF Algorithm...

- Initial SPF shedule delay 5000 ms = 5 sec (R waits after receiving LSU before running SPF Algorithm.)
- Minimum hold time between two consecutive SPFs 10 000 ms = 10 sec (R waits after running the SPF Algorithm before rerunning the algorithm again.)
- Maximum wait time between two consecutive SPFs 10 000 ms = 10 sec

R1(config)#router ospf <process_ID>

(OSPF is enabled with the router ospf process-id that is a number 1-65535. Thep rocess-id is locally significant, which means that it does not have to match
other OSPF routers in order to establish adjacencies with those neighbors. This differs from EIGRP. The EIGRP process ID or autonomous system number does
need to match for two EIGRP neighbors to become adjacent.)

1
R1(config-router)#network <network_number wild_card> area <area_ID>

(The area-id refers to the OSPF area = group of routers that share link-state information. All OSPF routers in the same area must have the same link-state
information in their link-state databases. This is accomplished by routers flooding their individual link-states to all other routers in the area. This is known as
single-area OSPF. There are several advantages to configuring large OSPF networks as multiple areas OSPF, to be able to isolate unstable network problems
within an area.)

(Although any area-id can be used, it is good practice to use an area-id of 0 with single-area
OSPF. This convention makes it easier if the network is later configured as multiple OSPF
areas where area 0 becomes the backbone area.)

R4 = Autonomous System Boundary Router (ASBR).

R1(config)#router ospf 1
R1(config-router)#router-id 11.11.11.11 (router-id must be unique!)

1) Introduced in IOS 12.0(T) and takes precedence over loopback and physical interface IP
addresses for determining the Router ID.
2) If the OSPF router-id command is not used and loopback interfaces are configured, OSPF
will choose highest IP address of any of its loopback interfaces.
3) If no loopback interfaces are configured, the router chooses highest active IP address of
any of its physical interfaces.

or R1(config)#interface Lo0
(for router-id use Loopback <lo> interface, is always up and number 0 can be the same within
each router with /32)

R1(config-if)#ip address 1.1.1.1 255.255.255.255


(must have /32! If there are loopback networks to not advertise /32 format only – done by default
– add on loopback interfaces following command:

R1(config-if)#ip ospf network point-to-point


(force OSPF to advertise loopback networks with assigned mask and not with /32 bit mask only)

(Note: Because some IOS versions do not support the router-id command, use the loopback 0 address method for assigning router IDs. Modifying a router ID with
a new loopback or physical interface IP address may require reloading the router.

The router ID can be modified with the IP address from a subsequent OSPF router-id command by reloading the router or by using the following command:
Router#clear ip ospf process

R1(config-router)#network 172.16.1.16 0.0.0.15 area 0


R1(config-router)#network 192.168.10.0 0.0.0.3 area 0
R1(config-router)#network 192.168.10.4 0.0.0.3 area 0
R1(config-router)#passive-interface Fa0/0
(disable OSPF updates on the appropriate interface(s))
R1(config-router)#default-information originate
(propagation of default 0.0.0.0/0 static route)

R1(config-router)#neighbor 192.168.10.2 (next hop exchanging info neighbor)


R1(config-router)#neighbor 192.168.10.6

OSPF Metric:
The Cisco IOS uses the cumulative bandwidths of the outgoing interfaces from
the router to the destination network as the cost value. All serial links are set to
default bandwidth (T1) 1544kbps.

R1(config-router)#auto-cost reference-bandwidth 100 (by default = 100Mb/s)


R1(config-router)#auto-cost reference-bandwidth 1000 (Gigabit Ethernet)
R1(config-router)#auto-cost reference-bandwidth 10000(10 Gigabit Ethernet)

(Change reference BW-value on each router (must be the same!!!) in the


same an area-id it is for the future preferencies…10 Gbps Eth.)

R1(config-if)#bandwidth <64 = value-in-kbits >

or R1(config-if)#ip ospf cost 1562

(no bandwidth – restores the default value 1544 kbps, immediatelly check
all interfaces on Routers : R1#show interface serial 0/0/0 and 0/0/1 →
attention! – command show ip interface serial 0/0/0, is different in its
result)

2
Multiaccess networks
can create two challenges for OSPF regarding the flooding of LSAs:

1. Creation of multiple adjacencies, one adjacency for every pair of routers. „BMA“
2. Extensive flooding of LSAs (Link-State Advertisements).

Solvation: DR/BDR Election criteria


1. DR: Router with the highest OSPF interface priority. (PRI)
2. BDR: Router with the second highest OSPF interface priority. (PRI)
3. If OSPF interface priorities are equal, the highest router ID is used to break
the tie.

DROthers only form FULL adjacencies networks with the DR and BDR, but will
still form a neighbor adjacency with any DROthers that join the network area-id.

The DR and BDR election process takes place as soon as the first router with an
OSPF enabled interface is active on the multiaccess network. This can happen
when the routers are powered-on or when the OSPF network command for that
interface is configured. The election process only takes a few seconds. If all of the
routers on the multiaccess network have not finished booting, it is possible that a router with a lower router ID will become the DR. This could be a lower-end router
that took less time to boot.

DR collects and distributes LSAs, it is important for this router to have sufficient CPU and memory capacity to handle the responsibility. Instead of relying on the
router ID to decide which routers are elected the DR and BDR, it is better to control the election of these routers with the ip ospf priority (PRI) interface command.

Router(config-if)#ip ospf priority {0 - 255} (0=DROther only, 1=default value, Highest number in area-id=DR, Second highest number in area-id=BDR)

Forcing of an Election DR, BDR:


RC(config)#interface fa0/0
RC(config-if)#ip ospf priority 200 <1-255>
RC(config-if)#shutdown
RC(config-if)#no shutdown
RC(config-if)#end
RC#show ip ospf neighbor

RD(config)#interface fa0/0
RD(config-if)#ip ospf priority 100
RD(config-if)#shutdown
RD(config-if)#no shutdown
RD(config-if)#end
RD#show ip ospf neighbor

Enable Default Static Route on Autonomous System Boundary Router (ASBR): here is R1

R1(config)#interface loopback 1
R1(config-if)#ip add 171.30.1.1 255.255.255.252
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1
R1(config)#router ospf 1
R1(config-router)#default-information originate
R1(config-if)#end

3
R1#copy running-config startup-config

R2#show ip route

O*E2 0.0.0.0/0 [110/1] via 192.168.10.10, 00:05:34, Serial0/0/1 (E2 denotes that this route is an OSPF External Type 2 route. )

OSPF external routes: External Type 1 (E1) or External Type 2 (E2). The difference between the two is in the way the OSPF cost of the route is calculated at
each router. OSPF accumulates cost for an E1 route as the route is being propagated throughout the OSPF area. This process is identical to cost calculations for
normal OSPF internal routes. However, the cost of an E2 route is always the external cost, irrespective of the interior cost to reach that route. In this topology,
because the default route has an external cost of 1 on the R1 router, R2 and R3 also show a cost of 1 for the default E2 route. E2 routes at a cost of 1 are the default
OSPF configuration. Changing these defaults, as well as more external route information, is discussed in CCNP.

Other OSPF commands:


OSPF authentication commands:

Step 1. On a router:
• Enable "simple" or "MD5" authentication for "all interfaces on a router" in OSPF 10 proccesses packets traversing through area 0.
• OSPF authentication Types:
▪ 0 - OSPF with no authentication;
▪ 1 - OSPF with "plain-text" password = simple authentication;
▪ 2 - OSPF with "MD 5" hash encryption algorithm.
R1(config)#router ospf 10
R1(config-router)#area 0 authentication (Enables simple authentication for all router´s interfaces in area 0. Clear text
passwords.)
R1(config-router)#area 0 authentication message-digest (Enables MD 5 authentication for all router´s interfaces in area 0.)

Step 2. On an interface:
• Enable "simple" or "MD5" authentication for "specific interfaces on a router"
• Create an "authentication-key" or "message-digest-key 1" with value of cisco123 or cisco that will be used for authentication.
• Neighboring routers on the same network (adjacent interfaces) must have the same password!!!
R1(config)#interface s0/0/0
R1(config-if)#ip ospf authentication (Enables simple authentication for router´s interface s0/0/0 only!!! Clear text passwords.)
R1(config-if)#ip ospf authentication-key cisco123 (To set the authentication key = password to cisco123 on s0/0/0.)
or
R1(config-if)#ip ospf authentication message-digest (Enables MD 5 authentication for router´s interface s0/0/0 only!!! Passwords encrypted by
MD5)
R1(config-if)#ip ospf message-digest-key 1 md5 cisco (To set the authentication key = password to cisco on s0/0/0.)

Step 3. Verify the operation of OSPF routing

R1#show ip route (displays Routing table – AD, Metrics, ID networks...)


R1#show ip route ospf

R1#clear ip route* (to force the routers to rebuild their routing tables)
R1#clear ip route ospf
R1#show ip traffic [….] (info about number and type of packets sent and received)

SUMMARY OSPF:

R1(config)#ip classless (or no ..., forwarding packets to the best supernet or default route. Classless routing behavior is by default from IOS 11.3.)
R1(config)#router ospf 10 (Ospf proces ID = 1-65 535; can be different on each router on area 0; on EIGRP must be the same for adjacencies)
R1(config-router)#router-id 1.1.1.1 (Static router-id must be unique for each router, or highest virtual, or highest physical interface ID)
R1(config-router)#log-adjacency-changes [detail] (Command without detail is by default, good for reporting up-down events)
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0 (***Interface with an address of 1.1.1.1 255.255.255.255 is to be put into area 0)
R1(config-router)#network 192.168.10.0 0.0.0.3 area 0 (Any interface with an address of 192.168.10.0 255.255.255.252 is to be put into area 0)

***To define the range or specific interfaces on the router which will be included in area 0 in OSPF. The router creates its advertisements based on the subnet mask configured on each
interface.

If your network is more complex, or you have multiple areas, or your network changes a lot, a very good habit to get into is specifying each interface address explicitly. The advantage
here is that you don't accidentally slip up and put an interface in the wrong area. The wildcard mask 0.0.0.0 means each statement only applies to a single IP address and won't
accidentally overlap another interface. If you're using a lot of VLSM, that can be challenging to troubleshoot.

An example of where this could cause trouble is if you had a router that joined an OSPF network to an EIGRP network, and you were redistributing between the protocols... If you
accidentally included an interface in OSPF when you thought it was only in EIGRP, then your router may behave much differently than you anticipate.***

R1(config-router)#passive-interface fa 0/0 (it will stop sending of Hello packets on interface – no adjacency!)
R1(config-router)#neighbor 10.1.1.2 (next hop exchanging info neighbor)
R1(config-router)#default-information originate [olways] (R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0 Propagate the default route on ASBR)
[olways] – Propagate the default route even if it is not configured on ASBR.
R1(config-router)#area 0 authentication (Enables simple authentication for all R1 interfaces in area 0. Clear text passwords.)
R1(config-router)#area 0 authentication message-digest (Enables MD 5 authentication for all R1 interfaces: encrypted passwords by MD5 hash algrthm)
R1(config-router)#auto-cost reference-bandwidth 10000 (Change OSPF reference BW-value on each router in the same area-id from 100 to 10 000 Mbps
on all interfaces for future preferencies…10 Gbps Eth.)

4
R1(config)#interface s0/0/0
R1(config-if)#ip ospf network point-to-point (force OSPF to advertise loopback networks with assigned mask and not with /32 bit mask only)
R1(config-if)#ip ospf cost 1562 Reference BW fa0/0 : BW fa0/0 = cost 1 (cost by default); cost 1562 = 64 kbps; cost 64 = 1544 kbps;
Reference BW 10 GB (10 000 Mbps) : BW fa 0/0 (100 Mbps) = cost 10 (cost after: auto-cost reference-bandwidth 10000)

R1(config-if)#no bandwidth (restores the default static value 1544 kbps)


R1(config-if)#bandwidth <64 = value-in-kbits> (immediatelly check all interfaces on Routers : R1#show interface serial 0/0/0 and 0/0/1 )
(attention! – command show ip interface serial 0/0/0, is different in its result)

Router(config-if)#ip ospf hello-interval 10 (The same on Serial and Ethernet links)


Router(config-if)#ip ospf dead-interval 40 (The same on Serial and Ethernet links)

R1(config-if)#ip ospf authentication (Enables simple authentication for router´s interface s0/0/0 only!!! Clear text passwords.)
R1(config-if)#ip ospf authentication-key cisco123 (To set the authentication key = password to cisco123 on s0/0/0.)
or
R1(config-if)#ip ospf authentication message-digest (Enables MD 5 authentication for router´s interface s0/0/0 only!!! Passwords encrypted by MD5)
R1(config-if)#ip ospf message-digest-key 1 md5 cisco (To set the authentication key = password to cisco on s0/0/0.)

Forcing of an Election DR, BDR in "BMA" area only!!!:


R1(config)#interface fa0/0
R1(config-if)#ip ospf priority 200 <0-255>; DR = 200; BDR = 100; always-DROTHER = 0; default = 1
R1(config-if)#shutdown
R1(config-if)#no shutdown

R1#write memory (Save changes into config file into NVRAM)


R1#copy running-config startup-config (Save changes into config file into NVRAM)

Other OSPF commands:

R1#show ip route (displays Routing table – AD, Metrics, ID networks...)


R1#clear ip route* (to force the routers to rebuild their routing tables)
R1#show ip route ospf (displays Routing table – AD, Metrics, ID networks... with only OSPF entries)
R1#clear ip route ospf

R1#show interfaces (view actual BW on interfaces – displays all timers of updates of Routing Protocols )
R1#show ip interface serial 0/0/0 (verify that OSPF on serial interface only – displays all timers Hello, Dead, … of updates of Routing Protocols)
R1#show ip ospf interfaces (fa0/0)

R1#clear ip ospf ?
R1#clear ip ospf process

R1#show ip ospf
R1#show ip ospf neighbor (detail)
R1#show ip ospf database (Link-State Database = must be the same on all routers in one area)
R1#show ip ospf 10 0 database (Link-State Database of process ID = 10 and of area 0)
R1#show ip ospf border-routers

R1#show ip protocol (verify that OSPF is enabled, displays all metrics, timers of updates of Routing Protocols)
R1#show protocols (verify BW… on all intefaces – 2. Data Link Layer of the OSI)

R1#debug ip ospf events (troubleshooting…or R1#clear ip route * or clear ip route ospf …)


R1#debug ip ospf adj
R1#copy running-config startup-config (Save changes into config file into NVRAM)

OSPFv3 doplniť z PT a LAB…

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy