OSPF Commands Flashcards
Initialize the OSPF Process
Router(config)# router ospf process-id
Enable OSPF on interfaces that match a specified network range
Router(config-router)# network ip-address wildcard-mask area area-id
Enable OSPF explicitly on a specific interface
From interface config mode:
Router(config-if)# ip ospf process-id area area-id
Configure a specific interface as passive
Router(config-router)# passive-interface interface-id
Configure all interfaces as passive
Router(config-router)# passive-interface default
Advertise a default route into OSPF (for an ABR)
Router(config-router)# default-information originate [always] [metric metric-value] [metric-type type]
Modify the OSPF reference bandwidth for dynamic interface metric costing
Router(config-router)# auto-cost reference-bandwidth mbps
Statically assign an OSPF cost to an interface
Router(config-if)# ip ospf cost 1-65535
Configure the OSPF priority for a DR/BDR election
Router(config-if)# ip ospf priority 0-255
Modify the default hello timer of an OSPF interface
Router(config-if)# ip ospf hello-interval 1-65535
Modify the default dead interval timer of an OSPF interface
Router(config-if)# ip ospf dead-interval 1-65535
Statically configure an interface as a broadcast OSPF network type
Router(config-if)# ip ospf network broadcast
Statically configure an interface as a point-to-point OSPF network type
Router(config-if)# ip ospf network point-to-point
Restart the OSPF process
Router# clear ip ospf process
Display OSPF interfaces on a router
Router# show ip ospf int [brief | interface-id]
Display the OSPF neighbors and current states
Router# show ip ospf neighbor [detail]
Display the OSPF routes that are installed in the RIB
Router# show ip route ospf
Summarize routes as they are crossing an OSPF ABR (aka Inter-area route summarization)
Router(config-router)# area {area-id} range network-address subnet-mask
NOTE: The network address and subnet will be the summarized result
Example:
RouterABR1(config-router)# area 0 range 10.1.0.0 255.255.0.0
Filter a route using a route summary on an OSPF ABR
Router(config-router)# area area-id range network-address subnet-mask not-advertise
Example:
Router3(config-router)# area 0 range 10.0.0.0 255.255.0.0 not-advertise
Filter routes as they cross an OSPF ABR
Router(config-router)# area area-id filter-list prefix PF-LIST-NAME {in | out}
Create a prefix list (2 commands)
Router(config)# ip prefix-list NAME deny subnet-address/mask
Router3(config)# ip prefix-list NAME permit 0.0.0.0/0 le 32
Example:
Router(config)# ip prefix-list FILTER_A deny 10.1.35.0/24
Router(config)# ip prefix-list FILTER_A permit 0.0.0.0/0 le 32
Filter OSPF routes from entering the RIB
Router(config-router)# distribute-list {acl-number | acl-name | prefix prefix-list-name |route-map *route-map-name} in
Display the LSAa in the LSDB
Router# show ip ospf database [router | network | summary]
Redistribute static routes from an OSPF router (becoming an ASBR)
Router1(config-router)# redistribute static subnets
What is the command to summarize routes from an ASBR?
Router(config-router)# summary-address network-address subnet-mask
Example: Router1(config-router)# summary-address 10.11.1.0 255.255.255.0
What commands would be used to filter external static routes on an ASBR using a route-map?
Router(config)# access-list list-id deny network-address wildcard-mask
Router(config)# access-list list-id permit any
Router(config)# route-map NAME deny sequence-num
Router(config-route-map)# match ip address ACL-id
Router(config)# router ospf process-id
Router(config-router)# redistribute static subnets route-map NAME
Example:
Router(config)# access-list 99 deny 10.1.1.0 0.0.0.255
Router(config)# access-list 99 permit any
Router(config)# route-map STATIC_FILTER deny 10
Router(config-route-map)# match ip address 99
Router(config)# router ospf 1
Router(config-router)# redistribute static subnets route-map STATIC_FILTER
What command(s) would you use to filter OSPF routes from a router’s local/own routing table?
Router(config-router)# distribute-list ACL-id in
OR
Router(config-router)# distribute-list prefix prefix-list-id in
OR
Router(config-router)# distribute-list route-map route-map-id in
Example:
Router(config)# access-list 99 deny 10.11.23.0 0.0.0.255
Router(config)# access-list 99 permit any
Router(config)# router ospf 1
Router(config-router)# distribute-list 99 in
What are the commands to make an area a Stub Area? Where would this be configured?
Configure on all routers in the Stub Area:
Router(config-router)# area area-id stub
Example: Router(config-router)# area 2 stub
What are the commands to make an area a Totally Stubby Area? Where would this be configured?
Configure on all routers in the Stub Area:
Router(config-router)# area area-id stub no-summary
Example: Router(config-router)# area 2 stub no-summary
What are the commands to make an area a Not So Stubby Area? Where would this be configured?
Configure on all routers in the Stub Area:
Router(config-router)# area area-id nssa
Example: Router(config-router)# area 2 stub nssa
What command is needed to summarize routes for a NSSA? Where is this configured?
On the ABR:
Router(config-router)# area area-id nssa default-information-originate
Example:
Router(config-router)# area 2 nssa default-information-originate
In OSPFv3, display LSA type 3
show ipv6 ospf database inter-area prefix
In OSPFv3, display LSA type 4
show ipv6 ospf database inter-area router
In OSPFv3, display LSA type 8
show ipv6 ospf database link
In OSPFv3, display LSA type 9
show ipv6 ospf database prefix