01-11-2022 11:35 AM - last edited on 03-09-2022 11:24 PM by smallbusiness
Hello,
For a school assignment I'm working on a network with a router connected to an ISP on one end, and to a switched network on the other end. I want to show that I've understood redundancy so I made two connections from different switches to the same router, so if one switch fails, the network still has access to the ISP. (note: this still leaves the router as a single point of failure, but this can't be changed within the boundaries of the assignment).
This is a simplified representation of what I'm trying to do. The switches are connected to more switches and end devices.
When configuring the router, I ran into the following problem: I can't define the same default gateway on both interfaces of the router that connect to the switches (as far as i know). But if I define different default gateways, it obviously won't work. I've thought about using FHRP, but as far as I know, this only works when there are two different routers instead of one in this case.
My question is: How do i configure the router properly? Is it even possible to do what I am doing?
Thanks in advance for any answers!
Solved! Go to Solution.
01-11-2022 10:13 PM
The original post does not tell us some details that would be important in understanding this situation. In particular we are not told whether this switched network is a single vlan or is multiple vlans. Also we are not told whether this switched network is a layer 2 network (with routing done on the router) or is a layer 3 network (with ip routing enabled on one or more switches). And we are not told what type of router this is.
For this response I will assume that this is a layer 2 network. If that is not correct then please let me know and I will modify my response.
One alternative depends on the type of router that this is. Some routers have an embedded switch (some of the interfaces act as layer 2 switch ports). If this router is one of those then the solution is simple - connect each of the switches to a switch port (configured in the same vlan). This would allow each switch to communicate with the router and provide redundancy. Those connections would create a loop and spanning tree would detect the loop and put one interface into blocking mode. So you would get traffic on only one interface at a time, but you would have redundancy.
I am guessing that this router does not have an embedded switch and so we need a different alternative. If this router supports the feature then Concurrent Routing and Bridging might be a solution. In CRB you enable bridging on both router interfaces, crb uses a Bridged Virtual Interface to have a single IP address that is used for both of the interfaces. This gets around the issue that you can not have 2 routed interfaces on the same router in the same IP subnet.
01-11-2022 12:20 PM
Hi
Not sure if I understood you properly. You mean, you have a router connected to your ISP and this must be your gateway. Well, then, your router must have 2 IP address and a defalt route point to your ISP.
One IP will be used to speak to ISP and the other one will be the gateway to you internal network.
Then, you connected 2 switch on the router. right? In this scenario, you can stablish trunk between router and switch and setup an Interface vlan on the router with your internal IP address. Then, you allow that Vlan on the trunk between switches and router. Create the same vlan on the switch in layer 2 only.
I think this should work.
01-11-2022 12:21 PM
Hi there,
You need to configure an SVI on the router instead of using routed interfaces. This will also require you to make those router interfaces connected to the switches (eg, gi0/1 and gi0/2) to operate at Layer2 (switchport), eg:
! vlan 10 ! int vlan 10 ip address 10.0.0.254 255.255.255.0 ! int range gi0/1-2 switchport switchport mode trunk switchport trunk allowed vlan add 10 no shut !
cheers,
Seb.
01-11-2022 03:23 PM
Thanks for your reply. What is the purpose of the vlan here? And what exactly do you mean by using an SVI? How can I configure this?
On the router I'm also using subinterfaces for inter-vlan routing, and it also runs a DHCP server. Will this all still work with this solution?
(Same goes for Vlavio's answer)
Thanks for your help
01-11-2022 10:13 PM
The original post does not tell us some details that would be important in understanding this situation. In particular we are not told whether this switched network is a single vlan or is multiple vlans. Also we are not told whether this switched network is a layer 2 network (with routing done on the router) or is a layer 3 network (with ip routing enabled on one or more switches). And we are not told what type of router this is.
For this response I will assume that this is a layer 2 network. If that is not correct then please let me know and I will modify my response.
One alternative depends on the type of router that this is. Some routers have an embedded switch (some of the interfaces act as layer 2 switch ports). If this router is one of those then the solution is simple - connect each of the switches to a switch port (configured in the same vlan). This would allow each switch to communicate with the router and provide redundancy. Those connections would create a loop and spanning tree would detect the loop and put one interface into blocking mode. So you would get traffic on only one interface at a time, but you would have redundancy.
I am guessing that this router does not have an embedded switch and so we need a different alternative. If this router supports the feature then Concurrent Routing and Bridging might be a solution. In CRB you enable bridging on both router interfaces, crb uses a Bridged Virtual Interface to have a single IP address that is used for both of the interfaces. This gets around the issue that you can not have 2 routed interfaces on the same router in the same IP subnet.
01-12-2022 01:39 AM
I additon to @Richard Burts answer, if you make the router the STP root bridge for the VLAN:
! spanning-tree vlan xx root primary !
...then assuming all links have the same STP cost, it will be the link between the switches which will have one end in a STP blocking state. This would be considered an optimal STP topology. In the event of one of the router interfaces failing the inter-switch link would become a RP for the most distance switch which would then begin forwarding towards the other switch.
cheers,
Seb.
01-12-2022 05:47 AM
Thanks! This was the solution I was looking for. Unfortunately, the router I have to use in the assignment doesn't support CRB (or IRB). So I'll guess I just have to keep one link and forget about the other one.
01-12-2022 07:29 AM
Thanks for the update. Yes I believe that CRB would have been a good solution. Too bad that the router that you need to use does not support it. Redundancy would have been nice, but given the restrictions you have it does not seem possible.
Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.
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