實驗拓撲
實驗目的
總部有三個路由器分別是AR1,AR2,AR3,區域爲0
分部1和分部2分別是AR4和AR5,且分別有兩根專線到總部的區域0,從而造成等價路由鏈路備份;
AR1引入感興趣的直連路由並作彙總;
分部1的路由器性能較差,爲了減小LSA條目,配置爲totally NSSA區域;
分部1配置爲NSSA區域後又引入了外部路由,從而變成NSSA區域的ASBR;
爲保證安全不受非法***致使ospf網絡震盪,區域啓動認證。
AR1宣告默認路由,使ospf的IP段能訪問外網。node
AR1配置安全
acl 2100 rule 5 permit source 11.11.8.0 0.0.7.255 //用於路由策略 acl 3001 rule 10 permit ip source 10.0.0.0 0.0.255.255 //用於nat ip route-static 0.0.0.0 0.0.0.0 202.100.1.2 默認路由指向ISP interface GigabitEthernet0/0/2 ip address 202.100.1.1 255.255.255.252 nat outbound 3001 //easy nat route-policy import_die permit node 10 if-match acl 2100 //用於引入的感興趣IP ospf 1 router-id 10.0.0.1 asbr-summary 11.11.8.0 255.255.248.0 //對外部路由彙總 default-route-advertise //整個ospf宣告默認路由,使其全部默認 import-route direct route-policy import_die area 0.0.0.0 authentication-mode simple 123 network 10.0.0.1 0.0.0.0 network 10.0.12.0 0.0.0.3 network 10.0.13.0 0.0.0.7
AR2配置網絡
ospf 1 router-id 10.0.0.2 area 0.0.0.0 authentication-mode simple 123 network 10.0.0.2 0.0.0.0 network 10.0.12.0 0.0.0.7 network 10.0.23.0 0.0.0.7 area 0.0.0.1 abr-summary 172.16.0.0 255.255.252.0 authentication-mode simple 123 network 10.0.24.0 0.0.0.7 nssa no-summary area 0.0.0.2 authentication-mode simple 123 network 10.0.25.0 0.0.0.7
AR3配置ide
ospf 1 router-id 10.0.0.3 area 0.0.0.0 authentication-mode simple 123 network 10.0.0.3 0.0.0.0 network 10.0.13.0 0.0.0.7 network 10.0.23.0 0.0.0.7 area 0.0.0.1 abr-summary 172.16.0.0 255.255.252.0 //ABR彙總 authentication-mode simple 123 network 10.0.34.0 0.0.0.7 nssa no-summary //配置totally NSSA area 0.0.0.2 authentication-mode simple 123 network 10.0.35.0 0.0.0.7
AR4配置性能
ospf 1 router-id 10.0.0.4 import-route direct area 0.0.0.1 authentication-mode simple 123 network 10.0.0.4 0.0.0.0 network 10.0.0.32 0.0.0.7 network 10.0.24.0 0.0.0.7
AR5配置code
ospf 1 router-id 10.0.0.5 area 0.0.0.2 authentication-mode simple 123 network 10.0.0.5 0.0.0.0 network 10.0.25.0 0.0.0.7
經過display ospf 1 routing 能夠查看ospf的路由條目
dis ip routing-table protocol ospf 查看轉發的ospf路由條目router