Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

Silver

ROUTER ON A STICK WITH 2 SWITCHES

which topoplogy is the right one? 2 switches connected to a router or a switch connected to the router and the other switch connect to the switch?

---

Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App

1 ACCEPTED SOLUTION

Accepted Solutions
VIP Purple

ROUTER ON A STICK WITH 2 SWITCHES

Hi,

You can connect 2 swicth to router:

When you create vlans, you are essentially creating seperate broadcast domains.  Generally when you create seperate broadcast domains, you are creating different subnets.  A layer 2 switch doesn't know how to forward traffic destined for a different broadcast domain.  You need a layer 3 device to route traffic between your vlans(broadcast domains).  I would think that ROAS is just the implementation of intervlan routing when there is no layer 3 switch available.

see the example:If you are configuring on Router

Create sub-interfaces, set 802.1Q trunking protocol and ip address on each sub-interface

Router(config)#interface f0/0

Router(config-if)#no shutdown

(Note: The main interface f0/0 doesn’t need an IP address but it must be turned on)

Router(config)#interface f0/0.0

Router(config-subif)#encapsulation dot1q 15

Router(config-subif)#ip address 192.168.15.1 255.255.255.0

Router(config-subif)#interface f0/0.1

Router(config-subif)#encapsulation dot11 20

Router(config-subif)#ip address 192.168.20.1 255.255.255.0

(Note: In the “encapsulation dot1q 15″ command, 15 is the VLAN ID this interface operates in)

Configure VLAN

Switch(config)#vlan 15

Switch(config-vlan)#name SALES

Switch(config-vlan)#vlan 20

Switch(config-vlan)#name TECH

Set ports to access mode & assign ports to VLAN

Switch(config)#interface range fa0/1

Switch(config-if)#no shutdown

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 15

Switch(config-if)#interface range fa0/3

Switch(config-if)#no shutdown

Switch(config-if)#switchport mode access

Switch(config-if)# switchport access vlan 20

Hope it helps.

Regards

Dont forget to rate helpful posts.

2 REPLIES
VIP Purple

ROUTER ON A STICK WITH 2 SWITCHES

Hi,

You can connect 2 swicth to router:

When you create vlans, you are essentially creating seperate broadcast domains.  Generally when you create seperate broadcast domains, you are creating different subnets.  A layer 2 switch doesn't know how to forward traffic destined for a different broadcast domain.  You need a layer 3 device to route traffic between your vlans(broadcast domains).  I would think that ROAS is just the implementation of intervlan routing when there is no layer 3 switch available.

see the example:If you are configuring on Router

Create sub-interfaces, set 802.1Q trunking protocol and ip address on each sub-interface

Router(config)#interface f0/0

Router(config-if)#no shutdown

(Note: The main interface f0/0 doesn’t need an IP address but it must be turned on)

Router(config)#interface f0/0.0

Router(config-subif)#encapsulation dot1q 15

Router(config-subif)#ip address 192.168.15.1 255.255.255.0

Router(config-subif)#interface f0/0.1

Router(config-subif)#encapsulation dot11 20

Router(config-subif)#ip address 192.168.20.1 255.255.255.0

(Note: In the “encapsulation dot1q 15″ command, 15 is the VLAN ID this interface operates in)

Configure VLAN

Switch(config)#vlan 15

Switch(config-vlan)#name SALES

Switch(config-vlan)#vlan 20

Switch(config-vlan)#name TECH

Set ports to access mode & assign ports to VLAN

Switch(config)#interface range fa0/1

Switch(config-if)#no shutdown

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 15

Switch(config-if)#interface range fa0/3

Switch(config-if)#no shutdown

Switch(config-if)#switchport mode access

Switch(config-if)# switchport access vlan 20

Hope it helps.

Regards

Dont forget to rate helpful posts.

Super Bronze

Re: ROUTER ON A STICK WITH 2 SWITCHES

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Not enough information to say which is "right".  Either could work, much depends on capabilities of switches and router, what you're trying to do, and perhaps physical topology issues.

Everything else being equal, the router connected to both switches might allow for better performance.

395
Views
0
Helpful
2
Replies