Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 DETAILS OF PROTOCOLS The Zoo Protocol - TCP - IP.

Similar presentations


Presentation on theme: "1 DETAILS OF PROTOCOLS The Zoo Protocol - TCP - IP."— Presentation transcript:

1 ravie@ftsm.ukm.my 1 DETAILS OF PROTOCOLS The Zoo Protocol - TCP - IP

2 2 A programmer can create Internet application software without understanding the underlying network technology or communication protocols - we will take a different approach Understanding the Zoo Protocol

3 3 Transmission Control Protocol (TCP)

4 4 Protocol at transport layer Sending message from client process to server process How client process could access services from server process? Inter-process communication is carried out through protocol port

5 5 Protocol Port Port number is assigned to process by operating system There are 2 16 ports (0 to 65535) There are 2 sets of port for UDP protocol for TCP protocol

6 6 Port well-known (1 – 1023) For standardized HTTP [80], SMTP[25], FTP[21, 22], POP3[110], Telnet [23] Ephemeral port (1024 – 65535) Assigned dynamically Assigned to client process When client process complete, port will be released The complete assigned list of ports can be seen with instruction /etc/services (at *nix)

7 7 Host sun1.ftsm.ukm.my /etc/services

8 8 Transmission Control Protocol (TCP) Provide reliable sending services Use protocol port for addressing process For application that needed trust such as: telnet, http, ftp etc.

9 9 Header Format of TCP

10 10 TCP connection TCP connection is identified with the last point (port number) of the connection To establish the connection, TCP needs both ways cooperation Client will request a port from server Server will open the port to start the connection

11 11 Three-Way Handshaking TCP uses three-way handshaking while starting and ending connection to provide reliability Determine that both nodes are ready as well as to put the sequence number in order to synchronize the connection

12 12 Starting TCP connection Use SYN segment to create a connection Host 1 sends SYN segment and random sequence number Host 2 reply to SYN segment, by sending ACK to Host 1 and random sequence number Host 1 reply with ACK

13 13

14 14 Ending TCP connection TCP uses FIN segment for ending the connection Four-way handshaking

15 15 User Datagram Protocol (UDP) It is a transport protocol Provide communication without unreliable communication Packet may be lost or it is not following the sequence No intermediary– receive data from application and immediately send it Used when no error control needed. For process such as : DNS [53], echo [7], tftp [69], SNMP[161]

16 16 UDP Datagram Format Header Source UDP Port (16 bit) Destination UDP Port (16 bit) UDP message length (16 bit) UDP Checksum (16 bit) Data Source UDP PortDestination UDP Port UDP message lenghtUDP Checksum Data

17 17 Internet Protocol (IP)

18 18 IP Protocol at network layer Provide packet sending via communication without connection Use IP for addressing Determine packet flow through one and more leap (hop) throughout the flow Provide mechanism that includes Data unit which called IP datagram Software to send datagram Method how host computer process datagram

19 19 Figure 19.2 Links in an internetwork

20 20 IP responsible in providing best-effort sending for packet/datagram How about the communication in the Internet ? Transport layer takes data flow and divided them into datagram Transport layer send each datagram through Internet. Division into smaller units could occur during this process At the destination, datagram will be regrouped by network layer to the original datagram and send it to transport layer

21 21 Figure 19.4 Network layer at the source

22 22 Figure 19.5 Network layer at a router

23 23 Figure 19.6 Network layer at the destination

24 24 Addressing Need a standard address format Address format must not dependent to hardware address format Address must be unique throughout the network (Internet) Body that regulate address registration– Internet Information Center (InterNIC)

25 25 IP address (IPv4) Represented by 32-bit integer Use dotted decimal quad notation Consist of 4 parts of 8 bit Divided by dot

26 26 Network class IP address is organized according to network class Class A: 0nnnnnnn.iiiiiiii.iiiiiiii.iiiiiiii Class B: 10nnnnnn.nnnnnnnn.iiiiiiii.iiiiiiii Class C: 110nnnnn.nnnnnnnn.nnnnnnnn.iiiiiiii Class D: 1110bbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb Class E: for future use Representation: n – network number i – host number b – group id

27 27 Address range to identify the class

28 28 Each IP address divided into two parts Network number (prefix) – shows physical network that connected the computer Host number (suffix) – shows computer unique number at the network Internet Corporation for Assigned Names and Numbers (ICANN) responsible for assigning class A, B and C to organisation

29 29 Class A, B and C are primary class Used for normal host addressing Class D is to multicast, For broadcasting message Class E is especially for future use Each host has virtual interface address which is known as loopback interface as 127.0.0.1 Also known as localhost

30 30 Figure 19.19 A network with two levels of hierarchy

31 31 Limitations in IP addressing system Some host has more than one address Network class is too rigid Not enough IP address for future development

32 32 Subnet IP address is organized as subnet to simplify network management Each subnet is a set of address that determine by Subnet address (exp: 199.17.35.96) Subnet mask (exp: 255.255.255.240)

33 33 Subnet A campus network consist of LAN for different departments

34 34 Figure 19.20 A network with three levels of hierarchy (subnetted)

35 35 Figure 19.21 Addresses in a network with and without subnetting

36 36 Exp of Subnet For network of Class B: 3 bit is used as subnet to turn it into 15 subnet subnet mask: 255.255.224.0 Other 13 bits represent host

37 37 Routing If destination host is not at the same network, datagram will be sent to gateway How would IP choose its pathway to send datagram to remote network? Using routing table that contain next hop information– that the other nod connected directly to gateway

38 38 Example of routing table netstat -nr $ netstat -nr Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 202.185.46.0 202.185.46.197 U 1 25591 hme0 224.0.0.0 202.185.46.197 U 1 0 hme0 default 202.185.46.254 UG 1 80525 127.0.0.1 127.0.0.1 UH 3 137862 lo0

39 39 Figure 19.31 Default routing

40 40 Internet Protocol Version 6 (IPv6) AKA Internet Protocol next generation (IPng) Address length added to 128 bit Allow Web host addition to Internet Allow Internet advancement

41 41 Diagnostic tools ping To test connection to host Measure round trip time traceroute (microsoft: tracert) Show data flow from host to destination http://www.traceroute.org/ netstat -nr Show routing table

42 42 ipconfig (microsoft) ifconfig -a (pd *nix) To show IP, subnet and computer gateway

43 43 Tools hostname Computer name domainname Domain name nslookup Network and Server Information Tools from Myloca (Telekom Malaysia) http://www.myloca.net/cgi-bin/trace/index.pl


Download ppt "1 DETAILS OF PROTOCOLS The Zoo Protocol - TCP - IP."

Similar presentations


Ads by Google