Network+ Chapter 2 Notes
Transcript of Network+ Chapter 2 Notes
-
7/28/2019 Network+ Chapter 2 Notes
1/13
CHAPTER 2 OPEN SYSTEMS INTERCONNECTION SPECIFICATION (OSI MODEL)
Seven hierarchal layers developed to enable different networks to communicate reliably betweendisparate systems
Encapsulation the process of encoding data as it goes down the OSI stack OSI (open systems interconnection) reference model was created by ISO to break barrier of
computers only being able to communicate within same manufacturer
Created interoperable network devices and software in the form of PROTOCOLS OSI model is the primary architectural model for networks Describes how data and network information are communicated from computer application
through network media to an application on another computer
The Layered Approach
Reference model conceptual blueprint of how communications should take place Addresses all processes required for effective communication, divides processes into logical
groups (Layers)
A communication system designed as such is called Layered Architecture What tasks must be done? Who will do them? What order will they be done? How will
they relate to one another?
Say you divide tasks into departments (a metaphor for the Layers) in which thedepartment members focus on their duties and no one elses
Each department will need practical methods to complete these duties (methodsbeing a metaphor for Protocols)
Software devs use reference model to understand computer communication processes andthe functions that need to be accomplished on each layer
When developing a protocol for a layer, all they worry about is THAT LAYERs functions Another layer and protocol will handle other functions Binding communication processes are bound to each other at a particular layer
Advantages of Reference Model Allows different vendors networks to interoperate through network component standardization
Also allows various types of hardware/software to communication OSI model divides network communication process into smaller and simpler components
Aids development, design, and troubleshooting Encourages industry standardization by defining functions occurring at each layer of OSI model Prevents changes in one layer from affecting other layers, doesnt hamper development, making
application programming easier
OSI Reference Model
Aiding data transfer between disparate hosts A set of guidelines that developers use to create applications which run on a network Acts as a framework for creating/implementing networking standards, devices, and internetworking
schemes
-
7/28/2019 Network+ Chapter 2 Notes
2/13
7 LAYERS (and their functions) 7: APPLICATION (File, print, message, database, and application services)
Provides a user interface 6: PRESENTATION (Data encryption, compression, and translation services)
Presents Data Handles processing, such as encryption
5: SESSION (Dialog control) Keeps different applications data separate
4: TRANSPORT (End-to-end connection) Provides reliable/unreliable delivery Performs ERROR CORRECTION before retransmission
3: NETWORK (Routing) Provides logical addressing which routers use for path determination
2: DATA LINK (Framing) Combines packets into bytes and bytes into frames Provides access to media devices using MAC addresses Performs error detection, NOT CORRECTION
1: PHYSICAL (Physical topology) Moves bits between devices Specifies voltage, wire speed, and pin-out of cables
Pneumonic Device: Please Do Not Throw Sausage Pizza Away
Seven layers are divided into two groups Top 3 define how the applications within the end stations communicate with each other/users
These 3 know nothing about networking or network addresses Bottom 4 define how data is transmitted end to end through physical media, switches, & routers
Determine how to rebuild a data stream from transmitting host to destination hosts app Application layer provides a User Interface
User interfaces with computer Presentation layer presents data and handles processing (such as encryption) Session layer keeps different applications data separateThe Application Layer
Where users actually communicate with the computer Technically, users communicate with the network stack through application process interfaces
(aka APIs) connecting application to the OS
Application layer chooses and determines availability of communicating partners and resourcesneeded to connect
Coordinates partnering applications, forms a consensus on procedures for controlling data integrityand error recovery
-
7/28/2019 Network+ Chapter 2 Notes
3/13
Acts only when its apparent that network access will be needed Example: If you uninstalled every networking component on a PC, you could still open a locally
saved HTML documents
BUT, if you tried to view this same HTML document retrieved using HTTP, FTP, or TFTP, itwouldnt work because Internet Explorer responds to those requests via Application Layer
Application Layer acts as interface between application program (NOT A PART OF THE LAYEREDSTRUCTURE) and the next layer down
Application layer provides a way for the program to send info down the protocol stack IE doesnt exist in Application Layer; IE interfaces with App Layer protocols when it needs
remote resources
Application layer identifies/establishes availability of intended communication partner andsufficiency of resources for the communication
Applications often require more than just desktop resources Unite communicating components from multiple network applications, such as file transfer,
email, remote access, network-management, client-server processes (ie- printing)APPLICATION LAYER ACTS AS INTERFACE BETWEEN APPLICATION PROGRAMS. THESE PROGRAMS DO
NOT RESIDE AT THE APPLICATION LAYER, BUT RATHER INTERFACE WITH IT VIA APPLICATION
LAYER PROTOCOLS WRITTEN IN THE PROGRAMS SOFTWARE, ENABLING NETWORK ACCESS
The Presentation Layer
Presentation Layer presents data to the Application Layer and handles data translation and codeformatting
It is a translator, providing coding and conversion functions Adapt data into a standard format before transmission Computers receive this generically formatted data then convert it back into its native format for
reading (ex. ASCII)
Presentation Layer ensures that data transferred from one systems Application Layer can beread by another systems Application Layer
Data compression, decompression, encryption, and decryption are handled by Presentation Layer,some multimedia operations
The Session Layer
Session Layer sets up, manages, and tears down sessions between Presentation Layer entries Provides dialog control between devices (nodes) Coordinates communication, offering Simplex, Half Duplex, and Full Duplex Session Layer keeps applications data separate from other applications data The Transport Layer
Transport Layer segments and reassembles data from upper-layers and u nites it onto the same datastream
Provides end-to-end data transport services, establishing logical connection btwn send/receive host
-
7/28/2019 Network+ Chapter 2 Notes
4/13
Provides mechanisms for multiplexing upper-layer applications Establishes virtual connections and tears down virtual circuits afterwards
Hides details of network-dependent information from higher layers Provides transparent data transfer
Uses TCP (transmission control protocol) and UDP (user datagram protocol) TCP = RELIABLE UDP = UNRELIABLE
Basically means, TCP has means to check on successfulness of data transfer, where as UDPjust sends the data without worrying about whether it arrived or not
Reliable Networking: acknowledgments, sequencing, and flow control are used Transport Layer can be Connectionless (unreliable) or Connection-Oriented (reliable)Connection-Oriented Communication (Transport Layer continued)
Before transmitting host sends segments down the OSI model (when you send, you start at AppLayer and work down to Physical. When receiving, vice versa), the senders TCP process contacts
the destination TCP process to establish connection Creates a Virtual Circuit with Connection-Oriented Communication The initial Handshake has the two TCP processes agree on:
Amount of info to be sent in either direction before recipient TCP sends back anacknowledgement
Virtual Circuit Setup (known as Overhead)
Hosts application programs notify their Operating Systems that a connection is initiated OSes send messages over network, confirming the approved transfer After synchronization occurs, connection is established and data transfer begins This is all called a THREE-WAY HANDSHAKE
1st: Request for synchronization 2nd: Acknowledgement of request and establishment of connection parameter s(rules) between
hostsrequesting that the receivers sequencing is synced so bidirectional connection is formed
3rd: Final acknowledgement, notifying destination that connection agreement is accepted,connection is established, and data transfer can start
SYN, SYN/ACK, ACKSYNCHRONIZE, SYNCHRONIZE AND ACKNOWLEDGE, ACKNOWLEDGE
[Sending PC ] [Receiving PC]
Syn ----------Syn, Ack
Ack -----Connection Established
Data Transfer of Bytes of Segments Sometimes, congestion can occur because a high-speed PC generates data traffic faster than the
network can handle transferring it
Several computers simultaneously sending datagrams through single gateway or to single PC cancause slowness
Gateway or destination congested though no single source caused it bottlenecked
-
7/28/2019 Network+ Chapter 2 Notes
5/13
Flow Control (Transport Layer continued)
Transport Layer also handles Data Integrity by maintaining Flow Control Allows users to request reliable data transport Flow Control provides means for receiver to govern amount of data send by sender
Prevents sending host from overflowing buffers of receiving host, resulting in loss of data Reliable data transport employs connection-oriented communication sessions, protocols ensure:
Segments delivered are acknowledged back to sender upon reception Segments not acknowledged are retransmitted Segments are sequenced back into proper order upon arrival Manageable data flow maintained to avoid congestion, overload, and data loss
A machine that receives datagrams too quickly stores them in memory called BUFFER Only solves issue if datagrams arrive in small bursts. If the flood capacity is exceeded, it discards
additional datagrams arriving
This is solved by the Transport Layer issuing not ready indicator to the sender, signaling thesending device to stop transmitting segment traffic Receiver processes segments in the buffer, then sends a ready transport indicator
In a fundamental, reliable, connection-oriented data transfer, datagrams are delivered in samesequence theyre transmitted
If the order is breached, transport fails Data segments lost, duplicated, or damaged in transmission cause a failure notice Receiving host acknowledges the reception of each data segment in correct order
SERVICE IS CONNECTION-ORIENTED IF IT HAS:
VIRTUAL CIRCUIT SET UP (SUCH AS 3-WAY HANDSHAKE)
USES SEQUENCING
USES ACKNOWLEDGMENTSUSES FLOW CONTROL
Windowing
Would be slow transmission if sender had to wait for acknowledgement after sending each segment With time available AFTER sender transmits data segment and BEFORE it processes
acknowledgments received from receiving machine, sender uses the break to transmit more data
Window: The quantity of data segments (in bytes) a transmitter is allowed to send withoutreceiving an acknowledgment
Windows are used to control number of outstanding, unacknowledged data segments Size of window = how much info is transferred from one end to the other
Some protocols quantify info by # of packets, but TCP/IP measures # of bytes A window size of 1 has the sending machine wait for acknowledgment for each data segment
transmitted before transmitting another
A window size of 3 allows the sending machine to transmit 3 data segments before anacknowledgment is received
-
7/28/2019 Network+ Chapter 2 Notes
6/13
A receiving host that fails to receive all segments can improve communication by decreasingthe window size
Acknowledgments
Reliable data delivery ensures integrity of data stream Guarantees that data wont be duplicated or lost This is achieved via Positive Acknowledgment with Retransmission
Requires receiving machine to communicate with transmitting source, sending anacknowledgment back to sender when the receiving machine gets the data
Sender documents each segment and waits for acknowledgment before sending next segment After sending a segment, the transmitting machine starts a timer and retransmits if the timer
expires before an acknowledgment is returned from the receiver
Transport Layer doesnt need to use connection-oriented service (whether thats included in theway the software interfaces with the OSI model is up to the application developer)
If youre connection-oriented (have set up a virtual circuit) then youre using TCP If you havent set up a virtual circuit, then youre using UDP and are connectionless
-
7/28/2019 Network+ Chapter 2 Notes
7/13
Certain devices operate at all seven layers of the OSI model:
Network Management Stations (NMSs)
Web & application servers
Gateways (not default gateways)
Network hosts
Some devices operate primarily at the Physical Layer of the OSI model, manipulating the physical
aspects of the data stream (voltages, signal direction, signal strength, etc)
NIC cards
Transceivers
Repeaters
Hubs (glorified repeaters)
Chapter 2 OSI Model (continued)
The Network Layer
Network layer manages device addressing, tracks location of devices, & determines best way tomove data
Transports traffic between devices that arent locally attached as wellRouters (layer 3) specified at Network layer provide data routing in internetwork
Process Packet received on router interface Destination IP address is checked If packet isnt destined for router, router looks up destination network address in routing table
If it cant find an entry for the destination network in routing table, drops packet Router chooses exit interface and sends packet to that interface to be framed/sent on network Two types of packets used at Network Layer Data packets
Transport user data through internetwork Uses routed protocols to support data traffic
IPv4 and IPv6 Route-Update packets
Used to update neighboring routers about networks connected to routers withininternetwork
Help build and maintain routing tables Protocols that send these route-update packets are called routing protocols
RIP: Routing Information Protocol and RIPv2 EIGRP: Enhanced Interior Gateway Routing Protocol OSPF: Open Shortest Path First
Routing table includes following info (demonstrated in the figure below):
-
7/28/2019 Network+ Chapter 2 Notes
8/13
Network Address Protocol-specific (ie: IPv4 or IPv6) addresses Router maintains routing table for individual routing protocols
Each routing protocol keeps track of a network with a different addressing scheme Interface
This is the exit interfacethat a packet takes when destined for another network Metric
Metric value = distance to the remote network Different routing protocols compute this distance differently
Ex. RIP uses hop counts the number of routers a packet passes through en route tothe remote network
Others use bandwidth, delay of line, or tick count (1/18of a second) Routers break up broadcast domains, so broadcasts arent forwarded through routers Routers also break up collision domains, but this can also be accomplished with a Layer 2 (data linklayer) switch
Switches are also known as Layer 2 Routers Switches break up collision domains
Each interface in a router represents a separate network, so it must have a unique networkidentification number
Each host connected to that router must use that same network number
-
7/28/2019 Network+ Chapter 2 Notes
9/13
As you can see, the Routing Table on the router connected to the network with Network Address 1 (NET
1) shows that data leaves the network on Exit Interface E0 (INT S0).
This router on NET ID 1 is 0 hops away from the Internet (a WAN service) which has Network Address 2
(NET ID 2) and Exit Interface S0 (INT S0).
NOTE: The router for NET ID 1 is 1 hop away from the router connected to the network with Network
Address 3 (NET ID 3), which has Exit Interface E0 (INT E0).
Notes about routers to memorize
By default, routers will not forward broadcastor multicastpackets Routers use logical address (ex. 192.168.1.5) in Network Layer header to determine next-hop router
to forward the packet to
Routers can use access lists to control security on types of packets entering/exiting an interface Routers can provide Layer 2 bridging functions and route through the same interface
Remember, switches are Layer 2, but when someone says Layer 3 Switch they mean Router Layer 3 Routers provide connections between VLANs (virtual local area networks) Routers provide QoS (quality of service) for network trafficThe Data Link Layer
Provides physical transmission of data and handles error notification (not correction), networktopology, and flow control
Ensures messages are delivered to proper device on LAN using hardware addresses (aka MACAddress or Ethernet Address)
Translates message from Network Layer into bits for Physical Layer to transmit The Data Link Layer formats messages into pieces called data frames and adds a header
(information encapsulating the message) containing: Destination hardware address (aka MAC address or Ethernet address) Source hardware address (aka MAC address or Ethernet address)
Routers at Network Layer dont care where host is located, only concerned with where networks arelocated and how to reach them
Data Link Layer is responsible for the identification of each device on the local network Router operates w/ Network Layer and finds the network (even remote ones) using LOGICAL
ADDRESSING (192.168.1.5), then Data Link Layer finds the appropriate host using HARDWARE
ADDRESSING (aka MAC or Ethernet) (00:1A:2B:3C:4D:5E)
For hosts to send packets to each other, as well as to send them to routers, the Data Link Layer usesHardware Addressing
Packet is framed with control info at Data Link Layer Control info is stripped off at the receiving router and original packet is left intact Framing of packet continues for each hop until its delivered to the correct host
Packet is never altered, only encapsulated with control info needed to be passed todifferent media devices
-
7/28/2019 Network+ Chapter 2 Notes
10/13
Data Link Layer has two sublayers: Media Access Control (MAC) and Logical Link Control (LLC)
MAC defines how packets are placed on media Contention media access is first come/first served where everyone shares same bandwidth Physical addressing is defined here, so are Logical Topologies
Logical Topology: signal path through a physical topology MAC sublayer of Data Link Layer can also use
Line discipline Error Notification (NOT CORRECTION) Ordered delivery of frames Optional Flow Control
LLC identifies Network Layer protocols and encapsulates them LLC header tells Data Link Layer what to do with packet once frame is received
Host receives frame, looks at LLC to find where its destined for (IP address at Network Layer) LLC provides flow control and sequencing of control bits
802.X Standard
802.1 LAN/MAN (metropolitan) Management (and MAC bridges) 802.2 LLC 802.3 CSMA/CD (Carrier Sense Multiple Access with Collision Detection) 802.4 Token Passing Bus 802.5 Token Passing Ring 802.6 Distributed Queue Dual Bus (DQDB) Metropolitan Area Network (MAN) DQDB MAN 802.7 Broadband LAN 802.8 Fiber-Optic LAN/MAN 802.9 Isochronous LAN 802.10 LAN/MAN Security 802.11 Wireless LAN 802.12 Demand Priority Access Method 802.15 Wireless Personal Area Network 802.16 Wireless MAN (aka: WiMAX) 802.17 Resilient Packet Ring 802.18 LAN/MAN Standards Committee
The Physical Layer Does two important things: sends and receives bits
Bits only come in values of 1 or 0 Physical Layer communicates directly with various types of communication media
Different media devices represent the bit values in different ways Some use audio tones, some employ state transitions (changes in voltage from high to low)
-
7/28/2019 Network+ Chapter 2 Notes
11/13
Protocols are needed for each type of media to describe proper bit patterns to be used, how data isencoded into signals, and qualities of the medias attachment interface
Physical Layer specifies electrical, mechanical, procedural, and functional requirements foractivating, maintaining, and deactivating physical link between systems
Physical Layer identifies interace between the DTE (data terminal equipment) and the DCE (datacommunication equipment)
DCE is usually located at customer, where DTE is attached device (a modem or CSU/DSUchannel service unit/data service unit
Physical layers connectors & topologies defined by standards, allowing disparate systems to talk Physical layer specifies layout of transmission media
Physical topology the way cabling is physically laid out Star, Bus, Ring, Mesh (partial & full mesh)
Encapsulation
Host transmitting data through network to another device has data go through encapsulation Data is wrapped with protocol info at each layer of OSI model
Each layer communicates only with its peer layer on other device To communicate/exchange data, each layer uses PDU(protocol data units)
The Protocol Data Units are as follows: Segments Packets Frames Bits That is how the units change as the data progresses from the top of the OSI model down to
the Physical Layer.
PDUs hold control info in which the data is encapsulated at each layer Usually attached to header, but can also be in the trailer
Data Encapsulation Method User info converted to data for transmission on network Data converted to segments and reliable connection set up between sender/receiver Segments converted to packets or datagrams, logical address placed in header so packets can
be routed through internetwork
Packets or datagrams converted to frames for transmission. Hardware Address (MAC/Ethernet)added to uniquely identify hosts on network
Frames converted to bits and a digital encoding/clocking scheme is used
-
7/28/2019 Network+ Chapter 2 Notes
12/13
Things To Remember
Remember each of the 7 OSI Layers: Application, Presentation, Session, Transport, Network, DataLink, and Physical
Application, Presentation, and Session are Upper Layers responsible for communicating fromthe User Interface to the Application itself
Transport Layer handles segmentation of data, sequencing of the data into proper order, andestablishing virtual circuits (reliable connection = TCP, unreliable = UDP)
Network Layer converts segments to packets, and provides logical network addressing (IPaddress, v4 or 6) and routing through an internetwork
Data Link Layer provides framing of the packets before placing data on the network medium Physical Layer converts packets to bits (1s and 0s) and encodes them into digital signal to send
Sublayers of Data Link Layer Only layer that has sublayers: LLC and MAC
LLC: responsible for multiplexing of Network Layer protocols MAC: responsible for physical (Hardware/Ethernet) addressing and determining when to
place data on the network
Know devices that operate at each layer of OSI Model Hubs and Repaters see only bits, so theyre Layer 1 (Physical)
All networking devices have physical connectivity to network, so they all operate at Layer 1(Physical), but only Hubs/Repeaters operate only at the Physical Layer
Always consider that a device operates at the highest layer that it supports. That layersfunctionality is the main reason we implement the device
-
7/28/2019 Network+ Chapter 2 Notes
13/13
Switches and Bridges are Layer 2 (Data Link) because they understand/make decisions based onLayer 2 (data link) addressing (MAC Addresses)
Routers are Layer 3 (Network Layer) because they handle logical (IPv4/IPv6) addressing Networking devices (such as workstations) run applications so theyre said to operate at Application
Layer