Module 5
- IPV4 Addresses
o Begin as binary and converted to decimal
- Binary
o Each address contains a string of 32 bits
§ Divided into 4 sections called octets
§ Each octet contains 8 bits
· 1 byte
· 4 bits
- IPV6 Addresses & Hexadecimal
o 8 Hextets
§ Or 8*16 bits
o Hexadecimal
§ Starts counting after the 10 value, 11 is A, and 12 is B, etc.
§ Each “letter” is 4 bits.
Data Link Layer (Layer 2 of the OSI model)
- Prepares network data for the physical network.
o Includes the Network Interface Card (NIC)
- Accepts Layer 3 Packets (IPv4 or IPv6) and encapsulates them into Layer 2 frames
- Performs error detection and rejects corrupted frames
Main Task
1. Adds layer 2 ethernet destination
2. Adds source NIC information
3. Converts into a packet supported by the physical layer
Data Link Sublayers
- IEEE 802 LAN/MAN
- Logical Link Control (LLC)
o Talks to networking software at upper layers
o Talks to device hardware at lower layers
o Places layer information (for which protocol is used) in frame
o Allows multiple protocols like IPv4 and IPv6 to use the same interface and media
- Media Access Control (MAC)
o Implements this sublayer in hardware
o Data encapsulation
§ Frame delimiting
· Identifies fields within a frame
· Provide synchronization between transmitting and receiving nodes
§ Addressing
· Source and destination addressing for the Layer 2 frame
§ Error Detection
o Media access control
§ Allows multiple devices to communicate over a shared medium (half-duplex)
· Full-duplex do not require access control
o Data link layer addressing
o Controls the NIC and other hardware
o Responsible for sending and receiving data on the LAN/MAN medium
- Router Functions
- At each hop along the path, a router performs the following Layer 2 functions:
o Accepts a frame from a medium
o De-encapsulates the frame
o Re-encapsulates the packet into a new frame
o Forwards the new frame appropriate to the medium of that segment of the physical network
§ LAN packets converted to WAN packets, etc
- Engineering Organizations
o IEEE
o ANSI
o ITU
o ISO
- Network Topologies
o Hub and Spoke (similar to star)
§
§ Single point of failure
o Mesh
§
§ More Expensive
§ High availability
o Point to Point WAN (PPP)
§ 2 nodes placed on the edge of the network
§ Simple, nodes don’t have to make any determination about an incoming frame being for it or not.
- Legacy LAN Topologies
- Bus
o All end systems are chained to each other and terminated in some form on each end. Just like a metal chain.
- Ring
o End systems are connected to their respective neighbor forming a ring.
o Does not have to be terminated
- Duplexes
o Half-Duplex
§ Both devices can transmit and receive on the media, but not simultaneously. (restricts)
§ Only allows one device to send or receive at a time on a shared medium (like an ethernet hub).
o Full-Duplex
§ Both devices transmit and receive on the media at the same time.
- Access Control Methods
o Multiaccess Networks
§ Network that can have 2 or more end devices attempting to access the network at the same time.
· They usually have access rules.
§ Ex: LAN, WLAN.
o Contention-based access
§ All nodes operating in half-duplex
§ Competing for the use of a medium
§ A process takes place for multiple devices trying to access at once
· Carrier Sense Multiple Access w/ Collision Detection (CSMA/CD) used on legacy bus-topology Ethernet LANs.
o PC1 checks if any device is transmitting on the medium. If no signal is detected, it proceeds.
o Ethernet hub receives and sends the frame. (multiport repeater)
§ If another device wants to transmit, but is currently receiving the mass sent frame, it must wait.
o The frame has a destination data link address for PC3, so only that device will accept and copy in the entire frame.
o If a collision is detected (from a higher signal amplitude than normal by the nic), both data would be corrupted and have to be resent.
· Carrier Sense Multiple Access w/ Collision Avoidance (CSMA/CA) used on wireless LANs.
o Does not detect collisions but attempts to avoid them by waiting before transmitting.
o All other devices receive this information and know how long the medium will be unavailable.
o One the receiver receives the data, it returns an acknowledgement.
o Do NOT scale well under heavy medium use.
§
o Controlled Access
§ Each node has its own time to use the medium
§ Inefficient because devices have to wait their turn
· Legacy Token Ring
·
· Legacy ARCNET
- Data Link Frame
- Goals
o Prepares the encapsulated data (ip packet) for transport by encapsulating it with a header and a trailer to create a frame.
o Responsible for NIC-to-NIC communication within the same network.
- Frame Fields
o Breaks the stream into decipherable groupings
o Control information inserted in the header
o Frame fields include the following:
§ Frame start and stop indicator flags – Used to identify the edges of the frame
§ Addressing – Indicates source and destination
§ Type – Identifies the L3 protocol
§ Control – Special control flow services such as QoS.
§ Data – Contains the frame payload? (packet header, segment header, and the actual data)
§ Error Detection – Included after the data to form the trailer.
· Transmitting node creates a logical summary of the contents of the frame (cyclic redundancy check: CRC)
· CRC is placed in the frame check sequence (FCS) to represent the contents of the frame.
· In the ethernet trailer, FCS provides a method for the receiving node to determine whether the frame experienced transmission errors.
- Layer 2 Addresses
o Data link layer provides addressing used in transporting the frame.
o Device addresses at this layer are referred to as physical addresses
§ Contained within the frame header
§ Specifies the frame destination node
§ Physical address stays the same if you move networks
o At each point along the way to the destination, the packet is encapsulated into a new data link frame.
§ Contains the source data link address of the NIC sender
§ Contains destination data link address of NIC receiver
§ No meaning beyond the local network
· If you must pass onto another network segment, an intermediary device is necessary.
- LAN and WAN Frames
o All OSI Layer 2 (data link) protocols work with IP at OSI Layer 3 (Network)
o Layer 2 protocol used depends.
§ Determined by technology, size, number of hosts, and services.
o Each protocol performs media access control
§ Number of different network devices can act as nodes that operate at the data link layer when implementing these protocols.
§ Including NICs, Interfaces on routers, and switches.
o Examples:
§ Ethernet
§ 802.11 Wireless
§ Point-to-Point Protocol (PPP)
§ High-Level Data Link Control (HDLC)
§ Frame Relay
Ethernet Switching – Module 7
- Ethernet Encapsulation
o One of 2 LAN technologies being used today (other being WLANs)
o Ethernet operates in the data link layer (2) and the physical layer (1). It is defined by them and their protocols.
o Ethernet is a family of networking technologies defined by the IEEE 802.2 & 802.3
- Ethernet uses the LLC and MAC sublayers of the data link layer (2) to operate.
o LLC (Logical Link Control) recap
§ An IEEE 802.2 sublayer
§ Communicates between the networking software and the device hardware.
§ Places which network layer protocol is being used into the frame.
§ Allows IPv4 and IPv6 to use the same network interface and media (by recognizing the protocol and encapsulating the frame)
o MAC (media access control) recap
§ IEEE 802.3, 802.11, or 802.15
§ Implemented in hardware
§ Responsible for encapsulation
· Structure of the Ethernet frame
· Ethernet addresses (MAC source and destination)
· Ethernet error detection (FCS trailer)
§ Provides data link layer addressing
- Ethernet Frame Fields
o Minimum size is 64 bytes
§ Any frame less than this is considered a “collision fragment” or “runt frame” and is automatically discarded.
o Expected max is 1518 bytes
§ Includes all bytes from destination MAC address through the FCS field.
§ Frames larger than 1500 bytes of data are considered “jumbo” or “baby giant frames.”
o Any frame larger/smaller than max/min are automatically discarded. (likely the result of collisions or others)
- Preamble and Start Frame Delimiter (SFD)
o Preamble (7 bytes) and SFD (or Start of Frame) fields are used for synchronization of the receiving/sending devices.
o Used to get the attention of the receiving nodes. (or tells them to get ready)
- Destination MAC Address
o 6-byte field
o Identifier for the intended recipient
o Address in the frame is compared to the MAC address of the device
o Can be unicast, multicast, or broadcast address
- Source MAC address
o 6-byte
o Identifies the originating NIC or interface
- Type/Length (aka EtherType, Type, or Length)
o 2-byte
o Identifies upper layer protocol being encapsulated in the Ethernet frame
o Common values are hexadecimal for IPv4, IPv6, and ARP
- Data Field
o 46-1500 bytes
o Contains the encapsulated data from higher layers (commonly an IPv4 packet)
o Must all be atleast 64 bytes long, padding is added if not
- Frame Check Sequence
o 4 bytes
o Uses cyclic redundancy check (CRC)
o Sending device includes the results of original CRC in the FCS field
o Receiving device receives the frame and generates a CRC
o Basically hashing
- MAC Addresses Specifics
o Each vendor must register with the IEEE to obtain an unique 6 hexadecimal code called the OUI (organizationally unique identifier)
o When a vendor assigns a MAC address to a device, it uses its assigned OUI as the first 6 hexadecimal digits, and a unique value in the last 6 digits.
§ Responsibility of the vendor to ensure that none of its devices be assigned the same MAC address.
§ MAC addresses duplicates still exist
§ Sometimes it’s referred to as BIA (burned in address) because it is encoded into the ROM permanently.
· However, you can use software to change the MAC address
- Frame Processing
o When a device forwards a message to an ethernet network, the ethernet header includes these:
§ Source MAC address
§ Destination MAC address
o When the frame is forwarded, the frame looks like this
§ Destination address
§ Source address
§ Encapsulated Data
o All the NICs on the network receive the packet, and if their MAC address match, it accepts it. Otherwise, it does not.
- Unicast MAC addresses
o In ethernet, different MAC addresses are used for Layer 2 unicast, broadcast, and multicast.
§ The system uses a destination IP address and destination MAC address in combination to deliver data to a specific host.
§ The process that a source host uses to determine the destination MAC address associated with a specific IPv4 address is known as ARP (address resolution protocol).
· For an IPv6 address, this is known as ND (Neighbor Discovery)
- Broadcast MAC address
o Still has a destination MAC address
o Flooded out ALL the Ethernet switch ports except the incoming port.
o NOT forwarded by a router.
o If the encapsulated data is an IPv4 broadcast packet:
§ The packet contains a destination IPv4 address that has all 1s in the host portion.
§ This means that all hosts on the local network will receive and process the packet.
§ When the IPv4 broadcast packet is encapsulated in the ethernet frame, the destination MAC address is “FF-FF-FF-FF-FF-FF” (48 ones in binary)
- Multicast MAC address
o The destination MAC address is 01-00-5E for IPv4
o The destination MAC address for IPv6 is 33-33
§ There are others for STP and LLDP
o Flooded out all ethernet ports
o Not forwarded by a router (unless configured to do so)
o The multicast group is assigned a multicast group IP address
- Ethernet Switch
o Uses only L2 MAC addresses to make forwarding decisions
o Examines its table to make the decision
§ Most switches keep an entry in the table for 5 minutes
§ If the source MAC address exists the timer is reset
§ If it doesn’t exit, it’s added along with the port number it’s connected to.
· If the destination MAC address is not in the table, it’s blasted to all the ports.
· The destination does not get added to the MAC table unless it then sends out a packet as the source MAC.
o When going to the Internet, the destination MAC is the router
o When coming from the Internet, the IP address is that of the sender off the network. (contained in the DATA section)
§ The source MAC is the router
§ The destination MAC is the computer.
- Frame Forwarding Methods (on cisco switches)
o Store-and-forward switching – Recivies the entire frame and computes the CRC (like a hash to determine the number of bits in the frame) to determine if there’s an error.
§ If the CRC is valid, the switch looks up the destination address, which determines the outgoing interface and forwards it through there.
§ Required for QoS.
o Cut-through switching – Forwards the frame before it is fully received. The destination address of the frame is read before it is forwarded (performs no error detection).
§ Fast-Forward Variant – Lowest level of latency by immediately forwarding the packet after reading the destination address.
§ Fragment Free Variant – Switch stores the first 64 bytes before forwarding (Most network errors occur in the first 64 bytes). It is like the middle between cut-through switching and store-and-forward switching.
- Memory Buffering on Switches
- Used when the destination port is busy and the switch stores the frame until it can be transmitted
o Port-based memory
§ Frames stored in queues linked to specific incoming/outgoing ports
§ Only transmitted when all frames in the queue have been successfully transmitted
§ Possible for one single frame to delay the transmission of all frames in memory because of a busy destination port, even if the other frames could be transmitted to other open destination ports.
o Shared memory
§ Deposits all frames into one common memory buffer
§ Amount of buffer memory required by a port dynamically allocated
§ Frames in the buffer are dynamically linked to the destination port, allowing a packet to be received on one port and then transmitted on another port without moving it to another queue
§ Results in the ability to store larger frames with potentially fewer dropped frames, important when there are multiple different port speeds.
- Duplex
o Duplex mismatch is one of the most common causes of performance on 10/100 Mbps Ethernet links
o Occurs when one port operates at half-duplex, and other at full duplex.
o Causes many collisions.
o Auto negotiation allows them to automatically select the same, best option.
- Auto MDIX
o Switch automatically detects the type of cable attached to the port and configures the interfaces accordingly.
o You should still regardless use the correct cable.