Connecting 2 switches to a Router

Unanswered Question
Jan 10th, 2011
User Badges:

Hi,

I have a router and 2 switches and I was wondering if it may be recommended to connect each switch to the same router for redundancy? An example of the network would be:


                                   ----------------Router----------------

                                   | (OSPF cost 1)                      | (OSPF cost 10)

                                   |                                           |

                             switch A -------hsrp-------------Switch B


There would be different cost on the link from switch A and switch B to the router to setup the redundancy/preferred path, however not too sure if it may be a best practice/recommended?


An alternative I do know that is not recommended would be to setup bridging on the router and let spanning tree take care of the redundancy.


Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
spremkumar Mon, 01/10/2011 - 06:34
User Badges:
  • Red, 2250 points or more

Hi


Due you have any specific requirement in terminating the L2 domain onto the switches? if possible you can terminated the same onto the router and make sure you run HSRP on those SVI interfaces rather than doing by what you have specified in your post.


regds

Jon Marshall Mon, 01/10/2011 - 06:37
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

CSCO10675262 wrote:


Hi,

I have a router and 2 switches and I was wondering if it may be recommended to connect each switch to the same router for redundancy? An example of the network would be:


                                   ----------------Router----------------

                                   | (OSPF cost 1)                      | (OSPF cost 10)

                                   |                                           |

                             switch A -------hsrp-------------Switch B


There would be different cost on the link from switch A and switch B to the router to setup the redundancy/preferred path, however not too sure if it may be a best practice/recommended?


An alternative I do know that is not recommended would be to setup bridging on the router and let spanning tree take care of the redundancy.


Thanks.


Depends on exactly what you are trying to do.


If the HSRP shown between the switches is actually HSRP running between the 2 interfaces on the router then this won't work as you can't assign 2 ethernet interfaces on the router from the same IP subnet.


However from the looks of your diagram it seems OSPF is running between the router and switches so can we assume the switches are L3 ?


If so then i would simply connect the switches to the router using L3 P2P links.If you do this then why prefer one path over the other ? It would be easier simply to use both paths. So config would look something like -


switch A

======


int gi0/1 <-- connects to router

no switchport

ip address 192.168.5.1 255.255.255.252


router ospf

network 192.168.5.0 0.0.0.3 area


switch B

======


int gi0/1 <-- connects to router

no switchport

ip address 192.168.5.5 255.255.255.252


router ospf

network 192.168.5.4 0.0.0.3 area


router

====


int gi0/1 <--- to switch A

ip address 192.168.5.2 255.255.255.252


int gi0/2 <-- to switch B

ip address 192.168.5.6 255.255.255.252


router ospf

network 192.168.5.0 0.0.0.7 area



If the switches are L2 then you are going to have run BVI between the 2 router interfaces. Note if you do this STP will block one of the links for you anyway.


Jon

CSCO10675262_2 Mon, 01/10/2011 - 16:14
User Badges:

Hi,

Thanks for the update. The reason on the preference of the ospf cost is due to security devices(example ips/etc...) connected between switch a and the router while switch b does not have a security device in between.


Not too sure if it would be recommended to have both the links from the router to the switches in the same ospf area 0 for faster convergence or to have them in different areas? The router is used for connection between offices (dwdm) as well as internet access.


Thanks,

Leo Laohoo Mon, 01/10/2011 - 16:27
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    The Hall of Fame designation is a lifetime achievement award based on significant overall achievements in the community. 

  • Cisco Designated VIP,

    2017 LAN, Wireless

Just want to make sure your router has two ethernet ports to connect to both switches.

CSCO10675262_2 Tue, 01/11/2011 - 16:16
User Badges:

Hi,

The router has several sfp gigabit ports (more than 10); thus this is definite not a problem.

Actions

This Discussion