04-16-2022 02:48 PM - last edited on 04-22-2022 04:16 AM by Translator
Hello,
I'm studying for the CCNA, and trying to figure my head around dynamic routing.
The task is to set up 3x autonomous system that uses the protocols ospf and bgp to set up dynamic routing and to share ip routes.
These are the steps i have taken so far. I have set up 3 bgp areas called 100, 200 and 300.
On the routers inside each autonomous system i have used the commands below. I have added the label 'X' to represent a number of the ip addresses. To keep it simple all the subnet masks are /24.
router ospf 1
redistribute bgp X
network 192.X.0.0 0.0.0.255 area 1
network 192.X.0.0 0.0.0.255 area 1
network X.X.0.0 0.0.0.255 area 1
On the outer routers I have set up the necessary OSPF network id, as well as used the commands below to set up the neighbour IP address, and to select the remote-as bgp autonomous area.
router bgp x
neighbor x.x.x.x remote-as x
network x.0.0.0
redistribute ospf 1
I can get all the routers inside each area to ping each other, but some of the outer routers pings aren't working (not sure if they're meant to?) and the three pc also cannot receive any pings from each other - which tells me i have done something incorrect, i just cannot figure out what.
My question is, does it look like i'm doing anything wrong, and are OSFP and BGP suppose to work like that?
To help everyone understand i have attached a photo of the network, as well as a Cisco 8.1.1 packet tracer file. If anyone could point me in the right direction that would be fantastic.
Thank you.
Solved! Go to Solution.
04-16-2022 03:09 PM - last edited on 04-22-2022 04:16 AM by Translator
Under ospf
Redistrubte bgp x subnet
Under bgp
Redistrubte-internal
Try both and do ping again
04-16-2022 03:39 PM
Hello,
It looks like your subnets are not quite being advertised correctly.
You have network 11.11.0.0 advertised instead of 11.11.11.0. This is the same for all your PC connected networks.
Change the network statement from 11.11.0.0 0.0.0.255 area 1 to 11.11.11.0 0.0.0.255 area 0 (I say area 0 because that best practice when only a single area)
Remember 0 means exactly this number and 255 means I don't care about this number.
Also when redistributing into OSPF use the subnets keyword to not just get classful networks:
redistribute bgp 100
Hope that helps.
-David
04-16-2022 03:09 PM - last edited on 04-22-2022 04:16 AM by Translator
Under ospf
Redistrubte bgp x subnet
Under bgp
Redistrubte-internal
Try both and do ping again
04-16-2022 03:44 PM - edited 04-16-2022 03:44 PM
Thank you for your reply. I added both of the commands you've listed. Still getting request timed out when i ping them.
When doing tracert the ping doesn't seem to know where to go after it arrives at the default gateway - which is the interface it's connected to.
04-16-2022 03:49 PM - edited 04-16-2022 03:55 PM
...
04-16-2022 06:51 PM
I retried this on a new packet tracer file, with correct wildcard masks and this fixed my problem too.
04-16-2022 03:39 PM
Hello,
It looks like your subnets are not quite being advertised correctly.
You have network 11.11.0.0 advertised instead of 11.11.11.0. This is the same for all your PC connected networks.
Change the network statement from 11.11.0.0 0.0.0.255 area 1 to 11.11.11.0 0.0.0.255 area 0 (I say area 0 because that best practice when only a single area)
Remember 0 means exactly this number and 255 means I don't care about this number.
Also when redistributing into OSPF use the subnets keyword to not just get classful networks:
redistribute bgp 100
Hope that helps.
-David
04-16-2022 03:53 PM
Perfect David, works like a charm. Thank you.
04-16-2022 04:02 PM
Quick question, are all the routers suppose to be able to ping each other in a set up like this? All my routers are able to ping each other a part from a couple. (Router 6 to router 4 and 5). What could be the reason for that?
04-16-2022 04:19 PM
They can not don’t have to. Depends on the design of the network. Usually the reason is they don’t know how to reach each other.
As in there is no route in the routing table. Start with one router and make sure the interfaces/subents you want reachable are advertised. Then go around to every other router and see if those subnets are in the routing table. If not you me shoot that connection/ neighborship.
It’s usually a bit more involved than that if you have access lists and route filtering because of the many ways to suppress and manipulate routes but it looks like yours is a simple topology without all that.
04-16-2022 04:51 PM - last edited on 04-22-2022 04:19 AM by Translator
show ip bgp
in R0
from there I will analysis all BGP routes
04-16-2022 05:10 PM - edited 04-16-2022 05:23 PM
Picture attached.
04-16-2022 05:41 PM
R0 don't know anything about AS300?
are R0 is iBGP with R2? if not then you have classic not full mesh iBGP
meaning
R0-R1-R2
R2 iBGP R1
R1 iBGP R0
any prefix R1 receive from R2 never resend to R0 since BGP rule is full mesh between iBGP peer.
so R0 never know R2 prefix
how can I fix this issue?
config iBGP between R0 and R2 "same for each other AS"
be sure that R0 know how to reach R2. use static or dynamic routing.
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