CSCI 245 Computer Networks Beloit College Computer Science Eyad Haj Said hajsaide@beloit.edu Meeting hours: TR 8:00 AM-9:45 AM, Beloit College, Science Building – 116 , Office Hours Monday 1:00 pm – 2:30 pm, Tuesday 12:00 pm -1:30 pm, or Wednesday 2:00 pm – 3:30 pm, or by appointment in person or Zoom CSCI 245 Computer Networks Pre-requisite • CSCI 175 Computer Architecture Textbook • Data Communications and Networking with TCP/IP Protocol Suite, Forouzan, McGraw Hill. Reference book • Computer Networks, Tanenbaum, 5th Edition, Pearson. . Course Objectives Identify the network topologies and network types. Understand the layered communication architectures (OSI and TCP/IP). Understand the fundamentals of data transmission principles Identify the characteristics of the various transmission media. Understand the concepts of error detection techniques. Understand the functionality of data link layer and services related to it. Become familiar with Ethernet and IEEE standards Identify the principles of routing and switching Describe IP protocol specification and operation Recognize transport layer services, protocols and performance. Understand the client/server model and key application layer protocols Recognize growth and control of the Internet and its social implications Understand the basics of data and network security Topics Introduction to data communication and networking Network Models Physical layer and data transmission Transmission media Data link layer and error detection and correction. Wired LAN and Ethernet. Network layer and Transport layer, IP UDP ,and TCP Application layer and standard Introduction client-server protocols. to data and network security. Assessment Overview Assessment Task Weighting Midterm Exam 3/7/2024 20% Quizzes 25% Homework Assignments 30% Final Exam 5/7/2002 at 9 am 25% Policies – Homework Assignments Four homework assignments will be assigned throughout the course period. Students are responsible for submitting their homework by submitting all related files. Some of the homework assignments are based on teamwork homework assignments. However, each student in the team should submit the work. Penalty for late submission - 15% of the maximum mark specified for the assessment will be deducted for each day. Submitting the homework more than two days after the due date will not be accepted, and the homework will be marked as zero. Policies – Quizzes Quizzes will be given throughout the semester. The quizzes will be taken in the first 10 to 15 minutes or the last 10 to 15 minutes of the class without any announcement. At least one quiz will be taken in each week. Understanding topics covered during the class and the previous lectures are essential to obtain a high score in the quiz. No makeup quizzes without any medical/emergency excuse. Policies – Attendance Attendance is very important and expected for all class meetings. If a conflict arises with the scheduled class meeting time, please contact me before the class meeting (or as soon afterwards as possible in the case of an emergency). Students with Disabilities A If you have a disability and need accommodations, contact Learning Enrichment and Disability Services (LEADS) located on 2nd floor Pearsons (north side), 608363-2572, learning@beloit.edu or through olesena@beloit.edu . For accommodations in my class, you are to bring me an Access Letter from the Director of LEADS and then we will discuss how to implement the accommodations. Contact that office promptly; accommodations are not retroactive. Policy on Inclusivity Inclusivity is a demonstration of equity and social justice through awareness, understanding, and respect for the differences in identity, culture, background, experience, and socialization, and the ways in which these forms of difference impact how we live and learn. Inclusivity requires equitable, institution-wide representation and access to resources. In practice, this manifests itself by each individual being aware of, committed to, and responsible for the well-being and care of all students, staff, and faculty. The land on which we gather is a sacred indigenous place located within the ancestral territories of the sovereign Sac and Fox, Ho-Chunk, and Potawatomi Nations, as recognized by treaties between those nations and the United States of America. Recognizing and honoring Native occupancy is new at Beloit College, but it is fitting in view of our commitment to inclusion and anti-racism Getting to Know you After I call your name can you tell everyone •how long you have been at Beloit College or •where you are from if transfer/exchange •something interesting about yourself •If you are visiting for the semester or don’t yet have access to the Advanced CS lab then let me know so I can get that done I want us to be interactive • Ask questions or give thoughts at any time. Software Wireshark Packet Tracer CSCI 245 Computer Networks Chapter one Introduction To Data Communication and Computer Networks Slides are based on Data Communications and Networking book Data Communication Data communications are the exchange of data between two devices via some form of transmission media. Data communication system is combination of software and hardware and its effectiveness depends on • Delivery • Accuracy • Timeliness • Jitter Data Communication System components Data Representation Text Numbers Images Audio Video Data Flow Networks A network is the interconnection of a set of devices capable of communication. Device can be a host (end system) • Large computer, desktop, laptop, workstation, cellular phone, or security system. Device can also be a connecting device • such as a router, a switch, a modem that changes the form of data, and so on. Devices are connected via transmission media • Such as air, cable A network must be able to meet a certain number of criteria. • Performance: – Transit time: Amount of time required for a message to travel from one device to another – Response time: elapsed time between the inquiry and response. • Reliability, and • Security Networks – Physical Structure – Types of Connection Link is a communication pathway that transfers data from one device to another. Networks – Physical Structure – Physical Topology Physical topology refers to way in which a network is laid out physically. • Geometric representation of the relationship of all the links and the linking devices to one another. – Linking devices are called nodes Networks – Physical Structure – Physical Topology – Mesh Topology Networks – Physical Structure – Physical Topology – Star Topology Networks – Physical Structure – Physical Topology – Bus Topology Tap is a connector Drop line is a connection running between the device and the main cable Long cable acts as backbone to link all devices in a network Networks – Physical Structure – Physical Topology – Ring Topology Networks Types The criteria of distinguishing one type of network from another is difficult and sometimes confusing. Few criteria such as size, geographical coverage, and ownership to make this distinction • Local Area Network (LAN) • Wide Area Network (WAN) • Internetwork • Internet Networks Types – LAN LAN is usually privately owned and connects some hosts in a single office, building, or campus. • can be as simple as two PCs and a printer in someone’s home office, or • it can extend throughout a company and include audio and video devices. Each host in a LAN has an identifier, an address, that uniquely defines the host in the LAN. A packet sent by a host to another host carries both the source host’s and the destination host’s addresses. Networks Types – LAN Networks Types – WAN WAN is an interconnection of devices capable of communication. • LAN is normally limited in size; a WAN has a wider geographical span, spanning a town, a state, a country, or even the world. • LAN interconnects hosts; a WAN interconnects connecting devices such as switches, routers, or modems. • LAN is normally privately owned by the organization that uses it; a WAN is normally created and run by communication companies and leased by an organization that uses it. Networks Types – Point to Point WAN Networks Types – Switched WAN Networks Types – internetwork made of two LANs and one WAN Internetwork or internet (note the lowercase i) is two or more networks that can communicate with each other. Networks Types – heterogeneous network made of three LANs and four WANs Networks Types – Internet The most notable internet is called the Internet (uppercase I ), and is composed of thousands of interconnected networks. Networks Types – Internet Backbones are large networks owned by companies such as Version and AT&T. • Connected via complex switching systems (Peering Point) Provider networks use the service of the backbones for fee. Customer networks are networks at the edge of the Internet. • Use the services provided by Interent. Protocol Layering A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate effectively. • When communication is simple, simple protocol is needed • When the communication is complex, we need a protocol at each layer, or protocol layering. Protocol Layering A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate effectively. • When communication is simple, simple protocol is needed • When the communication is complex, we need a protocol at each layer, or protocol layering. Postal carrier facility Protocol Layering The Protocol Layering is important. Why? Layer can be considered as black box with inputs and outputs. • Separate services from implementation. • Some intermediate systems do not need to deal with all layers. Postal carrier facility Protocol Layering Principles bidirectional communication, we need to make each layer so that it is able to perform two opposite tasks, one in each direction. the two objects under each layer at both sites should be identical. logical connection between each layer • layer-to-layer communication TCP/IP PROTOCOL SUITE The Transmission Control Protocol / Internet Protocol (TCP/IP) reference model is a set of protocols that allow communication across multiple networks. It is a hierarchical protocol made up of interactive modules. The term hierarchical means that each upper level protocol is supported by the services provided by one or more lower level protocols. TCP/IP is thought of as a five-layer model TCP/IP PROTOCOL SUITE TCP/IP PROTOCOL SUITE – Layered Architecture TCP/IP PROTOCOL SUITE – Layered Architecture Logical connections TCP/IP PROTOCOL SUITE – Layered Architecture Identical objects (messages) Identical objects (segment or user datagram) Identical objects (datagram) Identical objects (datagram) Identical objects (frame) Identical objects (frame) Identical objects (bits) Identical objects (bits) TCP/IP PROTOCOL SUITE – Physical Layer Responsible for carrying bits in a frame across the link. Transmission medium carries the electrical or optical signals • Bits coming from transport layers are transformed and sent through the transmission medium • We consider the logical unit between two physical layers in two devices is a bit TCP/IP PROTOCOL SUITE – Data Link Layer Data link layer is responsible for taking the datagram and moving it across the link • The next link to travel is determined by router • The datagram coming from the network layer is encapsulated into packets called frames When the datagram travel from host to destination, several overlapping sets of links are used Routers Many are responsible for choosing the best route for each packet. protocols can be used in data link layers in TCP/IP suit protocol • Each protocol provide different services – Error detection – Complete error detection and correction TCP/IP PROTOCOL SUITE – Network Layer The network layer is responsible for creating a connection between the source computer and the destination computer. The communication at the network layer is host-to-host. The network layer in the Internet includes the main protocol, Internet Protocol (IP), that defines the format of the packet, called a datagram at the network layer TCP/IP PROTOCOL SUITE – Transport Layer The connection between the two transport layers is end-to-end connection. The message coming from the application layer encapsulated it in a transport layer sends it, through the logical connection, to the transport layer at the destination host. • The packet called a segment or a user datagram in different protocols TCP (Transmission Control Protocol) • Connection-oriented protocol that first establishes a logical connection between transport layers at two hosts before transferring data. • It creates a logical pipe between two TCPs for transferring a stream of bytes. • TCP provides flow control, error control, and congestion control to reduce the loss of segments due to congestion in the network. • Flow control: matching the sending data rate of the source host with the receiving data rate of the destination host to prevent overwhelming the destination. • Error control: to guarantee that the segments arrive at the destination without error and resending the corrupted ones TCP/IP PROTOCOL SUITE – Transport Layer UDP (User Datagram Protocol) • It is a connectionless protocol that transmits user datagrams without first creating a logical connection. • In UDP, each user datagram is an independent entity without being related to the previous or the next one (the meaning of the term connectionless). • Does not provide flow, error, or congestion control. • Attractive to an application program that needs to send short messages and cannot afford the retransmission of the packets involved in TCP, when a packet is corrupted or lost. TCP/IP PROTOCOL SUITE – Application Layer The connection between the two application layers is end-to-end connection. The application layers is process-to-process communication. To communicate, a process sends a request to the other process and receives a response The Hypertext Transfer Protocol (HTTP) is a vehicle for accessing the World Wide Web (WWW). The Simple Mail Transfer Protocol (SMTP) is the main protocol used in electronic mail (e-mail) service. The File Transfer Protocol (FTP) is used for transferring files from one host to another. Encapsulation and De-capsulation Encapsulation At the application layer, the data to be exchanged is referred to as a message. The message is passed to the transport layer. The result is the transport-layer packet, which is called the segment (in TCP) and the user datagram (in UDP). The transport layer then passes the packet to the network layer. The network layer takes the transport-layer packet as data and adds its own header contains the addresses of the source and destination hosts. The packets are called a datagram passes the packet to the data-link layer. The data-link layer takes the network-layer packet as data and adds its own header, which contains the link-layer addresses of the host or the next hop (the router). The result is the link-layer packet, which is called a frame passed to the physical layer for transmission. Decapsulation at Destination Host After the set of bits are delivered to the data-link layer, this layer decapsulates the datagram from the frame and passes it to the network layer. The network layer decapsulates the user datagram from the datagram and passes it to the transport layer. The transport layer decapsulates the message from the user datagram and passes it to the application layer. Encapsulation and Decapsulation at Router After the set of bits are delivered to the data-link layer, this layer decapsulates the datagram from the frame and passes it to the network layer. The network layer only inspects the source and destination addresses in the datagram header and to find the next hop to which the datagram is to be delivered. The data-link layer of the next link encapsulates the datagram in a frame and passes it to the physical layer for transmission. Example Link layer addresses may called • Link address • Physical address • MAC address N is IP address, DNS is used to determine the destination IP address L is link address Address Resolution Protocol is used to determine the destination link address 3 links and 2 routers Addressing Addressing Any communication that involves two parties needs two addresses: source address and destination address. We need four pairs of addresses, one pair per layer The physical layer does not need addresses Each address is related to a specific layer in the TCP/IP architecture. At the application layer, we use • names to determine the sites www.somesite.com • Email address somemail@Beloit.edu At the transport layer, addresses are called Port numbers, and these define the application-layer programs at the source and destination. • Port numbers are local addresses that distinguish between several programs running at the same time. At the network-layer, IP address the addresses are global, with the whole Internet as the scope. • A network-layer address uniquely defines the connection of a device to the Internet. The link-layer addresses, sometimes called MAC addresses, are locally defined addresses, each of which defines a specific host or router in a network (LAN or WAN). Multiplexing and Demultiplexing Multiplexing in this case means that a protocol at a layer can encapsulate a packet from several next-higher layer protocols (one at a time) Demultiplexing means that a protocol can decapsulate and deliver a packet to several next-higher layer protocols (one at a time). The TCP/IP protocol suite uses several protocols at some layers, we have multiplexing at the source and demultiplexing at the destination. OSI Model OSI Model vs. TCP/IP Scenario Scenario