FIT4165

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

TCP Header

(- max size of tcp header is 60 bytes (20 bytes of header and 40 bytes of options) - min size of tcp header is 20 bytes Includes: - source port (16 bit) port number of sender - destination port. (16 bit) port number of destination - sequence number (32 bit) the sequence number in the header is the sequence number of the first byte in the data -acknowledgement number (32 bit) usedto request next TCP segment (sequence number +1) -flags: (9 bits) aka control bits (SYN, FIN) - checksum (16 bit) simple error detection mechanism to determine the integrity of the data transmitted over a network - options: is optional header field

TCP

- A connection-oriented transport layer protocol. - reliable (error and congestion control) - Does not fully use GBN or SR, uses a mix of both -The sender window in TCP is originally the same size as the receiver window, - But as the congestion builds up in the network, it can become smaller than the receiver window. It can never become larger than the receiver window.

RIP (Routing Information Protocol)

- A routing protocol that configures routers to periodically broadcast their entire routing tables. - RIP is based on the distance-vector routing algorithm, - hop count is the only metric used to decide best path -best for small networks, easy to understand and configure - can create bottlenecks as it broadcasts its updates every 30 s - max hop count of 15 so any router further than that is not reached - uses bellman ford algorithm

Flow and Error Control (Data link layer DLC)

- One of the responsibilities of the DLC sublayer is flow and error control at the data-link layer - if a frame is corrupted between the two nodes, it needs to be corrected before it continues its journey to other nodes.

OSPF (Open Shortest Path First)

- Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. - A link-state routing protocol used on IP networks. -best for large networks - unlike RIP, only exchanges routing information when there is a change in network topology doesn't broadcast the entire routing table like RIP - collects link state information from neighbor routers and creates network topology map for network - no limit in hop count - considers more than hop count to determine path like speed, cost and path congestion - Dijkstra algorithm

Packet Switching

- Packet Switching transmits data across digital networks by breaking it down into blocks or packets for more efficient transfer - In packet switching, information is broken into data packets that are sent through the network independently of one another. - is connectionless orientated

Go Back N vs Selective repeat

- SR receive window is greater than 1 which allows the receiving window to store out of order packets and avoid resending them to congest network - SR send window is half the size of GBN which means we can send fewer packets before waiting for ack -GBN has a larger send window which means more packets can be sent before waiting for ACK -GBN recieve window is 1 so it can only store one packet at a time, if one packet is lost it must request that packet again, packets sent after the lost packet are not stored and must be sent again. This causes network congestion

Data Link Layer (Layer 2)

- The data link layer takes the data bits and "frames," and creates packets of the data to guarantee reliable transmission. This layer adds source and destination addresses to the data stream as well as information to detect and control transmission errors. - Data link layer has two sub-layers: DLC/LLC sublayer: It deals with protocols, flow-control, and error control - deals with all issues common to both point-to-point and broadcast links; - framing, flow control, error control, link management - HDLC, PPP Media Access Control MAC: It deals with actual control of media - frame addressing (MAC address) - CSMA/CD for ethernet and CSMA/CA for wifi, ALOHA

IPv4 Addresses

- The identifier used in the IP layer of the TCP/IP protocol suite to identify the connection of each device to the Internet is called the Internet address or IP address. - An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet. - The IP address is the address of the connection, not the host or the router, because if the device is moved to another network, the IP address may be changed.

Nodes and Links

- communication at data link level is node to node - end hosts and routers are referred to as nodes and the network in between is the link - you can have a point to point link or a broadcast link (

UDP

- connectionless (no handshake) - unreliable (no error control or congestion control) - Packets can arrive out of order or be lost - 8 byte (64 bit) header (min size) - max size: maximum payload of an IP datagram is 65,515 bytes because it needs to be encapsulated into a single IP datagram - UDP is used for simple request-response communication when size of data is small and therefore not as much concern about error or congestion control. Ex DNS -Cannot say that UDP is always fast. if the data is lost or incorrect then the speed doesn't matter because it needs to be resent. So not about how fast data is sent it's about how fast correct data is sent

Selective repeat protocol

- mostly identical to GBN protocol except receive window is greater than 1 and can send the packets out of order - SRP works better when the link is very unreliable. Because in this case, retransmission tends to happen more frequently, selectively retransmitting frames is more efficient than retransmitting all of them. - Can send the packets out of order - The sending and receiving windows are the same size more overhead at the recieving window because bigger buffer - Max send window size = Max recieve window size= 2^m/2 or 2^(m-1)

Checksum

- not mandatory in UDP (If he sender decides not to include the checksum the value sent for the checksum field is all 0s to show that the checksum is not calculated. - mandatory in TCP. The sender should calculate the check- sum; otherwise, the checksum calculation at the receiver fails and the segment is dropped

MAC (Media Access Control)

- sublayer of datalink layer - the media access control (MAC) sublayer deals only with issues specific to broadcast links.

UDP Header

-8 bytes (64 bits) long, divided into four sections/fields: 1) source port (16 bits) 2) destination port (16 bits) 3) message length (16 bits) 4) checksum (16 bits)

