分类:
2012-11-30 10:43:18
Route Maps 这种更好控制粒度的方式来再发布的配置
Router1#ure terminal
Router1(config)#ip route 192.168.10.0 255.255.255.0 172.22.1.4
Router1(config)#ip route 192.168.11.0 255.255.255.0 172.22.1.4
Router1(config)#ip route 192.168.12.0 255.255.255.0 172.22.1.4
Router1(config)#access-list 20 permit 192.168.10.0
Router1(config)#access-list 21 permit 192.168.11.0
Router1(config)#route-map STATIC permit 10
Router1(config-route-map)#match ip address 20
Router1(config-route-map)#set metric 2
Router1(config-route-map)#set tag 2
Router1(config-route-map)#exit
Router1(config)#route-map STATIC permit 20
Router1(config-route-map)#match ip address 21
Router1(config-route-map)#set metric 8
Router1(config)#route-map STATIC deny 30
Router1(config-route-map)#exit
Router1(config)#router rip
Router1(config-router)#redistribute static route-map STATIC
Router1(config-router)#exit
Router1(config)#end
Router1#
注释 使用route map 可以对路由再发布进行更好粒度的控制,如果觉的配置命令难懂的话,使用验证命令show route-map 可能更好理解一些