21. config ospf &elgrp

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

th

10 Week

ICT & Electronics


Data Communications and Networking: Dynamic Routing Protocols
T D KAVU
How to configure open shortest path first
routing protocol
l
Create a topology as shown Below
How to configure open shortest path first routing
protocol
Continue
Continue
l
Configuring OSPF is slightly different from configuring RIP. When
configuring OSPF, use the following syntax:
l
Router(config)# router ospf process_ID
l
Router(config‐router)# network IP_address wildcard_mask area area_#
l
The process_ID is locally significant and is used to differentiate between
OSPF processes running on the same router. Your router might be a
boundary router between two OSPF autonomous systems, and to
differentiate them on your router, you will give them unique process IDs.
Note that these numbers do not need to match between different routers
so they have nothing to do with autonomous system numbers.
l
To configure any router double click on it and select CLI.To configure
this topology use this step by step guide
(1841Router0) Hostname R1
l
To configure and enable ospf routing on R1 follow these commands exactly.
l
Router>enable
l
Router#configure terminal
l
R1(config)#interface fastethernet 0/0
l
R1(config‐if)#ip address 10.0.0.1 255.0.0.0
l
R1(config‐if)#no shutdown
l
R1(config‐if)#exit
l
R1(config)#interface serial 0/0/0
l
R1(config‐if)#ip address 20.0.0.1 255.0.0.0
l
R1(config‐if)#clock rate 64000
l
R1(config‐if)#bandwidth 64
l
R1(config‐if)#no shutdown
l
R1(config‐if)#exit
l
R1(config)#router ospf 1
l
R1(config‐router)#network 10.0.0.0 0.255.255.255 area 0
l
R1(config‐router)#network 20.0.0.0 0.255.255.255 area 0
l
R1(config‐if)#exit
(2620XM­Router1) Hostname R2
l
Router>enable
l
Router#configure terminal
l
Router(config)#hostname R2
l
R2(config)#interface serial 0/0
l
R2(config‐if)#ip address 20.0.0.2 255.0.0.0
l
R2(config‐if)#no shutdown
l
R2(config‐if)#exit
l
R2(config)#interface fastethernet 0/0
l
R2(config‐if)#ip address 30.0.0.1 255.0.0.0
l
R2(config‐if)#no shutdown
l
R2(config‐if)#exit
l
R2(config)#router ospf 2
l
R2(config‐router)#network 20.0.0.0 0.255.255.255 area 0
l
R2(config‐router)#network 3
l
R2(config‐router)#network 30.0.0.0 0.255.255.255 area 0
l
R2(config‐router)#exit
(2620XM­Router2)Hostname R3
l
Router>enable
l
Router#configure terminal
l
Router(config)#hostname R3
l
R3(config)#interface fastethernet 0/0
l
R3(config‐if)#ip address 30.0.0.2 255.0.0.0
l
R3(config‐if)#no shutdown
l
R3(config‐if)#interface serial 0/0
l
R3(config‐if)#ip address 40.0.0.1 255.0.0.0
l
R3(config‐if)#clock rate 64000
l
R3(config‐if)#bandwidth 64
l
R3(config‐if)#no shutdown
l
R3(config‐if)#exit
l
R3(config)#router ospf 3
l
R3(config‐router)#network 40.0.0.0 0.255.255.255 area 0
l
R3(config‐router)#network 30.0.0.0 0.255.255.255 area 0
l
R3(config‐router)#exit
(2811Router3) Hostname R4
l
Router>enable
l
Router#configure terminal
l
Router(config)#interface serial 0/0/0
l
Router(config‐if)#ip address 40.0.0.2 255.0.0.0
l
Router(config‐if)#no shutdown
l
Router(config‐if)#exit
l
Router(config)#interface fastethernet 0/0
l
Router(config‐if)#ip address 50.0.0.1 255.0.0.0
l
Router(config‐if)#no shutdown
l
Router(config‐if)#exit
l
R4(config)#router ospf 4
l
R4(config‐router)#network 50.0.0.0 0.255.255.255 area 0
l
R4(config‐router)#network 40.0.0.0 0.255.255.255 area 0
l
R4(config‐router)#exit
PC1
l
PC>ipconfig
l
IP Address......................:10.0.0.2
l
Subnet Mask.....................: 255.0.0.0
l
Default Gateway.................: 10.0.0.1
l
PC>ping 50.0.0.2
PC2
l
PC>ipconfig
l
IP Address......................:
l
50.0.0.2
l
Subnet Mask.....................:
l
255.0.0.0
l
Default Gateway.................:
l
50.0.0.1
l
PC>ping 10.0.0.2
l
You can verify that ospf is running successfully via show ip protocols
command in privilege mode.
l
R4#show ip protocols
l
You can use show ip oute command to troubleshoot ospf network. If
you did not see information about any route checks the router attached
with that network.
l
R4#show ip route
Continue
l
To test ospf routing do ping from pc1 to pc2 and vice versa. If you get
replay then you have successfully configured ospf routing but if you did
not get replay double check this configuration and try to troubleshoot. I have
uploaded a configured and tested topology in case you are unable to
locate the problem
Configuration command of OSPF
Commands Descriptions

Router(config)#router ospf 1 Starts OSPF process 1. The process ID is any


positive integer value between 1 and
65,535.
Router(config-router)#network 172.16.0.0 OSPF advertises interfaces, not networks. Uses
0.0.255.255 area 0 the wildcard mask to determine which
interfaces to advertise.
Router(config-if)#ip ospf hellointerval timer Changes the Hello Interval timer to 20
20 seconds.

Router(config-if)#ip ospf deadinterval 80 Changes the Dead Interval timer to 80 seconds.

