cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18400
Views
10
Helpful
7
Replies

Redistribute static subnets?

brian.kennedy
Level 1
Level 1

Will this command also redistribute a static route as well as static subnets?  I have a wan site (A) that has equal paths to an address that's located at other sites (B and C) .  I want all traffic to that addres from site A to go to site B.  However, I don't want it mess up any traffic from site C that's bound to that same address that will take a different path.  I was going to enter in just an ip route <destination address> <site B address>, but I don't want all of site C's traffic for that address to go back through site A and then to B.  Hopefully this isn't too convoluded.

Brian

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

brian.kennedy wrote:

Will this command also redistribute a static route as well as static subnets?  I have a wan site (A) that has equal paths to an address that's located at other sites (B and C) .  I want all traffic to that addres from site A to go to site B.  However, I don't want it mess up any traffic from site C that's bound to that same address that will take a different path.  I was going to enter in just an ip route , but I don't want all of site C's traffic for that address to go back through site A and then to B.  Hopefully this isn't too convoluded.

Brian

Brian

This is with OSPF is it ?

redistrbute static subnets  tells the router to redistribute any static routes into OSPF - not sure what you mean by static subnets ?  If you want to control which ones are redistributed then use a route-map on the redistribute statement ie.

access-list 10 permit 192.168.5.0 0.0.0.255

route-map RST permit 10

match ip address 10


router ospf 10

resdistribute static subnets route-map RST

Jon

View solution in original post

Brian

If there are no other static routes being redistributed then just removing the redistribute static subnets command would seem to be the simple solution. That way the static route would operate locally and not be redistributed.

If there are other static routes that do need to be redistributed then the solution from Jon to configure a roue map to control what static routes are redistributed should work.

And if I understand your explanation correctly even if site C does redistribute its static route it should not impact site B.

[edit] If site C redistributes it static route then OSPF advertises it as an OSPF external route. On the router of site B how does it learn the route to the VPN peer? If it is static or is OSPF internal then those routes are preferred to any OSPF external. So it is not likely that redistribution on site C will impact the choice of site B.

HTH

Rick

HTH

Rick

View solution in original post

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

brian.kennedy wrote:

Will this command also redistribute a static route as well as static subnets?  I have a wan site (A) that has equal paths to an address that's located at other sites (B and C) .  I want all traffic to that addres from site A to go to site B.  However, I don't want it mess up any traffic from site C that's bound to that same address that will take a different path.  I was going to enter in just an ip route , but I don't want all of site C's traffic for that address to go back through site A and then to B.  Hopefully this isn't too convoluded.

Brian

Brian

This is with OSPF is it ?

redistrbute static subnets  tells the router to redistribute any static routes into OSPF - not sure what you mean by static subnets ?  If you want to control which ones are redistributed then use a route-map on the redistribute statement ie.

access-list 10 permit 192.168.5.0 0.0.0.255

route-map RST permit 10

match ip address 10


router ospf 10

resdistribute static subnets route-map RST

Jon

Jon,

Yes, this is OSPF.  So just to make sure I understand this, all the networks listed under OSPF, i would put those in my route map as I want those redistributed.  But if left the static route i entered in out, this will not be redistributed.

brian.kennedy wrote:

Jon,

Yes, this is OSPF.  So just to make sure I understand this, all the networks listed under OSPF, i would put those in my route map as I want those redistributed.  But if left the static route i entered in out, this will not be redistributed.

Brian

Not quite. The networks listed under OSPF do not need to go into the route-map. These are not being redistributed as they are already in OSPF as they are network statements under the OSPF config eg.

router ospf 10

network 192.168.5.0 0.0.0.255 area 0

network 192.168.6.0 0.0.0.255 area 0

so you wouldn't need to redistribute these into OSPF and it wouldn't make sense to.

However the static routes you configure are not in OSPF so you can redistribute them with the "redistribute static subnets" command. My understanding was that you wanted to only redistribute some of the static routes configured on the router and you do that with a route-map. The route-map will have no effect on the "network ...." statements under your OSPF configuration.


Jon

Thanks Jon, makes sense.

and actually, since there will only be the single static route on this router, I should just take out the redistribute command and all should be well.  I'm not sure why it was entered in to begin with.  All traffic from that router will go the right direction, w/out worrying about affecting the other sites traffic bound for the same address(es).

Brian

Richard Burts
Hall of Fame
Hall of Fame

Brian

I find your explanation difficult to follow. If we need to go further with this question it would be helpful if you provide some diagram, and especially if you provide some supporting details such as what networks/subnets are at each site.

But I believe that the answer to your immediate question is that supplying subnets in the redistribute static command is not going go change what you advertise. What the subnets keyword does is fairly simple. If you configure redistribute static (without specifying subnets) then OSPF will redistribute a static route if it is a classful network (not subnetted). So it would redistribute a static for a classA /8, or a classB /16, or a class C /24. But it would not redistribute any static route for a subnet of those networks. If you include the subnets keyword in the redistribute static command then OSPF will redistribute your static route no matter whether it is for the classful network or for a subnet.

HTH

Rick

HTH

Rick

Rick

Sorry for the confusion, I knew it would be.  See if this makes more sense w/out resorting to a diagram.

We have two sites that each have a site to site VPN tunnel set up to a 3rd party.  Each tunnel has the same peer addresses (150.1.0.0/16).  Each site has traffic that goes back and forth between devices through their own tunnel.  Not the optimal set up, but it works at this point until we combine to one tunnel.

Enter our 3rd site, who has equal links to both of us.  What I want is for any traffic from that 3rd site bound for 150.1.0.0/16 to go through only one of the parent sites.  Right now, with the equal costs, that traffic can try to go either way, causing the 3rd party to have intermittent connections via vpn.

My thought was to put an ip route 150.2.0.0 255.255.0.0 on the 3rd sites router.  But, I think if I do that, with the redistribute command in, it may force traffic from site B to try to go through the 3rd site, to site A and try to use site A's address, which is not desired.

I think I have the solution, and that's just to remove the redistribute command.  There's no other static routes in, so I'm not sure why it was entered in in the first place.

Brian

Brian

If there are no other static routes being redistributed then just removing the redistribute static subnets command would seem to be the simple solution. That way the static route would operate locally and not be redistributed.

If there are other static routes that do need to be redistributed then the solution from Jon to configure a roue map to control what static routes are redistributed should work.

And if I understand your explanation correctly even if site C does redistribute its static route it should not impact site B.

[edit] If site C redistributes it static route then OSPF advertises it as an OSPF external route. On the router of site B how does it learn the route to the VPN peer? If it is static or is OSPF internal then those routes are preferred to any OSPF external. So it is not likely that redistribution on site C will impact the choice of site B.

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: