2015年8月18日 星期二

static route, aggregate route and generated route的分別

剛好對這幾個類型的route在routing table中有何分別,想要分清楚一下,從網路上找了一些資料來整理。

- A static route is the most obvious. You need to be able to reach a certain prefix and you specify the next-hop. This is useful when you are not running dynamic routing protocols and/or when you want to override what a dynamic protocol dictates (since the protocol-preference for a static-route is lower -preferred- than that of any dynamic RP).

Static route很簡單的就是指定一筆route往一個固定的next-hop,而後可加行為(discard or reject..等)



- An aggregate route is a route you define but which is not used for forwarding traffic (next-hop is discard or reject). It is purely used to advertise this router's connectivity which is why it needs at least one contributing route (a route which belongs to the advertised subnet but with a longer mask - these are the ones used to forward the traffic). Typically, the aggregate route would be advertised into BGP (if it is active thanks to contributing routes) - BGP does not like dealing with routes which are too specific - it prefers aggregates.
aggregate route

這邊又延伸一個什麼是contributing route?

 
- A generated route is technically an aggregate route but which can be used to forward traffic. Traffic which matches the generated route (and not more specific routes) will be forwarded using the same next-hop as the first contributing route. A generated-route is typically combined with a policy to match which routes we want to be contributing and thus used as NHs. The generated-route is typically the default 0/0 with a policy matching to upstream routes - ie: provide connectivity if certain upstream routes exist.

簡單說,aggregate route是無法用於forwarding,generated route會根據設定的route,會尋找table內可用的next-hop後,此next-hop的就是contributing route,此筆route就可用於forwarding啦!!

沒有留言: