This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
edgerouter:bgp [2018/05/15 18:38] – [The Prefix Lists] brielle | edgerouter:bgp [2018/05/15 18:49] – brielle | ||
---|---|---|---|
Line 39: | Line 39: | ||
' | ' | ||
+ | |||
+ | In the above examples, 192.0.2.0/ | ||
+ | |||
+ | ===== The Route Maps ===== | ||
+ | While you can just use prefix lists with BGP to control routes imported and exported, route maps give you much more flexibility and control, and can even include AS path matching. | ||
+ | < | ||
+ | route-map BGP-ISPv6-From { | ||
+ | rule 10 { | ||
+ | action permit | ||
+ | match { | ||
+ | ipv6 { | ||
+ | address { | ||
+ | prefix-list BGP-ISPv6-From | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | route-map BGP-ISPv6-To { | ||
+ | rule 10 { | ||
+ | action permit | ||
+ | match { | ||
+ | ipv6 { | ||
+ | address { | ||
+ | prefix-list BGP-ISPv6-To | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | route-map BGP-ISP-From { | ||
+ | rule 10 { | ||
+ | action permit | ||
+ | match { | ||
+ | ip { | ||
+ | address { | ||
+ | prefix-list BGP-ISP-From | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | route-map BGP-ISP-To { | ||
+ | rule 10 { | ||
+ | action permit | ||
+ | match { | ||
+ | ip { | ||
+ | address { | ||
+ | prefix-list BGP-ISP-To | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | Like the prefix lists, -To and -From are your specific directions in and out (import and export). | ||
+ | |||
+ | ===== BGP Protocol Configuration ===== | ||
+ | < | ||
+ | bgp 65501 { | ||
+ | address-family { | ||
+ | ipv6-unicast { | ||
+ | network 2001: | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | neighbor 100.64.100.1 { | ||
+ | remote-as 65502 | ||
+ | route-map { | ||
+ | export BGP-ISP-To | ||
+ | import BGP-ISP-From | ||
+ | } | ||
+ | soft-reconfiguration { | ||
+ | inbound | ||
+ | } | ||
+ | update-source 100.64.100.2 | ||
+ | } | ||
+ | neighbor fd00::1 { | ||
+ | address-family { | ||
+ | ipv6-unicast { | ||
+ | route-map { | ||
+ | export BGP-ISPv6-To | ||
+ | import BGP-ISPv6-From | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | remote-as 65502 | ||
+ | soft-reconfiguration { | ||
+ | inbound | ||
+ | } | ||
+ | update-source fd00::2 | ||
+ | } | ||
+ | network 192.0.2.0/ | ||
+ | } | ||
+ | parameters { | ||
+ | router-id 100.64.100.2 | ||
+ | } | ||
+ | redistribute { | ||
+ | connected { | ||
+ | } | ||
+ | kernel { | ||
+ | } | ||
+ | static { | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ |