06-04-2014 01:06 AM - edited 03-04-2019 11:05 PM
Hello:
I'm using BGP and i'm doing redistribution of OSPF into BGP so as i have been reading the best way to do that is to use the network command.
At the moment I'm doing the redistribution of OSPF into BGP using a prefix list that specifies the networks to redistribute.
Is possible to do this by the network command?
My Network to redistribute is the 8.0.0.0 / 8 but the 8.0.0.0 / 16 is excluded.
The network in the IGP is with specific IP directions so I think that I have also use the auto-summary option or configure the aggregate-address command.
Another option that I prefer is to advertise the network in to parts because some of the ingress routers to the AS are better for the first part of the network and the other are better to the second part. So I'm planning to advertise this networks.
Thank you so much for your help. With regards, Juan.
Solved! Go to Solution.
06-04-2014 05:15 AM
hi dear,
By default, network command advertise only specific mask which u applied and it should be existed in routing table.
another option , you can use route map as well with network command
Regard,
kazim
"please rate me if post helpful"
06-04-2014 05:15 AM
hi dear,
By default, network command advertise only specific mask which u applied and it should be existed in routing table.
another option , you can use route map as well with network command
Regard,
kazim
"please rate me if post helpful"
06-04-2014 06:01 AM
Hello:
I know that the network command would match the exact prefix but it's possible to use the aggregated route if you use the aggregate command or the auto-summary command. Is that correct?
For excluding routes is it possible to do with the route map? I think that the route-map in this case was only to modify parameters.
Thanks for your help. With regards, Juan
06-04-2014 01:10 PM
Hi,
are you talking about excluding routes while redistributing from OSPF to BGP or while advertising to a BGP neighbor?
IMHO, you could use a route-map in both cases. Matching a prefix-list would be the easiest way.
As an example, you could use
ip prefix-list prefixes-from-ospf seq 5 deny 8.0.0.0/16 le 32
ip prefix-list prefixes-from-ospf seq10 permit 8.0.0.0/8 le 32
!
route-map to-bgp permit 10
match ip address prefix-list prefixes-from-ospf
!
You could use
router bgp ....
redistribute ospf ... match internal external ... route-map to-bgp
!
or
router bgp ....
neighbor .... route-map to-bgp out
!
The route-map would permit any 8.x.x.x/y prefix with the exception of 8.0.x.x/y prefixes.
Is this what you need?
Best regards,
Milan
06-06-2014 02:45 AM
Hello:
Replying to your question. I'm searching the better way to include routes in BGP to advertise them later to the other ISPs. Now I have this with redistribute OSPF into BGP using a route-map. So I think that the better way to do it is using network command. Could you please explain me the reason of this?
I have been thinking that my idea does not have so much sense because the network to exclude is inside the aggregated prefix ;)
I will explain my case.
The network 8.0.0.0 / 16 is used in the core of my ISP so this network dos not have to be advertised to other ISP.
And the following networks is used by the clients of the ISP. This networks have to be advertised to other ISPs.
So I think that the better way is to advertise the two networks and block connections to 8.0.0.0 / 16 with an ACL in each border router of the ISP.
Is this a good approach? Thanks for your help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide