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

Setting up Two Vlans on Two Switches

Zach1234
Level 1
Level 1

I have two Cisco switches and was told to add VLAN 100 for 192.168.70.0/24, then to add VLAN 200 for 192.168.45.0/24. My questions are am i supposed configure trunking to carry the traffic between those two VLANs. Does it matter what interfaces I use. I don't get if I'm supposed to add vlan 100 to one switch and vlan 200 to the other or if both vlans are added to each switch.  I need to test how the switches handle separating the traffic that was the main point of doing this.

 

2 Accepted Solutions

Accepted Solutions

Muhammad Awais Khan
Cisco Employee
Cisco Employee

Hi Billy,

 

What i understand from your question that you want to configure Vlan 100 & 200 on your two switches. Which means, some devices will connect to Vlan 100 and some on Vlan 200 based on your configuration of these switches.

 

How about the default Layer 3 gateway for these two Vlans, will it be on any other device or on one of the 2 switches ?

 

if in this design, if you use one of the switch to define Layer 3 SVI's then VLANs can talke to each other with the help of this.

 

on Layer 2 level, both VLAN's cannot communicate with each other without reaching the layer 3 default gateway.Usually, if you dont want your VLAN's to communicate with each other, then you can either define VLAN ACL on your Layer 3 switch or use firewall as your layer 3 gateway for the Vlans

 

Regarding your question on trunking, you can use any of ther interfaces for trunking, you need to cofigure as trunk. By default all the configured VLANs on the switch will be allowed on the trunk

Please elaborate more what you want to acheive ?

 

 

** Please mark above as helpful or accepted as solution if it helped you

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame

Assuming we want both VLANs on both switches, there are several ways to do this, but we'll assume the typical/usual approach.

First, you either need to define the two VLANs on both switches (or use VTP - which we'll ignore for now).

Once those VLANs are defined on both switches, you'll need to interconnect them across both switches.  The most common way to do this is use one port, on both switches, defined as a trunk port (which allows multiple VLANs to transverse it).

As to assigning networks to those VLANs, for that you need L3, whereas a "pure" switch is just L2.  If your two switches are L3 switches, we can define a SVI (switch virtual interface) for each network.  The two SVIs, assuming both switches are L3 switches, could be defined on either switch or just one on each switch (which is the better approach has considerations - which we'll also ignore for now).

BTW, once you're VLANs are defined, by default, a trunk port will allow all VLANs across it, and on Cisco switches, also by default, the default VLAN, VLAN 1, is what all access ports are defined to use.  I.e.  You'll normally want to define some access ports to both of your newly defined VLANs.  As both VLANs are defined on each switch, either switch can have ports in one of your two VLANs.

View solution in original post

4 Replies 4

Muhammad Awais Khan
Cisco Employee
Cisco Employee

Hi Billy,

 

What i understand from your question that you want to configure Vlan 100 & 200 on your two switches. Which means, some devices will connect to Vlan 100 and some on Vlan 200 based on your configuration of these switches.

 

How about the default Layer 3 gateway for these two Vlans, will it be on any other device or on one of the 2 switches ?

 

if in this design, if you use one of the switch to define Layer 3 SVI's then VLANs can talke to each other with the help of this.

 

on Layer 2 level, both VLAN's cannot communicate with each other without reaching the layer 3 default gateway.Usually, if you dont want your VLAN's to communicate with each other, then you can either define VLAN ACL on your Layer 3 switch or use firewall as your layer 3 gateway for the Vlans

 

Regarding your question on trunking, you can use any of ther interfaces for trunking, you need to cofigure as trunk. By default all the configured VLANs on the switch will be allowed on the trunk

Please elaborate more what you want to acheive ?

 

 

** Please mark above as helpful or accepted as solution if it helped you

balaji.bandi
Hall of Fame
Hall of Fame

You given task to add to exiting network or new network.

 

make a small diagram for us to understand how these switches connected.

 

If adding only VLAN, if Layer 3 interface already exits in the network then - just allow new VLAN in the trunk towards uplink, and setup the each port access port respected VLAN.

 

if you like to add VLAN Interface on the switches.

you need to add interface vlan 100 and 200 (with the respected IP address to that Layer 3 SVI)

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Joseph W. Doherty
Hall of Fame
Hall of Fame

Assuming we want both VLANs on both switches, there are several ways to do this, but we'll assume the typical/usual approach.

First, you either need to define the two VLANs on both switches (or use VTP - which we'll ignore for now).

Once those VLANs are defined on both switches, you'll need to interconnect them across both switches.  The most common way to do this is use one port, on both switches, defined as a trunk port (which allows multiple VLANs to transverse it).

As to assigning networks to those VLANs, for that you need L3, whereas a "pure" switch is just L2.  If your two switches are L3 switches, we can define a SVI (switch virtual interface) for each network.  The two SVIs, assuming both switches are L3 switches, could be defined on either switch or just one on each switch (which is the better approach has considerations - which we'll also ignore for now).

BTW, once you're VLANs are defined, by default, a trunk port will allow all VLANs across it, and on Cisco switches, also by default, the default VLAN, VLAN 1, is what all access ports are defined to use.  I.e.  You'll normally want to define some access ports to both of your newly defined VLANs.  As both VLANs are defined on each switch, either switch can have ports in one of your two VLANs.

Oh, I forgot to mention, if you have L3 switches, you can also define a SVI for each VLAN on both switches.  This would normally be done if you were going to use a FHRP (first hop redudancy protocol) on the switches like HSRP, GLBP or VRRP).

Review Cisco Networking products for a $25 gift card