close
cisco PBR
PBR(policy-based route,原則型路由)
可根據指定的條件改變路由目地
 
 
1.設定ACL條件
(config)#access-list < acl-option> 
 
 例:
(config)#access-list 1 permit 10.0.0.0 0.255.255.255
 
 
2.使用route-map來設定PBR
(config)# route-map < map-name> permit
(config-router-map)# match ip address < acl>
(config-router-map)# set < set-action>
 
 例:
(config)#route-map pbr permit 10
(config-router-map)#match ip address 1
(config-router-map)#set ip next-hop 192.168.1.1
 
※set ip next-hop < ip1 [ip2 [ip...]]> 先依ip1為主,失敗再走ip2,依序下去
※未符合PBR設置的IP條件者,皆會走一般IP路由(如預設路由、靜態路由等)
 
3.介面套用route-map,啟動PBR
 (config-if)# ip policy route-map < map-name>
 
 例:
(config)#interface GigabitEthernet0/0
(config-if)#ip policy route-map pbr
 
 
4.檢視PBR狀態
#sh route-map pbr
route-map pbr, permit, sequence 10
  Match clauses:
    ip address (access-lists): 1 
  Set clauses:
    ip next-hop 192.168.1.1
  Policy routing matches: 225936712 packets, 2527724840 bytes

 

補充< set-action> 其他用法
•next-hop: 指定下一跳的路由目的位置
•next-hop recursive:指定下一跳的路由目的位置(非直連網路的IP)
•default next-hop: 先走一般IP路由(如預設路由、靜態路由等),路徑失敗時才使用PBR
 

 

原廠文件參考
Configuring Policy-Based Routing
 
牛的大腦

http://systw.net/note/af/sblog/more.php?id=241

arrow
arrow
    文章標籤
    pbr cisco
    全站熱搜

    鵝 發表在 痞客邦 留言(0) 人氣()