Networking Case Study in Stem Education - Application Layer Protocol Labs
Networking Case Study in Stem Education - Application Layer Protocol Labs
Networking Case Study in Stem Education - Application Layer Protocol Labs
Abstract
The TCP/IP network stack offers different communication services through defined standard transport
and network layer protocols. It represents a networking subsystem that is currently used by most of the
application layer protocols - for example, DNS (Domain Name System), FTP (File Transfer Protocol),
HTTP (Hypertext Transfer Protocol), different e-mail protocols, and many others. All application
protocols rely on transport layer protocols (TCP or UDP), but in their standard form, they completely lack
any data security mechanisms. That is why nowadays networks include "security layer" protocols such
as TLS (Transport Layer Security).
When introducing application protocols to our undergraduate STEM students, we provide clear lab
examples in which basic protocol facts can be checked by simply recording and analysing network traffic
at the host. This paper gives an introduction to a few often-used application layer protocols and their
relation to the TCP/IP network stack. It includes the description of our standard networking lab - using
the well-known network analyzer, Wireshark, students have to notice and try to explain some specific
events and protocol behaviours. Two application protocol-related labs are described - DNS and HTTP
labs. As part of the HTTP lab, the basics of securing transferred data are depicted, explained, and
hopefully, confirmed by students.
Generally, the goal of the paper is to provide an explanatory example that can help STEM students
understand the basics of everyday used application protocols.
Keywords: TCP/IP, application protocol, Wireshark, STEM, networking, HTTP, DNS.
1 INTRODUCTION
The Internet is mainly based on ideas and protocols defined in the TCP/IP network stack ([1], [2]). Even
though those concepts originate back in the 1980s, they are still used every day as dominant underlaying
foundation for application layer protocols, such as DNS (Domain Name Server, [3]), HTTP (Hypertext
Transfer Protocol, [4]), FTP (File Transfer Protocol, [5]), different e-mail protocols and other proprietary
application layer protocols used in computer networks. The TCP/IP stack itself can be seen as a layer-
based system, as shown in Fig. 1 – the lowest layer relates to physical network technology used to
implement communication links (e.g. Ethernet, optical, wireless or mobile), while network/Internet layer
always uses IP (Internet Protocol, IPv4 [6] or IP v6 [7], with current Google statistics [8] showing the
availability of IPv6 connectivity around 35%).
HTTP DNS
port 80 port 53
...HTTP, DNS, HTTPS
port 443
Application IMAP, POP,
SMTP, FTP...
TLS
TLS
Transport TCP • UDP TCP UDP
ICMP
Internet IPv4 • IPv6 IP
ARP
IEEE 802.3
IEEE 802.11
Link LTE
HSDPA...
Some of interesting issues and functionalities of IP that are presented to our students were described
in [9]. Transport layer of the TCP/IP stack proposes TCP (Transmission Control Protocol, [10]) and UDP
2939
More precisely, the web browser shall use HTTP (application layer protocol) to obtain the web page, by
sending HTTP request to the web server! Prior to that, it will have to use DNS to obtain required
information about the web server user wants to access (basically, it has to obtain logical, IP address for
the given symbolic web server (domain) address). In each case, web browser shall contact the
application layer of the networking subsystem (step 2 in Fig. 2)!
Figure 2. Schematic view – “wider picture”– user, software application and TCP/IP stack.
Shortly – when talking about application protocols in our networking class, we refer to application layer
protocols of TCP/IP stack (even though, the application protocol may be a term that could be used for
other usages, e.g. rules of communication among two programs). The term application relates to certain
user-oriented piece of software – program installed on the device, using certain operating system (e.g.
Windows on desktop PC, Android on mobile phone, some kind of smart or proprietary OS on TV etc.).
Additionally, Fig. 2 shows how the operating system relates to networking subsystem – while users
interact with user apps (programs, such as previously mentioned web browser, e-mail clients or any
other software requiring the networking) using some user interface (UI), the app, when necessary, must
interact with networking subsystem (when handling user requests by sending something to the network
and receiving data from the network, before presenting it to the user). The app shall only use the highest
layer protocols (HTTP, DNS, FTP etc.). Based on the communication process, it can be considered
client or server – client application (or software process) usually initiates the communication by sending
some kind of request to the server, while server waits for requests, starts the processing and finally
sends the response (most of our every-day used apps are clients – for example, the web browser is
HTTP client). Less important for this paper, Fig. 2 also depicts that networking subsystem at its lowest
layer must have the ability to use hardware related functionalities of the operating system – for example,
sends the data to device drivers which are responsible for working with network cards etc.
2940
are local DNS servers that are responsible for contacting all required servers, when and if necessary,
and sending response to the clients.
When our application (web browser, for example) gets a user request to fetch the information from some
web server (for instance, contacting Facebook with facebook.com or Google with google.com domain
name entered in address field of the browser – as show in Fig. 3) it has to connect to the server. But, in
order to connect, it must have server public IP address (symbolic domain names are here primarily to
make it easier for us, humans, to remember the most used addresses) – in general, it has to obtain
server IP address based on entered domain name, and that is why it has to contact the DNS before
making the connection. Additionally, each device can store DNS cache locally (simply put, by recording
all previously obtained domain name and IP address pairs), which may allow skipping some of steps
described next. For the sake of the clarity, we skip considering the device local DNS cache.
Our browser shall require server IP address from the DNS – as a DNS client, it connects to local DNS
server and sends a query (step 1 in Fig. 3). Local DNS server has to collect necessary information and
respond with the results. In the worst-case scenario, local DNS server will have to contact root NS in
order to get information about TLD NS responsible for .com domain (steps 2 and 3 in Fig. 3). After that
it would have to contact .com TLD NS in order to get address of authoritative NS responsible for
facebook.com (steps 4 and 5). Finally, it would have to contact authoritative NS to get the IP address of
the web server (steps 6 and 7). Obtained IP address is sent from local DNS server to the client (step 8)
and, finally, the browser can produce and send HTTP request (and encapsulate it to TCP and IP – being
able to fill in all required control information in protocol headers, including destination IP address in IP
header). On transport layer, DNS can use both UDP and TCP. UDP uses well-known-port 53 on the
server, and it is usually used for sending queries and retrieving results, while TCP is used for
administrative purposes (the same TCP port number 53, is assigned to DNS).
2941
of view, that may be considered a flaw. That is why additional secure sublayer is used to protect and
encrypt data being send through the network.
Figure 4. The concept of client/server negotiation when establishing secure HTTPS communication.
Figure only shows the idea, not technical details – when HTTPS is used, TCP connection has to be
established, as well as when using HTTP. But, prior to exchanging any data, the client and the server
have to negotiate secure communication parameters. If both sides are able to conform the requests (for
example, the server can insist on new version of TLS – if the client cannot support it, the secure
connection cannot be established) the procedure of exchanging and checking certificates starts. In case
all the checks are successful, symmetric key is generated and securely exchanged, and the secure
communication can start!
3 METHODOLOGY
While using adapted test environment for standard student labs, as described in [9], [12] and [14], labs
related to analysis of the application layer protocols can be performed in standard desktop environment
– no emulated network is required and student can perform the analysis in real-world network.
For the labs related to DNS and HTTP, network enabled PC is required, with installed network analyzer
tool, Wireshark [15]. Lab example related to DNS and described in 4.1 uses nslookup tool to connect to
DNS. It is a standard tool available on all platforms, providing direct access to DNS by sending queries
and receiving DNS answers. It can be used for educational purposes to allow students to record and
analyse network traffic and discuss some details of DNS (detecting transport protocol used, checking
DNS related control information – type of query etc.). Official reference to Windows OS implementation
of nslookup is given in [17].
Labs related to HTTP can be performed by using any available web browser. In this case, Mozilla Firefox
was used, but the result should not be importantly different when using other browsers. For provided
example, shared hosting server with prepared content and simple HTML page was used – commercial
domain unin.com.hr is used, with Apache [18] as HTTP server. For preparing HTML documents, Visual
Studio Code editor was used [19].
2942
In order to record a network traffic, Wireshark is started, proper network interface selected and capturing
activated. After completing each lab or part of the lab, captured data is recorded and analysed, following
suggestions given in official lab notes. Since used in real-world environment it was expected that large
amount of network traffic shall be captured and it was suggested that recorded data is filtered – the
simplest way would be filtering the data so that it matches server IP address (the static IPv4 address of
hosting server for unin.com.hr is 185.62.75.251). Additional functionalities of Wireshark, such as “Follow
TCP stream” can be used if necessary.
4 RESULTS
Using the methodology described in previous section, students are encouraged to study the official lab
documentation and work on given assignments. In this paper, only few lab examples are covered, but it
should give enough hints and ideas for expanding or adapting. The results are shortly described and
accompanied with visuals of used tools. All the examples presented here relate to domain unin.com.hr.
4.1 DNS
Tool called nslookup allows us to interact with DNS. Depending on the implementation, it supports
different optional parameters that can impact the results – for example, default DNS server can be
defined, the type of the DNS query selected etc.
The DNS lab example presented here queries the DNS for details about domain name unin.com.hr.
When analysing the domain, if following the lectures as expected, student should be able to determine
top level domain (hr) and its type (country code domain). Based on Fig. 3, it should be clear that host
(DNS client) will communicate only with local DNS server (or default server set with proper parameter
when calling nslookup).
For this example, instead of using local DNS server (in home networks, usually the server administered
by our Internet service provider), as default “local” DNS server we selected Google public DNS server
[20] with IPv4 address 8.8.8.8. After that, we send default query to the DNS server, by simply sending
known domain name (complete “trace” of nslookup command prompt can be seen in Fig. 5).
The result, showing filtered traffic captured in Wireshark is shown in Fig. 6. As it can be noticed, the filter
used in Wireshark is ip.dst == 8.8.8.8 or ip.src == 8.8.8.8. Why using IPv4 address 8.8.8.8?
Because it is the address of the DNS server we are using as default in this example.
What could be read and concluded from the captured data shown in Fig. 6? Actually, a lot! First of all,
as directly seen in central part of the Wireshark window, the result shows and proves that DNS uses
UDP as transport protocol and well-known port 53 on server side. Another thing that can be seen is that
standard query including only domain name (unin.com.hr) produces total of 4 queries – first two, for
certain reasons (correct lookup query for our domain would be if we enter correct fully qualified domain
name, FQDN, which should end with a dot – unin.com.hr. instead of unin.com.hr) try to get info about
unin.com.hr.Home – that is related to Windows networking and should be ignored. Without that, it can
be seen that two different queries about unin.com.hr were sent – type A and type AAAA – A is asking
for IPv4 address, while AAAA represents a query for IPv6 address.
2943
Fig. 6 shows details of server response (DNS answer) to type A query. As an answer, it returns
unin.com.hr public IPv4 address to the client. Also, when analysing the data, content view at the bottom
of Wireshark window could be used to determine that plain text data (e.g. domain name) is transferred
as packet payload. A query for IPv6 does not return any IPv6 since the server has no public IPv6.
Additionally, negative server responses (“No such name” response to unin.com.hr.Home query) could
be analysed and it could be seen that default server (8.8.8.8) returns a name of one of the root DNS
servers (a.root-servers.net) as administrative server that could have additional info about the domain.
4.2 HTTP
HTTP traffic for the analysis is generated using web browser connecting to prepared HTML example
page at address http://unin.com.hr/edulearn (index.html file located in folder edulearn at the server). The
web page includes a HTML form (used to fill some data – imaginary username and password - and send
it to the server using POST HTTP method) and two images – EduLearn21 logo and our institution logo.
Both images are located at the server. When visualized in the browser, example page looks as shown
in Fig. 7, while the HTML code used for the web page is listed in Fig. 8.
Couple tests can be done as part of this lab exercise. First, the web page access can be analysed – it
should show TCP connection establishment and few HTTP requests – first for the web page
(index.html), and then two more requests during the same TCP connection (HTTP/1.1 is used) for
fetching the image files (edulearn_logo.png and unin_logo.png).
2944
Figure 8. Source HTML for sample page (Visual Studio Code snapshot).
Another example would be recording the traffic after sending data through HTML form to the server. The
screenshot of traffic recorded in Wireshark and filtered so that it includes only established TCP
connection is given in Fig 9. The selected packet shows plain text data being send from the form to the
server (username and password are clearly visible and that kind of HTTP usage represents security risk
– the password is visible to anyone being able to record our network traffic).
Figure 9. Unsecure HTTP – POST to the server with readable username and password.
2945
Figure 10. Secured HTTP – TCP connection, negotiation and “missing” username and password.
5 CONCLUSIONS
As part of our networking course, we try to provide clear overview of all topics, followed by practical lab
examples used to confirm the theory presented during the lectures. When covering topics related to
application layer protocols students are encouraged to study the official lab documentation and work on
given assignments on their own, in their real networking environment. This paper described few quite
simple and easy to understand lab exercises, covering and explaining expected results. It is our intention
to organize the labs so that any student can confirm principles learned during the course. Due to the
space limitations, just two of application protocols, DNS and HTTP, were included in the paper, but that
should give proper overview of the methods used in our education process.
ACKNOWLEDGEMENTS
The registration fee and publication costs were paid by the author private business, Inter-biz, and not
his domicile institution (University North). Author can be contacted via [email protected] or
[email protected].
Graphical elements on some figures (Fig. 3) were downloaded from UxWing free icon library [21], while
other illustrative elements visible in figures being snapshots of lecture notes were found and imported
directly from Microsoft PowerPoint.
REFERENCES
[1] IETF, Network Working Group: “Requirements for Internet Hosts – Communication Layers”, RFC
1122 – status: Internet Standard, 1989. Retrieved from https://tools.ietf.org/html/rfc1122
[2] IETF, Network Working Group: “A TCP/IP Tutorial”, RFC 1180 – status: Informational, 1991.
Retrieved from https://datatracker.ietf.org/doc/html/rfc1180
[3] IETF, Network Working Group: “Domain Names – Implementation and specification”, RFC 1035 –
status: Internet Standard, 1987. Retrieved from https://datatracker.ietf.org/doc/html/rfc1035
[4] W3C (World Wide Web Consortium), HTTP Specifications and Drafts, Retrieved from
https://www.w3.org/Protocols/Specs.html
[5] IETF, Network Working Group: “File Transfer Protocol (FTP)”, RFC 959 – status: Internet Standard,
1985. Retrieved from https://datatracker.ietf.org/doc/html/rfc959
2946
[6] Internet Protocol Specification, RFC 791 – status: Internet Standard, 1981. Retrieved from
https://datatracker.ietf.org/doc/html/rfc791
[7] Internet Protocol version 6 Specification, RFC 8200 – status: Internet Standard, 2017. Retrieved
from https://datatracker.ietf.org/doc/html/rfc8200
[8] Google IPv6 Statistics. Accessed 10. May 2021. Retrieved from
https://www.google.com/intl/en/ipv6/statistics.html
[9] M. Mikac, M. Horvatić, V. Mikac, “Networking case study in STEM education – IP fragmentation”, in
INTED 2020 Proceedings, IATED Academy, pp. 1068-1077, 2020.
[10] IETF – Information Sciences Institute (ISI), University of Southern California, “Transmission Control
Protocol – DARPA Internet Program Protocol Specification”, status: Internet Standard, 1981.
Retrieved from https://tools.ietf.org/html/rfc793
[11] IETF – J. Postel, ISI, “User Datagram Protocol”, status: Internet Standard, 1980. Retrieved from
https://tools.ietf.org/html/rfc768
[12] M. Mikac, “Networking case study in STEM education – transport layer protocol (TCP and UDP)
labs”, in EDULEARN20 Proceedings, IATED Academy, pp. 2328-2337, 2020.
[13] IMUNES – Integrated Multiprotocol Network Emulator/Simulator. Accessed 12. May 2021.
Retrieved from http://imunes.net
[14] M. Mikac, M. Horvatić, “An approach for teaching and understanding computer networks using
realistic emulation tool”, in ICERI 2019 Proceedings, IATED Academy, pp. 1209-1219, 2019.
[15] Wireshark Network Analyzer. Accessed 1. May 2021. Retrieved from https://www.wireshark.org/
[16] Internet Assigned Numbers Authority - IANA, “List of root servers”. Accessed 12. May 2021.
Retrieved from https://www.iana.org/domains/root/servers
[17] Microsoft Docs. Accessed 12. May 2021., Retrieved from https://docs.microsoft.com/en-
us/windows-server/administration/windows-commands/nslookup
[18] Apache HTTP Server. Accessed 13. May 2021. Retrieved from https://apache.org
[19] Microsoft Visual Studio Code, Development IDE. Accessed 12. May 2021. Retrieved from
https://code.visualstudio.com/
[20] Google Public DNS. Accessed 13. May 2021. Retrieved from
https://developers.google.com/speed/public-dns
[21] UxWing Free Download icons. Accessed 12. May 2021. Retrieved from
https://uxwing.com/tag/networking-icons/
2947