< All CompTIA Network+ Notes

doctori | CompTIA Network+ | Module 1.4

By: doctorX | Related Course: CompTIA Network+ | Published: August 23, 2016 | Modified: August 23, 2016
Join Cybrary

NotepadIs the MAC address contained in the data packets?

1. Yes, switches and hubs are wired devices. They act as an intermediate to connect one computer with another. But when an access point is connected to a hub, switch, or a wired router, it sends wireless signals.
(An Access point provides wireless access to a wired Ethernet network.)
2. Recall that switch is a layer 2 device, i.e. it works at data link layer or has MAC address. Also recall that switch learns the MAC address by learning and listening from where the packets are coming from and from which port.
Computer A has MAC address (real MAC address are of 48 bits) of 1111 connected to port 1 and computer B has MAC address 2222 connected to port 2.
computer A wants to send data to computer B. Switch receives the packets from port 1 with MAC 1111 with destination MAC address 2222. Switch checks its MAC table whether MAC 1111 is listed yet. If not, then it adds an entry of MAC 1111 – port 1.
Then switch again looks its MAC table whether MAC 2222 is listed or not to see on which port is it on. If it does not find it, the packets are sent to every port the switch is connected with except the originating port.
The switch now know on what port computer A is on, i.e. on port 1.
So if switch receives traffic for 1111 then it knows that it has to be sent to port 1 (computer A). When the MAC 2222 (from port 2) replies to 1111, switch send the packets out only to port 1 and switch will add an entry of MAC 2222 – port 2, to its MAC table.
Eventually, switch will learn on what ports are MAC address on.

Another question that may turn up to your mind could be,
How does one computer knows another computers MAC address from IP address?
All network devices maintain an ARP (Address Resolution Protocol) table. ARP maps MAC addresses to IP addresses. Switch works no differently. It uses ARP to build network diagrams, to know what MAC address has been assigned what IP address. ARP is used to transmit information between devices in the same network. Another way for transmitting information is by IP address, when transmitting between different networks. So the MAC address does not need to be included in the IP header in the latter case.

IPv4 header format:

|Version| IHL |Type of Service| Total Length |
| Identification |Flags| Fragment Offset |
| Time to Live | Protocol | Header Checksum |
| Source Address |
| Destination Address |

< All CompTIA Network+ Notes
Join Cybrary

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play

Support Cybrary

Donate Here to Get This Month's Donor Badge

Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?