The Big Picture: Internetworking Internetworking: Internet Protocol (IP)
00010001 11001001 00011101
(Lecture 9)
Teknologi Jaringan Komputer
you are here, bab 4
Johny Moningka (
[email protected]) Fakultas Ilmu Komputer Universitas Indonesia Semester 2003/2004 Versi: 1.01
2
Agenda
Review (… so far) Understand
Problem: There is more than one network!
Bagaimana bentuk/dasar jaringan: host terhubung langsung => link tunggal (one physical medium) Bagaimana membangun jaringan lebih besar (connected networks: packet switching).
Simple Internetworking (Bab 4.1) • • • • • • •
Basis internetwork (Bab 4.1.1) Service model (Bab 4.1.2) Global Address & ARP (Bab 4.1.3, 4.1.5) Datagram Forwarding: IP (Bab 4.1.4) Host Configuration: DHCP (Bab 4.1.6) Error Reporting: ICMP (Bab 4.1.7) Virtunal Networks & Terminals (Bab 4.1.8)
Internetworking Masalah variasi dan heterogenitas jaringan => implementasi yang berbeda pada protokol bawah (layer 1 & 2) dan hardware. Membahas jaringan yang berkembang menjadi sangat besar, mis. Internet (scalability issues).
Rujukan: Peterson and Davie, Ch. 4 3
Versi: 1.1
Versi: 1.1
4
Basics of Internetworking
Versi: 1.1
Heterogeneity
Apa yang disebut: internetwork?
Routers (R1, R2..) interconnect networks of different types
Ilusi terhadap koneksi seperti: suatu jaringan (direct link) tunggal Dalam praktek: jaringan dibangun diatas kumpulan berbagai jenis jaringan. Dalam praktek: penulisan software (proses) yang mendukung model abstraksi “communication channel”.
Network 1 (Ethernet) H7 H2
H1
H8
Network 4 (point-to-point)
Network 2 (Ethernet) R1
Sifat:
R3
H3
R2
Mendukung heterogenitas jaringan: tidak bergantung pada implementasi hardware, topologi dan platform (sistem operasi, jenis nodes dll) Potensi skala konetivitas
H4 Network 3 (FDDI)
H5
H6
“The Internet: a specific global internetwork that grew out of ARPANET” 5
Versi: 1.1
6
Versi: 1.1
1
Heterogeneity
Internet Protocol (IP)
Protocol stack perspective
Umum:
H1
Packet based (packet switching): datagram Fungsi: menghubungkan banyak jaringan (internetwork), jaringan yang layer 1 & 2 berbeda (phisical & datalin: kabel & frame yg berbeda). Prasyarat (capabilities)
H8
TCP
R1
R2
IP
IP
ETH
ETH
IP
FDDI
FDDI
TCP
R3
IP
PPP
IP
ETH
PPP
• Routing: forwarding paket multi hops / melalui multiple links. • Global addressing: IP Address (32-bit), panduan utk routing.
ETH
7
Versi: 1.1
Internet Protocol (IP): protocol stack
8
Versi: 1.1
The Internet Protocol: Layer
network protocol for the Internet operates on all hosts and routers IP => jembatan utama protokol lain
...
FTP
Host/application
HTTP
NV
TCP
TFTP
Paket data yang dibuat oleh end-system (host)
Layer App
...
UDP
Transport
TCP / UDP
Network
IP
Data
TCP Segment
Hdr
Data
Hdr
IP Datagram
Link
network
...
Ethernet
IP FDDI
ATM
phone line
Paket data yang dikirimkan dalam internetworking
...
Hardware 9
Versi: 1.1
IP: Outline topics
10
IP: service model Service untuk Transport layer (TCP, UDP)
Outline of internetworking with IP
global name space & identifikasi host (address) host-to-host connectivity (connectionless) “best effort” packet delivery
service model overview of message transmission host addressing and address translation datagram forwarding fragmentation and reassembly error reporting/control messages dynamic configuration protocol extensions through tunneling 11
Versi: 1.1
Not in service model: delivery guarantees on bandwidth, atau delay => DATAGRAM Delivery failure modes packet delayed for very long time packet lost packet delivered more than once packets delivered out of order Versi: 1.1
12
Versi: 1.1
2
Global Addressing Considerations (1)
Addressing Considerations Structured vs flat
Map higher interface to lower interface
Contoh alamat flat => Ethernet (global unik), tapi tidak terdapat identifikasi networks mana interface tsb berada (asumsi hanya satu networks)
Misalkan: alamat surat
Fixed length or variable length? Issues:
Issues
• Flexibility • Processing costs • Header size
Routes => find the subnetwork => find the host in that subnetwork => find the host’s interface Need structure => to map subnetwork and host How many levels => skalabilitas vs kompleksitas prosesing
Engineering choice: IP uses fixed length addresses
IP Address: structured/hirarkis, fixed 2 levels.
Router: sederhana, prosesing address cepat 13
Versi: 1.1
IP (IPv4) : address model
14
IP Addresses Fixed length: 32 bits Initial classful structure (1981) Total IP address size: 4 billion
Internet address properties 32-bit address hierarchical: network (/subnetwork), host
Class A: 128 networks, 16M hosts Class B: 16K networks, 64K hosts Class C: 2M networks, 256 hosts
traditional classful address (1981)
A: 0 network (7) B: 1 0
High Order Bits 0 10 110
host (24 bits)
network (14 bits)
C: 1 1 0
host (16 bits)
network (21 bits)
Versi: 1.1
IP (IPv4) : address model (3)
127.0.0.1: local host (a.k.a. the loopback address Host bits all set to 0: network address Host bits all set to 1: broadcast address
www.usps.gov
Host in class B network www.cs.ui.ac.id
Note:
Host in class C network
17
Versi: 1.1
Some Special IP Addresses
Decimal-dot notation Host in class A network
• 198.182.196.56
Class A B C
16
IP addresses
• 152.118.14.3
Format 7 bits of net, 24 bits of host 14 bits of net, 16 bits of host 21 bits of net, 8 bits of host
host (8 bits)
15
• 56.0.78.100
Versi: 1.1
IP address => address interface (bind) Suatu host /card dapat mempunyai lebih satu interface => satu host mempunyai lebih dari satu IP address.
www.linux.org
Versi: 1.1
18
Versi: 1.1
3
IP: Datagram forwarding
Forwarding: “network”
Properties:
198.192.186.23
198.192.100.10
MyHost
Setiap paket IP harus mempunyai alamat IP untuk host tujuan (global address) Setiap alamat IP mempunyai informasi host tujuan berada pada “network” yang mana (“bagian network” dari IP address) Semua host dan router yang terhubung pada satu “network” (physical) mempunyai alamat “network” yang sama dari IP address
OtherHost R1 198.192.186.
198.192.100.
R3 198.192.186.10
R2 198.190.180.
• Misalkan: 198.192.186 (network address) => suatu jaringan LAN X; semua host yang terhubung dengan LAN X, mempunyai alamat IP: 198.192.186.xx
198.190.180.2 198.190.180.14
19
Versi: 1.1
Internetwork: Datagram Routing
20
Versi: 1.1
Router: Forwarding Router:
Routers send packet to next closest point
H
R
R
H
Menyimpan routing table (how to reach destinations) => arah atau next hops Misalkan: Dari Myhost untuk mencapai host 198.190.189.14, harus melalui R2 dan R3
R
H
R
• Pada entry tabel routing R2, untuk mencapai subnetwork 198.190.189.xx => go to R3
R R
Kemungkinan R3, juga dapat melakukan forwarding ke router yang lain dst, sampai di subnetwork tujuan.
H R
H: Hosts
R
R: Routers
H
21
Versi: 1.1
Forwarding Table
22
IP Address: Public & Private Publik: IP address (network number) yang unik dan dikenal di Internet (reachable)
Contoh Forwarding Table: Router R2
23
Versi: 1.1
Network Address
Next Hop
198.192.100
R1
198.190.180
R3
198.192.186
Interface 0
Registrasi dan distribusi informasi pada backbone router di Internet
Private: IP address (network number) yang dapat digunakan secara internal => tidak untuk umum Internal routing (hanya unik secara internal) RFC1918 - IANA assigned private IP address: 10.0.0.0/8; 172.16.0.0/16; 192.168.0.0/16; Network Mask: 255.0.0.0 ( / 8) Versi: 1.1
24
Versi: 1.1
4
Public IP Address
IP Packet Size
IP public diatur oleh organisasi ICANN (non-profit)
Besarnya data dalam paket IP => 64 KB (lebar field untuk panjang data 16 bit) Masalah:
Untuk Asia Pasifik registrasi didelegasikan melalui APNIC (http://www.apnic.net) APNIC juga memberikan porsi alokasi IP address pada NIR (National Internet Registry) dan ISP
Perbedaan physical layers (variasi) yang membatasi panjang “frame” (mis. Ethernet hanya 1500 bytes)
Keterbatasan IP address:
• Dikenal sebagai: maximum transmission unit (MTU)
Terutama untuk kelas B Secara praktek tidak ada pembagian kelas lagi (CIDR) tapi dengan prefix (/20 => 12 bit untuk host address => 4096 host untuk suatu netwok) 25
Versi: 1.1
IP: Fragmentation and Reassembly (1)
Source host tidak dapat mengetahui berapa minimum MTU (protokol link yang akan dilewati)
26
IP: Fragmentation and Reassembly (2)
Solusi:
Fragmen adalah paket lengkap (IP datagram)
Jika diharuskan: IP paket dapat dipecah (fragmentation) oleh router dalam beberapa paket IP
Terdapat IP header pada setiap fragmen Router (intermediate) dapat melakukan fragementasi sesuai keperluan
• Setiap paket IP dikirim pada setiap frame ke link
Questions
Penggabungan fragmen dilakukaan pada tujuan (destination address)
• Dimana fragemen paket-paket tersebut digabung (reassembly) kembali? • Apa yang harus dilakukan jika salah satu fragmen hilang atau rusak?
27
Versi: 1.1
Versi: 1.1
Fragmentation: information
End nodes (host);
Jika satu atau lebih fragmen hilang => discard semua fragmen lain 28
Versi: 1.1
IP: Packet Format
Length Panjang dari IP fragment (panjang data) 0
Identification
4
8 16 19 Length HLen TOS Ident Flags Offset TTL Protocol Checksum
31
Version
Identifikasi yang sama untuk fragment dari IP paket yang sama: match up with other fragments
Flags
SourceAddr DestinationAddr Options (variable) Data
Akhir dari fragment (ada atau tidak ada lagi fragment) : More fragments flag
Fragment offset
Pad
(variable)
Posisi byte fragment tsb (where this fragment lies in entire IP datagram) 29
Versi: 1.1
30
Versi: 1.1
5
IP Packet Format 4-bit version IPv4 = 4, IPv6 = 6
4-bit header length Counted in words, minimum of 5
8-bit type of service field (TOS) Mostly unused
16-bit data length Counted in bytes
IP Packet Format Fragmentation support
8-bit time-to-live field (TTL)
16-bit packet ID
Hop count decremented at each router Packet is discard if TTL =0
• All fragments from the same packet have the same ID
3-bit flags • 1-bit to mark last fragment
8-bit multiplexing protocol field
13-bit fragment offset into packet
TCP = 6, UDP = 17
• Counted in 8-byte words
16-bit IP checksum on header
31
Versi: 1.1
Summary: Internet Architecture
IP is the “compatibility layer” Hourglass architecture All hosts and routers run IP => perekat dari berbagai jenis jaringan & aplikasi
33
Variable size Source-based routing Record route
Padding Fill to 32-bit boundaries
32
Versi: 1.1
Summary: “Simple” Approach Dumb network
Packet-switched datagram network Best effort, connectionless
32-bit source IP address 32-bit destination IP address Options
IP provide minimal functionalities to support connectivity TCP
• Addressing, forwarding, routing
UDP
Smart end system Transport layer or application performs more sophisticated functionalities
IP
• Flow control, error control, congestion control
Advantages
Satellite
Accommodate heterogeneous technologies (Ethernet, modem, satellite, wireless) Support diverse applications (telnet, ftp, Web, X windows) Decentralized network administration
Ethernet ATM
Versi: 1.1
34
Versi: 1.1
6