平時沒有關注默認路由的重分佈細節,今天偶然遇到,作作實驗。分享一下默認路由的ACL寫法:web
- interface Loopback0
- ip address 202.1.1.1 255.255.255.0
- !
- interface Serial0/0
- ip address 12.1.1.1 255.255.255.0
- serial restart-delay 0
- !
- router eigrp 100
- redistribute static
- network 12.1.1.1 0.0.0.0
- auto-summary
- !
- ip http server
- no ip http secure-server
- !
- ip route 0.0.0.0 0.0.0.0 Loopback0
R1的配置很正常,重點 在於發佈了默認路由。redis
文章的重點在R2的配置上:ide
- interface Loopback0
- ip address 192.168.1.1 255.255.255.0
- !
- interface Serial0/0
- ip address 12.1.1.2 255.255.255.0
- serial restart-delay 0
- router eigrp 100
- redistribute eigrp 200 metric 100 1 255 1 1500
- network 12.1.1.2 0.0.0.0
- auto-summary
- !
- router eigrp 200
- redistribute eigrp 100 metric 100 1 255 1 1500 route-map cisco
- network 192.168.1.1 0.0.0.0
- auto-summary
- access-list 100 permit ip any host 0.0.0.0
- !
- route-map cisco permit 10
- match ip address 100
紅色字體 是重點 內容,默認路由的ACL捕抓方法就是:oop
- access-list 100 permit ip any host 0.0.0.0
內容簡單,重在分享。字體