Lecture 01-Data Communication & Network-Networking Basics
Lecture 01-Data Communication & Network-Networking Basics
Starting with a look at diagram below, you get a picture of a basic LAN network that’s connected together using a hub. This network is actually
one collision domain and one broadcast domain.
How would you say the PC named Bob communicates with the PC named Sally? Well, they’re both on the same LAN connected with a
multiport repeater (a hub). So does Bob just send out a data message, “Hey Sally, you there?” or does Bob use Sally’s IP address and put things
more like, “Hey 192.168.0.3, are you there?” Hopefully, you picked the IP address option, but even if you did, the news is still bad - both
answers are wrong! Why? Because Bob is actually going to use Sally’s MAC address (known as a hardware address), which is burned right
into the network card of Sally’s PC, to get a hold of her.
Great, but how does Bob get Sally’s MAC address since Bob knows only Sally’s name and doesn’t even have her IP address yet? Bob is going
to start with name resolution (hostname to IP address resolution), something that’s usually accomplished using Domain Name Service
(DNS). And of note, if these two are on the same LAN, Bob can just broadcast to Sally asking her for the information (no DNS needed).
Here’s an output from a network analyzer depicting a simple name resolution process from Bob to Sally:
As I already mentioned, since the two hosts are on a local LAN, Windows (Bob) will just broadcast to resolve the name Sally (the destination
192.168.0.255 is a broadcast address). Let’s take a look at the rest of the information:
What this output shows is that Bob knows his own MAC address and source IP address but not Sally’s IP address or MAC address, so Bob
sends a broadcast address of all fs for the MAC address (a Data Link layer broadcast) and an IP LAN broadcast of 192.168.0.255. Again, don’t
freak—you’re going to learn all about broadcasts later, “Subnetting, Variable Length Subnet Masks (VLSMs), and Troubleshooting TCP/IP.”
Before the name is resolved, the first thing Bob has to do is broadcast on the LAN to get Sally’s MAC address so he can communicate to her
PC and resolve her name to an IP address:
Bob now has both Sally’s IP address and her MAC address! These are both listed as the source address at this point because this information
was sent from Sally back to Bob. So, finally Bob has all the goods he needs to communicate with Sally.
By the way, I want you to understand that Sally still had to go through the same resolution processes to communicate back to Bob. Consider
this a welcome to IPv4 and basic networking.
Internetworking Models
When networks first came into being, computers could typically communicate only with computers from the same manufacturer. For example,
companies ran either a complete DECnet solution or an IBM solution but not both together. In the late 1970s, the Open Systems Interconnection
(OSI) reference model was created by the International Organization for Standardization (ISO) to break this barrier.
The OSI model was meant to help vendors create interoperable network devices and software in the form of protocols so that different vendor
networks could work with each other. The OSI model is the primary architectural model for networks. It describes how data and network
information are communicated from an application on one computer through the network media to an application on another computer. The
OSI reference model breaks this approach into layers.
Layered Approach
A reference model is a conceptual blueprint of how communications should take place. It addresses all the processes required for effective
communication and divides these processes into logical groupings called layers. When a communication system is designed in this manner, it’s
known as layered architecture.
In this scenario, I’m using departments as a metaphor for the layers in a communication system. Once your business is launched, your
department heads, each armed with the part of the blueprint relating to their own department, will need to develop practical methods to
implement their assigned tasks. These practical methods, or protocols, will need to be compiled into a standard operating procedures manual
and followed closely. Each of the various procedures in your manual will have been included for different reasons and have varying degrees of
importance and implementation. If you form a partnership or acquire another company, it will be imperative that its business protocols—its
business blueprint—match yours (or at least be compatible with it).
Similarly, software developers can use a reference model to understand computer communication processes and see what types of functions
need to be accomplished on any one layer. If they are developing a protocol for a certain layer, all they need to concern themselves with is that
specific layer’s functions, not those of any other layer. Another layer and protocol will handle the other functions. The technical term for this
idea is binding. The communication processes that are related to each other are bound, or grouped together, at a particular layer.
The OSI has seven different layers, divided into two groups. The top three layers define how the applications within the end stations will
communicate with each other and with users. The bottom four layers define how data is transmitted end to end. The figures below shows the
three upper and four lower layers and their functions.
The following network devices operate at all seven layers of the OSI model:
Network management stations (NMSs)
Web and application servers
Gateways (not default gateways)
Network hosts
The figure shows a summary of the functions defined at each layer of the OSI model. With this in hand, you’re now ready to explore each
layer’s function in detail.
Application Layer
The Application layer of the OSI model marks the spot where users actually communicate to the computer. This layer only comes into play
when it’s apparent that access to the network is going to be needed soon. Take the case of Internet Explorer (IE). You could uninstall every
trace of networking components from a system, such as TCP/IP, NIC card, and so on, and you could still use IE to view a local HTML document
no problem.
Presentation Layer
The Presentation layer gets its name from its purpose: It presents data to the Application layer and is responsible for data translation and code
formatting. This layer is essentially a translator and provides coding and conversion functions. A successful data-transfer technique is to adapt
the data into a standard format before transmission. Computers are configured to receive this generically formatted data and then convert the
data back into its native format for actual reading (for example, EBCDIC to ASCII). By providing translation services, the Presentation layer
ensures that data transferred from the Application layer of one system can be read by the Application layer of another one. The OSI has protocol
standards that define how standard data should be formatted. Tasks like data compression, decompression, encryption, and decryption are
associated with this layer. Some Presentation layer standards are involved in multimedia operations too.
Session Layer
The Session layer is responsible for setting up, managing, and then tearing down sessions between presentations layer entities. This layer also
provides dialog control between devices, or nodes. It coordinates communication between systems and serves to organize their communication
by offering three different modes: simplex, half duplex, and full duplex. To sum up, the Session layer basically keeps different applications’
data separate from other applications’ data.
Transport Layer
The Transport layer segments and reassembles data into a data stream. Services located in the Transport layer segment and reassemble data
from upper-layer applications and unite it into the same data stream. They provide end-to-end data transport services and can establish a logical
connection between the sending host and destination host on an internetwork.
Both TCP and UDP work at the Transport layer and that TCP is a reliable service and UDP is not. This means that application developers have
more options because they have a choice between the two protocols when working with TCP/IP protocols.
The Transport layer is responsible for providing mechanisms for multiplexing upper-layer applications, establishing sessions, and tearing down
virtual circuits. It also hides details of any network-dependent information from the higher layers by providing transparent data transfer.
The following sections will provide the skinny on the connection-oriented (reliable) protocol of the Transport layer.
Flow Control
Data integrity is ensured at the Transport layer by maintaining flow control and by allowing users to request reliable data transport between
systems. Flow control prevents a sending host on one side of the connection from overflowing the buffers in the receiving host an event that
can result in lost data. Reliable data transport employs a connection-oriented communications session between systems, and the protocols
involved ensure that the following will be achieved:
The segments delivered are acknowledged back to the sender upon their reception.
Any segments not acknowledged are retransmitted.
Segments are sequenced back into their proper order upon arrival at their destination.
A manageable data flow is maintained in order to avoid congestion, overloading, and data loss.
Connection-Oriented Communication
In reliable transport operation, a device that wants to transmit sets up a connection-oriented communication with a remote device by creating a
session. The transmitting device first establishes a connection-oriented session with its peer system, which is called a call setup or a three way
handshake. Data is then transferred; when the transfer is finished, a call termination takes place to tear down the virtual circuit.
The figure below depicts a typical reliable session taking place between sending and receiving systems. Looking at it, you can see that both
hosts’ application programs begin by notifying their individual operating systems that a connection is about to be initiated. The two operating
systems communicate by sending messages over the network confirming that the transfer is approved and that both sides are ready for it to take
place. After all of this required synchronization takes place, a connection is fully established and the data transfer begins.
While the information is being transferred between hosts, the two machines periodically check in with each other, communicating through their
protocol software to ensure that all is going well and that the data is being received properly. Let sum up the steps in the connection-oriented
session the three-way handshake pictured in the figure above:
The first “connection agreement” segment is a request for synchronization.
The second and third segments acknowledge the request and establish connection Parameters - the rules - between hosts. These
segments request that the receiver’s sequencing is synchronized here as well so that a bidirectional connection is formed.
The final segment is also an acknowledgment. It notifies the destination host that the connection agreement has been accepted and
that the actual connection has been established. Data transfer can now begin.
What happens when a machine receives a flood of datagrams too quickly for it to process? It stores them in a memory section called a buffer.
But this buffering action can solve the problem only if the datagrams are part of a small burst. If not, and the datagram deluge continues, a
device’s memory will eventually be exhausted, its flood capacity will be exceeded, and it will react by discarding any additional datagrams that
arrive.
Instead of dumping resources and allowing data to be lost, the transport can issue a “not ready” indicator to the sender, or source, of the flood
as shown in figure below. This mechanism works kind of like a stoplight, signaling the sending device to stop transmitting segment traffic to
its overwhelmed peer. After the peer receiver processes the segments already in its memory reservoir - its buffer - it sends out a “ready”
transport indicator. When the machine waiting to transmit the rest of its datagrams receives this “go” indictor, it resumes its transmission.
In fundamental, reliable, connection-oriented data transfer, datagrams are delivered to the receiving host in exactly the same sequence they’re
transmitted and the transmission fails if this order is breached! If any data segments are lost, duplicated, or damaged along the way, a failure
will transmit. This problem is solved by having the receiving host acknowledge that it has received each and every data segment.
A service is considered connection-oriented if it has the following characteristics:
A virtual circuit is set up (e.g., a three-way handshake).
It uses sequencing.
It uses acknowledgments.
It uses flow control.
Windowing
Ideally, data throughput happens quickly and efficiently. And as you can imagine, it would be slow if the transmitting machine had to wait for
an acknowledgment after sending each segment. But because there’s time available after the sender transmits the data segment and before it
finishes processing acknowledgments from the receiving machine, the sender uses the break as an opportunity to transmit more data. The
quantity of data segments (measured in bytes) that the transmitting machine is allowed to send without receiving an acknowledgment for them
is called a window. The size of the window controls how much information is transferred from one end to the other.
Acknowledgments
Reliable data delivery ensures the integrity of a stream of data sent from one machine to the other through a fully functional data link. It
guarantees that the data won’t be duplicated or lost. This is achieved through something called positive acknowledgment with retransmission
a technique that requires a receiving machine to communicate with the transmitting source by sending an acknowledgment message back to
the sender when it receives data. The sender documents each segment it sends and waits for this acknowledgment before sending the next
segment. When it sends a segment, the transmitting machine starts a timer and retransmits if it expires before an acknowledgment is returned
from the receiving end.
In figure above, the sending machine transmits segments 1, 2, and 3. The receiving node acknowledges it has received them by requesting
segment 4. When it receives the acknowledgment, the sender then transmits segments 4, 5, and 6. If segment 5 doesn’t make it to the destination,
the receiving node acknowledges that event with a request for the segment to be resent. The sending machine will then resend the lost segment
and wait for an acknowledgment, which it must receive in order to move on to the transmission of segment 7.
The Network Layer
The Network layer (also called layer 3) manages device addressing, tracks the location of devices on the network, and determines the best way
to move data, which means that the Network layer must transport traffic between devices that aren’t locally attached. Routers (layer 3 devices)
are specified at the Network layer and provide the routing services within an internetwork. Two types of packets are used at the Network layer:
data and route updates.
Data packets used to transport user data through the internetwork. Protocols used to support data traffic are called routed protocols; examples
of routed protocols are IP and IPv6.
Route update packets used to update neighboring routers about the networks connected to all routers within the internetwork. Protocols that
send route update packets are called routing protocols; examples of some common ones are RIP, RIPv2, EIGRP, and OSPF. Route update
packets are used to help build and maintain routing tables on each router.
The Data Link layer formats the message into pieces, each called a data frame, and adds a customized header containing the hardware destination
and source address. This added information forms a sort of capsule that surrounds the original. The figure below shows the Data Link layer
with the Ethernet and IEEE specifications.
The Physical Layer
The physical layer communicates directly with the various types of actual communication media. The Physical layer specifies the electrical,
mechanical, procedural, and functional requirements for activating, maintaining, and deactivating a physical link between end systems. This
layer is also where you identify the interface between the data terminal equipment (DTE) and the data communication equipment (DCE).