Writing / Cisco
OSPF
do not increment metric and start with 200
conf t
router ospf 1
redistribute static subnets metric 200 metric-type 2
when changing router-id
conf t
clear ip ospf process
loopback to "normal" interface
conf t
int lo 1
ip ospf network point-to-point
check DR and BDR
show ip ospf neighbour
show ip ospf interface
force DR on R1
interface FastEthernet0/0
ip address 172.30.0.1 255.255.255.0
ip ospf priority 200
duplex auto
speed auto
!
--> and set prio on others to 0
change hello interval for p2x interfaces
same hello on all routers
conf t
router ospf 1
ip ospf hello-interval 10
little troubleshooting
- name must be uniqe
- broadcast 10 sec hello message
- NBMA 30 sec hello message
ospf interface config
conf t
router ospf 1
interface gig0/1
ip ospf 1 area 0
cost change

# R1-R4 (area 0)
conf t
router ospf 1
net 10.0.0.0 0.0.255.255 area 0
end
# R3-R5-R7 (area 1)
conf t
router ospf 1
net 10.1.0.0 0.0.255.255 area 1
end
# R4-R6-R8 (area 2)
conf t
router ospf 1
net 10.2.0.0 0.0.255.255 area 2
end
# To fix the reference bandwidth (all routers)
conf t
router ospf 1
auto-cost reference bandwidth 1000

reduce type 5 and 4 LSAS messages with "STUB"
router ospf 1
redistribute static subnets metric-type 1 metric 3
- R4, R6, R8 - turn into STUB
conf t
router ospf 1
area 2 stub
reducing LSAS 3, 4 and 5
- R7
conf t
router ospf 1
redistribute static subnets
end
- R6, R8
conf t
router ospf 1
area 2 stub
end
- R4 <-- LSA 3, 4, 5
conf t
router ospf 1
area 2 stub no-summary
end
priority and router ID
- R1, R2
conf t
int gig0/1
ip ospf priority 6
end
administrative distance and interface cost
- R4
conf t
router ospf 1
distance 77
# for R3 to mark the routes
distance 33 3.3.3.3 0.0.0.0
end
- R2
conf t
int gig0/2
ip ospf cost 3
end
authentication
- R1, R2
conf t
router ospf 1
area 0 authentication message-digest
# interface level
int g0/2
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 somereallystrongpassword
end
advertise default route
conf t
router ospf 1
default-information originate always
# to advertise no matter if the default route exist
end
summarize ABR
- R3, R4
conf t
router ospf 1
# R4
area 0 range 10.0.0.0 255.255.0.0
area 2 range 10.2.0.0 255.255.0.0
# R3
area 0 range 10.0.0.0 255.255.0.0
area 1 range 10.1.0.0 255.255.0.0
end
filtering routes ABR
- R4
conf t
router ospf 1
area 0 range 10.0.0.0 255.255.0.0 not-advertise
end
filter with preefix list
- R3
conf t
ip prefix-list no35 deny 10.1.35.0/24
ip prefix-list no35 permit 0.0.0.0/0 le 32
exit
router ospf 1
area 0 filter-list prefix no35 in
end
local OSPF route filtering
- R2
conf t
access-list 10 deny 10.1.35.0
access-list 10 permit any
router ospf 1
destribute-list 10 in
end
```
## filtering at the ASBR
- R1
```sh
conf t
access-list 1 permit 10.11.11.16
route-map no16 deny 10
match ip address 1
exit
route-map no26 permit 20
set metric-type type-1
set metric 6789
end
router ospf 1
redistribute static subnets
end
LSA Types

NSSA - Type 7
- R4, R6, R8
conf t
router ospf 1
area 2 nssa
end
- R7
conf t
router ospf 1
redistribute static subnets
end
- R8
conf t
router ospf 1
redistribute static subnets
end