TCP Error control for reliable connection

1. Must give an ack that gives the next sequence number it expects to receive. The Seq number is the first byte of data the packet is up to 2. To reduce number of ACKs sent, when the receiver has no data to send and it recieves an in order segment, the receiver delays sending an ACK until another segment has passed. 3. When a segment arrives when a sequence number that is expected by the receiver and the previous in-order segment has not been acknowleded, the receiver immediately sends an ACK. Shouldnt be more than two in-order segments sent before an ACK. Prevents retransmission which can cause songestion 4. When a segment arrives with an out-of-order seq number that is higher than expcted (last segment was lost), the receiver immediately sends an ACK for the lost segment (the one it was expecting). Fast retransmission 5. When a missing segment arrives, the receiver sends an ACK for the next expected segment to tell the sender that the lost segment was received A fast retransmission algorithm is used when 3 duplicate ACKs are sent from receiver requesting the same segment Cumulative ACK: If an ack is lost but the receiver later sends an ACK for a next segment, sender knows the other ack was lost. The ACk for the next segment acts as an ACK for the previous as well 6. RTO (retransmission timeout): if an ACK is lost and a long time passes with no ACK received, RTO timer triggers a segment resend of last segment

Flow control Stop and Wait

1. source transmits frame 2. destination receives frame and replies with acknowledgement (ACK) 3. source waits for ACK before sending next frame 4. destination can stop the flow by not sending ACK 5. works well for a few large frames 6. Stop and wait becomes inadequate if large block of data is split into small frames

Sockets

A socket is one endpoint of a two way communication link between two programs running on the network. The socket mechanism provides a means of inter-process communication (IPC) by establishing named contact points between which the communication take place. Like 'Pipe' is used to create pipes and sockets is created using 'socket' system call. The socket provides bidirectional FIFO Communication facility over the network. A socket connecting to the network is created at each end of the communication. Each socket has a specific address. This address is composed of an IP address (32 bits) and a port number (16 bit)

ALOHA

ALOHA is a multiple access protocol for transmission of data via a shared network channel. It operates in the medium access control sublayer (MAC sublayer) of the open systems interconnection (OSI) model. In ALOHA, each node or station transmits a frame without trying to detect whether the transmission channel is idle or busy. If the channel is idle, then the frames will be successfully transmitted. If two frames attempt to occupy the channel simultaneously, collision of frames will occur and the frames will be discarded. These stations may choose to retransmit the corrupted frames repeatedly until successful transmission occurs.

Layers in TCP/IP

APPLICATION → Layer 5 → Packets are called messages → Addresses are called names TRANSPORT → Layer 4 → Segment/user datagram → Port numbers NETWORK → Layer 3 → Datagram → Logical numbers DATA LINK → Layer 2 → frame → Link-layer addresses PHYSICAL → Layer 1 → Bits

Advantages and disadvantages of Packet switching

Advantages - More efficient than circuit switching - Data packets are able to find the destination without the use of a dedicated channel - Reduces lost data packets because packet switching allows for resending of packets - More cost-effective since there is no need for a dedicated channel for voice or data traffic Disadvantages - Not ideal for applications that are in constant use, such as high volume voice calls - Each packet requires overhead information Includes destination and sequencing information Reduces communication capacity (Includes destination and sequencing information -> Reduces communication capacity) - More processing required at each node

Sequence number

All bytes in a TCP connection are numbered, beginning at a randomly chosen initial sequence number (ISN). The SYN packets consume one sequence number, so actual data will begin at ISN+1. The sequence number is the byte number of the first byte of data in the TCP packet sent (also called a TCP segment). The acknowledgement number is the sequence number of the next byte the receiver expects to receive. The receiver ack'ing sequence number x acknowledges receipt of all data bytes less than (but not including) byte number x.

