Solved

Usage of Layer2/Layer3 Switch

Posted on 2009-05-10
21
294 Views
Last Modified: 2012-05-06
As far as I know, Layer 2 switch can be split into Vlans and those Vlans will form different subnets, and the L2 switch can be trunked from one port to the router port to make all the vlans talk to each other.
Layer 3 switch, from what I have heard it works like a router, but how it does.??
If I have a LAyer 3 switch with 48 ports.Does that mean I can create Vlans and will be able to talk to each other without a need for  trunk to the router?

Thanks
0
Comment
Question by:jskfan
  • 10
  • 7
  • 4
21 Comments
 
LVL 23

Assisted Solution

by:that1guy15
that1guy15 earned 220 total points
Comment Utility
You are correct. A L3 switch is basically a switch and router combined. You can create VLANs on it and then also route between the VLANs without the use of a router.

An L3 switch is able to do this because it stores both a L2 mac address table (CAM table) and a L3 routing table (FIB table). You can also utilize L3 routing protocols on a L3 switch such as OSPF, EIGRP (cisco only), BGP and others.

0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 280 total points
Comment Utility
Be careful of the term Layer 3 switch. There aren't many layer 3 switches anymore. A true layer 3 switch is nothing more than a very fast router with only ethernet ports. The devices that most people mean when they say "Layer 3 Switch" is actually a multilayer switch. Capable of layer 2 and layer 3 operations.

The easiest way to think about a multilayer switch is to first start out with a regular layer 2 switch that has all the normal features of a layer 2 switch (VLANs, trunks, etherchannel, spanning-tree, etc.).

Then put a router inside of the switch. The connection between the router and the switch is over the internal backplane of the switch (usually measured in multi-gigabit speed). that can carry all VLANs.

For intra-VLAN traffic, the standard layer-2 switching operations are performed. But inter-VLAN traffic is sent to the (internal) router to handle.


0
 

Author Comment

by:jskfan
Comment Utility
is there any series number that Multi layer switch starts from, so that we can tell if it's multi layer switch or layer2 just by koojing at it from outside the box?
when you configure routing between vlans in layer, you need to specify which port is a trunk and which vlans can route traffic through that trunk.
 how do you do that in layer 3.?
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
>is there any series number that Multi layer switch starts from

No. In the Cisco product line, the layer 3 switches end with "L3". As in 3548G-L3.

> how do you do that in layer 3.?

Same way you do with a router. Remember, a layer three switch IS a router. Just really fast. :-)
0
 

Author Comment

by:jskfan
Comment Utility
in routers, if I remember you create a sub-interface for each vlan, is it the same in L3 switch?
L3 switch might have just ethernet ports, how do you do that?
if you don't mind please paste the code on how to configure Vlans to talk to each other.
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
>                Was this comment helpful?                         Yes               No                                 jskfan:             in routers, if I remember you create a sub-interface for each vlan, is it the same in L3 switch?

Yes.

>L3 switch might have just ethernet ports, how do you do that?
None of Cisco's Layer3 switches have ethernet ports. Only FastEthernet and GigabitEthernet ports.

>if you don't mind please paste the code on how to configure Vlans to talk to each other.
On a layer 3 switch? Just like you do on a router.

int f0/1.1
 encap dot1q 1
 ip address x.x.x.x y.y.y.y
int f0/1.2
 encap dot1q 2
 ip address x.x.x.x y.y.y.y

etc.
0
 

Author Comment

by:jskfan
Comment Utility
<<ip address x.x.x.x y.y.y.y>>>

is it gonna be the same as the IP address configured on  the VLAN interface?
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
What VLAN interface?
0
 

Author Comment

