2

How can I connect one VLAN to two different routers ports? Should I do it, or will be better if I connect switches with each other and then connect one of them into router?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide your own answer and accept it.
    – Ron Maupin
    Aug 7, 2017 at 16:43

3 Answers 3

1

You can, and you should. If the switches are stacking switches then you can even have the ports on 2 separate switches. It's a rather simple port-channel configuration on the router and switch. Cisco has a document explaining this, Configuring EtherChannel and 802.1Q Trunking Between Catalyst L2 Fixed Configuration Switches and a Router (InterVLAN Routing).

interface Port-channel1
 switchport trunk native vlan 10
 switchport mode trunk
 no ip address
 flowcontrol send off
!
interface FastEthernet0/1
 no ip address
!
interface FastEthernet0/2
 switchport trunk native vlan 10
 switchport mode trunk
 no ip address
 channel-group 1 mode on
!
interface FastEthernet0/3
 switchport trunk native vlan 10
 switchport mode trunk
 no ip address
 channel-group 1 mode on

And on the router:

interface Port-channel1
 no ip address
 hold-queue 150 in
!
interface Port-channel1.10
 encapsulation dot1Q 10 native
 ip address 10.10.10.1 255.255.255.0
!
interface Port-channel1.20
 encapsulation dot1Q 20
 ip address 10.10.11.1 255.255.255.0
!

!--- Output suppressed.

!
interface FastEthernet3/0
 no ip address
 channel-group 1
!
interface FastEthernet4/0
 no ip address
 channel-group 1

enter image description here

3
1

If you mean should you use a router to connect two separate switches to each other at Layer 2 then probably not no.

A router is designed to be a gateway between two different layer two domains rather than linking them at Layer 2.

If you want the VLAN on each switch to be a single VLAN spanning both switches then connect them to each other. If you want to use the same VLAN ID to provide two separate VLANs, one on each switch, with different subnets assigned, then sure go via the router.

All that said, you can often make a router bridge two interfaces together, which is effectively making the router ports "switch", as switches are just bridging really. In Cisco land, they call this integrated routing and bridging.

0

Switches are designed to switch within VLANs, and routers route between networks (VLANs). Cisco routers can bridge, but that is an expensive way to switch. You didn't say what router model, so I can't be specific on how to do it.

2
  • I used Cisco router 1841, but if you right and this not best idea I have another question. Should I connect two switches with each other and then connect one of them into router? Or exist better way? Dec 23, 2015 at 4:39
  • There is noting wrong with connecting switches to each other with one connected to the router, as long as you understand that failure of the first switch will keep both from the router. A better way would be to have two separate VLANs, each switch on its own VLAN and router connection. Very little today actually requires being on the same layer-2 domain.
    – Ron Maupin
    Dec 23, 2015 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.