catalogue
1, Brief description of route filtering:
2, Distribution list filtering configuration:
——- (1) use ACL to match route entries (used by OSPF process)
——- (2) use prefix list to match routing entries (used by OSPF process)
——- (3) OSPF process + interface usage
3, Modify interface OSPF priority:
V.: modify the reference bandwidth value
——(1) Modification in OSPF process
1, Brief description of route filtering:
- LSA-3 filtering - database level
- distribute list filtering - between database and routing table
-----------------------------—
2, Distribution list filtering configuration:
In general, matching routes generally use prefix lists
——- (1) use ACL to match route entries (used by OSPF process)
r1(config)#access-list 1 deny 3.3.3.0 0.0.0.255 r1(config)#access-list 1 deny 4.4.4.0 0.0.0.255 r1(config)#access-list 1 permit any r1(config)#router ospf 100 r1(config-router)#distribute-list 1 in
Filter the route matched by acl into my route table, but it is still in the database and will be updated to others
——- (2) use prefix list to match routing entries (used by OSPF process)
r1(config)#ip prefix-list aaa seq 1 deny 192.168.100.0/24 r1(config)#ip prefix-list aaa seq 2 permit 0.0.0.0/0 le 32 r1(config)#router ospf 100 r1(config-router)# distribute-list prefix aaa in r1(config-router)# exit
——- (3) OSPF process + interface usage
r1(config)#access-list 1 deny 3.3.3.0 0.0.0.255 r1(config)#access-list 1 deny 4.4.4.0 0.0.0.255 r1(config)#access-list 1 permit any r1(config)#router ospf 100 r1(config-router)#distribute-list 1 in f0/0
r1(config-router)#distribute-list 1 in f0/0
LSA S of 3.3.3.0 and 4.4.4.0 from f0/0 interface are ignored when calculating routes; You can't enter my routing table, but you should prevent it from entering from other interfaces
——- (4) Note:
r1(config-router)#distribute-list 1 out r1(config-router)#distribute-list 1 out f0/0
ospf does not advertise its own routing entries, but ospf advertises lsa, so these two commands are invalid for ospf
——- (5) filter LSA-5 in ASBR router
r1(config)#access-list 1 permit 4.4.4.0 0.0.0.255 r1(config)#router ospf 100 r1(config-router)#distribute-list 1 out bgp
Only bgp routes 4.4.4.0 are allowed to enter my database, which is used to control the redistributed routes to enter my database (configured at ASBR)
-----------------------------
3, Modify interface OSPF priority:
r1(config-router)#nei 1.1.1.1 priority 10 - for 1.1.1.1, my priority is 10 r1(config-if)#ip ospf priority 10 ------- the priority of my interface is 10 (1 by default)
The maximum router ID is DR
-----------------------------
4, OSPF - passive interface:
(config-router)#passive-interface s0/1 [(config-router)#passive-interface vlan 10)
This interface does not send ospf hello message (the establishment of OSPF neighbor relationship depends on the hello packet)
r1(config-router)#passive-interface default r1(config-router)#no passive-interface s0/1
All interfaces are set to passive except S0/1. R1 connects 100 branches and only establishes ospf neighbors with R2. These 100 branches are included in the network statement
----------------------------
V.: modify the reference bandwidth value
——(1) Modification in OSPF process
r1(config)#router ospf 100 r1(config-router)#auto-cost reference-bandwidth 1000
A router has a G excuse and an F interface, but the calculated cost value is 1, which is unfair! Global effect. The unit is M
This 1000M is actually the eighth power of 10
1G==1 000 000 000
100M==1 000 000 00
Note: in the same OSPF network, if one is modified, all routers need to be modified to unify the routing standard