cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2710
Views
0
Helpful
3
Replies

Configuring OSPF between two routers and two switches

Hi All 

(New guy) 

 

I have this topology 

 

SW1 ---- R1 -----R2-----SW2          

 

R1 and R2 are in OSPF area 0 and all is good. 

SW1 and R1 are in OSPF area 10 and they can ping each other. 

SW2 and R2  are in OSPF area 20 and they can ping each other. 

 

The question now is, if I want to connect an end device to SW1 (say interface 20) how do I get traffic from the end device routed through SW1 to the other  areas all the way to an end device connected to SW2.  

 

Must I add the interface the device is connected to, to a VLAN?  Can traffic be routed directly without adding the end device's interface to a VLAN and if so how ? 

 

any advice greatly appreciated 

1 Accepted Solution

Accepted Solutions

Hi,

Add/Advertise  VLAN 201 in the OSPF. 

 

router ospf x

network 192.168.40.0 0.0.0.255 are y

 

X = is OSPF process ID

y = is the area ID for this switch.

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

View solution in original post

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

The question now is, if I want to connect an end device to SW1 (say interface 20) how do I get traffic from the end device routed through SW1 to the other  areas all the way to an end device connected to SW2.  

 

Must I add the interface the device is connected to, to a VLAN?  Can traffic be routed directly without adding the end device's interface to a VLAN and if so how ? 

So, you can do it 2 ways, one is to add the end device to a vlan, create an SVI for that vlan and than add the SVI to the OSPF and the 2nd way, you can simply connect the end device to say port 20 and make that port a routed port (not switchport) and than give the PC one IP and the switch interface one IP and than add that interface to OSPF.

In the switching/LAN environment the first option in common because you can add multiple devices to the same vlan vs the second method is point-to-point,meaning you can only have 2 devices on that segment (switch and end device).

Also, usually, the first method using a vlan uses a bigger subset like /25 or 24 and the second method you just need two IPs, so usually a /30 is sufficient. 

HTH  

Thank you for you reply, I still got an issue with this. 

 

My SW1 ospf interface is G1/0/24 (192.168.10.5) (which is in the ospf area with R1(192.168.10.1)

The end device on vlan 201 is on G1/0/20 and the vlan 201 interface is 192.168.40.1. 

What do I need to do to route Vlan 201 from the ospf  192.168.10.5 switch interface?  It is on a 3650 switch. 

 

thank you 

Hi,

Add/Advertise  VLAN 201 in the OSPF. 

 

router ospf x

network 192.168.40.0 0.0.0.255 are y

 

X = is OSPF process ID

y = is the area ID for this switch.

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!
Review Cisco Networking products for a $25 gift card