Divided into two sublayers:
LLC - logical link control as defined by 802.
2MAC media access control as defined by 802.3
Ethernet at layer 1
Defines:-signals-bit streams that travel on the media-physical components that put signals on media-various topologies
Ethernet at layer 2
addresses:-provides interface to upper layer protocols-provides an address to identify devices-uses frames to organize bits into meaningful groups-controls transmission from data sources
LLC sublayer
Takes the network layer protocol data unit, usually IPv4 packet, and adds control information to deliver the packet to the destination node. Layer 2 communicates with the upper layers through functions of LLCsoftware side of Ethernet
MAC sublayer
-data encapsulation-MAC
Data encpsulation of MAC sublayer
primary functions:-frame delimiting-addressing-error detection
Ethernet success
because of :simplicity and ease of maintenenceability to incorporate new techreliabilitylow cost
MAC Address Structure
-contains an address assigned to an NIC that must use the vendor's assigned OUI (organizational unique identifier) as the first 3 bytes-addresses with the same OUI must be assigned a unique value to identify that particular deviceMAC address is loaded into RAM at computer start`
CSMA/CD process
-listen before sending-detecting a collision-jam signal and random backoffif collision occurs then transmitting devices continue transmitting for a time so the jam signal is created to notify other devices that there was a collision. then the backoff algorithm assigns each device to stop transmitting a random amount of time
Ethernet timing
Latency - the time that it takes for electrical signal to travel down a cable, increased as more hubs/repeaters increases.
Increased latency = increased chance for collisions.Timing and synchronization - 10Mbps speeds and lower are asynchronous, meaning that the receiving device will use 8 bytes of timing information to synchronize the receive circuit to the incoming data and then discard the 8 bytes. 100mbps and faster are synchronous, meaning timing information in the header is not required but preamble and start frame delimiter fields are still present.Bit time10Mbps - 100ns100Mbps - 10ns1Gbps - 1ns10Gbps - .
01nsSlot time- important for half duplex ethernet and is used to establish:-minimum size of an ethernet frame-maximum size of a network's segment10Mbps - 512 bit times100Mbps - 512 bit times1Gbps - 4096 bit times10Gbps - not supported
interframe spacing & backoff timing
interframe spacing - time measured from the last bit of the FCS field of one frame to the first bit of the preamble of the next frame. This is the delay after a successful frame transmissionBackoff timing - After a collision all devices allow the cable to become idle, the devices whose transmissions collided must wait an additional and potentially progressively longer period of time before attemping to retransmit the collided frame. The waiting period is intentionally random so that two stations dont delay for the same amount of time which would mean more collisions.
Switches vs hubs
Switchesa re better. used because:-dedicated bandwidth to each port-collision free environment-full duplex operation
Switches
Each host connected to a switch port has a MAC address assigned to a specific port number which identifies that device. switches use five basic operations:learningagingfloodingselective forwardingfilteringLearning:as a frame enters a switch, it examines the source MAC address.
to see if there is an entry in its table. If there is no entry, the switch creates a new entry in the MAC table using the source MAC address and pairs the address with the port on which it arrived. It can now forward frames to this nodeAgingThe entries acquired by the MAC table are time stamped. After an entry is made, a countdown occurs using the timestamp as the beginning value.
When the value reaches 0- the entry in the table is aged out and removed from the MAC table. The timer can be reset when the switch receives a frame from that node on the same port. FloodingIf the switch doesn't have a MAC address in its table that matches the destination address then the switch floods the frame. This means it sends a frame to all ports except the one it arrived on.
Selective ForwardingThe process of examining the destination MAC address of a frame and forwarding to the appropriate port. This is the main function of a switch.FilteringIn some cases a frame isn't forward. One use has already been dscribed: a switch doesn't forward a frame to the same port on which it arrived. A switch will also drop a corrupt frame.
If it fails the CRC check the frame is dropped. Additional reasons are for security such as blocking frames to or from selective MAC addresses or specific ports.
Address Resolution Protocol ARP
Two basic functions:Resolving IPv4 addresses to MAC addressesMaintaining a cache of mappingAdding addresses:Two ways: monitor traffic that occurs on the local network segment. As a node receives frames from the media it records the source IP and MAC addresses as a mapping in the ARP table.broadcast an ARP request. sends a layer 2 broadcast to all devices on the LAn.
It contains an ARP request packet with the IPv4 address of the destination host. The node receiving the frame that identifies the IP address as its own responds by sending an ARP reply packet back as a unicast frame.Mapping destination outside LAnFrames do not traverse a route into another network so a packet is created to be sent to the gateway as shown in the IPv4 configuration settings.