Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 MCT620 – Distributed Systems Workshop 1 – Lecture 3 Introduction to Networks.

Similar presentations

Presentation on theme: "1 MCT620 – Distributed Systems Workshop 1 – Lecture 3 Introduction to Networks."— Presentation transcript:

1 1 MCT620 – Distributed Systems Workshop 1 – Lecture 3 Introduction to Networks

2 2 Introduction to Distributed Systems Lecture 1 – Introduction to Distributed Systems Lecture 2 – History of Distributed Systems Lecture 3 – Introduction to Networks

3 3 In this Lecture …. Protocol Hierarchies Architecture of the Internet IP Addressing & Classes Subnetting Transmission Control Protocol - TCP User Datagram Protocol - UDP

4 4 Protocol Hierarchies

5 5 Protocol Hierarchies (2) The philosopher-translator-secretary architecture

6 6 Protocol Hierarchies (3)

7 7 Architecture of the Internet

8 8 TCP/IP Reference Model (1)

9 9 Format of the IP datagram

10 10 The big picture

11 11 User Datagram Protocol (1) Simple transport layer protocol described in RFC 768, in essence just a IP datagram with a short header Provides a way to send encapsulated raw IP datagrams without having to establish a connection

12 12 User Datagram Protocol (2) The application writes a datagram to a UDP socket, which is encapsulated as either IPv4 or IPv6 datagram that is sent to the destination; there is no guarantee that UDP datagram ever reaches its final destination Many client-server application that have one request – one response use UDP Each UDP datagram has a length; if a UDP datagram reaches its final destination correctly, then the length of the datagram is passed onto the receiving application UDP provides a connectionless service as there is no need for a long term relation-ship between a client and the server

13 13 UDP header

14 14 Transmission Control Protocol (1) Provides a reliable end to end byte stream over unreliable internetwork (different parts may have different topologies, bandwidths, delays, packet sizes, etc…) Accepts user data streams from local processes, breaks them into pieces (not larger than 64KB) and sends each piece as a separate IP datagram- tt the receiving end, the IP datagrams that contains TCP packets, are delivered to the TCP transport entity, which reconstructs the original byte stream The IP layer gives no guarantee that the datagrams will be delivered properly, so it is up to TCP to time out and retransmit them as the need arises Datagrams that arrive, may be in the wrong order; it is up to TCP to reassemble them into messages in the proper sequence

15 15 Transmission Control Protocol (2) Each byte on a TCP connection has its own 32 bit sequence number, used for various purposes (re-arrangement of out of sequence segments; identification of duplicate segments, etc…) Sending and receiving TCP entities exchange data in the form of segments. A segment consists of a fixed 20 byte fixed header (plus an optional part) followed by zero or more data bytes

16 16 TCP Service Model (1) Provides connections between clients and servers, both the client and the server create end points, called sockets Each socket has a number (address) consisting of the IP address of the host and a 16 bits number, local to that host, called port (TCP name for TSAP) To obtain a TCP service, a connection has to be explicitly established between the two end points A socket may be used for multiple connections at the same time Two or more connections can terminate in the same socket; connections are identified by socket identifiers at both ends (socket1, socket2) Provides reliability When TCP sends data to the other end it requires acknowledgement in return; if ACK is not received, the TCP entity retransmits automatically the data and waits a longer amount of time

17 17 TCP Service Model (2) All TCP connections are full duplex and point to point (it doesnt support multicasting or broadcasting) A TCP connection is a byte stream not a message stream (message boundaries are not preserved) i.e. if a process is doing four writes of 512 bytes to a TCP stream, data may be delivered at the other end as four 512 bytes reads, two 1024 bytes reads or one 2048 read

18 18 TCP IP Client Server Interaction

19 19 IP Addressing

20 20 Internet Classes

21 21 Dotted decimal notation

22 22 Class ranges for Internet addresses

23 23 Campus network example Consider a large organization with class B addresses ( )

24 24 Subnets (1)

25 25 Subnets (2) In our example, the subnets are as follows: Subnet 1: | Subnet: Subnet mask: First host in the subnet 1: Subnet 2: | Subnet: Subnet mask: First host in the subnet 2: Subnet 3: | Subnet: Subnet mask: First host in the subnet 3:

26 26 CIDR Basic idea is to allocate the remaining IP addresses in variable-sized blocks, without regard to the classes. If a site needs, say 2000 addresses, it is given a block of 2048 addresses on a 2048 byte boundary Dropping classes makes the routing more complicated, the old routing algorithm is not working anymore

27 27 CIDR practical example (1) Addresses are available at

28 28 NAT

29 29 IPv6 CIDR and NAT may buy a few more years, but the days of IPv4 are numbered (address shortage problem) 1990, IETF started to work on IPv6, with a number of ambitious goals However, its still not widely deployed

30 30 Summary In this lecture we have looked at some of the aspects of networking that impact on the way that Distributed Systems are designed. We have seen how Protocol Hierarchies allow us to reduce complexity by abstracting detail into different layers. The Architecture of the Internet has an ever growing influence on Distributed System design and we have seen how it is organised. TCP & UDP are important protocols for internet based systems – we meet them again next week in the context of socket programming.

Download ppt "1 MCT620 – Distributed Systems Workshop 1 – Lecture 3 Introduction to Networks."

Similar presentations

Ads by Google