03-31-2018 12:02 PM - edited 03-08-2019 02:28 PM
Hi All,
I have VLAN 10 created on a layer 2 switch (Switch 1 ).
And I created VLAN 20 on another layer 2 switch (Switch 2).
I understand there should be routing between these 2 VLANs in order for it to communicate.
I connected both this switches to a router on two different ports. (g0/0 and g0/1). and assigned the default gateway.
Since there is only one VLAN configured on each switch, is it necessary to create a trunk port ?
Please advise. Because when I tried creating switchport mode access from switch to router, I was not able to reach VLAN 20 from VLAN 10.
Thanks,
Fyaz
Solved! Go to Solution.
03-31-2018 12:31 PM
Hello,
No it's not required.
You need an ip adress on each router interface within the right subnet (ONE SUBNET/VLAN), the port on the switch must be set to the right vlan too (switchport access vlan X).
The benefits with a trunk link is that it is more flexible: if you want to add a vlan, you only need to add subinterface on the router, the vlan on the switch, set some access ports to this vlan and your done.
Regards, Guillaume
03-31-2018 12:31 PM
Hello,
No it's not required.
You need an ip adress on each router interface within the right subnet (ONE SUBNET/VLAN), the port on the switch must be set to the right vlan too (switchport access vlan X).
The benefits with a trunk link is that it is more flexible: if you want to add a vlan, you only need to add subinterface on the router, the vlan on the switch, set some access ports to this vlan and your done.
Regards, Guillaume
03-31-2018 12:53 PM
Hi Guillaume,
Great it helped me ! and thanks for the explanation about the trunk link.
So in the case of multiple vlans on a single switch, we create a trunk port and in the router level, we define the ip address for each vlans in dot1q command?
I would like to clarify, we are using dot1q to identify different vlans carried out by the trunk link?
Thanks,
Fyaz
03-31-2018 01:22 PM
03-31-2018 03:43 PM
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