guys can someone p[lease explain basic switching to me plz.....just have few questions.....first of all suppose if i have a new cisco switch like 3560 or 70.....and i take it out from the box.....if i connect three pc's (same subnet) will they communicate with it....i guess they will be able....now the process i m more interested in to learn....how switch learns mac address......the pcs will broadcast traffic as soon as they will be connected or what i sthe method for switch to learn the mac addresses......secondly what is arp and in this scenario how arp will work.....??? thirdly pcs have ip address when pc want to send some thing to otehr pc how switch will transfer the data??? i believe mac address but how swoicth will know where to send the data.....guys i m v new plz help me out.....thanks for looking
Fundamental point one: A switch will by default forward any broadcasts, multicasts or packets to unknown mac addresses to all ports that are in a forwarding state, other than the port on which it was received.
That means when you just plug in three PCs, the first packet sent gets forwarded to both the other PCs.
Fundamental two: When a device transmits a packet via switch, the switch will look at the source MAC address in the packet and add it to the MAC table against the port it has been seen on. From then (subject to expiry by aging) any packets TO that MAC address will be sent only to that port.
ARP; Address resolution protocol - the mechanism by which devices discover the L2 address associated with an IP address. Basically a device will broadcast to ask "who has this IP address?". Being a broadcast (refer to fundamental 1) it gets forwarded by the switch to all active ports so all devices will see it. The device with that address will respond to identify itself. At this point, both devices have sent at least one packet, so both will be in the MAC table.
Device one will then send the data it wants to send, it will use the IP address *AND* the MAC address. The switch will look up the destination mac address in the table and as in this case both have already sent a packet it will find the address and just send the packet out of the port that device is attached to.
Terminology MAC table - the table of addresses (Midia Access Control). CAM - content addressable memory - the memory mechanism normally used to store the MAC table, so that lookups can be done very quickly.
Thanks for such a lovely reply....now my question is that if a new pc is attached to a switch by default switch will not learn it mac address unless someone tries to talk to it or it self that pc tries to talk to it??? is it right.....seconldy u said that arp is when pc broadcast it to all other??? when it requires a mac-address....nmy question is i thought switch broadcast it??? what procedure pc follows to decide that for this address i have to broadcast or unicast......does it have a cam table or routing table??? thanks again waiting for the kind response
Thanks for such a nice reply....now only one confussion is left........if there is a routing table and an arp table in pc.....u have explained the arp table......so why there is a routing table what is it use??? thanks again
Different layers. The ARP table is local L2 info associated with local L3 addresses.
The routing toaable is normally pretty sparse on a PC, often with only one real route in it. This tells the PC about L3 information, which router to use to get to various networks. Typically in a PC it las local information - which subnets are on which network interfaces, and a default route pointing at the defaullt gateway.
an ethernet switch works as a transparent bridge : it is not allowed to modify the user traffic frames.
MAC address learning works in this way:
ports that are enabled and in STP forwarding state will receive traffic from the attached device.
The switch builds its CAM MAC address table by using the following info:
source MAC address of frames
port on which the MAC is heard
Vlan: the vlan to which the port belongs
The first decision the switch needs to take is: the frame is destined to a MAC associated to another port ?
If the answer is yes the frame is forwarded out the port associated with the destination MAC.
IF the MAC destination is learned on the same port on which the frame has been received (this can happen if an hub is connected to the switch port and two PCs to the hub ports) the frame is just filtered=ignored because there is no need to forward it.
a Vlan is a group of switch ports that are in the same broadcast domain : a broadcast sent on one of the port is replicated out all the other ports in the same vlan.
The same happens for: multicast frames with a L2 multicast destination and for unknown unicast frames (until the switch learns out which port the MAC is located)
Factory defaults are : all ports in Vlan1 so yes the three Pcs will be able to communicate.
ARP table is used by a L3 device to map each ip address in the subnet with the corresponding MAC address.
In your case :
each PC has its own ARP table that can contain up to three entries: the other two PCs and the MAC address of SVI vlan1 of the switch if you configure it with an ip address in the same IP subnet.
the L2 switch uses MAC addresses for forwarding and this will work even if the SVI vlan1 is shutted down or configured in another subnet.
The ProblemEnter EVCsHow It Works (Ingress)How It Works
(Egress)Step-by-Step ExampleFinal Thoughts The ProblemOn traditional
switches whenever we have a trunk interface we use the VLAN tag to
demultiplex the VLANs. The switch needs to determine which MAC ...
The ProblemEnter EVCsHow It Works (Ingress)How It Works
(Egress)Step-by-Step ExampleFinal Thoughts Introduction: Netdr is a tool
available on a RSP720, Sup720 or Sup32 that allows one to capture
packets on the RP or SP inband. The netdr command can be use...
IntroductionOSPF, being a link-state protocol, allows for every router
in the network to know of every link and OSPF speaker in the entire
network. From this picture each router independently runs the Shortest
Path First (SPF) algorithm to determine the b...