Download - P4- Internetwork Dengan TCP-IP

Transcript
Page 1: P4- Internetwork Dengan TCP-IP

INTERNETWORKING DENGAN

TCP/IP

INTERNETWORKING DENGAN

TCP/IP

Presented by Dr. Suryani Alifah

Page 2: P4- Internetwork Dengan TCP-IP

Internetwork

• Kumpulan jaringan yang terinterkoneksi dimana terdiri dari jaringan-jaringan yang berbeda saling terhubung.

Misal: Penyambungan sebuah LAN dengan sebuah WAN atau penyambungan dua buah LAN disebut Internetwork.

2

Misal: Penyambungan sebuah LAN dengan sebuah WAN atau penyambungan dua buah LAN disebut Internetwork.

Permasalahan:

kompatibiltas antar perangkat (keras/ lunak)?

Page 3: P4- Internetwork Dengan TCP-IP

Internetworking

• Sebagian besar jaringan saling terhubung:

– Antar LAN yang berbeda tipe

– Antar LAN yang serupa

– Merbagai site terhubung dg WANMerbagai site terhubung dg WAN

• Dapat membentuk jaringan yang besar

• Konfigurasi tertentu dirujuk sbg internet

• Setiap bagian jaringan merupakan subnetwork

Page 4: P4- Internetwork Dengan TCP-IP

Jalur Data (Data Path)

• Jalur yang menghubungkan node-node pada internetwork untuk memindahkan/ mentransmisikan data (melakukanproses pengiriman/ penerimaan data),

4

Page 5: P4- Internetwork Dengan TCP-IP

Kebutuhan Internetwork• Data path/ jalur data: jalur yang menghubungkan node-node pada

internetwork untuk memindahkan/ mentransmisikan data (melakukan proses pengiriman/ penerimaan data)

• Sistem sumber juga harus mampu menginformasikan identitassistem tujuan yang diinginkan kepada jaringan komunikasi.

• Sistem sumber harus dapat memastikan bahwa sistem tujuan

5

• Sistem sumber harus dapat memastikan bahwa sistem tujuanbenar-benar dipersiapkan untuk menerima data

• Aplikasi transfer file pada sistem sumber harus dapat memastikanbahwa program manajemen file pada sistem tujuan benar-benardipersiapkan untuk menerima dan menyimpan file untuk beberapauser tertentu.

• Bila format-format file yang dipergunakan pada kedua sistemtersebut tidak kompatibel, maka salah satu atau sistem yang lain harus mampu melakukan fungsi penterjemahan.

Page 6: P4- Internetwork Dengan TCP-IP

Contoh : Arsitektur Komunikasi

Italian Business Effective Communication French Business

6

TranslatorTranslator

Telex OperatorTelex Operator

Physical Communication

:COMMUNICATIONS ARCHITECTURE EXAMPLE (william J. Bayda, 2000)

Page 7: P4- Internetwork Dengan TCP-IP

Sejarah TCP/IP

• The Defense Advance Research Projects Agency (DARPA) mengembangkan Transmission Control Protocol/Internet Protocol (TCP/IP) untuk interkoneksi antar berbagai jaringan komputer pada departemen keamanan departemen keamanan

• The Internet, an international Wide Area Network, menggunakan TCP/IP untuk menghubungkan institusi pendidikan dan pemerintah di seluruh dunia

• TCP/IP juga digunakan secara luas untuk jaringan komersial dan privat

Page 8: P4- Internetwork Dengan TCP-IP

Internetworking

• Sebagian besar jaringan saling terhubung:

– Antar LAN yang berbeda tipe

– Antar LAN yang serupa

– Merbagai site terhubung dg WANMerbagai site terhubung dg WAN

• Dapat membentuk jaringan yang besar

• Konfigurasi tertentu dirujuk sbg internet

• Setiap bagian jaringan merupakan subnetwork

Page 9: P4- Internetwork Dengan TCP-IP

Internetworking Devices

• Setiap subnetwork meliputi komunikasi antar devais yang terhubung ke subnetwork

– End systems (ESs)

• Antar subnetwork saling terhubung dengan intermediate systems (ISs)

– Menyediakan fungsi routing, relay dan path komunikasi – Menyediakan fungsi routing, relay dan path komunikasi

– Bridge dan router

– Menggunakan berbagai protokolyang berbeda

• Bridge bekerja pada layer 2

– Relay antar jaringan yang serupa

• Router bekerja pada layer 3

