Slide 5 Flashcards
What does that Data Link Layer does ?
The data link layer deals with data transfer between devices belonging to the same subnet.
It encapsulates datagrams into frames.
Data Link Layer Services
- Framing, Link access;
- Reliable delivery between adjacent nodes;
- Error detection;
- Error correction;
- Flow control;
- Half-duplex and full-duplex links.
MAC address
The MAC address uses (48 bits) and is like the “Cartão de cidadão” while the IP being the postal address.
- MAC flat address -> portability:
- I can move network interface card from one LAN to another.
- IP hierarchical address is NOT portable:
- IP address depends on the subnet to which the node is currently attached.
Broadcast address = FF-FF-FF-FF-FF-FF
How are MAC addresses allocated ?
The manufacturer buys a portion of MAC address space (to assure uniqueness);
The first 3 bytes are the organisation identifier while the last 3 are the NIC aka the individual identifier.
What is the ARP ?
The address resolution protocol (ARP), each node keeps an ARP table which contain the <IP address; MAC address; TTL> in this case TTL is a time (e.g. 20 minutes) and not a number of hops.
ARP is plug and play, it works without the intervention from net admin.
ARP: A wants to find B address
If B’s MAC is not in A’s ARP table, A needs to broadcast to FF:FF:FF:FF:FF:FF B’s IP address, when the broadcast reaches B, and it will reply with its own MAC address.
Error detection: Parity Bit
É uma forma antiga de detetar erros.
No fim da transmissão, era acrescentado um bit que dependia do número de bits totais da mensagem:
Se o número de bits fosse par, colocava-se um 0;
Se o número de bits fosse ímpar, colocava-se um 1.
Não é uma forma muito boa pois não deteta um número par de erros.
Bus Topology
Bus topology was popular in mid 1990s, all nodes where in the same collision domain so they could collide with each other.
Start Topology
Consists on an active switch in center and each host runs a separate protocol through the switch. The nodes do not collide with each other.
Ethernet Frame Structure
- Preamble;
- Addresses;
- Type;
- Data;
- CRC.
What is the preamble in Ethernet frames ?
The preamble are 7 bytes with pattern 10101010 followed by one byte with pattern 10101011, used to synchronise receiver and sender clock rates.
What are the addresses in Ethernet frames ?
With 6 bytes, if the frame arrives to the wrong MAC address it is discarded.
What is the Type in Ethernet frames ?
The type indicates the higher layer protocol, normally IP but could be Novell IPX or AppleTalk.
What is the data in Ethernet frames ?
Its the MTU (maximum transmission unit) ranging from 46 to 1500 bytes.
What is the CRC in Ethernet frames ?
It’s used to check if erros happened during the transmission.