Flow control Sliding window

Allows multiple numbered frames to be in transit • Receiver should have buffer space for W frames • Transmitter sends up to W frames without ACK • ACK includes number of next frame expected Receiver can stop further transmission with ACK RNR (Receive Not Ready) To resume it must send a normal acknowledge to resume For full-duplex link, ACK's can piggyback on frames

Packet/PDU and address names at each layer

Application Layer - Message, names Transport Layer - Segment, port numbers Network Layer - Datagram, logical addresses Data-link layer - Frame, link-layer address Physical layer - Bits

Error detection and correction DLC: Block Coding

Block coding refers to the technique of adding extra bits to a digital word in order to improve the reliability of transmission. The word consists of the message bits (often called information, or data) plus code bits. - the message to be sent is divded into datawords - a few bits are added to the dataword to make a codeword - the receiver knows the code words so knows if the codeword sent is valid or has been corrupted

DNS

A DNS server is a computer with a database containing the public IP addresses associated with the names of the websites an IP address brings a user to. DNS acts like a phonebook for the internet. Application layer protocol

classless addressing

A concept in IPv4 addressing that defines a subnetted IP address as having two parts: a prefix (or subnet) and a host. 12.24.76.8/8 → First 8 bits are for the prefix. Remaining 24 bits (32-8) will be suffix so for the network devices. 24 bits means 2^24 devices First address is the network address which is the prefix followed by 0s. You cannot use it Last address = Broad cast address and cannot be used by device Prefix length (netoworks) = 32 - log2(N) where N = number of addresses

Logical connection

A connection between browser and server, is different from a physical connection which is a transfer of electricity. A logical connection is a transfer of data over a network The layer-to-layer communication is referred to as a logical connection. Logical since the actual communication occurs at each layer by passing the Protocol Data Units (PDUs) down to the layer below (or up on receiver). So, the actual data exchange is between the layers of the protocol stack. A connection since the corresponding layers follow the same protocol when communicating with one another (host-to-host or hop-to-hop). The term connection here is used loosely.

Packet switching: virtual circuit approach

A connection between network nodes that, although based on potentially disparate physical links, logically appears to be a direct, dedicated link between those nodes. - packets are delivered in order - reliable connection - no need for overhead ineach packet -costly to implement - must always have a new connection set up

Assume Alice uses her browser to open two connections to the HTTP server running on Bob's server. How can these two connections be distinguished by the TCP?

A connection is distinguished by a pair of socket addresses, one for each end. Although the socket addresses at Bob's site are the same in this case, the socket addresses at Alice's site are different. Each socket address at Alice's site has a different ephemeral port number. (An ephemeral port is a short-lived endpoint that is created by the operating system when a program requests any available user port. The operating system selects the port number from a predefined range, typically between 1024 and 65535, and releases the port after the related TCP connection terminates.)

DHCP (Dynamic Host Configuration Protocol)

A network service that provides automatic assignment of IP addresses and other TCP /IP configuration information.

path-vector routing

A path vector protocol is a network routing protocol which maintains the path information that gets updated dynamically. Updates which have looped through the network and returned to the same node are easily detected and discarded. ❖ Spanning Trees ❖ Creation of Spanning Trees ❖ Path-Vector Algorithm

Link State Routing