- Me-rutekan paket2 antar jaringan yang berbeda

Page 10: P4- Internetwork Dengan TCP-IP

Routers

• Interconnect dissimilar subnetworks

– Provide a link between networks

– Provide for routing and delivery of data between processes on end systems attached to different networks

– Do not require modifications of architecture of subnetworks– Do not require modifications of architecture of subnetworks

• Must accommodate differences among networks

– Addressing schemes

– Maximum packet sizes

– Interfaces

– Reliability

• Satisfied by internetworking protocol implemented in all end systems and routers

– IP

Page 11: P4- Internetwork Dengan TCP-IP

Internetworking Terminology

• Internet

– Sekumpulan jaringan komunikasi ynag interkoneksi menggunakan bridges dan/atau routers

• Intranet

– Digunakan oleh satu organization– Digunakan oleh satu organization

– Menyediakan aplikasi internet utama (World Wide Web)

– Beroperasi di dalam organisasi untuk maksud internal

– Can exist as isolated, self-contained internet

– Dapat terhubung ke Internet

• Subnetwork

– Refers to a constituent network of an internet. This avoids ambiguity because the entire internet, from a user's point of view, is a single network

Page 12: P4- Internetwork Dengan TCP-IP

Internetworking Terminology (2)

• End System (ES)– Device attached to one of the networks of an internet

– Supports end-user applications or services

• Intermediate System (IS)– Device used to connect two networks

– Permits communication between ES attached to different networks

• Bridge• Bridge– IS used to connect two LANs that use similar protocols

– Address filter

– Does not modify packets

– Layer 2 of the OSI model

• Router– IS used to connect two networks that may or may not be similar

– Uses an internet protocol present in each router and each end system of the network

– Layer 3 of the OSI model

Page 13: P4- Internetwork Dengan TCP-IP

Standards

• Dibutuhkan guna interoperability antar perangkat

• Keuntungan:

– Menjamin pasar besar bagi perangkat dan

software

13

software

– Memungkinkan komunikasi antar produk yang

berbeda

• Kerugian

– Freeze technology (???)

Page 14: P4- Internetwork Dengan TCP-IP

Standards Organizations in Networking

• Internet Society

• ISO (International Organization for Standardization)

– more formal

– NGO, but most members are from governments

14

– NGO, but most members are from governments

• ITU-T (formerly CCITT)

– International Telecommunications Union

– UN agency

– governmental

Page 15: P4- Internetwork Dengan TCP-IP

Internet Society (ISOC)

• Internet development and standardization

• 3 suborganizations

– IAB (Internet Architecture Board)

• overall Internet architecture

15

• overall Internet architecture

– IETF (Internet Engineering Task Force)

• protocol engineering and development

– IESG (Internet Engineering Steering Group)

• monitors IETF standardization efforts

Page 16: P4- Internetwork Dengan TCP-IP

IETF Organization

• Dikelompokkan dalam area

– Aplikasi, security, routing, dll.

– Setiap area mempunyai Area Director, yang juga member IESG

• Setiap area mempunyai beberapa working groups

16

• Setiap area mempunyai beberapa working groups

– working groups berkontribusi untuk standards/protocols, etc.

• Voluntary participation in IETF working groups

• For detail see

– www.ietf.org or

– RFC 3160 - The Tao of IETF - A Novice's Guide to the Internet Engineering Task Force

Page 17: P4- Internetwork Dengan TCP-IP

Internet Drafts and RFCs

• Internet Draft

– Draft and temporary documents

– expires in 6 months, if IESG does not approve it as an RFC

– can be resubmitted

– published online

17

– published online

– comments are welcome

• RFC (Request for Comments)

– final version

– can obsolete previous RFCs about the same topic

– actually an RFC can be of any type of document

• not necessarily a standard

• Best Current Practice, Experimental, Informational RFCs

