6.34 OSPF Default Routing
一定要有default route才能產生LSA, 除非加上always
另外路由器選擇路徑時一定是 intra-area > inter-area > E1 > E2
R4:
router ospf 1
default-information originate always metric 40 metric-type 1
R6:
ip route 0.0.0.0 0.0.0.0 54.1.1.254
!
router ospf 1
default-information originate metric 60
6.35 OSPF Conditional Default Routing
檢查路由表中是否有特定路由才產生default route...但這一點不太好,不建議
R6:
router ospf 1
default-information originate always route-map TRACK_LINK_TO_BB1
!
ip prefix-list LINK_TO_BB1 seq 5 permit 54.1.1.0/24
!
route-map TRACK_LINK_TO_BB1 permit 10
match ip address prefix-list LINK_TO_BB1
6.36 OSPF Reliable Conditional Default Routing
這個比較好,使用ipsla搭配track套用在null route上,最後才用prefix-list檢查這筆null route.
R4:
ip sla 1
icmp-echo 204.12.30.254
timeout 2000
frequency 5
ip sla schedule 1 life forever start-time now
!
track 1 rtr 1
!
ip route 169.254.0.1 255.255.255.255 Null0 track 1
!
ip prefix-list PLACEHOLDER seq 5 permit 169.254.0.1/32
!
route-map TRACK_PLACEHOLDER permit 10
match ip address prefix-list PLACEHOLDER
!
router ospf 1
default-information originate always route-map TRACK_PLACEHOLDER
6.37 OSPF Filtering with Distribute-Lists
過濾路由,distribute-list 這種比較辛苦,area x range比較快.
R5:
router ospf 1
distribute-list 1 in
!
access-list 1 deny 150.1.1.1
access-list 1 deny 150.1.2.2
access-list 1 permit any
SW2:
router ospf 1
distribute-list 1 in
!
access-list 1 deny 150.1.1.1
access-list 1 deny 150.1.2.2
access-list 1 permit any
SW4:
router ospf 1
distribute-list 1 in
!
access-list 1 deny 150.1.1.1
access-list 1 deny 150.1.2.2
access-list 1 permit any
6.38 OSPF Summarization and Discard Routes
R5:
router ospf 1
no discard-route internal
area 0 range 150.1.0.0 255.255.252.0
6.39 OSPF Filtering with Administrative Distance
過濾特定gateway(router)所產生的特定路由
R5:
router ospf 1
distance 255 150.1.6.6 0.0.0.0 67
!
access-list 67 permit 155.1.67.0
6.40 OSPF Filtering with Route-Maps
當遇到有一筆路由有兩個gateway(router)同時產生時,怎麼做過濾呢?
route-map可以使用next-hop套用特定的gateway(router)
R6:
router ospf 1
distribute-list route-map DENY_R3_LOOPBACK_FROM_R4 in
!
access-list 3 permit 150.1.3.3
access-list 4 permit 155.1.146.4
!
route-map DENY_R3_LOOPBACK_FROM_R4 deny 10
match ip address 3
match ip next-hop 4
!
route-map DENY_R3_LOOPBACK_FROM_R4 permit 20
6.41 OSPF NSSA ABR External Prefix Filtering
nssa路由器在abr上可以下summary-address x x not-advertise
R3:
router ospf 1
area 2 nssa
summary-address 200.0.0.0 255.255.255.0 not-advertise
R6:
interface FastEthernet0/0.146
shutdown
!
interface Loopback0
shutdown
!
router ospf 1
area 2 nssa
SW1:
router ospf 1
area 2 nssa
SW3:
router ospf 1
area 2 nssa
6.42 OSPF Database Filtering
兩種過濾方式,在process下指定鄰居,或是在介面下直接過濾
R5:
router ospf 1
neighbor 155.1.0.2 database-filter all out
SW1:
interface Vlan79
ip ospf database-filter all out
6.43 OSPF Stub Router Advertisement
R4:
router ospf 1
max-metric router-lsa
6.44 OSPF Interface Timers
R1:
interface Serial0/0
ip ospf hello-interval 5
ip ospf dead-interval 7
R2:
interface Serial0/0
ip ospf hello-interval 5
ip ospf dead-interval 7
R3:
interface Serial1/0
ip ospf hello-interval 5
ip ospf dead-interval 7
R4:
interface Serial0/0/0
ip ospf hello-interval 5
ip ospf dead-interval 7
!
interface Serial0/1/0
ip ospf dead-interval minimal hello-multiplier 4
R5:
interface Serial0/0/0
ip ospf hello-interval 5
ip ospf dead-interval 7
!
interface Serial0/1/0
ip ospf dead-interval minimal hello-multiplier 4
6.45 OSPF Global Timers
R4:
router ospf 1
timers throttle spf 100 1000 10000
timers pacing flood 50
timers pacing retransmission 75
timers throttle lsa all 10 4000 6000
timers lsa arrival 2000
!
interface Serial0/1
ip ospf transmit-delay 2
ip ospf retransmit-interval 10
R5:
router ospf 1
timers throttle spf 100 1000 10000
timers pacing flood 50
timers pacing retransmission 75
timers throttle lsa all 10 4000 6000
timers lsa arrival 2000
!
interface Serial0/1/0
ip ospf transmit-delay 2
ip ospf retransmit-interval 10
6.46 OSPF Resource Limiting
R4:
router ospf 1
max-lsa 5000
redistribute maximum-prefix 500
process-min-time percent 20
6.47 Miscellaneous OSPF Features
SW4:
ip host Rack1SW2 150.1.8.8
!
ip ospf name-lookup
!
interface Port-channel1
ip ospf mtu-ignore
!
router ospf 1
ignore lsa mospf
沒有留言:
張貼留言