BGP filtering
Netstudent
Member Posts: 1,693 ■■■□□□□□□□
in CCNP
Okay so i'm going over some BGP configs and I'm a little unsure of this route map that will filter out incoming routes from a service-provider. I don't want my egde device to learn 10,000 internet routes right. That wouldn't be good.
So let say I am setting up BGP in router configuration mode and I do a:
neighbor 10.10.10.10 remote-as 200
neighbor 10.10.10.10 route-map as200only in
(config)#ip as-path access-list 10 permit ^200$
(config)#route map as200only permit 10
match as-path 10
But my question is, what if the service provider has a large internal AS. Ya sure I may not get the 10,000 internet routes that the service provider has learned, but I don't want to get all of the routes that are sourced from the service providers AS 200 do I?
Also if my BGP config is only:
router bgp 39
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor x.x.x.x remote-as 300
no auto-summary
What would stop this router from learning too much? Would this router learn everything that the peer has in it's routing table, or would this router only learn what the peer has configured under the BGP config with the "network" or "redirstribute connected" commands. I'm just getting into BGP so i may be a little off on how it works at the moment. I've been reading and labbing for like 6 hours now, so my brain might be a little blurry.
So let say I am setting up BGP in router configuration mode and I do a:
neighbor 10.10.10.10 remote-as 200
neighbor 10.10.10.10 route-map as200only in
(config)#ip as-path access-list 10 permit ^200$
(config)#route map as200only permit 10
match as-path 10
But my question is, what if the service provider has a large internal AS. Ya sure I may not get the 10,000 internet routes that the service provider has learned, but I don't want to get all of the routes that are sourced from the service providers AS 200 do I?
Also if my BGP config is only:
router bgp 39
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor x.x.x.x remote-as 300
no auto-summary
What would stop this router from learning too much? Would this router learn everything that the peer has in it's routing table, or would this router only learn what the peer has configured under the BGP config with the "network" or "redirstribute connected" commands. I'm just getting into BGP so i may be a little off on how it works at the moment. I've been reading and labbing for like 6 hours now, so my brain might be a little blurry.
There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
Comments
-
dtlokee Member Posts: 2,378 ■■■■□□□□□□It all really depends on what you're trying to do with the configuration. Typically you don't need to share a BGP table with the provider unless you're multihoming. If that is the case then you do want the entire routng table so you can acheive optimal routing to the Internet. If you're talking about MPLS, well then you'll only get what's in the VRF on the SP.Netstudent wrote:What would stop this router from learning too much? Would this router learn everything that the peer has in it's routing table, or would this router only learn what the peer has configured under the BGP config with the "network" or "redirstribute connected" commands.
You could use the "neighbor x.x.x.x maximum-prefix yy" command to prevent your router from learning too many routes if you're worried about it melting your router. Also once the routes are orignated into BGP they ill be advertised to all peers unless something like community, as filters, prefix-lists, or access-lists are used.The only easy day was yesterday! -
Netstudent Member Posts: 1,693 ■■■□□□□□□□Hey thanks again.There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!