Router#show ip protocol Displays parameters for all protocols running


on the router

Router#show ip route Displays a complete IP routing table

Router#show ip ospf Displays basic information about OSPF


routing processes
Continue
Commands Description
Router#show ip ospf interface Displays OSPF info as it relates to all interfaces

Router#show ip ospf interface fastethernet 0/0 Displays OSPF information for interface
fastethernet 0/0

Router#show ip ospf border-routers Displays border and boundary router information

Router#show ip ospf neighbor Lists all OSPF neighbors and their states

Router#show ip ospf neighbor detail Displays a detailed list of neighbors

Router#clear ip route * Clears entire routing table, forcing it to rebuild

Router#clear ip route a.b.c.d Clears specific route to network a.b.c.d

Router#clear ip opsf counters Resets OSPF counters


Continue
Commands Description

Router#clear ip ospf process Resets entire OSPF process,


forcing OSPF to re-create
neighbors, database, and routing
table
Router#debug ip ospf events Displays all OSPF events

Router#debug ip ospf adjacency Displays various OSPF states and


DR/ BDR election between
adjacent routers
Router#debug ip ospf packets Displays OPSF packets
Topology
Router 0

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/1

Router(config-if)#ip address 192.168.1.1 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#interface serial 0/0/0

Router(config-if)#ip address 192.168.1.245 255.255.255.252

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown
Router 1

Router(config)#interface serial 0/0/0

Router(config-if)#ip address 192.168.1.246 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface serial 0/0/1

Router(config-if)#ip address 192.168.1.249 255.255.255.252

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown
Router2

Router(config)#interface serial 0/0/1

Router(config-if)#ip address 192.168.1.250 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface serial 0/0/0

Router(config-if)#ip address 192.168.1.253 255.255.255.252

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown
Router5

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 20.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/1

Router(config-if)#ip address 192.168.1.10 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#

Router(config)#interface serial 0/0/0

Router(config-if)#ip address 192.168.1.254 255.255.255.252

Router(config-if)#no shutdown
Router3

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 192.168.1.6 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/1

Router(config-if)# ip address 192.168.1.9 255.255.255.252

Router(config-if)#no shutdown
Router4

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 192.168.1.5 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/1

Router(config-if)# ip address 192.168.1.2 255.255.255.252

Router(config-if)#no shutdown
Configure EIGRP routing protocol

Router(config)# router eigrp autonomous_system_#

Router(config-router)# network IP_network_# [subnet_mask]

Router(config)# router eigrp autonomous_system_#: This command will
enable EIGRP routing protocol in router. We can use any ASN (Autonomous
System Number) from 1 to 65,535. In order to become EIGRP neighbors this
number must be same on all participates.

Router(config-router)# network IP_network_# [subnet_mask]:This command
allows us to specify the local interfaces which we want to include in EIGRP.
Basically we define a range of addresses and router search for these
addresses in local interfaces. If match found EIGRP will be enabled on that
interface.

We have two options while defining the range of addresses with network
command: without wildcard and with wildcard mask

Without: This option is very straightforward. All we need to do is, type the
network ID with network command. For example network 172.168.0.0
command will enable EIGRP on all interfaces which belong to network
172.168.0.0.

With:this option provide wildcard mask along with network ID
Router0 and Router 1

Router(config)#router eigrp 20

Router(config-router)#network 10.0.0.0 0.0.0.255

Router(config-router)#network 192.168.1.244 0.0.0.3

Router(config-router)#network 192.168.1.0 0.0.0.3


Router(config)#router eigrp 20

Router(config-router)#network 192.168.1.244 0.0.0.3

Router(config-router)#

%DUAL-5-NBRCHANGE: IP-EIGRP 20: Neighbor 192.168.1.245 (Serial0/0/0)
is up: new adjacency

Router(config-router)#network 192.168.1.248 0.0.0.3
Router 2 and Router 5

Router(config)#router eigrp 20

Router(config-router)#network 192.168.1.248 0.0.0.3

Router(config-router)#

%DUAL-5-NBRCHANGE: IP-EIGRP 20: Neighbor 192.168.1.249 (Serial0/0/1)
is up: new adjacency

Router(config-router)#network 192.168.1.252 0.0.0.3

we can use both wildcard mask and subnet mask with network command. We
have used wildcard mask for above routers. In remaining routers we will use
subnet mask.

Router(config)#router eigrp 20

Router(config-router)#network 20.0.0.0 255.0.0.0

Router(config-router)#network 192.168.1.252 255.255.255.252

Router(config-router)#

%DUAL-5-NBRCHANGE: IP-EIGRP 20: Neighbor 192.168.1.253 (Serial0/0/0)
is up: new adjacency

Router(config-router)#network 192.168.1.8 255.255.255.252
Router 3 and Router 4

Router(config)#router eigrp 20

Router(config-router)#network 192.168.1.8 255.255.255.252

Router(config-router)#

%DUAL-5-NBRCHANGE: IP-EIGRP 20: Neighbor 192.168.1.10 (FastEthernet0/1)
is up: new adjacency

Router(config-router)#network 192.168.1.4 255.255.255.252


Router(config)#router eigrp 20

Router(config-router)#network 192.168.1.4 255.255.255.252

Router(config-router)#

%DUAL-5-NBRCHANGE: IP-EIGRP 20: Neighbor 192.168.1.6 (FastEthernet0/0) is
up: new adjacency

Router(config-router)#network 192.168.1.0 255.255.255.252

Router(config-router)#

%DUAL-5-NBRCHANGE: IP-EIGRP 20: Neighbor 192.168.1.1 (FastEthernet0/1) is
up: new adjacency

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