Network Programming Lecture 01 PDF - University of Haripur

Summary

These are lecture notes for Network Programming from the University of Haripur, created in 2012. The notes cover topics such as the OSI model, TCP/IP, network components, and types of networks. The prerequisites include basic C++ programming and understanding operating systems.

Full Transcript

Network Programming Lecture 01 Prerequisites Basic C++ Programming Understanding of Operating Systems Computer Networks Fundamentals Modules Introduction to Network Programming TCP Socket Programming UDP Socket Programming Advanced Socket Progr...

Network Programming Lecture 01 Prerequisites Basic C++ Programming Understanding of Operating Systems Computer Networks Fundamentals Modules Introduction to Network Programming TCP Socket Programming UDP Socket Programming Advanced Socket Programming Application-Level Protocols Network Performance & Security REFERENCES BOOKS 1. An Engineering Approach to Computer Networks - S. Keshav, 2nd Edition, Pearson Education. 2. Understanding communications and Networks, 3rd Edition, W. A. Shay, Cengage Learning. 3. Computer Networking: A Top-Down Approach Featuring the Internet, James F. Kurose, K. W. Ross, 3rd Edition, Pearson Education. Outcomes Students should be understand and explore the basics of Computer Networks and Various Protocols. Student will be in a position to understand the World Wide Web concepts. Students will be in a position to administrate a network and flow of information further. Student can understand easily the concepts of network security, Mobile Network Overview Layering (service abstraction) - Problem decomposition - Modular design - Interoperability OSI Principles: - Different level of abstraction - Well-defined functions - Supporting open system - Well-defined interfaces (layers boundaries) - Different functions are in different layers Introduction to Networking Concepts Network – A collection of interconnected devices (computers, servers, routers) that communicate to share resources and data. Node – Any device (computer, printer, router) connected to a network. Protocol – A set of rules that define how data is transmitted over a network (e.g., TCP/IP, HTTP, FTP). IP Address – A unique numerical identifier assigned to each device in a network for communication. Cont. MAC Address – A hardware address assigned to a network interface card (NIC) for device identification. LAN (Local Area Network) – A network confined to a small geographic area, like a home or office. WAN (Wide Area Network) – A network that covers large geographic areas, such as the internet. Router – A device that directs data packets between different networks. Switch – A network device that connects multiple devices within a LAN and forwards data based on MAC addresses. Firewall – A security system that monitors and controls network traffic based on security rules. IP Address Function: Enables devices to send and receive data over the network by identifying their location. Purpose: Ensures that data reaches the correct destination in a networked environment. Types of Networks LAN (Local Area Network) – Small, single location (Home, Office) WAN (Wide Area Network) – Large, multiple locations (Internet) MAN (Metropolitan Area Network) – City-wide network PAN (Personal Area Network) – Bluetooth, smartwatches Network Components Hosts (Computers, Servers, IoT devices) Networking Devices (Routers, Switches, Hubs) Communication Media (Cables, Wireless Signals) Protocols (TCP/IP, HTTP, FTP, etc.) What is the OSI Model? The Open Systems Interconnection (OSI) Model is a conceptual framework for network communication. Divides communication into 7 layers Ensures interoperability between different systems OSI Model - Overview Application Layer – End-user interaction (HTTP, FTP) Presentation Layer – Data encryption & formatting (SSL, JPEG) Session Layer – Session establishment (RPC, SQL) Transport Layer – Reliable data transfer (TCP, UDP) Network Layer – Routing & addressing (IP, Routers) Data Link Layer – MAC addressing, error detection (Ethernet) Physical Layer – Transmission of raw bits (Cables, Wi-Fi) Overview TCP/IP Transmission Control Protocol/Internet Protocol (TCP/IP) is the foundation of the Internet and modern networks. Defines how data is sent and received across networks TCP/IP Model – Overview Application Layer – User-level applications (HTTP, FTP, SMTP) Transport Layer – Ensures reliable data delivery (TCP, UDP) Internet Layer – IP addressing and packet routing Network Access Layer – Physical network transmission Compare OSI vs TCP/IP