by:jskfan
Comment Utility
on the switch you are going to create a VLAN (VLAN10) and add tghe rnage of ports to it, then assign it an IP address. (10.10.10.10)
in the router subinterface you are going to create a trunk port and give it the same address as 10.10.10.10 ???
if you don't mind try to paste the code on ho wto create vlans on the switch, assign ithem IPs and how to trunk them to a router subinterface.
that's a lot but I appreciate it.
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
On a layer 2 switch you don't assign IP addresses to VLANs. It's a layer TWO switch. The only IP address on a layer 2 switch is for management.

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:jskfan
Comment Utility
canyou just drop the code here on ho wto create vlans on a switch and how to trunk them to the router?
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
vlan 10
vlan 20
vlan 30
int f0/1
 switchport trunk encap dot1q
 switchport mode trunk

0
 

Author Comment

by:jskfan
Comment Utility
I know that it takes time to type the whole configuration.
whenever you get a chance can you do it? no rush..
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
No.

To create a full config for your switch would require more information. The topology of the network (what devices are connected to what ports, IP addresses, etc., etc., etc.,).

Way beyond the scope this question and format.
0
 

Author Comment

by:jskfan
Comment Utility
you can just set up an example:
Switch1 has 24 ports we nee 3 vlans of 5 ports each, to talk to each other. That's it.
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
What model switch?
What version IOS?
What are the VLANs (numbers)?
What ports will be in what VLANs?
What port will be connected to the router?
What model router?
What version IOS?
What port will be connected to the switch?
Will the router be connected to any other devices?

0
 
LVL 23

Expert Comment

by:that1guy15
Comment Utility
Oh a whole lot going on here!! Lets take a step back for a second and see if we can get this solved.

Creating VLANs on a L3 switch is done the exact same way as an L2 switch. In fact VLANs and ports on an L3 switch only run at L2 until you configure them to run at layer three.

donjohnston was correct on how to create the VLANs and set them up as trunk ports. But on a L3 switch you do not need to create sub-interfaces and trunk VLANs. All you need to do is set the VLAN up with an IP address. This creates a SVI (switched virtual interface) for the vlan that runs at layer three and allows traffic to flow between VLANs. The IP address should reside in the same subnet as the VLAN and all devices in the VLAN should point to that IP for a gateway. That is all that needs to be done to route VLANs on a L3 switch.

Oh forgot you must first enable IP routing :)

Here is a sample of what it would look like with two VLANs

vlan 100
vlan 200 <---creates the vlans
interface range f0/1 - 5
switchport mode access
switchport access vlan 100 <---assignees port 1 - 5 to vlan 100

interface range f0/6 - 12
switchport mode access
switchport access vlan 200 <---assigness port 6 - 12 to vlan 200

ip routing <---enables IP routing

int vlan 100
no switchport <---enables L3 capabilities
ip address 10.0.0.1 <--this will be VLAN 100s default gateway

int vlan 200
no switchport
ip address 10.0.100.1


Traffic will now be able to flow between vlan 100 and 200.
0
 
LVL 23

Expert Comment

by:that1guy15
Comment Utility
woops correction:

int vlan 100
no switchport <---enables L3 capabilities
ip address 10.0.0.1 255.255.255.0<--this will be VLAN 100s default gateway

int vlan 200
no switchport
ip address 10.0.100.1 255.255.255.0
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
>Creating VLANs on a L3 switch is done the exact same way as an L2 switch.

You cannot create VLANs on a layer-3 switch. You can only do this on a layer-2 and a multi-layer switch.

0
 
LVL 23

Expert Comment

by:that1guy15
Comment Utility
donjohnston:

I think we are using two different terms for the exact same thing. When I say L3 switch i mean a multi-layer switch such as a 3550 or 3560.

0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
> When I say L3 switch i mean a multi-layer switch such as a 3550 or 3560.

And that can create some confusion.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

New Server 172.16.200.2  was moved from behind Router R2 f0/1 to behind router R1 int f/01 and has now address 172.16.100.2. But we want users still to be able to connected to it by old IP. How to do it ? We can used destination NAT (DNAT).  In DNAT…
The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now