Instructions for online Class
Find an online trace router and enter some web site url and watch the route taken
Students to update their IB Notes on how TCP/IP work to send packets across the internet. Able to identify the 5 different levels in the TCP/IP model with examples of protocols at each layer.
*** Assessment Using Time Slot Students will be asked questions on content covered today.
3.1.11 Explain how data is transmitted by packet switching.
3.1.3 Understand how and why communication over networks is broken down into different layers
What is packet switching?
Packet switching is a method of transferring the data to a network in form of packets. In order to transfer the file fast and efficient manner over the network and minimize the transmission latency, the data is broken into small pieces of variable length, called Packet. At the destination, all these small-parts (packets) has to be reassembled, belonging to the same file. A packet composes of payload and various control information.
Packet switching uses Store and Forward technique while switching the packets; while forwarding the packet each hop first store that packet then forward. This technique is very beneficial because packets may get discarded at any hop due to some reason. More than one path is possible between a pair of source and destination. Each packet contains Source and destination address using which they independently travel through the network. In other words, packets belonging to the same file may or may not travel through the same path. If there is congestion at some path, packets are allowed to choose a different path possible over existing network.
Advantage of Packet Switching over Circuit Switching
SMTP ( email)
IP Layer Wrapped around - What Machine /IP address is going to get this packet
TCP Layer Wrapped around Going to port 25 and this is packet 1/4
Sending a simple Email Assume 4 packets
All bundled together and the routed thru the network using IP Protocol
--------> Route VIA IP
- 1The Receiver deconstructs it looks at the IP layer and knows that the message is for this machine
- 2Data to be received on PORT 25 and first part of four 1/4
- 3Stores that and takes note received 1/4
Because IP protocol the next packet may be packet 3, but TCP will check and put in order.
What happens if not all packets are received ?
IP does not know or care, but TCP does care
TCP checks and if after reconstructs the email a packet is missing it will request the sender to resend that packet only
Find an online trace router and enter some web site url and watch the route taken
TCP/IP 5 Layer Model
What is a protocol ?
A protocol is a set of rules that govern how systems communicate. For networking they govern how data is transferred from one system to another.
What is a protocol Suite ?
A protocol suite is a collection of protocols that are designed to work together.
layered protocol stacks
Each level of the stack performs a particular function and communicates with the levels above and below it.
This layered arrangement is not confined to networking, and how it works is probably best understood if you compare it to real life example.
We will divide the task into two distinct processes as follows:
Why not use one single protocol to transfer data from one application to another?
The answer is that any of the layers/tasks can be changed without affecting the other layers.
One of the great benefits of TCP/IP is that it provides interoperable communications between all types of hardware and all kinds of operating systems.
A sign of the network’s success is the confusion that surrounds the term internet. Originally it was used only as the name of the network built upon IP. Now internet is a generic term used to refer to an entire class of networks. An internet (lowercase “i”) is any collection of separate physical networks, interconnected by a common protocol, to form a single logical network. The Internet (uppercase “I”) is the worldwide collection of interconnected networks
The most common protocol used in the transport layer is TCP (Transmission Control Protocol). This is a connection oriented protocol. TCP offers reliable, peer-acknowledged, ordered, session-based connectivity between two hosts.
During sending data, TCP assures that data has been provided to the recipient. The receiver checks if the received packet was intact during transmission (by checking the checksum of the data) and, if so, the receiver confirms it by sending an acknowledgement to the sender. If the sender doesn't receive the acknowledgement for a message within some time period, it will resend the lost packet.
After several unsuccessful attempts, TCP assumes that the receiver is unreachable and informs the application layer that the transmission has failed.
The TCP header contains a field with the message sequence number. The sequence number is incremented by one for every message sent. During receiving data, TCP rearranges incoming packets and put them in the right order. Thanks to that, the application layer doesn't need to care about the ordering of network packets.
TCP is widely used by protocols and applications that require high reliability. It is not as fast as UDP but, if configured properly, it still provides quite good speed together with high quality of transmitted data.
There are a lot of application layer protocols that are most mostly used together with TCP. Some of the most popular ones are:
The second popular protocol that is used in the transport layer is UDP (User Datagram Protocol or Universal Datagram Protocol), a simpler, connectionless protocol. One program just sends some packages to another, without creating any kind of relation between them.
Due to its simplicity UDP is faster than TCP. On the other hand, it doesn't provide such reliability as TCP. There is no guarantee that the messages would reach the receiver. UDP doesn't deliver packets in the same order that they were sent. It is up to the application to check that the received messages are intact and to deal with data in the correct order.
UDP is preferred if unimportant data is transmitted or the communication has to be really fast. For example, UDP is used for DNS requests (because of a huge number of clients sending many short messages to relatively few DNS servers). Similarly, during audio and video transmission the loss of some packets is not so damaging to the receiver.
There are a lot of application layer protocols that use UDP, for example:
Analogy between the postal network and TCP/IPBoth the post office and Internet separate responsibility into independent layers. Here is a comparison of the operation of the post office and the TCP/IP protocols.
Postal network: Someone writes a letter to a friend in New York, addresses it, and drops it in a mailbox. The friend opens the letter and reads it with a smile on his face. Neither of them think about how the letter got there -- did it go in a Ford or Chevrolet truck to the airport, what was the name of the person driving the truck, did it fly straight to New York or was it transferred to another plane in Kansas City, etc.? They are working at the application layer -- getting work done. They are communicating directly with each other, unaware of the underlying delivery mechanism.
TCP/IP: A user retrieves a Web page from a server in New York by typing a URL into a browser and clicking the enter key. The server receives the request, finds the page on its hard drive and sends it back to the user. Neither the user nor the client or server software is aware of the way the messages were delivered -- did they go over wireless connections, how many routers did they pass through, who manufactured the routers, was the server a PC or a rack-mounted machine, was it running IIS or Apache, etc.? There are many application layer protocols.
Postal network: If you accidentally write the wrong address on a letter to someone in Kansas, a postal employee in Kansas will stamp it "address unknown" and it will be returned to you. You will also be informed if a registered letter cannot be delivered. You will be unaware of the details of the error message delivery system, and it will be up to you to decide what to do next.
TCP/IP: Transport layer software establishes a connection between a client and server then monitors that connection for errors. It also slows transmission if it gets too fast to handle at the other end. Transport layer software is not concerned with how the data is actually moved from one point to the other -- that is the responsibility of lower level software. There are two transport layer protocols TCP (reliable) and UDP (unreliable, but fast). If TCP tries repeatedly and errors persist, it informs its "boss," the application program.
Postal network: Airplanes move letters between cities. The pilot does not pay attention to who the letters are addressed to or from, what they say, or whether they contain photos and drawings or only written words.
TCP/IP: Internet layer programs move data between networks. IP is the internet layer protocol. IP software ignores the data, and it does the same thing with a packet whether it comes from the Dalai Lama or your mother in law. Once the data gets to its destination local area network (LAN), it is handed over to data linklayer software or firmware for delivery to the proper computer.
Data link layer
Postal network: Trucks move letters within a city.
TCP/IP: Data Link layer programs move (incoming and outgoing) data within LANs. Ethernet is the most common data link protocol. A data link program is not concerned with how outgoing data will be handled once it leaves the LAN or how incoming data got there. That is the responsibility of the internet layer software.
Postal network: People use pens and paper to write letters, and the recipient reads them using reflected light and sometimes glasses.
TCP/IP: Physical layer protocols specify the means of representing ones and zeros (bits). The method of transmitting them between two points using wire, radio, fiber, etc. is also specified. There are many ways to make ones and zeros and many ways to transmit them so there are many physical layer protocols.
Breaking the rules
These are ideal descriptions. In real life, a postman might read a letter or decide not to deliver it. On the Internet, a router may be programmed to process packets from the owner of a competing service slowly or to send copies of packets containing certain content to a government security agency. In the postal network, there are laws against tampering with mail. Some people advocate network neutrality laws against differential treatment of packets on the Internet.