|-------------------| |--------| | |---------| |-----OTHERS | AS1 | | AS2 | | 192.168.0.0/16 | | | | |---------| |-----OTHERS |-------------------| |--------|
I advertise my class B range from AS1 for example 192.168.0.0/16 on both routers but to achieve some load-sharing I addvertise 192.168.0.0/17 on one router and 192.168.128.0/17 on the other router as well.
I setup a community NO-EXPORT for the /17 so AS2 won't advertise them out to other AS's.
The question In AS2 BGP selects the best route and /17 should be selected because of the longest match rule. BGP places the /17 in its routing table. BGP should only UPDATE the other IBGP Peers with its routing table entry (IE Each router won't send it's entire BGP database). So if the /17 will be sent to other IBGP with the community NO-EXPORT how do other AS's learn about the /16 ?
AS2 will have both /17's and the /16 in it's routing table. Those are three separate destinations. The /16 will never actually be used, because there's a more specific (one of the /17's) for every possible address within that /16, but that's irrelevant. There are three distinct destinations (196.168/16, 192.168/17, 192.168.128/17) and BGP will (absent some sort of filtering) install the best route to each such destination in it's table. Absent filtering, AS2 would send all three routes to it's BGP peers, but your NO EXPORT community will cause the two /17s to be filtered, so only the /16 will make it beyond AS2. -- Brett