OSI stands for Open Systems Interconnection; it was developed to help vendors create interoperable network devices and software in the form of protocols, or standards, so the different networks could become more compatible and work better together.
The central purpose of the OSI model is to allow different networks to interoperate, or work in conjunction with one another, smoothly.
It’s the primary architecture model for all networks in today’s age, and it’s used to show how data progresses from the beginning of the traffic flow to the very end.
The OSI model has a layered approach; meaning that there are several different processes for effective communication, and these processes are grouped into “layers”, so that each layer can concentrate on performing their job to the best of their ability.
The communication methods that are very similar to each other are grouped onto the same layer.
Advantages of using the OSI Network Model
It allows various different types of network hardware and software to communicate.
It prevents changes made in one layer from affecting other layers
It facilitates development and makes application programming easier.
Encourages everybody in the industry to use one standard
The OSI model divides network communication processes into smaller and simpler components, thus aiding component development, design, and troubleshooting.
The OSI’s seven layers are divided into two groups
Layers 5-7 define the rules of how the applications working within host machines communicate with each other as well as with end users.
Layers 1-4 define how the actual data is transmitted from end to end.
Image#1
Image#2
Layer 1 “The Physical”
Layer 1 describes the physical and electrical specifications for devices.
Basically this layer deals with the communication mediums such as cable types, connectors, signaling, network cables, plug-ins, cable pinouts, wireless radio frequencies, transceivers, repeaters, and fiber optics.
This is where the network connection is first established.
Hubs and Repeaters are Layer 1 Devices.
Physical Topology
Layer 2 “Data Link”
This layer handles the moving of data in & out of the physical layer, and into the network.
This layer handles “Framing”
Adding a customized header containing destination and source hardware addresses.
This customized header forms a capsule around the original message. This is identical to the navigational devices attached to the Apollo-13 upon it’s ascension. Once a piece of the ship served it’s purpose, it was stripped from the rocket.
Switches are Layer 2 Devices.
Data Link layer is responsible for the unique identification of each device that resides on a local network by “linking” the data to it’s proper device.
Ensures that messages are delivered to the proper device on a network (LAN) by using it’s hardware address (MAC address); while also translating messages from the network layer into bits for the physical layer to transmit.
Data Link has 2-sublayers
Media Access Control (MAC) Layer
Defines how packets are placed on the media and defines when to place data on the network.
Responsible for flow control.
Logical Link Control Layer
Identifies network layer protocols and then encapsulates them
Layer 3 “Network”
The network layer manages logical device addressing, tracks the location of devices on the network, and determines the best way to move data.
Transport data between devices that are not apart of the internal network.
Routers are Layer 3 Networking devices; their only purpose is to “route” data from one network to another.
Layer 4 “Transport”
Basics
The transport layer segments and reassembles data into a data stream; provides reliable or unreliable communication
UDP (User Datagram Protocol) + TCP (Transmission Control Protocol) both work at the Transport Level.
Acknowledgements, sequencing, and flow control are used in the Transport Level
Reliable Communication (TCP)
TCP will contact the destination’s-TCP to establish a connection before agreeing to send data.
This is called a virtual circuit aka overhead.
The two OS communicate by sending messages over the network confirming that the transfer is approved and that both sides are ready for it to take place.
A connection is fully established and the data transfer begins
Three-Way Handshake
Two TCP processes establish a mutual connection and agree on the amount of information that will be sent in either direction before sending an acknowledgement.
3-Way Handshake Process
1.) SYN - Synchronize
2.)SYN/ACK - Synchronize/Acknowledge
3.)ACK - Acknowledge
Reliable connection is reliable because everything is agreed upon and set in stone before the first message is even sent.
Image
Layer 5 “Session”
Responsible for setting up, managing, and tearing down sessions.
Coordinates communication between systems using three different modes
Simplex (data travels in one direction)
Half-Duplex (data travels in Both directions, but only one at a time)
Full-Duplex (data travels in Both directions simultaneously)
Keeps applications separate from one another.
Ex. Allows and Controls multiple web browser sessions on your desktop at the same time)
Layer 6 “Presentation”
This layer presents data to the application layer and is responsible for translating data into a readable format for the application layer.
Data can be encrypted, compressed, decompressed, and decrypted all at this layer.
Layer 7 “Application”
The layer where users actually communicate or interact with the computer; the layer we see (Google Mail, Facebook, Youtube)
Applications (Chrome, Edge, Firefox, Microsoft Word, etc.) don’t actually reside on the application layer of the OSI model. They only interact or interface with it.
Proxy Server operates at this level.
Responsible for code and character-set conversion as well as recognizing data formats
All People Seem To Need Data Processing
DoD Layer Model
Very similar to the OSI.
Pocahontas Hides In Nature
Encapsulation
When a host send data across a network to another device, protocol information is wrapped around the data at each layer of the OSI model
The data is stripped of the protocol information (Decapsulation) as it goes through all 7 Layers of the OSI model; This process is very similar to how Apollo-13 took flight.
Internal Protocol (IP) Header
Internet Protocol is the internet layer.
It holds the big picture and can see all of the interconnected networks. It can see all of the interconnected networks because every machine on the network has an IP Address.
IP Address is the logical location or ID that contains valuable encoded information that greatly simplifies the routing process.
Routers (Layer 3 Devices) make routing decisions based on the information in the destination IP Address.
The IP Header is used to find the location of devices on a network and the destination of individual packets.
Identifying devices on a network require two questions.
Which network is it on? (IP Address)
What is the logical address or the street address; The IP Address
What is its ID on that network? (Hardware Address)
What is the hardware address or the correct mailbox on the street; The MAC address.
An Ethernet Media Access Control (MAC) address consists of how 48 bits.
What exactly is in a IP Header?
The IPv4 header is like a written form of an address on an envelope, whereas the essential data or packets is the letter, placed inside
Version
IP Version Number; either IPv4 or IPv6
Header Length
Header Length in 32-bit words
Priority and Type of Service
Type of Service tells how the datagram should be handled
The first 3 bits are the priority bits, now called the differentiated services bits
Total Length
Exactly what is sounds like; The total length of the packet, including header and data.
Identification
Value used to differentiate fragmented packets from different diagrams
Flags
Specifies whether fragmentation of the packet should occur.
Fragment Offset
Provides fragmentation and reassembly if the packet is too large to put in a frame.
Allows different MTUs on the internet.
Time to Live
TTL stops IP packets from continuously cycling the network looking for a home
If the packet doesn’t find its destination before the TTL expires, then BOOM, it’s gone.
Protocol
Defines the upper-layer protocols; for example, TCP is port 6 or UDP is port 17.
It contains a number indicating the type of data found in the payload portion of the datagram; Normally being either TCP/6 or UDP/17
Also supports network layer protocols like ARP + ICMP.
Header Checksum
CRC check on the header only
CRC stands for Cyclic Redundancy Check; it’s an error-detecting code used in digital networks and storage devices to detect accidental changes to digital data.
Source IP address
The 32-bit IP address of the station that’s sending the packets (data) to begin with.
Destination IP Address
The 32-bit IP Address of the station the packet (data) is intended for.
Options
Used for network testing, debugging, security, and more.
Data
This field varies and may not appear in all IP Headers
Any upper layer Protocols
TCP Headers
TCP Header
TCP or Transmission Control Protocol takes large blocks of information from the application and breaks them into segments.
TCP is a full-duplex, connection-oriented, reliable, and accurate protocol; although very reliable and accurate, it takes up a considerably large amount of network overhead. TCP is often used by programmers because a lot of the programming leg work is removed.
TCP establishes a connection-oriented reliable peer system by using a Three-Way Handshake
It numbers and sequences each segment so that the destination ‘s TCP process can put the segments back in the order that they came.
After the segments are sent, TCP will wait for an acknowledgement from the destination end’s TCP and based on what segments were acknowledged, it will resend the segments that weren’t.
TCP Header Segment Format
TCP segments a data stream and prepares it for the Internet Layer.
The TCP header is 24 bytes long, or up to 60 bytes max.
Source Port
Port# of the application on the host that’s actually sending the data
Destination Port
Port# of the application requested on the destination host
Sequence Number
Number used by TCP that puts the data back in the correct order or retransmits missing or damaged data during a process called sequencing
Acknowledgement Number
Value of the TCP octet that is expected next
Header Length
Number of 32-bit words in the TCP header, which indicates where the data begins. The TCP header is an integral number of 32 bits in length
Reserved
always set to zero
Code Bits/TCP Flags
controls functions used to set up and terminate a session
Includes URG, ACK, PSH, SYN, FIN, RST
Window
window size the sender is willing to accept, in octets
Checksum
Cyclic Redundancy Check (CRC) used because TCP doesn’t trust the lower layers and checks everything. CRC checks the header and the data fields
Urgent
If the URG control flag is set, this value indicates an offset from the sequence number, indicating the last urgent data byte.
Options
These are optional fields for setting maximum segment sizes, selective acknowledgments and enabling window scaling for more efficient use of high-bandwidth networks.
Payload (Data)
Includes the upper-layer headers, which are handed down to the TCP protocol at the Transport Layer.
TCP Header Image
TCP Flags
TCP flags are also called control bits. We use them to establish connections, send data and terminate connections
URG: Urgent pointer; When this bit is set, the data should be treated as priority over other data.
ACK: Used for the acknowledgment.
PSH: This is the push function. This tells an application that the data should be transmitted immediately and that we don’t want to wait to fill the entire TCP segment.
RST: This resets the connection, when you receive this you have to terminate the connection right away. This is only used when there are unrecoverable errors and it’s not a normal way to finish the TCP connection.
SYN: We use this for the initial three way handshake and it’s used to set the initial sequence number.
FIN: This finish bit is used to end the TCP connection. TCP is full duplex so both parties will have to use the FIN bit to end the connection. This is the normal method how we end an connection.
Image
Payload
This is the data portion of the packet; the actual datagrams that are being sent.
Maximum Transmission Unit (MTU)
A Flag set in the IP Header; The MTU is normally set during the network creation process.
By knowing the max IP packet size, you can send packets through the network without having to fragment (break apart, send, and reassemble) anything. 1500 bytes is normally the max.
Fragmenting
Sometimes a packet will be way too large to send across the network; In this case you’ll need to fragment the data, send it across the network in pieces, and then rebuild the data once it arrives. Doing all of this causes some serious overhead to the network.
Fragmenting slows down the overall flow of data traffic.
Optimizing your network communication so you’re not fragmenting will cause you to have a much higher throughput and overall better traffic.
Troubleshooting MTUs
UDP Headers
UDP (User Datagram Protocol)
Compared to TCP, UDP is a thin scaled-down economy version.
Often times referred to as the thin protocol. Similar to a thin person on a bench, a thin protocol doesn’t take up much space, or in this case, much bandwidth on a network.
Does a great job at transporting information that doesn’t require reliable delivery — and does so using far less network resources
UDP is used for Faster Data Transfers, while TCP is used for Reliability.
UDP doesn’t have to worry about reliability because it’s handled at the Process/Application Layer.
UDP does not put data segments in sequential order,does not check to see if they actually delivered, or even allow for an acknowledgement of a safe delivery!
Because of this, it’s referred to as an unreliable protocol.
Pros
No retransmission delays – UDP is suitable for time-sensitive applications that can’t afford retransmission delays for dropped packets. Examples include Voice over IP (VoIP), online games, and media streaming.
Speed – UDP’s speed makes it useful for query-response protocols such as DNS, in which data packets are small and transactional.
Suitable for broadcasts – UDP’s lack of end-to-end communication makes it suitable for broadcasts, in which transmitted data packets are addressed as receivable by all devices on the internet. UDP broadcasts can be received by large numbers of clients without server-side overhead.
Cons
No guaranteed ordering of packets.
No verification of the readiness of the computer receiving the message.
No protection against duplicate packets.
No guarantee the destination will receive all transmitted bytes. UDP, however, does provide a checksum to verify individual packet integrity.
UDP Header Segments
Source Port
Port# of the application on the host that’s actually sending the data
Destination Port
Port# of the application requested on the destination host
Length
Specifies the number of bytes comprising the UDP header and the UDP payload data. The limit for the UDP length field is determined by the underlying IP protocol used to transmit the data.
Checksum
The checksum allows the receiving device to verify the integrity of the packet header and payload.
Data
The actual payload or data being sent
UDP Header Image
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (