Matakuliah Tahun Versi : H0483 – Network Programming : 2008 : 2.0 Pertemuan 1 Network System Overview 1 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa dapat : • menjelaskan berbagai macam komponen / element pada sistem jaringan • menjelaskan fungsi protokol pada jaringan komoputer 2 Outline Materi • • • • • • • • Network System Elements Network software Communications Protocol Protocol layer OSI Model TCP/IP Reference Model Network Programming Tools Aplikasi Client Server 3 Network System Overview Network System Overview • Network System Elements – Computing Terminals (e.g. PC, Workstation, PDA, etc.) – Communication Links (e.g. LAN, WAN, Modem, ISDN, etc.) – Communication Protocols (e.g. TCP, UDP, and IP) – System Software (e.g. OS, Protocol Stack and NIC Drivers) – Application Software (e.g. Web, FTP, etc.) 4 Network System Overview 5 Network System Overview • Network software? – Software untuk mentransfer data dari satu proses ke proses yang lainnya. – System-level Network Software • Software untuk mengoperasikan dan mengelola jaringan – Network Interface Card drivers – Routing Software – Name Servers, etc. • Software for communications services – Transport protocol – Application-level Network Software • Integrate other functions (e.g. HTML ) to provide a particular service • Contoh: web servers and browsers, dll 6 Network System Overview Communications Protocol • A specification for two or more parties to convey information across a communications link. – Defines the interaction model (e.g. using a finite-state machine model) – Defines data encoding and structure • Examples: TCP, HTTP, FTP, etc. Packet / Frame / Segment / Message • A unit (finite number of bytes) for communications in a certain protocol • Unit has predefined structure such as header and trailer • Analogy – A bus is a unit for transportation. Every bus has a driver, an engine, etc. 7 Network System Overview • Communications Protocol – Software yang menerapkan protocol komunikasi tertentu. – Contoh: TCP Layer, IP Layer, dll. 8 Network System Overview • Protocol Stack – A collection of related Protocols or Protocol Layers – Example: a TCP/IP protocol stack 9 OSI Reference Model The OSI Reference Model • Developed by the International Standards Organization (ISO). • The model is called Open Systems Interconnection (OSI). • Consists of seven layers. • A paper design without practical implementation. • Provides a standard way to divide networking functions into seven layers. 10 OSI Reference Model 11 OSI Reference Model • Physical Layer – Physical layer merubah bit ke signal dan sebaliknya. – Media yg dipergunakan untuk mentransmisikan signal : Radio, Twisted pair, Coaxial cable, Optical fiber, dll. • Data Link Layer – Menyediakan suatu layanan yang bebas dari kesalahan transmisi, dengan kata lain Data link layer menjaga agar paket tiba dengan baik sampai di ujung media yg digunakan – Menyediakan error control (error detection) and flow control /acknowledgment 12 OSI Reference Model • The Network Layer – Network layer berkaitan dengan pengambilan paket dari source node ke destination node, routing, addressing physical device. • The Transport Layer – Transport layer mengontrol pengiriman pesan antara dua node di dalam network. – Divide message into packets – If required reorder packet that arrive out of order – If required resend lost or damaged packets 13 OSI Reference Model • The Session Layer – Provides session management • Pengendalian dialog (satu arah atau dua arah) • Token management (untuk memastikan bahwa kedua belah pihak yg berhubungan tdk melakukan operasi yang sama) • synchronization or crash recovery • The Presentation Layer – Concerns the syntax and semantics of the information transmitted – Performs information encoding and decoding to facilitate the exchange of information • Text: ASCII versus Unicode • Numbers: byte ordering and byte size differences 14 OSI Reference Model • The Application Layer – Defines the protocols and services for a specific application. – Examples: • • • • File Transfer (FTP) Email (SMTP, POP3) WWW (HTTP) Network News (NNTP) 15 TCP/IP Reference Model • TCP/IP Reference Model – A reference model created from the Internet protocols – Model assumptions: • Network is inherently unreliable • Network is connection-less – Consists primary of three layers • Internet Layer (IP) • Transport Layer (TCP, UDP) • Application Layer (HTTP, FTP, etc.) 16 TCP/IP Reference Model 17 TCP/IP Reference Model 18 TCP/IP Reference Model • The TCP/IP stack is shorter than the OSI one: • TCP is a connection-oriented protocol, UDP (User Datagram Protocol) is a connectionless protocol 19 TCP/IP Reference Model • The Internet Layer – – – – – – Protocol used: Internet Protocol (IP) Assumes a packet-switching network Connectionless Handles routing of IP packets Similar to OSI’s network layer IP (internet protocol) breaks communication into packets. • • • • Packets routed and delivered separately No delivery guarantee Max packet size: 65535 (less a 20 byte header) Sockets enable two machines to communicate via IP. 20 TCP/IP Reference Model • The Transport Layer – Protocol one: Transmission Control Protocol (TCP) • • • • Provides a reliable, connection-oriented, stream service. Handles data packetization and reassembly. Handles flow control, sequencing, and error recovery. Handles designation among processes in the same host by means of service port numbers. – Protocol two: User Datagram Protocol (UDP) • Provides an unreliable, connectionless, datagram service. • Handles designation among processes in the same host by means of service port numbers. • No flow control, sequencing, and error recovery. 21 TCP/IP Reference Model • The Application Layer Services Protocols • • • • • • • • • TELNET FTP SMTP/POP3 DNS NNTP HTTP RTSP NFS SNMP Virtual Terminal File Transfer Electronic Mail Name Resolution Network News World Wide Web Streaming Video Network File System Network Management 22 Network Programming Tools • Essential Components – A Programming Environment • Editor, Debugger, Compiler, etc. • Examples: gcc in UNIX, Visual C++ in Windows, etc. – A Network Programming Library • Application Programming Interface • Must be compatible with the Programming Environment • Examples: BSD Sockets, Winsocks, etc. – A Networked Operating System • Providing the required protocols • Controlling the network hardware • Examples: UNIX, Windows, etc. 23 Useful Network Tools • ping – Sends a packet (ICMP Echo, RFC792) to a remote machine, which then sends back a reply. – Useful for checking whether remote machine is online • telnet – As a quick debugging tool for text-based application protocols running over TCP • netstat – Finding out active connections and their status • Ipconfig (windows), ifconfig (linux) 24 Aplikasi Client Server Pendahuluan • Sebagian besar aplikasi-aplikasi pada jaringan komputer dibagi dua bagian yaitu : Client dan Server 25 Aplikasi Client Server 26 Aplikasi Client Server • Contoh : – Web Brouser (Clinet) vs Web Server – FTP Client vs FTP Server – Telnet Client vs Telnet Server • Client berkomunikasi dengan satu Server, sedangkan Server dapat berkunikasi dengan beberapa Client pada saat yg sama 27 Aplikasi Client Server Client Server Client Client Server handling multiple clients at the same time 28 Aplikasi Client Server 29 Aplikasi Client Server • Komunikasi antara Client dan Server pada jaringan komputer umumnya menggunakan Protokol jaringan al: TCP/IP, UDP dll. • TCP (pada Transport layer) menggunakan Internet Protokol / IP (pada Network layer). IP berkomunikasi dengan Lapisan Data Link 30 Aplikasi Client Server • Istilah IP yg telah dikenal mulai awal th. 80-an disebut juga dengan IP versi 4.0 (IPv4), dan pada pertengahan tahun 1990an telah dikembanagkan IP Versi 6 (IPv6). • Aplikasi Client – Sever tidak hanya pada LAN yang sama tetapi juga pada LAN yg berbeda 31 Aplikasi Client Server 32 Aplikasi Client Server • Network Programming – Mempelajari bagian apa nya ?? 33 Simplified Network Model Process Process Interface Protocols Transport Transport Peer-to-peer Protocols Network Network Data Link Data Link 34 Network API 35 FedX Layers Letter Addressed Envelope Letter Addressed Envelope 36