Networking datalink layer

From wikinotes

Sends network frames to MAC Addresses (media access control).
Occasionally abbreviated to the link layer.

Components

routers

Protocols

ethernet protocol most commonly used protocol for the datalink layer
address resolution protocol (ARP) discovers mac addrs for ipv4 addrs
neighbor discovery protocol (NDP) discovers mac addrs for ipv6 addrs

Terminology

routing schemes broadcast, unicast, multicast, ...
duplex If traffic can be sent/received at the same time
MTU the largest allowed frame-size (datalink) on a network.
ASN autonomous system number - assigned to some interior gateway protocols.

Tools

arp discovers mac addr belonging to ipv4 addr
nd discovers mac addr belonging to ipv6 addr
tcpdump

Configuration

vlan using one NIC/cord to share multiple connections to separate networks (ex: WAN/LAN on firewall)

Troubleshooting

Error Types

Datalink Errors
frame errors Frames received with an invalid checksum.
drops Frames that were discarded by the netwk iface. unexpected VLAN tags, ipv6 packets when iface is not configured for ipv6.
overruns Too much data received too quickly (before kernel can handle them). The buffer is full, so packets are dropped.
collisions On half-duplex netwk, when 2x sides of a connection are talking at the same time.

Finding Errors

netstat -i
TX-     ## packets sent
RX-     ## packets received


*-OK   ## correctly recceived frames
*-ERR  ## incorrect packets received
*-DRP  ## packets dropped at this interface
*-OVR  ## packets this interface was unable to receive