cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6256
Views
0
Helpful
4
Replies

Router on stick with two switches

DJames
Level 1
Level 1

I understand the concept of vlans with a router on stick with one router and one switch but it is possible to connect to switches together and do vlans through the router?

1 Accepted Solution

Accepted Solutions

DJames@piedmontplastics.com

So you would need to create two sub interfaces on fa 0/1 and  configure the vlan1 interface?  Ex. fa0/1.1 172.16.2.1/24 and fa0/1.2 172.16.3.1/24 and vlan1 int 172.16.1.1/24. Configure the fa0/1 as the trunk interface as dot.1q.  Connect the fa0/1 to the switch A. Is the connection from the router the only trunk port? Or is the connection between the two switches also a trunk port?

David

In your diagram you only have vlan 2 on the second switch so you could actually configure the ports on that link to be in vlan 2 ie. "switchport access vlan 2". If you had both vlan 1 and 2 clients on second switch then you would need to make the link a trunk link.

If you only 2 vlans then you need either -

1) 2 subinterfaces on the router

or

2) 1 subinterface + the physical interface.

Note if vlan 1 is the native vlan on the trunk and it will be unless you change it then if you use option 1 you need to specify the native vlan eg.

int fa0/1.1

ip address x.x.x.x

encapsualtion dot1q 1 native

int fa0/1.2

ip address x.x.x.x

encapsulation dot1q 2

if you use option 2 then you don't eg.

int fa0/1              <-- if you use the physical it must match the native vlan of the trunk

ip address x.x.x.x

int fa0/1.2

ip address x.x.x.x

encapsulation dot1q 2

Jon

View solution in original post

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

David

Yes you can do this. In fact you can have as many switches as you like, as long as the vlans are allowed across the uplinks ie. usually this means trunk links then one router can route for vlans on many switches.

Jon

So you would need to create two sub interfaces on fa 0/1 and  configure the vlan1 interface?  Ex. fa0/1.1 172.16.2.1/24 and fa0/1.2 172.16.3.1/24 and vlan1 int 172.16.1.1/24. Configure the fa0/1 as the trunk interface as dot.1q.  Connect the fa0/1 to the switch A. Is the connection from the router the only trunk port? Or is the connection between the two switches also a trunk port?

DJames@piedmontplastics.com

So you would need to create two sub interfaces on fa 0/1 and  configure the vlan1 interface?  Ex. fa0/1.1 172.16.2.1/24 and fa0/1.2 172.16.3.1/24 and vlan1 int 172.16.1.1/24. Configure the fa0/1 as the trunk interface as dot.1q.  Connect the fa0/1 to the switch A. Is the connection from the router the only trunk port? Or is the connection between the two switches also a trunk port?

David

In your diagram you only have vlan 2 on the second switch so you could actually configure the ports on that link to be in vlan 2 ie. "switchport access vlan 2". If you had both vlan 1 and 2 clients on second switch then you would need to make the link a trunk link.

If you only 2 vlans then you need either -

1) 2 subinterfaces on the router

or

2) 1 subinterface + the physical interface.

Note if vlan 1 is the native vlan on the trunk and it will be unless you change it then if you use option 1 you need to specify the native vlan eg.

int fa0/1.1

ip address x.x.x.x

encapsualtion dot1q 1 native

int fa0/1.2

ip address x.x.x.x

encapsulation dot1q 2

if you use option 2 then you don't eg.

int fa0/1              <-- if you use the physical it must match the native vlan of the trunk

ip address x.x.x.x

int fa0/1.2

ip address x.x.x.x

encapsulation dot1q 2

Jon

Worked like a charm.  Was able to create two dhcp scopes on the router and pass out address to both devices on each vlan. Thanks for your help.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card