A routing algorithm that creates least-cost trees and forwarding tables is link-state (LS) routing. ❖ Link-State Database (LSDB) ❖ Least-Cost Trees (Dijkstra's Algorithm)

open-loop congestion control

Policies are used to prevent the congestion before it happens. Methods used: - retransmission policy: sender retranmits a pakcet if it feels it has been lost or corrupted. Timers are set for efficiency - window policy: Selective repeat window is used so only lost packets are resent - acknowledgment policy: positive and negative acknowledgments - discarding policy: A router may discard less sensitive packets when congestion is likely to happen - admission policy: a quality of service mechanism that can prevent congestion in virtual circuit

Protocol Layering

Protocol layering is the division of a protocol into simpler smaller protocols that stack together to perform a task - A set of cooperating network protocols is called a protocol suite (protocol layering). + reduced dependency + division of tasks + flexibility allows layer to be replaced with another without changing the stack - commnication overhead: each layer needs to keep track of communication with other layers - some tasks may get repeated in each layer (like error detecion at data link layer and transport layer)

Network Delay

Queuing Delay: time waiting for its turn at output link Processing/Nodal Delay: Check for packet error & routing decision Transmission Delay: time to pump the packet onto a link at link speed Propagation Delay: the amount of time it takes for the head of the signal to travel from the sender to the receiver Router/node-to-router/node propagation Total Delay=sum of all the delays-above

Framing (DLC)

Data link layer needs to pack bits into frames, so that each frame is distinguishable from another. - Character-Oriented Framing (data is transmitted as series of bytes -suited for text) ❖ Bit-Oriented Framing (data is transmitted as series of bits -suited for any sequence of bits)

IPv4 datagram (network layer)

Data transmitted over an internet using IP is carried in messages called IP datagrams - has header (20 bytes) and data (65,535) - payload (data) - connectionless and unreliable thats why TCP has the error control process in place - Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the internet - IPSec is a security mechanism for IPv4

Other network layer services (error control, flow control, congestion and security)

Error control: can be implemented but usally isnt because data is fragmented at each router which makes error checking inefficent Flow control: regulates flow of data which can be sent without overloading receiver. There is a lack of flow control at network layer. Congestion control: Congestion occurs when the number of datagrams sent by source is beyond the capacity of network or routers

FTP

File Transfer Protocol (FTP) is the standard protocol provided by TCP/IP for copying a file from one host to another. Although transferring files from one system to another seems simple and straightforward, some problems must be dealt with first. For example, two systems may use different file name conventions. Two systems may have different ways to represent data. All of these problems have been solved by FTP in a very simple and elegant approach. Two separate connections are needed for setup and teardown to use FTP. FTP uses two TCP connections for communication. - Control connection: for control info like password port 21 - Data connection: for sending the file port 20 FTP uses a control connection for EACH transfer

HDLC Frame

Flag - It is an 8-bit sequence that marks the beginning and the end of the frame bit pattern is 01111110. Address - It contains the address of the receiver. If the frame is sent by the primary station, it contains the address(es) of the secondary station(s). If it is sent by the secondary station, it contains the address of the primary station. The address field may be from 1 byte to several bytes. Control - It is 1 or 2 bytes containing flow and error control information. (8 bits) different for difference frame types I for information S for supervisory U for unnumbered Information FCS - It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code used is CRC (cyclic redundancy code) (in I and U frames)

persistent and non-persistent connection

HTTP The non-persistent connection takes the connection time of 2RTT + file transmission time. It takes the first RTT (round-trip time) to establish the connection between the server and the client. The second RTT is taken to request and return the object. This case stands for a single object transmission. • For each connection, TCP requires at least three handshake messages( SYN, SYN-ACK, ACK) to establish the connection, but the request can be sent with the third one. After the connection is established, the object can be transferred. • After receiving an object, another three handshake messages (FIN, FIN-ACK, ACK) are needed to terminate the connection. A persistent connection takes 2 RTT for the connection and then transfers as many objects, as wanted, over this single connection • Only one connection establishment and connection termination is used. Can send as many requests without needing to do the handshakes

HTTP (Application Layer)

HTTP provides standard between a web browser and web server to establish communication. It is set of rules for transferring data from one computer to another. Data such as text, images, and other multimedia files are shared on the World Wide Web - can use persistent or non persistent connection

HDLC (High-level Data Link Control)

High-level Data Link Control (HDLC) is a group of communication protocols of the data link layer for transmitting data between network points or nodes

In classless addressing, we know the first and the last address in the block. Can we find the prefix length? If the answer is yes, show the process.

If the first and the last addresses are known, the block is fully defined. We can first find the number of addresses in the block (N) and then find the prefix length (n). N = (last address) - (first address) + 1 n = 32 - log2N Block: (first address)/n

Unicast Routing vs multicast routing

In unicast routing, a packet is routed, hop by hop, from its source to its destination by the help of forwarding tables. Multicast transmission sends IP packets to a group of hosts on a network

Network layer (Layer 3)

It's main function is to transfer network packets from the source to the destination. It is involved both at the source host and the destination host. At the source, it accepts a packet from the transport layer, encapsulates it in a datagram and then deliver the packet to the data link layer so that it can further be sent to the receiver. At the destination, the datagram is decapsulated, the packet is extracted and delivered to the corresponding transport layer.

NAT (Network Address Translation)

Network Address Translation (NAT) is a process that enables one, unique IP address to represent an entire group of computers The main use of NAT is to limit the number of public IP addresses an organization or company must use, for both economy and security purposes

Assume we add a new protocol to the application layer. What changes do we need to make to other layers?

No changes are needed because the protocol added would simply use services provided by one of the transport layer protocols.

Simple transport layer protocol

No flow or error control The sender sends packets one after another without even thinking about the receiver.

Assume that an application-layer protocol is written to use the services of UDP. Can the application-layer protocol uses the services of TCP without change?

No, if an application is using the UDP protocol, it will not be able to use the TCP services as they are different protocols and provide different services.

HDLC Transfer Modes

Normal Response Mode: -Unbalanced config, primary initiates transfer - Secondary sends only when permitted by primary - No communication between secondaries - Typically used in multipoint lines, e.g. host + terminals Asynchronous balanced mode: balanced config, either station initiates transmission, has no polling overhead, Most widely used, requires combined stations, Best mode for point-to-point lines. Asynchronous response mode - unbalanced config, secondary may initiate and transmit without permission from primary, rarely used NRM - Primary is responsibility for the line, initialization, error recovery, and logical disconnection

TCP Congestion: TAHOE and RENO

TAHOE: The early TCP, known as Taho TCP, used only two different algorithms in their congestion policy: slow start and congestion avoidance Treats three duplicate acks same as timeout RENO: A newer version of TCP, called Reno TCP, added a new state to the congestion-control FSM, called the fast-recovery state. This version treated the two signals of congestion,time-out and the arrival of three duplicate ACKs, differently. In this version, if a time-out occurs, TCP moves to the slow-start state (or starts a new round if it is already in this state); on the other hand, if three duplicate ACKs arrive, TCP moves to the fast-recovery state and remains there as long as more duplicate ACKs arrive.

TCP Congestion control

TCP's general policy for handling congestion is based on three phases: slow start, congestion avoidance, and congestion detection In the slow-start algorithm, the size of the congestion window increases exponentially until it reaches a threshold. Sender starts with slow rate of transmission and increases the rate rapidly until threshold is met and then reduces rate to avoid congestion. If congestion is detected, sender goes back o slow start or congestion avoidance phase Increases Maximum Segment size (MSS) aka the CWND Congestion avoidance: In congestion avoidance, the size of the congestion window increases additively until congestion is detected To avoid congestion before it happens, we must slow down this exponential growth in slow start alg. congestion avoidance, which increases the cwnd additively instead of exponentially. Congestion detection: If congestion occurs, the congestion window size must be decreased. The only way the sender can guess that congestion has occurred is by the need to retransmit a segment. However, retransmission can occur in one of two cases: when a timer times out or when three Duplicate ACKs are received. In both cases, the size of the threshold is dropped to one-half, a multiplicative decrease. Three acks has a weaker chance of congestion compared to timeout

TCP/IP

TCP/IP is a protocol suite used in the Internet today There are four layers (5 including physical) of the TCP/IP model: network access, internet, transport, and application. Used together, these layers are a suite of protocols. The TCP/IP model passes data through these layers in a particular order when a user sends information, and then again in reverse order when the data is received.

Packet switching

move data in separate, small blocks -- packets -- based on the destination address in each packet. When received, packets are reassembled in the proper sequence to make up the message. - more efficent - packet delay can vary - each packet requires overhead info

Hamming distance (Error detection block codes)

number of bit positions in which two codewords differ In other words, it measures the minimum number of substitutions required to change one string into the other hamming distance of d(000,011) is 2 dmin= s+1 if hamming distance = 2 then the code guarantees a detection of only 1 error. If two errors occur then the received codework may match a valid codework and error will not be detected

classful addressing

specific ranges of IP addresses that make up classes of addresses in which the number of available network and host addresses are defined - prefix tells how many networks, if n=8 there are 2^8 networks. - suffix is for the devices. If you have a network with more networks and less user n would be large

What are the types of addresses (identifiers) used in each layer?

― application layer: Domain names ― transport layer: Port numbers ― network layer: IPv4 (32-bit) or IPv6 address (128-bit) ― data-link layer: data-link address is a 48-bit MAC address/Physical address/Hardware NIC address.

Distance vector routing algorithm

● In distance-vector routing, the first thing each node creates is its own least-cost tree with the rudimentary information it has about its immediate neighbours. - Bellman ford equation

IPv6

● The main reason for migration from IPv4 to IPv6 is the small size of the address space in IPv4. ● An IPv6 address is 128 bits or 16 bytes (octets) long, four times the address length in IPv4.

Error control in the data link layer

Techniques (very similar to transport layer) - error detection - positive acknowledgement -retrasnmission after timeout negative acknowledgment and retransmission Call this ARQ which converts unreliable data link into a reliable one - stop and wait ARQ - Go back N ARQ - Selective reject ARQ - sends a reject for damaged frame

A source socket address is a combination of an IP address and a port number. Explain what each section identifies

The IP address identifies the source computer; the port number identifies the source process.

What is the advantage and disadvantage of sending large packets in packet-switched network?

The advantage of using large packets is - less overhead because sending less packets and fewer extra bytes needed (for adding the headers to each packet) The disadvantage - need to resend a lot of data is packet is lost or corrupted - is not providing equitable and fair access to other devices in the network.

When we say that the transport layer multiplexes and demultiplexes application layer messages, do we mean that a transport-layer protocol can combine several messages from the application layer in one packet? Explain.

The answer is no. Multiplexing/demultiplexing at the transport layer does not mean combining several upper-layer packets (from the same or different applications) into one transport-layer packet. It only means that each of the transport-layer protocols (such as TCP or UDP) can carry a packet from any application-layer protocol that needs its service. However, a transport-layer packet can carry one, and only one, packet from an application-layer protocol. For example, UDP can carry a message from a DNS query in one user datagram and a TCP can carry a message from HTTP in another user datagram called a tcp segment.

Application layer (Layer 5)

The application layer is the highest abstraction layer of the TCP/IP model that provides the interfaces and protocols needed by the users. It combines the functionalities of the session layer, the presentation layer and the application layer of the OSI model - protocols: FTP, HTTP, SMTP

Bandwidth Delay Product

The bandwidth-delay product is = BW × Delay (must be in same units) Problem: Assume that, in a Stop-and-Wait system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 milliseconds to make a round trip. What is the bandwidth-delay product? If the system data packets are 1,000 bits in length, what is the utilization percentage of the link? Solution The bandwidth-delay product is = BW × Delay = (1 × 10^6) × (20 × 10^−3) = 20,000 bits.

Explain how a client process finds the IP address and the port number to be inserted in a remote socket address.

The client should either know the IP address of the server being communicated with or should know the name of the server (URL) and use the DNS to map the name to the IP address. The client should also know the standard well-known (TCP/UDP) port number of the corresponding server process.

client-server paradigm

The client/server paradigm divides software into two categories, clients and servers. A client is software that initiates a connection and sends requests, whereas a server is software that listens for connections and processes requests the server must be running all the time but the client needs to be running only when it is needed.

Cyclic Redundancy Check (CRC)

The cyclic redundancy check (CRC) is a technique used to detect errors in digital data. CRC is a hash function that detects accidental changes to raw computer data commonly used in digital telecommunications networks and storage devices such as hard disk drives - need to be able to do division to find codeword

In a TCP connection, assume that maximum segment size (MSS) is 1000 bytes. The client process has 5400 bytes to send to the server process, which has no bytes to respond (unidirectional communication). The TCP server generates ACKs according to the rules we discussed already. Show the timeline for the transactions during the slow start phase, indicating the value of cwnd at the beginning, at the end, and after each change. Assume that each segment header is only 20 bytes.

The data from the client process, 5400 bytes, can be divided into six chunks (five chunks of 980 bytes and one chunk of 500 bytes). After adding a header of 20 bytes, we have six segments (five segments of 1000 bytes and one segment of 520 bytes). The segments and the ACKs are created according to the rule we mentioned in the text. The size of the congestion window is doubled by every RTT If we follow the growth of the cwnd, we can see the pattern is exponential (20 = 1, 2 1 =2, 2 2 =4, 23 =8).

A client uses TCP to send data to a server. The data consist of 16 bytes. Calculate the efficiency of this transmission at the TCP level (ratio of useful bytes to total bytes considering only TCP header).

The data section is only 16 bytes. The TCP header is 20 bytes. The efficiency is (16) / (16 + 20) = 0.444 → 44.4%

What is Multiplexing and Demultiplexing?

The layered architecture may allow the usage of several protocols at each layer. Multiplexing is the process of encapsulating the PDU of multiple higher layer protocols in the current layer protocol at the sender. Demultiplexing is the process of recovering the PDU of the higher layer protocol and delivering the PDU to the corresponding higher layer protocol. The process naturally requires a way of identifying which higher layer protocol is the sender (multiplexing) and receiver (demultiplexing) of a given PDU.

What is Encapsulation and decapsulation

The process of adding the required information for the current layer to the PDU (protocol data unit) received from the higher layer is referred to as Encapsulation - In encapsulation, the data moves from the upper layer to the lower layer, and each layer includes/adds a bundle of information known as a header along with the actual data - In decapsulation, the data (PDU) moves from the lower layer to the upper layers, and each layer unpacks the corresponding headers to obtain the actual data. Encapsulation occurs in the source computer. Decapsulation occurs in the destination computer.

Some of the application programs can use the services of two transport-layer protocols (UDP or TCP). When a packet arrives at the destination, how can the computer find which transport layer is involved?

The protocol field of the datagram defines the transport-layer protocol that should receive the transport-layer packet. If the value is 06, the protocol is TCP; if the value is 17, the protocol is UDP.

Assume a TCP client expects to receive byte 2001, but it receives a segment with sequence number 1201. What is the reaction of the TCP client to this event? Can you justify the reaction?

The received segment is a duplicate. The TCP client needs to discard the segment and immediately send an ACK with acknowledgment number 2001. This reaction helps the server to update itself if the previous ACK with acknowledgment number 2001 is somehow lost (Rule 6 in ACK generation).

In the Go-Back-N protocol, the size of the send window can be 2 m-1, while the size of the receive window is only 1. How can flow control be accomplished when there is a big difference between the size of the send and receive windows?

The rest of the packets (2m - 2) are supposed to be in transit, filling the pipe. The size of the receive window is chosen to be 1 to accept only one packet, the one expected, and not out-of-order packets. The receiver cannot be over- whelmed because it holds only one packet in its window. When the only packet in the window is consumed by the upper-layer protocol, the receive window slides to make it possible to receive the next packet in transit. If any packet in transit arrives before the window slides, it is discarded

Stop and Wait protocol

The sender sends one packet at a time and waits for an acknowledgment before sending the next one. The protocol can be Stop-and-Wait with the receive window size of 1 and the send window size of 1. Two sequence numbers 0 and 1. Sender requests packet 1 and receiver sends ACK 1 to acknowledge revieving and request next packet

Simple Parity check (Error detection DLC)

The simple parity-check code is the most familiar error-detecting code. In this code, a k-bit data word is changed to an n-bit code word where n = k + 1. The extra bit, called the parity bit, is selected to make the total number of 1s in the code word even Both even parity and odd parity can only detect odd number of inversions in the dataword. • It cannot detect even number of inversions in the dataword.

Transport Layer (Layer 4)

The transport layer is responsible for error-free, end-to-end delivery of data from the source host to the destination host. The transport layer is located between the network layer and the application layer. The transport layer is responsible for providing services to the application layer; it receives services from the network layer. Protocols: UDP, TCP and SCTP

Can you explain why some transport-layer packets may be lost in the Internet?

The transport-layer packets are encapsulated in the datagram at the network layer. The router through which the datagrams need to pass to reach their destination may be congested and drop the packets.

Network layer (layer 3)

This includes setting up the routes for data packets to take, checking to see if a server in another network is up and running, and addressing and receiving IP packets from other networks

Can you explain how TCP, which uses the services provided by the unreliable IP, can provide reliable communication?

This is done through acknowledgment and retransmission. If a packet is lost or corrupted, it will be re-sent. As an analogy, assume the postal service is unreliable. When we send a letter to a friend, we can ask for confirmation with a postcard. If we do not receive the postcard, we can resend the copy of the letter until we finally get the confirmation

Network throughput and bandwidth

Throughput tells you how much data was transferred from a source at any given time and bandwidth tells you how much data could theoretically be transferred from a source at any given time The throughput = throughput of the slowest link (bottleneck)

Packetization

_______ is the process of breaking down information sent or transmitted across the Internet into small parts. The process of encapsulating the data received from upper layers of the network(also called as payload) in a network layer packet at the source and decapsulating the payload from the network layer packet at the destination is known as packetizing.

Circuit Switching

a dedicated connection is formed between two points and the connection remains active for the duration of the transmission - utilisation is not 100% can be inefficient -

What are PDUs

a protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network. It is composed of protocol-specific control information and user data. Also known as a packet

a. What is the minimum size of a UDP user datagram? b. What is the maximum size of a UDP user datagram? c. What is the minimum size of the application-layer payload data that can be encapsulated in a UDP user datagram? d. What is the maximum size of the application-layer payload that can be encapsulated in a UDP user datagram?

a) 8 bytes (64 bits) for the header b) 65,515 bytes (actual) because it neds to be encapsulated into a single IP datagram (IPv4) (65353 is theoretica) c) 0 d) 65,515 - 8 (header) = 65,507

