Networking Notes
Networking Notes
Data networks and the Internet support the human network by supplying reliable communication between people. On a single device, people can use
multiple applications and services such as email, the web, and instant messaging to send messages or retrieve information. Data from each of these
applications is packaged, transported and delivered to the
appropriate application on the destination device.
Figure shows the four layers of the TCP/IP model and how it enables applications on devices to communicate. The figure highlights the Transport
layer, which is responsible for moving data between applications on devices in the network. The transport layer on the sending device corresponds
with the transport layer of the receiving device.
To pass data streams to the proper applications, the transport layer must identify the target application (Figure 3). To accomplish this, the transport
layer assigns each application an identifier called a port number. Each software process that needs to access the network is assigned a port number
unique to that host.
Conversation Multiplexing
TCP
TCP transport is analogous to sending packages that are tracked from source to destination. If a shipping order is broken up into
several packages, a customer can check online to see the order of the delivery.
With TCP, there are three basic operations of reliability:
UDP
While the TCP reliability functions provide more robust communication between applications, they also incur additional overhead and
possible delays in transmission. There is a trade-off between the value of reliability and the burden it places on network resources.
Adding overhead to ensure reliability for some applications could reduce the usefulness of the application and can even be detrimental.
In such cases, UDP is a better transport protocol.
UDP provides the basic functions for delivering data segments between the appropriate applications, with very little overhead and data
checking. UDP is known as a best-effort delivery protocol. In the context of networking, best-effort delivery is referred to as unreliable
because there is no acknowledgment that the data is received at the destination. With UDP, there are no transport layer processes that
inform the sender of a successful delivery.
UDP is similar to placing a regular, non-registered, letter in the mail. The sender of the letter is not aware of the availability of the
receiver to receive the letter. Nor is the post office responsible for tracking the letter or informing the sender if the letter does not arrive
at the final destination.
Click Play in the figure to see an animation of UDP segments being transmitted from sender to receiver.
Figure is an animation that shows a computer sending a file to a server using the TFTP application, which utilizes the UDP at the
transport layer. The data is segmented into six segments and all packets leave the computer and are sent to a router and then directed
to the TFTP server on a remote server farm network. The server receives all the packets, but since it is using UDP no acknowledgment
packet is sent from the server.
In other cases, an application can tolerate some data loss during transmission over the network, but delays in transmission are
unacceptable. UDP is the better choice for these applications because less network overhead is required. UDP is preferable for
applications such as streaming live audio, live video, and Voice over IP (VoIP). Acknowledgments and retransmission would slow down
delivery.
For example, if one or two segments of a live video stream fail to arrive, it creates a momentary disruption in the stream. This may
appear as distortion in the image or sound, but may not be noticeable to the user. If the destination device had to account for lost data,
the stream could be delayed while waiting for retransmissions, therefore causing the image or sound to be greatly degraded. In this
case, it is better to render the best media possible with the segments received, and forego reliability.
Note: Applications that stream stored audio and video use TCP. For example, if your network suddenly cannot support the bandwidth
needed to watch an on-demand movie, the application pauses the playback. During the pause, you might see a “buffering...” message
while TCP works to re-establish the stream. Once all the segments are in order and a minimum level of bandwidth is restored, your
TCP session resumes and the movie begins playing.
Figure shows UDP protocol properties on the left including fast, low overhead, does not require acknowledgments, and delivers data as
it arrives. On the right are the TCP properties including reliable, acknowledges data, resends lost data, and delivers data in order sent.
Example UDP applications include IP telephony and streaming live video. Example TCP applications include Email and HTTP.
TCP Features
To understand the differences between TCP and UDP, it is important to understand how each protocol implements specific reliability
features and how they track conversations. In addition to supporting the basic functions of data segmentation and reassembly, TCP, as
shown in the figure, also provides other services.
Establishing a Session
TCP is a connection-oriented protocol. A
connection-oriented protocol is one that
negotiates and establishes a permanent
connection (or session) between source and
destination devices prior to forwarding any
traffic. Through session establishment, the
devices negotiate the amount of traffic that can
be forwarded at a given time, and the
communication data between the two can be
closely managed.
Reliable Delivery
Same-Order Delivery
Flow Control
Network hosts have limited resources, such as memory and processing power. When TCP is aware that these resources are
overtaxed, it can request that the sending application reduce the rate of data flow. This is done by TCP regulating the amount of data
the source transmits. Flow control can prevent the need for retransmission of the data when the receiving host's resourses are
overwhelmed.
The figure shows a single computer that has multiple web pages open along with an instant messaging window and an e-mail
application running. Four core services provided by T.C.P. are establishing a session, providing reliable delivery of data, providing
proper order of data sent and managing flow control.
TCP Header
TCP is a stateful protocol. A stateful protocol is a protocol that keeps track of the state of the communication session. To track the state
of a session, TCP records which information it has sent and which information has been acknowledged. The stateful session begins
with the session establishment and ends when closed with the session termination.
As shown in the figure, each TCP segment has 20 bytes of overhead in the header encapsulating the application layer data:
Source Port (16 bits) and Destination Port (16 bits) - Used to identify the application.
Figure shows the fields of the TCP header including source and destination ports, sequence number, acknowledgment number, header
length, and window size.
UDP Features
UDP Header
Figure shows fields of the UPD header including source and destination port numbers, length, and checksum.
Figure shows a computer with three different applications open and the port number associated with each. Some email applications will
use port 110, an HTTP page may use port 80, and an Internet chat window will use port 531.
Port Numbers
Source Port
Destination Port
Figure shows a computer with three different applications open and the port number associated with each. Below each application is
the specific protocol in use and the transport layer adds the proper port number to form the segment. POPv3 uses port 110, HTTP uses
port 80 and Instant Messaging uses port 531.
Socket Pairs
The source and destination ports are placed within the segment. The segments are then encapsulated within an IP packet. The IP
packet contains the IP address of the source and destination. The combination of the source IP address and source port number, or the
destination IP address and destination port
number is known as a socket. The socket is used
to identify the server and service being requested
by the client. A client socket might look like this,
with 1099 representing the source port number:
192.168.1.5:1099
Figure shows the location of the source and destination port numbers within a segment. The figure is showing a computer that has both
an active FTP session and a web session. When data is meant for the FTP server the computer selects a random source port value
above 1023 and assigns 21 to the destination port. In the figure the source port used is 1305. The IP address and the port number
create the socket and this allows the computer to keep track of the FTP data. The web traffic also uses a random source port above
1023, and in the figure it is using port 1099. The data destined for the web server is assigned a destination port of 80, which is the port
used by web servers. The IP address and the port number create the socket and this allows the computer to keep track of the web
server connection.
Registered Ports (Numbers 1024 to 49151) - These port numbers are assigned by IANA to a requesting entity to use with
specific processes or applications. These processes are primarily individual applications that a user has chosen to install, rather
than common applications that would receive a well-known port number. For example, Cisco has registered port 1985 for its Hot
Standby Routing Protocol (HSRP) process.
Dynamic or Private Ports (Numbers 49152 to 65535) - Also known as ephemeral ports, these are usually assigned dynamically
by the client’s OS when a connection to a service is initiated. The dynamic port is then used to identify the client application
during communication.
Note: Some client operating systems may use registered port numbers instead of dynamic port numbers for assigning source ports.
Figure 2 displays some common well-known port numbers and their associated applications. Some applications may use both TCP and
UDP. For example, DNS uses UDP when clients send requests to a DNS server. However, communication between two DNS servers
always uses TCP.
Click here to view the full list of port numbers and associated applications at IANA’s website.
Figure 1 shows the three ranges used for port numbers. Ports 0 through 1023 are classified as well known ports. Numbers 1024
through 49151 are registered ports. Ports 49152 through 65535 are considered private and slash or dynamic ports. Figure 2 lists a
dozen of the more common well-known port numbers including FTP (20 and 21), SSH (22), SMTP (25), DNS (53), DHCP (67 and 68),
TFTP (69), HTTP (80), POP3 (110), IMAP (143), SNMP (161), and HTTPS (443).
Each application process running on the server is configured to use a port number, either by default or manually, by a system
administrator. An individual server cannot have two services assigned to the same port number within the same transport layer
services.
For example, a host running a web
server application and a file
transfer application cannot have
both configured to use the same
port (for example, TCP port 80). An
active server application assigned
to a specific port is considered to
be open, which means that the
transport layer accepts and
processes segments addressed to
that port. Any incoming client
request addressed to the correct
socket is accepted, and the data is
passed to the server application.
There can be many ports open
simultaneously on a server, one for
each active server application.
Application Layer
Figure shows the TCP/IP and OSI models side by side. Sample Applications for the O.S.I. model Application layer include Domain
Name System, Hypertext Transfer Protocol, Simple Mail Transfer Protocol, Post Office Protocol, Dynamic Host Configuration Protocol,
File Transfer Protocol, and Internet Message Access Protocol.
As shown in the figure, the presentation layer formats data for the application layer, and it sets standards for file formats. Some well-
known standards for video include QuickTime and Motion Picture Experts Group (MPEG). Some well-known graphic image formats that
are used on networks are Graphics Interchange Format (GIF), Joint Photographic Experts Group (JPEG), and Portable Network
Graphics (PNG) format.
As the name implies, functions at the session layer create and maintain dialogs between source and destination applications. The
session layer handles the exchange of information to initiate dialogs, keep them active, and to restart sessions that are disrupted or idle
for a long period of time.
Figure shows the TCP/IP and OSI models side by side. Examples for the OSI model Presentation layer include Quick Time, Motion
Picture Experts Group (MPEG), Graphics Interchange Format (GIF), Joint Photographic Experts Group (JPEG), and Portable Network
Graphics (PNG).
TCP/IP Application Layer
Protocols
1. Which two characteristics are associated with UDP sessions? (Choose two.)
Destination devices receive traffic with minimal delay.*
Transmitted data segments are tracked.
Destination devices reassemble messages and pass them to an application.
Received data is unacknowledged.*
Unacknowledged data packets are retransmitted.
Explain:
TCP:
· Provides tracking of transmitted data segments
· Destination devices will acknowledge received data.
· Source devices will retransmit unacknowledged data.
UDP
· Destination devices will not acknowledge received data
· Headers use very little overhead and cause minimal delay.
2. What happens if part of an FTP message is not delivered to the destination?
The message is lost because FTP does not use a reliable delivery method.
The FTP source host sends a query to the destination host.
The part of the FTP message that was lost is re-sent.*
The entire FTP message is re-sent.
Explain:
Because FTP uses TCP as its transport layer protocol, sequence and acknowledgment
numbers will identify the missing segments, which will be re-sent to complete the message.
3. A host device needs to send a large video file across the network while providing data
communication to other users. Which feature will allow different communication streams to
occur at the same time, without having a single data stream using all available bandwidth?
window size
multiplexing*
port numbers
acknowledgments
Explain:
Multiplexing is useful for interleaving multiple communication streams. Window size is used to
slow down the rate of data communication. Port numbers are used to pass data streams to
their proper applications. Acknowledgments are used to notify a sending device that a stream
of data packets has or has not been received.
4. What kind of port must be requested from IANA in order to be used with a specific
application?
registered port*
private port
dynamic port
source port
Explain:
Registered ports (numbers 1024 to 49151) are assigned by IANA to a requesting entity to use
with specific processes or applications. These processes are primarily individual applications
that a user has chosen to install, rather than common applications that would receive a well-
known port number. For example, Cisco has registered port 1985 for its Hot Standby Routing
Protocol (HSRP) process.
5. What type of information is included in the transport header?
destination and source logical addresses
destination and source physical addresses
destination and source port numbers*
encoded application data
Explain:
In a segment, the transport layer header will include the source and destination process, or
port numbers. Destination and source physical addressing is included in the frame header.
Destination and source logical addressing is included in the network header. Application data
is encoded in the upper layers of the protocol stack.
6. What is a socket?
the combination of the source and destination IP address and source and destination
Ethernet address
the combination of a source IP address and port number or a destination IP address and port
number*
the combination of the source and destination sequence and acknowledgment numbers
the combination of the source and destination sequence numbers and port numbers
Explain:
A socket is a combination of the source IP address and source port or the destination IP
address and the destination port number.
7. What is the complete range of TCP and UDP well-known ports?
0 to 255
0 to 1023*
256 – 1023
1024 – 49151
Explain:
There are three ranges of TCP and UDP ports. The well-know range of port numbers is from
0 – 1023.
8. Which flag in the TCP header is used in response to a received FIN in order to terminate
connectivity between two network devices?
FIN
ACK*
SYN
RST
Explain:
In a TCP session, when a device has no more data to send, it will send a segment with the
FIN flag set. The connected device that receives the segment will respond with an ACK to
acknowledge that segment. The device that sent the ACK will then send a FIN message to
close the connection it has with the other device. The sending of the FIN should be followed
with the receipt of an ACK from the other device.
9. What is a characteristic of a TCP server process?
Every application process running on the server has to be configured to use a dynamic port
number.
There can be many ports open simultaneously on a server, one for each active server
application.*
An individual server can have two services assigned to the same port number within the
same transport layer services.
A host running two different applications can have both configured to use the same server
port.
Explain:
Each application process running on the server is configured to use a port number, either by
default or manually, by a system administrator. An individual server cannot have two services
assigned to the same port number within the same transport layer services. A host running a
web server application and a file transfer application cannot have both configured to use the
same server port. There can be many ports open simultaneously on a server, one for each
active server application.
10. Which two flags in the TCP header are used in a TCP three-way handshake to establish
connectivity between two network devices? (Choose two.)
ACK*
FIN
PSH
RST
SYN*
URG
Explain:
TCP uses the SYN and ACK flags in order to establish connectivity between two network
devices.
11. A PC is downloading a large file from a server. The TCP window is 1000 bytes. The server is
sending the file using 100-byte segments. How many segments will the server send before it
requires an acknowledgment from the PC?
1 segment
10 segments*
100 segments
1000 segments
Explain:
With a window of 1000 bytes, the destination host accepts segments until all 1000 bytes of
data have been received. Then the destination host sends an acknowledgment.
12. Which factor determines TCP window size?
the amount of data to be transmitted
the number of services included in the TCP segment
the amount of data the destination can process at one time*
the amount of data the source is capable of sending at one time
Explain:
Window is the number of bytes that the sender will send prior to expecting an
acknowledgement from the destination device. The initial window is agreed upon during the
session startup via the three-way handshake between source and destination. It is
determined by how much data the destination device of a TCP session is able to accept and
process at one time.
13. During a TCP session, a destination device sends an acknowledgment number to the source
device. What does the acknowledgment number represent?
the total number of bytes that have been received
one number more than the sequence number
the next byte that the destination expects to receive*
the last sequence number that was sent by the source
14. What information is used by TCP to reassemble and reorder received segments?
port numbers
sequence numbers*
acknowledgment numbers
fragment numbers
Explain:
At the transport layer, TCP uses the sequence numbers in the header of each TCP segment
to reassemble the segments into the correct order.
15. What does TCP do if the sending source detects network congestion on the path to the
destination?
The source host will send a request for more frequent acknowledgments to the destination.
The source will decrease the amount of data that it sends before it must receive
acknowledgements from the destination.*
The destination will request retransmission of the entire message.
The source will acknowledge the last segment that is sent and include a request for a
smaller window size in the message.
Explain:
If the source determines that TCP segments are either not being acknowledged or not
acknowledged in a timely manner, then it can reduce the number of bytes it sends before
receiving an acknowledgment. Notice that it is the source that is reducing the number of
unacknowledged bytes it sends. This does not involve changing the window size in the
segment header.
16. What is a characteristic of UDP?
UDP datagrams take the same path and arrive in the correct order at the destination.
Applications that use UDP are always considered unreliable.
UDP reassembles the received datagrams in the order they were received.*
UDP only passes data to the network when the destination is ready to receive the data.
Explain:
UDP has no way to reorder the datagrams into their transmission order, so UDP simply
reassembles the data in the order it was received and forwards it to the application.
17. What does a client do when it has UDP datagrams to send?
It just sends the datagrams.*
It queries the server to see if it is ready to receive data.
It sends a simplified three-way handshake to the server.
It sends to the server a segment with the SYN flag set to synchronize the conversation.
Explain:
When a client has UDP datagrams to send, it just sends the datagrams.
18. What happens if the first packet of a TFTP transfer is lost?
The client will wait indefinitely for the reply.
The TFTP application will retry the request if a reply is not received.*
The next-hop router or the default gateway will provide a reply with an error code.
The transport layer will retry the query if a reply is not received.
Explain:
The TFTP protocol uses UDP for queries, so the TFTP application must implement the
reliability, if needed.
19. A host device is receiving live streaming video. How does the device account for video data
that is lost during transmission?
The device will immediately request a retransmission of the missing data.
The device will use sequence numbers to pause the video stream until the correct data
arrives.
The device will delay the streaming video until the entire video stream is received.
The device will continue receiving the streaming video, but there may be a momentary
disruption.*
Explain:
When TCP is used as the transport protocol, data must be received in a specific sequence or
all data must be fully received in order for it to be used. TCP will use sequence numbers,
acknowledgments and retransmission to accomplish this. However, when UDP is used as the
transport protocol, data that arrives out of order or with missing segments may cause a
momentary disruption, but the destination device may still be able to use the data that it has
received. This technology results in the least amount of network delay by providing minimal
reliability. Since live streaming video applications use UDP as the transport protocol, the
receiver will continue showing the video although there may be a slight delay or reduction in
quality.
20. Why does HTTP use TCP as the transport layer protocol?
to ensure the fastest possible download speed
because HTTP is a best-effort protocol
because transmission errors can be tolerated easily
because HTTP requires reliable delivery*
Explain:
When a host requests a web page, transmission reliability and completeness must be
guaranteed. Therefore, HTTP uses TCP as its transport layer protocol.
21. When is UDP preferred to TCP?
when a client sends a segment to a server
when all the data must be fully received before any part of it is considered useful
when an application can tolerate some loss of data during transmission*
when segments must arrive in a very specific sequence to be processed successfully
Explain:
UDP can be used when an application can tolerate some data loss. UDP is the preferred
protocol for applications that provide voice or video that cannot tolerate delay.
22. Which three application layer protocols use TCP? (Choose three.)
SMTP*
FTP*
SNMP
HTTP*
TFTP
DHCP
Explain:
Some protocols require the reliable data transport that is provided by TCP. In addition, these
protocols do not have real time communication requirements and can tolerate some data loss
while minimizing protocol overhead. Examples of these protocols are SMTP, FTP, and HTTP.
23. Refer to the exhibit. Consider a datagram that originates on the PC and that is destined for
the web server. Match the IP addresses and port numbers that are in that datagram to the
description. (Not all options are used.)
destination IP address -> 192.168.2.2
destination port number -> 80
source IP address -> 192.168.1.2
source port number -> 2578
Explain:
A TCP/IP segment that originated on the PC has 192.168.1.2 as the IP source address. 2578
is the only possible option for the source port number because the PC port number must be in
the range of registered ports 1024 to 49151. The destination is the web server, which has the
IP address 192.168.2.2, and the destination port number is 80 according to the HTTP protocol
standard.
24. What information is used by TCP to reassemble and reorder received segments?
sequence numbers*
acknowledgment numbers
fragment numbers
port numbers
Older Version
25. Refer to the exhibit. How many broadcast domains are there?
1
2
3
4*
26. How many usable host addresses are there in the subnet 192.168.1.32/27?
32
30*
64
16
62
27. How many host addresses are available on the network 172.16.128.0 with a subnet mask of
255.255.252.0?
510
512
1022*
1024
2046
2048
28. A network administrator is variably subnetting a network. The smallest subnet has a mask of
255.255.255.248. How many host addresses will this subnet provide??
4
6*
8
10
12
29. Refer to the exhibit. A company uses the address block of 128.107.0.0/16 for its network.
What subnet mask would provide the maximum number of equal size subnets while providing
enough host addresses for each subnet in the exhibit?
255.255.255.0
255.255.255.128*
255.255.255.192
255.255.255.224
255.255.255.240
30. Refer to the exhibit. The network administrator has assigned the LAN of LBMISS an address
range of 192.168.10.0. This address range has been subnetted using a /29 prefix. In order to
accommodate a new building, the technician has decided to use the fifth subnet for configuring
the new network (subnet zero is the first subnet). By company policies, the router interface is
always assigned the first usable host address and the workgroup server is given the last usable
host address. Which configuration should be entered into the properties of the workgroup server
to
allow
56
60
64
68
72*
35. When developing an IP addressing scheme for an enterprise network, which devices are
recommended to be grouped into their own subnet or logical addressing group?
end-user clients
workstation clients
mobile and laptop hosts
hosts accessible from the Internet*
36. A network administrator needs to monitor network traffic to and from servers in a data
center. Which features of an IP addressing scheme should be applied to these devices?
random static addresses to improve security
addresses from different subnets for redundancy
predictable static IP addresses for easier identification*
dynamic addresses to reduce the probability of duplicate addresses
37. Which two reasons generally make DHCP the preferred method of assigning IP addresses to
hosts on large networks? (Choose two.)
It eliminates most address configuration errors.*
It ensures that addresses are only applied to devices that require a permanent address.
It guarantees that every device that needs an address will get one.
It provides an address only to devices that are authorized to be connected to the network.
It reduces the burden on network support staff.*
38. Refer to the exhibit. A computer that is configured with the IPv6 address as shown in the
exhibit is unable to access the internet. What is the problem?
56
60
64
68
72*
47. Match the subnetwork to a host address that would be included within the subnetwork. (Not
all option are used.)
– not scored –
192.168.1.64/27
– not scored –
192.168.1.32/27
192.168.1.96/27
48. Refer to the exhibit. Match the network with the correct IP address and prefix that will
satisfy the usable host addressing requirements for each network. (Not all options are used.)