Ch-2 Switching Flashcards
Switching?
Until and unless we have full mesh connections, every endpoint may not communicate with every other endpoint. That’s why we have Switching.
Ethernet- 802.3
- It’s a Layer 2 protocol used for Switching.
- 99% of networks use this
- Invented by IEEE
Ethernet header:
Ethernet header, packet, trailer
- Header: preamble, Start frame demiliter, dest MAC address, source MAC address, type
Trailer: FCS (Frame check Sequence)
Preamble, SFD
- Preamble: 7 bytes
- SFD: 1 byte
- used for synchronizing the transmitter and receivers.
MAC addresses:
- Dest and source MAC addresses indicate devices sending and receving the frame.
- 6 bytes (6 * 8 = 48 bits)
- also called physical address or burnt in address
MAC address is 6 bytes
- it is represented in Hexadecimal
- organizational unique identifier (OUI) : first 3 bytes ( should be able to identify who the manufacturer is)
Type field : 2 bytes
- will indicate what higher layer packet is there.
- if we’re using ipv4/ipv6
FCS :4 bytes
- it’s like a seal when one endpoint is sending data to another endpoint
Flooding:
As soon as the switch receives a frame, without the destination address - the switch doesn’t know where to send the frame. Initially MAC address table is empty.
- since it doesn’t know where to send, it uses something called Flooding (sending the frame to all other interfaces except the interface of which it received).
Forwarding:
- As soon as the frame is received on the switch, the switch learns it’s dest mac address and adds it to the MAC address table.
- the switch then forwards the frame to it’s destination.
Broadcasting:
When A wants to send frame to all the other endpoints, it will broadcast.
- dest MAC address: FF:FF:FF:FF:FF:FF
- Multicast (One to Many)
What is Switching Logic ?
As frame is received on the switch
- Look at Dest MAC, if it’s known (present in MAT) Forward it.
- if it’s unknown, Flood
- Look at source MAC, if it’s not in MAT, add it to the table.