11-01-2011 12:21 PM - edited 03-04-2019 02:07 PM
hi ..
Please help me with the explanation of how does a vlan map assoacisate to a ip subnet, what i mean is vlan is a group of ports/mac addresses, however how does ip segementation happen for example when i mean an assumption vlan-5 , i assume that there is an ip range for example 192.168.5.1 to 192.168.5.254 assoasciated with it.
Where does this assosciation happen , i mean where is it defined?
Is it on the switch database ?
Solved! Go to Solution.
11-01-2011 07:32 PM
Hi Rakesh,Rakesh Nair wrote:
hi ..
Please help me with the explanation of how does a vlan map assoacisate to a ip subnet, what i mean is vlan is a group of ports/mac addresses, however how does ip segementation happen for example when i mean an assumption vlan-5 , i assume that there is an ip range for example 192.168.5.1 to 192.168.5.254 assoasciated with it.
Where does this assosciation happen , i mean where is it defined?
Is it on the switch database ?
VLan is basically working at layer 2 and ip as you would know is at Layer 3.
To understand the concept more easily, its good to look at legacy layer 2 switches. if you have a simple layer 2 switch, you would not see any Ip address on that vlan at all (except for the management, which we'll ignore here as that is not related to what we are discussing).
So in that case, a simple vlan will not have any direct relation to the ip address except that the vlan will help to contraint the broadcast within that vlan itself. Not to confuse you, but you can have two PCs from different ip address subnet say 192.168.1.0/24 and 10.1.1.0/24.
Switch doesnt understand ip packets, its just looks at the frame. so to answer your question, there is no association of ip address in a switch mac address table.
As mentioned by Darren, you may have an ip addresses assigned to the SVI which happens on the Layer 3 switch. This basically allows the switch to allow routing from one vlan to another and also acts as default gateway to the clients sitting in that vlan. for eg you have a PC and you assign a static ip 192.168.1.10/24 and your gateway as 192.168.1.1. then you program the SVI on the layer 3 switch with an ip of 192.168.1.1. (the command syntax would be like mentioned by Darren above)
Hope this helps- Happy to explain more if required.!
11-01-2011 12:30 PM
There are some more articulate members of the community (Peter, Leo.....) that may weigh in.
starting with a port.
You assign it to a vlan. Which is defined in the the vlan database.
Then
For routing purposes, you create a swtiched virtual interface (SVI) which is the logical instance for routing that vlan, and all its members.
Consider,
Interface fastethernet 0/0
ip address 10.10.10.1/24 This is a physical, routed interface.
interface vlan110
ip address 10.10.10.2/24 this is an SVI (on a switch) ports defined in this vlan should be addresseed out of this subnet either by static assignment or DHCP
I'll leave it to my betters to tidy up my quick explination. Have at it gents!
11-01-2011 07:21 PM
Peter would give a splendid answer. Where are you?
11-01-2011 06:08 PM
Rakesh Nair wrote:
hi ..
Please help me with the explanation of how does a vlan map assoacisate to a ip subnet, what i mean is vlan is a group of ports/mac addresses, however how does ip segementation happen for example when i mean an assumption vlan-5 , i assume that there is an ip range for example 192.168.5.1 to 192.168.5.254 assoasciated with it.
Where does this assosciation happen , i mean where is it defined?
Is it on the switch database ?
A given VLAN doesn't automatically associate with an IP subnet.
A VLAN is a layer 2 instance - it is not aware of the IP protocol stack (which is layer 3).
If you want a given layer-2 VLAN to associate with a given layer-3 IP address subnet, you need to create a Switched Virtual Interface or SVI in the switch - and while this is supported for at least one VLAN on all Cisco switches, not all of them support multiple SVI's being created.
The way you associate an SVI to a given VLAN is to simply create it with the same VLAN number as your layer 2 VLAN. On a Cisco switch, you do soemthing like this
switch# configure terminal
switch(config)# vlan 100
switch(config-vlan)# name Workstations
switch(config-vlan)# exit
switch(config)# interface vlan100
switch(config-if)# description Workstation SVI
switch(config-if)# ip address 10.10.0.254 255.255.255.0
switch(config-if)# no shut
switch(config-if)# end
This will get you something like this
switch# show vlan
EQX-SY1-COR-SW1#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
100 workstations active
switch# show running-config interface vlan100
Building configuration...
Current configuration : 213 bytes
!
interface Vlan100
description Workstation SVI
ip address 10.10.0.254 255.255.255.0
end
You can then add individual ports into VLAN100 and have them talk to the 10.10.0.254 address. Note that the SVI interface VLAN100 will *not* come up and be active until there is an individual ACTIVE (I.E. plugged in and online) port in the layer 2 VLAN 100.
Hope this helps.
Cheers.
11-01-2011 07:32 PM
Hi Rakesh,Rakesh Nair wrote:
hi ..
Please help me with the explanation of how does a vlan map assoacisate to a ip subnet, what i mean is vlan is a group of ports/mac addresses, however how does ip segementation happen for example when i mean an assumption vlan-5 , i assume that there is an ip range for example 192.168.5.1 to 192.168.5.254 assoasciated with it.
Where does this assosciation happen , i mean where is it defined?
Is it on the switch database ?
VLan is basically working at layer 2 and ip as you would know is at Layer 3.
To understand the concept more easily, its good to look at legacy layer 2 switches. if you have a simple layer 2 switch, you would not see any Ip address on that vlan at all (except for the management, which we'll ignore here as that is not related to what we are discussing).
So in that case, a simple vlan will not have any direct relation to the ip address except that the vlan will help to contraint the broadcast within that vlan itself. Not to confuse you, but you can have two PCs from different ip address subnet say 192.168.1.0/24 and 10.1.1.0/24.
Switch doesnt understand ip packets, its just looks at the frame. so to answer your question, there is no association of ip address in a switch mac address table.
As mentioned by Darren, you may have an ip addresses assigned to the SVI which happens on the Layer 3 switch. This basically allows the switch to allow routing from one vlan to another and also acts as default gateway to the clients sitting in that vlan. for eg you have a PC and you assign a static ip 192.168.1.10/24 and your gateway as 192.168.1.1. then you program the SVI on the layer 3 switch with an ip of 192.168.1.1. (the command syntax would be like mentioned by Darren above)
Hope this helps- Happy to explain more if required.!
11-01-2011 07:58 PM
thanks , i have got it now.
Thanks to you all....:-)
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