protocol

defines the rules that the sender and receiver must follow to communicate means servers and routers can communicate to end points regardless of the differences in their underlying infrastructures, designs or standards.

Closed loop congestion control

Closed-loop congestion control mechanisms is to mitigate/reduce the congestion after it happens. - Backpressure: Backpressure is a node-to-node congestion control that starts with a node and propagates back, in the opposite direction of data flow. (to each node) - choke packet: a congested router or node sends a special type of packet called choke packet to the source to inform it about the congestion -Implicit Signalling: In implicit signalling, there is no communication between the congested node or nodes and the source. The source guesses that there is congestion somewhere in the network when it does not receive any acknowledgment. This type of congestion control policy is used by TCP. - Explicit Signalling: the congested nodes explicitly send a signal to the source or destination to inform about the congestion. Explicit signalling can occur in either the forward direction or the backward direction .

TCP Handshake

Conneciton initiation: SYN, SYN/ACK, ACK SYN consumes one sequence number. ACK consumes 0 Termination: FIN, FIN ACK, ACK - termination Half close: FIN, ACK (continue to send data), FIN

Connection and connectionless orientated service

Connection-oriented service is related to the telephone system (TCP) Connectionless is like the postal system (UDP) - not as reliable and congestion is possible

LAN, WAN, MAN

