cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1977
Views
0
Helpful
10
Replies

Did the switch receives Packets or Frames from connected PC.

Devansh
Level 1
Level 1

I knew, it is basic question. However i got mixed responses from my colleagues who is supporting Net Ops.

 

Did the switch get frames or packets from connected switch.

 

As per OSI model, Physical layer will be at the bottom, So when we sending a packet from one router to another router, we have cable connecting. which means even we can have Physical layer while sending data between two network layer 3 device?

1 Accepted Solution

Accepted Solutions

No, frames contain ip address also , but the switch makes forwarding decision based on  MAC address.

Switch does not send a ARP request,

first the source device sends a ARP request (broadcast) to destination, if the device got the ARP reply from destination host, it will add that MAC address in layer 2 header field and then frame will be send to switch. As Martin said ,the switch takes a decision based on MAC/CAM table.hope you understand.

 

View solution in original post

10 Replies 10

sivam siva
Level 3
Level 3

Frames is the answer for your question. 

When a data send in Layer 2 environment (commonly LAN ) called as a Frames (which include the destination and source MAC in the layer 2 header field).

When it is crossed the Router ( commonly WAN ) called as a packet ( normally when a pocket populated in the WAN there will be a HDLC or PPP is the layer 2 encapsulation instead of ARP ).

simply,

Frames are transmitted  in layer 2 environment by using MAC address,

packets are transmitted   in layer 3 environment by using IP address.

when the packets are transmitted  from one router to another router ,it operates at layer 3,2,1 -1,2,3.

Martin Carr
Level 4
Level 4

Sivam is correct, IP is layer 3 (Network). This is a packet, before IP headers are added it is a frame.

Data is encapsulated from the bottom up and decapsulated (vice versa) when a client receives it.

Without Layer 1 (Physical) you would not have anything, as there would be no medium for the above to happen, hence why knowing the OSI model is fundamental knowledge in networking.

 

Martin 

If we are getting frames at switch port, how do switch get know the switch to send ARP request based on IP address to all of the Membersin VLAN.( Why Because frame does not get any IP address).

 

 

 

 

Switches (by definition) operate at Layer 2, when a node sends a frame the source and destination MAC addresses are within it's headers.

The source is recorded in the CAM table along with details of the interface and VLAN. 

If the destination MAC address is not known, it will flood the frame out of all interfaces (except the one it was received on) when the node replies it's MAC address will be recorded. At this point the switch is operating as a hub (which operates at L1).

Thereafter this process will never happen again (unless it ages out) or the table is cleared etc.

A router filters at L3, i.e. IP addresses.

 

Martin 

No, frames contain ip address also , but the switch makes forwarding decision based on  MAC address.

Switch does not send a ARP request,

first the source device sends a ARP request (broadcast) to destination, if the device got the ARP reply from destination host, it will add that MAC address in layer 2 header field and then frame will be send to switch. As Martin said ,the switch takes a decision based on MAC/CAM table.hope you understand.

 

Sorry to bother you. When frames containing the IP address, May I know what is the difference between packets and frames. I believe switch sends ARP packets ( Not ARP frames ) to all destinations in VLAN with destination MAC as FF::FF::FF::FF::FF::FF::FF asking who is having the destination IP address. Which means that PC is sending IP address ( i am not sure whether this will send in frames or in packets ). As per my understanding frames should not contains ip address as this will be encapsulated at network layer.

Can i have link where i can check the Layer 2 headers? and also please let us know the packet flow when destination is not within VLAN.

As stated, the switch does not perform ARP broadcasts, this is done by the client to resolve the logical IP address to a physical address, that being a MAC address, in the case of Ethernet.

 

All F's MAC is received by every device in the broadcast domain. For example, if node A did not know the MAC address for B it would send an ARP request, if the switch did not know the destination address, it would flood it out of every port (apart from the one it came in on) as I described earlier.

 

Routing, which is required to communicate with another VLAN is something different. A router uses L3 addresses (IP) to make it's forwarding decision. Here MAC headers are changed.

Here goes... the node knows that the destination address is not on it's own network and uses the d/g MAC address as the destination. The router receives the packet and rewrites the source MAC to itself and the destination MAC will be that of the egress interface. For each hop the process continues, when the packet arrives at the last hop, it will rewrite the source address to that of itself and the destination to that of the host.

 

Martin

 

 

 

Just to clarify so as not to confuse the OP. 

 

The destination mac is not the egress interface of the router, that is the source mac. 

 

The destination mac is either the next hop device or the destination device. 

 

Jon

Thanks Jon :)

 

Martin

Hi

Don't confuse frames with ARP packet,in tcp/ip world every message send by protocol is generally called as a packet.

Without ip address in ARP, how the source device can request and get reply from destination device ?!.

 

A packet refers to the encapsulated unit created at the nework layer of the OSI model. One of the most commonly encountered packets is the IP packet, which contains control information such as the source and destination IP addresses, differentiated services flags and so on. Thus, a packet typically contains logical address information.

A frame, on the other hand, refers to the encapsulated unit created at the data link layer. One of the most commonly encountered frames is the Ethernet frame, which contains information such as source and destination MAC addresses etc. Thus a frame typically contains physical address information.

 

Use this link to know about how Data goes from one VLAN to another VLAN 

https://youtu.be/Z7WM7wFTWrs

Review Cisco Networking products for a $25 gift card