cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9034
Views
25
Helpful
7
Replies

Using OSPF with Subinterfaces?

tplinton6693
Level 1
Level 1

Hi all,

I am a first year networking student so please explain like I'm 5 when replying if you don't mind.

I'm currently working on a small-ish project in Packet Tracer.

I have three routers connected in a straight line I suppose you can say. Router A is connected to Router B which is connected to Router C.

Router A is then connected to a Switch, which is connected to two other switches to form a triangle. Any number of hosts is expected to be connected to these switches. It is being configured as router-on-a-stick, with three VLANs and three subnetworks accordingly. The interface attached the Switch has been divided into three subinterfaces with three networks for each VLAN.

Router B is just a central router, connecting Router A to Router C.

Router C is a stub network. It is using a default route to get outside of it's network, to the next hop on Router B. 

Router B and Router A are supposed to be configured with OSPF. 

I had everything working fine until I added the VLANs and three subnetworks to my network on Router A. Originally, it was just a single network and I had full connectivity. However, when I assigned the subinterfaces, I can no longer ping from the stub network to the Router A's network(s). The packets are dropped at Router B because it doesn't know where to go.

I tried removing the old single network attached to Router A from the OSPF on Router B and adding the three subnetworks in instead. This did not work however.

We were not taught how to deal with this scenario in our course so I'm quite lost. I tried googling but could only find information on configuring OSPF on the same router with the subinterfaces, involving Frame Relay? However my teacher says this is not the answer to the problem.

I was wondering if you guys could point me in the right direction.

To summarize again, how do I configure OSPF on Router B (my central router) to the subnetworks on the subinterfaces on Router A?

Thanks! 

edit://

I have attached the topology and running configs for my three routers below.

"IT" is Router A

"Gateway" is Router B

"Accounting" is Router C

1 Accepted Solution

Accepted Solutions

There are some mistakes in your configuration files

  • First for the IT router

You assuming that the router is connected to  network 192.168.1.0 which u do not have in your topology as I can see

network 192.168.1.0 0.0.0.255 area 0 ( remove)

 network 192.168.3.0 0.0.0.3 area 0 (remove)

 

your router should only advertise these networks

network 192.168.10.0 0.0.0.255 area 0 

 network 192.168.20.0 0.0.0.255 area 0

 network 192.168.30.0 0.0.0.255 area 0

 network 192.168.2.0 0.0.0.3 area 0

 

there is no no need to  use the static route,  u can  just remove it

 

ip route 192.168.4.0 255.255.255.0 192.168.2.2  (remove)

 

  • For the gateway router

You did the same mistake, you are assuming that the gateway router is connected to  following networks

network 192.168.10.0 0.0.0.255 area 0 (remove)

 network 192.168.20.0 0.0.0.255 area 0 (remove)

 network 192.168.30.0 0.0.0.255 area 0 (remove)

 you should remove them from the configuration file and it should only have the following networks

network 192.168.3.0 0.0.0.3 area 0

 network 192.168.2.0 0.0.0.3 area 0

  • For the accounting router

 

I do not know why you configured that u are going to use ospf but u did not  add any network to it

You should add these networks to it

network 192.168.3.0 0.0.0.3 area 0

network 192.168.3.0 0.0.0.255 area 0

 

 if  you added the previous two network  to your ospf, then there is not need for the following line in your configuration file

you should remove it

ip route 0.0.0.0 0.0.0.0 192.168.3.1  (remove)

View solution in original post

7 Replies 7

David99
Level 1
Level 1

Hi There,

If you could share configurations that would be helpful.I am assuming this is a 'Router on a Stick' scenario.

However the first question I would ask is...are you actually advertising these new networks into OSPF on router A?

Please share configurations, IP schemes and the routing tables :)

Yes of course! I edited the main post with the topology and configs. Hopefully that helps.

naseromer
Level 1
Level 1

would you  please send the configuration file and a screen shot of your topology?

I edited my post with attachments for the topology and three running configs

Also, note: I don't just want the appropriate config given to me. I'd like an explanation for how this works and/or a link to learning material for this scenario if possible. :]

There are some mistakes in your configuration files

  • First for the IT router

You assuming that the router is connected to  network 192.168.1.0 which u do not have in your topology as I can see

network 192.168.1.0 0.0.0.255 area 0 ( remove)

 network 192.168.3.0 0.0.0.3 area 0 (remove)

 

your router should only advertise these networks

network 192.168.10.0 0.0.0.255 area 0 

 network 192.168.20.0 0.0.0.255 area 0

 network 192.168.30.0 0.0.0.255 area 0

 network 192.168.2.0 0.0.0.3 area 0

 

there is no no need to  use the static route,  u can  just remove it

 

ip route 192.168.4.0 255.255.255.0 192.168.2.2  (remove)

 

  • For the gateway router

You did the same mistake, you are assuming that the gateway router is connected to  following networks

network 192.168.10.0 0.0.0.255 area 0 (remove)

 network 192.168.20.0 0.0.0.255 area 0 (remove)

 network 192.168.30.0 0.0.0.255 area 0 (remove)

 you should remove them from the configuration file and it should only have the following networks

network 192.168.3.0 0.0.0.3 area 0

 network 192.168.2.0 0.0.0.3 area 0

  • For the accounting router

 

I do not know why you configured that u are going to use ospf but u did not  add any network to it

You should add these networks to it

network 192.168.3.0 0.0.0.3 area 0

network 192.168.3.0 0.0.0.255 area 0

 

 if  you added the previous two network  to your ospf, then there is not need for the following line in your configuration file

you should remove it

ip route 0.0.0.0 0.0.0.0 192.168.3.1  (remove)

The Accounting router was not supposed to use OSPF, only a default route, which is why the other routers have static routes to the 192.168.4.0 network.

My understanding of how OSPF works must need adjusting. For some reason I was confusing the networks to advertise as if they were networks I was adding to a route table, hence why I put the three subnetworks on the Gateway router instead of on the IT router. I realize now that when I'm using the "network x.x.x.x x.x.x.x.x area x" command, I'm adding the networks attached to that router that I want advertised through OSPF, not adding them to other routers as if they were static routes or something. Whoops!

I will edit my configurations and hopefully it will work. Such a simple little thing. Thanks for clarifying.

edit://

Yep that fixed it, thanks. I'll remember forever now how OSPF is supposed to work lol

you  are  welcome. yeah that is right  you only need to add the networks attached to that router that  you want  to be  advertised by OSPF.

Review Cisco Networking for a $25 gift card