Local-area network (LAN) -a network that connects a relatively small number of machines in a relatively close geographical area Wide-area network (WAN) -large geographic distance Metropolitan-area network (MAN) -large cities

Routing and forwarding

Routing = how to get from A to B (the path to take) Forwarding = moves traffic from A towards B

SSH

SSH, also known as Secure Shell or Secure Socket Shell, is a network protocol that gives users, particularly system administrators, a secure way to access a computer over an unsecured network.

Send and receive window

SeqNo: byte number of first byte of data in segment AckNo: is the sequence number of the next byte the receiver expects to receive. rwnd: a variable that advertises the amount of data that the destination side can receive. cwind: congestion window, limits the amount of data that can be sent before receiving an ACK Together, rwnd and cwnd are used to regulate data flow in TCP connections, minimize congestion, and improve network performance.

Go Back N Protocol

To improve the efficiency of transmission, multiple packets must be in the transition while the sender is waiting for an acknowledgment The protocol can also be Go-Back-N with the receive window size of 1 and the send window size of n packets. Send Window theoretical max = 2^m -1 where m = sequence size in bits, receivce window size = 1

ICANN ranges

Well known: reserved for common TCP/IP applications 0-1023 Registered: Registered port numbers are non-well-known ports that are used by vendors for their own server applications 1024 - 49,151 Dynamic: Client and server processes 49151 - 65,535

Relationship between send window size and sequence size

Window size should be less than or equal to half the sequence number in SR protocol. This is to avoid packets being recognized incorrectly. If the size of the window is greater than half the sequence number space, then if an ACK is lost, the sender may send new packets that the receiver believes are retransmissions. Sequence number and window size are in the header of a segment (segment - header and data)

Using the FTP protocol, Can the client retrieve one file from the server site and store one file on the server site? If so, how many control connections and how many data transfer connections are needed?

YES, i.e. upload and download a file from the same server is possible. The task can be done using only one control connection, but two data-transfer connections are needed, one for retrieving and one for storing. Although the data-transfer connection is a two-way connection, one is used for data transfer, the other for acknowledging.


संबंधित स्टडी सेट्स

Injury Prevention - Thigh, Hip, Groin, and Pelvis

View Set

Advance Project Management Midterm

View Set

Chapter 1, 2, C5, Chapter 4, Chapter 3

View Set