• April 1st RFCs (http://en.wikipedia.org/wiki/April_1_RFC )

– My favorite is IP over Avian Carriers (RFC 1149)

Page 18: P4- Internetwork Dengan TCP-IP

Internet Standards Track

• Steps involve increasing amount of scrutiny and testing

• Step 1: Internet Draft

• Step 2: Proposed standard

– Internet Draft approved as an RFC by IESG

– must remain at least six months to advance

18

– must remain at least six months to advance

• Step 3: Draft standard

– at least two independent and interoperable implementations

– must remain at least 4 months

• Step 4: Internet standard

– Significant operational experience

• key difference between ISOC and other standardization organizations

– Consensus needed

Page 19: P4- Internetwork Dengan TCP-IP

Internet Assigned Numbers Authority (IANA)

• An ISOC entity responsible for all “unique numbers”

on the Internet

– including IP addresses

• Almost all protocols work with numeric parameters

19

• Almost all protocols work with numeric parameters

– e.g. port numbers, error codes, status codes,

message types, options, etc.

– the meanings of all numeric codes are mostly

specified in RFCs, but number assignment is

formalized by IANA

Page 20: P4- Internetwork Dengan TCP-IP

PROTOKOL TCP/IPPROTOKOL TCP/IP

Page 21: P4- Internetwork Dengan TCP-IP

Definisi Protokol

• Perlunya aturan, yaitu tata cara bagaimana merekadapat saling mengenal dan melakukan transfer data tanpa error.

• ‘Harus berbicara dengan bahasa yang sama.’

21

• Protokol: Kesepakatan dalam komunikasi tentang:

- apa yang dikomunikasikan,

- bagaimana komunikasi itu terjadi

- kapan komunikasi tersebut dilakukan

-

Page 22: P4- Internetwork Dengan TCP-IP

• TCP/IP merupakan satu set protocol yang

dikembangkan untuk memungkinkan kooperasi

antar komputer dalam berbagi sumber daya antar

jaringan

• TCP : “Transmission Control Protocol”

22

• TCP : “Transmission Control Protocol”

• IP : “Internet Protocol”

• Terdapat protokol Transport layer dan Network

layer

• The most well known network that adopted TCP/IP

is Internet – the biggest WAN in the world

Page 23: P4- Internetwork Dengan TCP-IP

TCP/IP Model

• Because TCP/IP was developed earlier than the OSI

7-layer mode, it does not have 7 layers but only 4

layers

23

OSI 7-layerTCP/IP Protocol Suite

FTP, SMTP, Telnet, HTTP,…

TCP, UDP

IP, ARP, ICMP

Network Interface

Page 24: P4- Internetwork Dengan TCP-IP

Figure 2.11

OSI v TCP/IP

Internet

Standards

IEEE

ISO

ITU-T

Page 25: P4- Internetwork Dengan TCP-IP

TCP/IP

TCP UDP

Process Layer

Transport Layer

Process Process

IP

802.3

Network Layer

Data-Link Layer

ICMP, ARP

&

RARP

Page 26: P4- Internetwork Dengan TCP-IP

TCP/IP Protocol Suite

Page 27: P4- Internetwork Dengan TCP-IP

Application

Transport

Internet

Network Interface

Application

Transport

Internet

Network Interface

Internet

Network Interface

Machine A Machine B

Router/Gateway

TCP/IP architecture-- Internet layer

27

Network 1 Network 2

Figure 2.11

1. Transfer of information across networks through gateways/routers

2. Corresponding to OSI network layer: routing and congestion control

3. Global unique IP address and IP packets

4. Best-effort connectionless IP packet transfer: no setup, routed independently, robust, out

of order, duplicate, or lose of packet

Page 28: P4- Internetwork Dengan TCP-IP

Application

Transport

Internet

Network Interface

Application

Transport

Internet

Network Interface

Internet

Network InterfaceS

Machine A Machine B

Router/Gateway

TCP/IP architecture-- Network interface layer

IP

packet

PacketPacket

of network1

IP

packetIP

packet

Packet

of network2

IP

packet

Packet

28

Network 1 Network 2

Figure 2.11

1. Concerned with network-specific aspects of the transfer of packets

2. Corresponding to part of OSI network layer and data link layer

3. Different network interfaces: X.25, ATM, frame relay, Ethernet, etc

Packet

of network1of network1 of network2

Packet

of network2

Page 29: P4- Internetwork Dengan TCP-IP

The procedure executed at routers

1. Router receives a frame from one network (e.g., N1) through its physical layer

2. The data link entity for N1 extracts the IP packet from the frame and passes the IP packet up to its network entity.

3. The network entity checks destination IP address (finds the

29

3. The network entity checks destination IP address (finds the packet is not for itself) and determines the next hop based on destination IP address (i.e., routing) , this next hop router will be in another network (e.g. N2)

4. Network entity passes the IP packet down to the data link entity for N2

5. Data link entity for N2 encapsulates the IP packet in a frame of N2 and passes the frame down to physical layer for transmission to the next router through network N2.

Page 30: P4- Internetwork Dengan TCP-IP

HTTP SMTP RTP

TCP UDP

DNSApp.

TransportTCP/UDP Provides

a network

independent

platform

IP provides

30

IP

Network

Interface 1

Network

Interface 3Network

Interface 2

Figure 2.12

TCP/IP protocol graph

InternetIP provides

independence

from underlying

networks

(e.g., Ethernet driver) (e.g., PPP driver)

Page 31: P4- Internetwork Dengan TCP-IP

ADDRESSING PADA TCP/IP

Terdapat 4 level pengalamatan yang digunakanpada internet menggunakan protokol TCP/IP:

1. Alamat fisik/ physical address,2. Alamat logika/ logical address,

TCP/IP Protocol Suite 31

2. Alamat logika/ logical address,3. Alamat port/ port address,4. Alamat khusus aplikasi/ application-specific

address.Setiap alamat dihubungkan dengan salu layer pada

arsitektur TCP/IP

Page 32: P4- Internetwork Dengan TCP-IP

32

Page 33: P4- Internetwork Dengan TCP-IP

NETWORK ACCESS LAYER:

PHYSICAL ADDRESS

Page 34: P4- Internetwork Dengan TCP-IP

Data Link and Physical Layers

34

Application

Transport

Network

Network Interface

Message

Segments

h M h M h M

h Mh h Mh h Mh

Packets

h Mh h Mhh h

Frames

Page 35: P4- Internetwork Dengan TCP-IP

TCP/IP Protocol Suite 35

Data87 101

packetdiscarded

2

packetdiscarded

3

packetaccepted

Data87 10

4

Page 36: P4- Internetwork Dengan TCP-IP

Sebagian besar LAN menggunakan alamat fisik 48-bit (6-byte)yang ditulis sebagai digit 12 hexadecimal; dimana setiap byte(2 hexadecimal digits) dipisahkan dengan colon, sbb:

TCP/IP Protocol Suite 36

07:01:02:01:2C:4B07:01:02:01:2C:4BA 6-byte (12 hexadecimal digits) physical address

Page 37: P4- Internetwork Dengan TCP-IP

• Hanya alamat hardware (MAC address) yang

unik untuk setiap host

• Perlu mengubah alamat jeringan ke alamat MAC

Destination IP = 158.132.148.132Source IP =

37

Ethernet

Ethernet

Frame

Ethernet address = ?

Packet

Destination IP = 158.132.148.132Source IP =

158.132.148.66

Packet

Page 38: P4- Internetwork Dengan TCP-IP

ARP – Address Resolution Protocol

1. Broadcast: Who has got IP address

158.132.148.132? What’s your

Ethernet address?

Case 1

38

2. Reply: I do. My Ethernet address is

00-60-8C-41-37-52

Ethernet Frame3.

Ethernet address = 00-60-8C-41-37-52

Page 39: P4- Internetwork Dengan TCP-IP

ARP – Address Resolution Protocol

Case 21. Broadcast: Who has got IP address

158.132.148.132? What’s your

Ethernet address?

39

2. Reply: The IP you indicated is not in your network. You

can give the packet to me first. My MAC address is 00-

60-8C-12-34-56

Router

3.

Ethernet Frame

Ethernet address = 00-60-8C-12-34-56

Page 40: P4- Internetwork Dengan TCP-IP

ARP Cache

• Will have a heavy traffic if so many ARP

broadcast messages are generated

• Each host will have a cache to store the

mappings (from IP to MAC address) that were

40

mappings (from IP to MAC address) that were

obtained before

• An entry will only be kept in the cache for a

limited amount of time (say, 2 minutes)

IP Address MAC Address

158.132.148.80 00-60-8C-27-35-9A

158.132.148.28 02-60-8C-1A-37-49

Page 41: P4- Internetwork Dengan TCP-IP

NETWORK LAYER:NETWORK LAYER:

ALAMAT LOGIKA

Page 42: P4- Internetwork Dengan TCP-IP

Network Layer

42

Application

Transport

Network

Network Interface

Message

Segments

h M h M h M

h Mh h Mh h Mh

Datagrams / Packets

Page 43: P4- Internetwork Dengan TCP-IP

Alamat jaringan/Network danSubnet

• Headerditambahkan ke setiap segmen pada

Network layerTotal

43

IP3

Total Length

Time to Live

Protocol Header CheckSum

Source Address

Destination Address

Segment

Segment

Page 44: P4- Internetwork Dengan TCP-IP

• Total Length – Total length of a packet (up to

65535 bytes)

• Time to Live – How many times this packet can

be routed on the network (up to 255)

• Protocol – The transport layer protocol that the

44

• Protocol – The transport layer protocol that the

packet belongs to• TCP: 6

• UDP: 17

• ICMP: 1

• Source address – the network address of the

computer that sends the data

• Destination address – the network address of

the computer that the data is sending to

Page 45: P4- Internetwork Dengan TCP-IP

• (Already mentioned)

• Each computer (host) must have a unique network

address (or IP address for TCP/IP suite)

• Each IP address is 32-bit long (four bytes)

• The four-byte address is written out as a.b.c.d

• e.g.

45

• e.g. Byte 1 Byte 2 Byte 3 Byte 4

158 132 161 99

• IP addresses are hierarchical

• network I.D. and host I.D.

• Each Network I.D. on the Internet needs to be

registered to the Internet Assigned Number

Authority

Page 46: P4- Internetwork Dengan TCP-IP

Net I.D.

Class A – for very large network

Host I.D.0

1 bit 7 bits 24 bits

46

• Only 27 (63) networks can belong to this class

• Each network, there are 224 hosts or computers

• Very few class A networks in the world

• e.g. Arpanet – the earliest packet switched

WAN (started 40 years ago)

Page 47: P4- Internetwork Dengan TCP-IP

Net I.D.

Class B – for medium size network

Host I.D.0

2 bits 14 bits 16 bits

• 214 (16384) networks can belong to this class

1

47

• 214 (16384) networks can belong to this class

• Each network, there are 216 (65536) hosts or

computers

• Polyu’s address belongs to this group

• e.g. 158.132.14.1

1001 1110 1000 0100 0000 1110 0000 0001

Network I.D. Host I.D.

Page 48: P4- Internetwork Dengan TCP-IP

Class C – for small network

Net I.D. Host I.D.0

3 bits 21 bits 8 bits

11

48

• 221 networks can belong to this class

• Each network, there are only 28 (256) hosts or

computers

Page 49: P4- Internetwork Dengan TCP-IP

Class D – for multicast network

Group no.0

4 bits 28 bits

111

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

49

• Packets are addressed to a multicast group

• Not often supported on Internet

Page 50: P4- Internetwork Dengan TCP-IP

Special Addresses

• Host I.D. = all ‘1’s ⇒⇒⇒⇒ Directed broadcast

“Broadcast to all hosts in the network or

subnetwork”, not assigned

• Host I.D. = all ‘0’s ⇒⇒⇒⇒ “This network”, not assigned

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

50

• Host I.D. = all ‘0’s ⇒⇒⇒⇒ “This network”, not assigned

• Network I.D. = 127 is reserved for loopback and

diagnostic purposes, not assigned

• Network I.D. + Host I.D. = all ‘1’s ⇒⇒⇒⇒ Limited

broadcast

“Broadcast to all hosts in the current network”,

not assigned

Page 51: P4- Internetwork Dengan TCP-IP

Subnets

• A class B address can have 65536 hosts

• Difficult to manage

• Usually subdivide into a few small subnets

• Subnetting can also help to reduce broadcasting

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

51

• Subnetting can also help to reduce broadcasting

traffic

All traffic to

158.132.0.0

158.132.0.0

Total 65536 hosts

RouterRouter

All traffic to

158.132.0.0

158.132.1.0

158.132.2.0

158.132.3.0

Each subnet 256 hosts

Page 52: P4- Internetwork Dengan TCP-IP

Subnet Mask

• How does the router know which subnet a packet

should go?

• For each interface of the router, a subnet mask is

provided to redefine which part of the address is

52

provided to redefine which part of the address is

Net ID and which part is Host ID

• Become classless addressing

A subnet mask: 255.255.255.0

1111 1111.1111 1111. 1111 1111. 0000 0000

‘1’s Net ID ‘0’s Host ID

Page 53: P4- Internetwork Dengan TCP-IP

Router

A packet with destination

address 158.132.1.10

S0E0 S1

S2

158.132.1.10

53

S0 S1 S2

Subnet 158.132.1.0 158.132.2.0 158.132.3.0

Mask 255.255.255.0 255.255.255.0 255.255.255.0

Routing Table

158.132. 1. 10

AND 255.255.255. 0

158.132. 1. 0

1001 1110.1000 0100.0000 0001.0000 1010

AND 1111 1111.1111 1111.1111 1111.0000 0000

1001 1110.1000 0100.0000 0001.0000 0000

Advantage: easy to compute

Page 54: P4- Internetwork Dengan TCP-IP

F. Routing• How a packet finds its way to a computer in a

network?

• By using Routers

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

54

• By using Routers

• Routing is the selection of a path to guide a

packet from the source to the destination

• Criteria in selecting a path may be:

• Shortest path

• Quickest path

• Cheapest path

Page 55: P4- Internetwork Dengan TCP-IP

U.S.

212.64.123.98router

Internet

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

55

Hong Kong

158.132.161.99

The red path is the

shortest path

Page 56: P4- Internetwork Dengan TCP-IP

• Each router has a table that records the

estimated distance to all other routers

• If a router knows the entire network topology,

the shortest path can be calculated

• To achieve this, routers broadcast Link State

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

56

• To achieve this, routers broadcast Link State

Advertisement to all other routers periodically

• By means of routing protocol

• Each router knows the exact topology, and then

calculates the shortest path

• In practice, it is not possible for a router to all

paths. Only the nearer ones are kept

• Hence can give wrong estimation

Page 57: P4- Internetwork Dengan TCP-IP

Host A158.132.148.66Default gateway: Router C

T1T1

S1T0

S0Router A

Routing Table

Subnet158.132.166.0

S1 158.132.166.0

255.255.255.0

Direct

T1 160. 64. 0. 0 Forward

ENG224

INFORMATION TECHNOLOGY – Part I

9. TCP/IP

57Host B160.64.123.98

Router C

S0

S1

T0

S1

T0

T0

Subnet160.64.123.0

Router B

T1 160. 64. 0. 0

255.255. 0. 0

Forward

Subnet160.64.124.0

Routing Table

S0

S0

S1

160. 64.124.0

255.255.255.0160. 64.123.0

255.255.255.0

Direct

Direct

Page 58: P4- Internetwork Dengan TCP-IP

Obtaining an IP AddressObtaining an IP Address

Page 59: P4- Internetwork Dengan TCP-IP

Obtaining an Internet Address

• Static addressing

– Each individual device must be configured with an IP address.

• Dynamic addressing

– Reverse Address Resolution Protocol (RARP)

Bootstrap Protocol (BOOTP)– Bootstrap Protocol (BOOTP)

– Dynamic Host Configuration Protocol (DHCP)

– DHCP initialization sequence

– Function of the Address Resolution Protocol

– ARP operation within a subnet

Page 60: P4- Internetwork Dengan TCP-IP

Static Assignment of IP Addresses

• Each individual device

must be configured

with an IP address.

Page 61: P4- Internetwork Dengan TCP-IP

Reverse Address Resolution Protocol

(RARP)

MAC HEADER IP HEADERRARP REQUEST

MESSAGE

Destination

FF-FF-FF-FF-FF-FF

Source

FE:ED:FD:23:44:EF

Destination

255.255.255.255

Source

????????

What is my IP address?

Page 62: P4- Internetwork Dengan TCP-IP

BOOTP IP

• The Bootstrap Protocol (BOOTP) operates in a client/server environment and only requires a single packet exchange to obtain IP information.

• BOOTP packets can include the IP address, as well as the address of a router, the address of a server, and the address of a router, the address of a server, and vendor-specific information.

Page 63: P4- Internetwork Dengan TCP-IP

Dynamic Host Configuration Protocol

• Allows a host to obtain an IP address using a defined

range of IP addresses on a DHCP server.

• As hosts come online, contact the DHCP server, and

request an address.request an address.

Page 64: P4- Internetwork Dengan TCP-IP

Problems in Address Resolution

• In TCP/IP communications, a datagram on a local-area network must contain both a destination MAC address and a destination IP address.

• There needs to be a way to automatically map IP to MAC addresses.

• The TCP/IP suite has a protocol, called Address Resolution • The TCP/IP suite has a protocol, called Address Resolution Protocol (ARP), which can automatically obtain MAC addresses for local transmission.

• TCP/IP has a variation on ARP called Proxy ARP that will provide the MAC address of an intermediate device for transmission outside the LAN to another network segment.

Page 65: P4- Internetwork Dengan TCP-IP

TRANSPORT LAYER:

PORT ADDRESSING

Page 66: P4- Internetwork Dengan TCP-IP

Transport Layer Protocols

Page 67: P4- Internetwork Dengan TCP-IP

Transport Layer

67

Application

Transport

Network

Network Interface

Message

Segments

h M h M h M

Page 68: P4- Internetwork Dengan TCP-IP

Source Port Destination Port

Sequence NumberTCP

Dividing and Reassembly

68

Sequence Number

Acknowledgement Number

Checksum

Message Data

TCP

Message

Page 69: P4- Internetwork Dengan TCP-IP

1 2 3

Sender

69

Timeout

retransmitA1 A3

1 3

Recipient

2

A2

Page 70: P4- Internetwork Dengan TCP-IP

• A Typical Procedure

• Sender• TCP divides a message into segments

• Add sequence no.

70

• Add sequence no.

• Send the segments in sequence and wait for acknowledgement

• If an acknowledgement for a segment is not received for a certain

period of time, resend it until an acknowledgement is received

• Recipient• When receiving segments, send the acknowledgement with correct

number

• Reassembly the segments back to the message

Page 71: P4- Internetwork Dengan TCP-IP

• A computer may perform a number of network

applications at the same time• FTP + SMTP + HTTP, etc.

• Each computer has only one network address, how

can it serve so many applications at the same time?

Port Multiplexing

71

can it serve so many applications at the same time?

⇒⇒⇒⇒ by port multiplexing

Network add:

158.132.161.99

Port 21 Port 25

Port 80

FTP SMTP

HTTP

Page 72: P4- Internetwork Dengan TCP-IP

Well-known Port Numbers

• Some port numbers are reserved for some purposes• Port 21: FTP – file transfer

• Port 25: SMTP – mail transfer

• Port 23: TELNET – remote login

• Port 80: HTTP – Web access

72

• Port 80: HTTP – Web access

• These port numbers are well known to all

computers in the network

• E.g. whenever a client access port 25 of the server, it

means the client needs SMTP service

Page 73: P4- Internetwork Dengan TCP-IP

Client SMTP Server

Located by: network

address + TCP port no.

Source Port Destination

SMTP port

= 1357

SMTP port

= 25

73

Source Port = 1357

Destination Port = 25

Sequence Number

Acknowledgement Number

Checksum

Message Data

= 1357 = 25

Page 74: P4- Internetwork Dengan TCP-IP

Client A SMTP + FTP Server

SMTP port

= 1357

Network address:

158.132.161.99

SMTP port

= 25

74

Client B

= 1357

FTP port

= 1361

FTP port

= 21

Page 75: P4- Internetwork Dengan TCP-IP

TCP

• Usual transport layer is Transmission Control Protocol

– Reliable connection

• Connection

– Temporary logical association between entities in different systems

• TCP PDU • TCP PDU

– Called TCP segment

– Includes source and destination port (c.f. SAP)

• Identify respective users (applications)

• Connection refers to pair of ports

• TCP tracks segments between entities on each connection

Page 76: P4- Internetwork Dengan TCP-IP

APPLICATION LAYER

Page 77: P4- Internetwork Dengan TCP-IP

• Application layer protocols define the rules when

implementing specific network applications

• Rely on the underlying layers to provide accurate

and efficient data delivery

77

and efficient data delivery

• Typical protocols:• FTP – File Transfer Protocol

• For file transfer

• Telnet – Remote terminal protocol

• For remote login on any other computer on the network

• SMTP – Simple Mail Transfer Protocol

• For mail transfer

• HTTP – Hypertext Transfer Protocol

• For Web browsing

Page 78: P4- Internetwork Dengan TCP-IP

Application Layer Examples

Page 79: P4- Internetwork Dengan TCP-IP

• TCP/IP is built on “connectionless” technology, each

datagram finds its own way to its destination

• Transport Layer protocols define the rules of

79

• Transport Layer protocols define the rules of • Dividing a chunk of data into segments

• Reassemble segments into the original chunk

• Typical protocols:• TCP – Transmission Control Protocol

• Provide further the functions such as reordering and data resend

• UDP – User Datagram Service

• Use when the message to be sent fit exactly into a datagram

• Use also when a more simplified data format is required

Page 80: P4- Internetwork Dengan TCP-IP

• Network layer protocols define the rules of how to

find the routes for a packet to the destination

• It only gives best effort delivery. Packets can be

80

• It only gives best effort delivery. Packets can be

delayed, corrupted, lost, duplicated, out-of-order

• Typical protocols:• IP – Internet Protocol

• Provide packet delivery

• ARP – Address Resolution Protocol

• Define the procedures of network address / MAC address translation

• ICMP – Internet Control Message Protocol

• Define the procedures of error message transfer

Page 81: P4- Internetwork Dengan TCP-IP

Application Layer

81

Application

Transport

Network

Network Interface

Page 82: P4- Internetwork Dengan TCP-IP

SMTP ServerClient

B. Example: SMTP

82

SMTP

TCP

IP, ARP, ICMP

Network Interface

SMTP

TCP

IP, ARP, ICMP

Network Interface

Actual

Virtual

Page 83: P4- Internetwork Dengan TCP-IP

• The underlying layers have guaranteed accurate

data delivery

• We need to make a lot agreements with the server

in application layer before sending mail

83

1. Agree on how data is represented

• Binary or ASCII

2. Ensure the right recipient

• There may be 1000 users served by the server

3. Ensure the client has the right to send mail

• Some clients are not welcome

4. How to tell the server it is the end of the message

• All mail looks the same

:

Page 84: P4- Internetwork Dengan TCP-IP

• Example: SMTP

The following mail is to be sent:

84

Date: Fri, 18 Jan 02 13:26:31 EDT

From: [email protected]

To: [email protected]

Subject: meeting

Let’s get together Monday at 1pm.

Page 85: P4- Internetwork Dengan TCP-IP

SMTP ServerClient

access port 25 of server

220 eee.hku.hk SMTP Service at 20 Jan

02 05:17:18 EDT

85

HELO polyu.edu.hk

MAIL From: <[email protected]>

250 eee.hku.hk – Hello,

polyu.edu.hk

250 MAIL accepted

Page 86: P4- Internetwork Dengan TCP-IP

Client SMTP Server

RCPT To:<[email protected]>

250 Recipient accepted

86

Date: Fri, 18 Jan 02 13:26:31 EDT

From: [email protected]

To: [email protected]

Subject: meeting

Let’s get together Monday at 1pm.

.

DATA

250 Recipient accepted

354 Start mail input; end with

.

Page 87: P4- Internetwork Dengan TCP-IP

• The agreement made in the SMTP protocol• All messages use normal text

• All ASCII characters

• The responses all begin with numbers

• To indicate the status when receiving the command

• Some words are reserved words

87

• Some words are reserved words

• HELO, MAIL, RCPT…

• Mail ends with a line that contains only a period

• The information passed with the SMTP messages

• The recipient name

• The sender name

• The mail

Page 88: P4- Internetwork Dengan TCP-IP

C. Domain Name (mentioned before)

• Every computer has a network address

• e.g. 158.132.161.99

• To access a computer, we need to specify its

88

• To access a computer, we need to specify its

network address

• Human beings are weak in memorizing numbers

• We prefer computer name or domain name

• e.g. hkpu10.polyu.edu.hk

• Need a machine on the Internet to convert name to

number

Page 89: P4- Internetwork Dengan TCP-IP

Domain name hierarchy

Example:

hkpu10.polyu.edu.hk

Computer name

89

Root domain name

other examples:

com – commercial company

org – general organization

net – major network centre

gov – government org.

mil – militrary group

edu – education org.

•The domain

within hk

•Note: edu.hk is

not the same as

edu

•The domain within

edu.hk

•One of the

educational

institutions in H.K.

Computer name

Page 90: P4- Internetwork Dengan TCP-IP

• An organization needs to register its domain name

• e.g. PolyU has registered its name to the domain

of edu.hk

• Once a domain name is assigned, the organization is

free to assign other names belong to its domain

90

• Once a domain name is assigned, the organization is

free to assign other names belong to its domain

• e.g. we can have

hkpu10.polyu.edu.hk

smtp.polyu.edu.hk

mail.polyu.edu.hk

Page 91: P4- Internetwork Dengan TCP-IP

Client

Domain Name Server (DNS) of

polyu.edu.hk

Address of www.yahoo.com

Where is

www.yahoo.com?

usually UDP

Become

client

91DNS of com

DNS of Yahoo.com

Where is

www.yahoo.com?

Address of www.Yahoo.com

Where is yahoo.com?

Address of the DNS

of Yahoo.com

client

Page 92: P4- Internetwork Dengan TCP-IP

• Nevertheless, such a complicated procedure needs

not perform in most cases

• Client computers usually remember the answers

that it got before

92

that it got before

• It reduces the loading to the root DNS

• To further reduce loading, there can be many root

DNS on the Internet

• e.g. there are a few “com” root DNS