VLAN's basic working

Unanswered Question
Sep 2nd, 2008
User Badges:

gusy i m bit new and i cant get my head around to a v simple thing.....suppose we have three switches A , B , C. a server is connected to a C switch and the port is gig1/5 (layer 2 switch 4948). Switch B is another layer 2 switch and connected with switch C (trunk port all vlans allowed) now swicth A is a distribution switch and all Vlans interfaces are configured on that.......so my question is if a server wants to talk to another server which is in diff vlan on same swicth C. How the communication works. how come switch c knows where to send the traffic and how come switch B knows where to send the traffic. ideally the traffic shd hit swicth A and it will do the inter vlan routing........do we need any gateway on swicth C and B to reach A....i m v confused just like my question all i wann aknow is how this whole communication gonna work step by step.....now the strange thing why in sh mac-address table all vlans mac comes with ffff.ffff what does that mean and why its like that.....thanks guys in advance

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
merryllem Tue, 09/02/2008 - 17:10
User Badges:

No you don't need a gateway on sw B and C... but you do need a gateway (VLAN Interface) on sw A.

It would be helpful to if you uploaded sw configs if possible.

Jon Marshall Tue, 09/02/2008 - 20:29
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

An example may help.

server1 = vlan 10

server2 = vlan 11

both servers are on switch C. As you say there is a trunk port to switch A allowing all vlans and the L3 SVI's for vlan 10 & vlan 11 are on switch A ie.

Switch A

int vlan 10

ip address

int vlan 11

ip address

So server1 has it's default-gateway set & server2 has it's default-gateway set to

server1 wants to send a packet to server2. server1 compares it's network address and subnet mask so - from this it knows it's network

server1 then compares the destination address of (server2) with it's own subnet mask (note server1 only knows about it's own subnet mask) so - from this it knows server2's network is

So server1 knows that server2 is on a different subnet. So it looks in it's routing table and finds it's

default-gateway (servers generally only have default-gateways and not full routing tables)

server1 then arps out for it's default-gateway address. Switch A responds with the mac-address for

int vlan 10. server1 then sends the packet to switchA down the trunk link. The packet is carried with a vlan tag of 10 to switch A.

Switch A then inspects the destination IP address, sees it is for It arps out for server2's mac-address and when it gets a response it then routes the packet onto vlan 11 and sends it back down the trunk link with a vlan tag of 11. Server2 receieves and basically does what server1 did ie. compares network with subnet mask, sends to default-gateway etc.

Hope this makes sense



This Discussion