4. Ch3: Transport Layer - Exam 2, 5 - copy. Ch3: Transport Layer Cont., 6-copy. Ch4. Network Layer

Ace your homework & exams now with Quizwiz!

Virtual circuits: signaling protocols

- Used to setup, maintain teardown VC - Used in ATM, frame-relay, X.25 - Not used in today's Internet between the end users

Output ports

- Buffering required when datagrams arrive from fabric faster than the transmission rate - Scheduling discipline chooses among queued datagrams for transmission

VC implementation

- A VC consists of ○ Path from source to destination ○ VC numbers, one number for each link along path ○ Entries in forwarding tables in routers along path - Packet belong to VC carries VC number (rather than destination address) - VC number can be changed on each link ○ New VC number comes from forwarding table

GBN: receiver extended FSM

- ACK-only: always send ACK for correctly-received packet with highest in-order sequence # ○ may generate duplicate ACKs ○ need only remember expectedseqnum - out-of-order packet ○ discard (don't buffer) -> no receiver buffering! Re-ACK packet with highest in-order sequence #

Refinement: inferring loss

- After 3 dup ACKs ○ CongWin is cut in half ○ Window then grows linearly - But after timeout event ○ CongWin instead set to 1 MSS ○ Window then grows exponentially ○ To a threshold, then grows linearly - Philosophy ○ 3 dup ACKs indicates network capable of delivering some segments Timeout indicates a "more alarming" congestion scenario

how does a connection setup work?

- An important function in some network architectures ○ ATM, frame relay, X.25 - Before datagrams flow, two end hosts and intervening routers establish virtual connection ○ Routers get involved - Network vs transport layer connection service: ○ Network: between two hosts (may also involve intervening routers in case of VCs)

Output port queuing

- Buffering when arrival rate via switch exceeds output line speed - Queuing (delay) and loss due to output port buffer overflow

ATM switching

- Connection oriented - Cells routed according to labels - Cell address label associates cells with connections

What is the difference between connection and connection-less communication at the network layer level?

- Connection-oriented: Requires a session connection (analogous to a phone call) be established before any data can be sent. This method is often called a "reliable" network service. It can guarantee that data will arrive in the same order. Connection-oriented services set up virtual links between end systems through a network, as shown in Figure 1. Note that the packet on the left is assigned the virtual circuit number 01. As it moves through the network, routers quickly send it through virtual circuit 01. - Connectionless: Does not require a session connection between sender and receiver. The sender simply starts sending packets (called datagrams) to the destination. This service does not have the reliability of the connection-oriented method, but it is useful for periodic burst transfers. Neither system must maintain state information for the systems that they send transmission to or receive transmission from. A connectionless network provides minimal services.

Energy flow control

- Control traffic flow at user-network interface (UNI) to alleviate short-term overload conditions - When GFC enabled at UNI, 2 procedures used: ○ Uncontrolled transmission ○ Controlled transmission

What are the three TCP sender events?

- Data receive from app ○ Create segment with seq # ○ Seq # is byte-stream number of first data byte in segment ○ Start timer if not already running (think of timer as for oldest unacked segment) - Timeout ○ Retransmit segment that caused timeout ○ Restart timer - ACK received ○ If acknowledges previously unacked segments ○ Update what is known to be acked ○ Start timer

Connection vs. connectionless

- Datagram network provides network -layer connectionless service - VC network provides network-layer connection service - Analogous to the transport-layer services, but: ○ Service: host-to-host ○ No choice: network provides one or the other ○ Implementation

Input port functions

- Decentralized switching ○ Given datagram destination, lookup output port using forwarding table in input port memory ○ Goal: complete input port processing at 'line speed' ○ Queuing: if datagrams arrive faster than forwarding rate into switch fabric

A link-state routing algorithm

- Dijkstra's algorithm ○ Net topology, link costs known to all nodes ○ Accomplished via "link state broadcast " ○ All nodes have some info ○ Computes least cost paths from one node ("source") to all other nodes ○ Gives forwarding table for that node ○ Iterative: after k iterations, know least cost path to k destinations

Input port queuing

- Fabric slower than input ports combined -> queueing may occur at input queues - Head of the line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward - Queuing delay and loss due to input buffer overflow

Header format

- Generic flow control - Virtual path identifier (VPI) - Virtual channel identifier (VCI) - Payload type - Cell loss priority - Header error control

Datagram networks

- No call setup at network layer - Routers: no state about to end-to-end connections ○ No network-level concept of "connection" - Packets forwarded using destination host address ○ Packets between same source-destination pair may take different paths

How does TCP flow control work?

- Receiver side of TCP connection has a receiver buffer - flow control: sender won't overflow receiver's buffer by retransmitting too much, too fast - speed matching service: matching the send rate to the receiving app's drain rate - space room in buffer = RcvWindow = RcvBuffer - [LastByteRcvd - LastByteRead] - sender limits unACKed data to RcvWindow; guaranteeing receive buffer doesn't overflow

How does a router work?

- Routers have interfaces which connect with other network devices - When a packet comes at an interface, router needs to find the right interface to send out the packet - The destination IP field of packet is checked against information stored in the router - If there is a match, the packet is sent out via the proper interface - this process is repeated along the way on each router

What are the basic functions of an ATM switch?

- Routing(space switching) which indicates how the information is internally routed from the inlet to outlet. - queueing which is used in solving contention problems if 2 or more logical channels contend for the same output - header translation that all cells which have a header equal to some value j on incoming link are switched to outlet and their header is translated to a value k

What are the roles of the network layer?

- Transport segment from sending to receiving host - On sending side encapsulates segments into datagrams - On rcving side, delivers segments to transport layer - Network layer protocols in every host, router - Router examines header files in all IP

What does the architecture of a router look like? What are the two key router functions?

- Two key router functions ○ Run routing algorithms/protocol (RIP, OSPF, BGP) ○ Forwarding datagrams from incoming to outgoing link

ATM address labels

- Two kinds of labels ○ Virtual path connection (VPI Virtual Path Identifier) ○ Virtual Channel connection (VCI Channel Identifier)

How does TCP slow start work?

- When connection begins, CongWin = 1 MSS ○ Example: MSS = 500 bytes & RTT = 200 msec ○ Initial rate = 20 kbps - Available bandwidth may be >> MSS/RTT ○ Desirable to quickly ramp up - When connection begins, increase rate exponentially fast until first loss event ○ Double CongWin every RTT ○ Done by incrementing CongWin for every ACK received - Summary ○ Initial rate is slow but ramps up exponentially fast

Describe the Reliable Data Transfer Version 3.0 (Rdt3.0) with handles data errors and loss, garbled ACKs, duplicate re-transmissions, and infinite waits

- checksum used to check data integrity - sequence #: if receiver gets same seq# as last packet, it means sender never got proper ACK for previous packet - ACK sequence #: when receiver ACKs it should reply with updated ACK seq#, if sender gets ACK seq# same as last packet, it means that receiver failed to ACK - countdown timer: sets a limit on how long the sender should wait for a response from receiver before re-trasnmitting

Describe the Selective Receiver pipelining protocol

- receiver individually acknowledges all correctly received packets ○ buffer packets, as needed, for eventual in order delivery to upper layer - sender only resends packets for which ACK not received ○ sender time for each unACKed packet - sender window ○ N consecutive sequence #'s again limits sequence #s of sent, unACKed packets

What are the 2 functions performed by a connection setup procedure at each switching node in ATM switching?

1) A unique connection identifier at the incoming link and the link identifier and a unique connection identifier at the outgoing link are defined for each connection. 2) Routing tables at each switching node are set up to provide an association between the incoming and outgoing links for each connection. VPI (Virtual Path Identifier) and VCI (Virtual Channel Identifier) are the two connection identifiers used in ATM cells. There can be multiple VCIs in VPI

What is the 1's complement of the following byte? 00011100

11100011 => toggle each bit

How does a routing/forwarding table work?

A router uses a routing table containing a list of destinations/routes Using Longest Prefix Matching router matches destination IP with an entry in the routing table - In the given example entry: 192.168.1.20/32 is more accurate that 192.168.1.0/24 in the search for 192.168.1.20. Then the router learns the correct destination using static or dynamic routing

What is a Virtual circuit? What kind of connection is it used in? How is it implemented?

A virtual circuit is used in a connection oriented transportation of data over a packet switch computer network, in which it appears as if there is a physical path established between the final destination and source and through which all packets can be routed during the call. The source identifies a suitable path for virtual circuit before the actual data communication starts. For this, it makes use of all intermediate nodes, routing table and other additional parameters. Once the data transmission is completed, the resources and values present for the virtual circuit are removed completely. - A VC consists of ○ Path from source to destination ○ VC numbers, one number for each link along path ○ Entries in forwarding tables in routers along path - Packet belong to VC carries VC number (rather than destination address) - VC number can be changed on each link ○ New VC number comes from forwarding table

Rdt3.0: channels with errors and loss. Assuming underlying channel can also lose packets (data or ACKs)

Approach: - sender waits "reasonable" amount of time for ACK - retransmit if no ACK received in this time - if packet (or ACK) just delayed (not lost) ~ retransmission will be duplicated, but use of sequence #'s already handles this ~ receiver must specify # of packets being ACKed - requires countdown timer

What are the steps to close a TCP connection?

Assuming flow starts with client closing the socket 1. Client sends TCP FIN control segment to server 2. Server receives FIN, replies with ACK. Closes connection, sends FIN 3. Client receives FIN, replies with ACK and enters a "timed wait" period 4. Server receives ACK (connection closed)

What is ATM switching?

Asynchronous transfer mode (ATM) is a switching technique used by telecommunication networks that uses asynchronous time-division multiplexing to encode data into small, fixed-sized cells.

What is the main difference betwee Bellman-Ford and Dijkstra's Algorithm?

Bellman-Ford algorithm is a single-source shortest path algorithm, so when you have negative edge weight then it can detect negative cycles in a graph. The only difference between two is that Bellman Ford is capable also to handle negative weights whereas Dijkstra Algorithm can only handle positives

Differences between virtual circuits & datagram networks?

Computer networks that provide connection-oriented service are called Virtual Circuits while those providing connection-less services are called as Datagram networks. For prior knowledge, the Internet which we use is actually based on Datagram network (coonection-less) at network level as all packets from a source to a destination do not follow same path. Virtual Circuits: 1. It is connection-oriented simply meaning that there is a reservation of resources like buffers, CPU, bandwidth,etc. for the time in which the newly setup VC is going to be used by a data transfer session. 2. First packet goes and reserves resources for the subsequent packets which as a result follow the same path for the whole connection time. 3. Since all the packets are going to follow the same path, a global header is required only for the first packet of the connection and other packets generally don't require global headers. 4. Since data follows a particular dedicated path, packets reach inorder to the destination. 5. From above points, it can be concluded that Virtual Circuits are highly reliable means of transfer. 6. Since each time a new connection has to be setup with reservation of resources and extra information handling at routers, its simply costly to implement Virtual Circuits. Datagram Networks: 1. It is connectionless service. There is no need of reservation of resources as there is no dedicated path for a connection session. 2. All packets are free to go to any path on any intermediate router which is decided on the go by dynamically changing routing tables on routers. 3. Since every packet is free to choose any path, all packets must be associated with a header with proper information about source and the upper layer data. 4. The connectionless property makes data packets reach destination in any order, means they need not reach in the order in which they were sent. 5. Datagram networks are not reliable as Virtual Circuits. 6. But it is always easy and cost efficient to implement datagram networks as there is no extra headache of reserving resources and making a dedicated each time an application has to communicate.

What are the states and TCP sender actions for the 5 possible events in TCP Congestion control?

CongWin: dynamically determined value that indicates perceived network congestion = ~transmission rate bytes/sec * RTT >= LastByteSent - LastByteAcked MSS: maximum segment size - When CongWin is below Threshold, sender in slow-start phase: CongWin = MSS initially, then doubles for every ACK received - When CongWin is above Threshold, sender is in congestion-avoidance phase, window grows linearly - When a triple duplicate ACK occurs, Threshold set to CongWin/2 and CongWin set to Threshold - When timeout occurs, Threshold set to CongWin/2 and CongWin is set to 1 MSS

What is the difference between distance vector routing and link state routing?

Distance Vector Routing: - It is a dynamic routing algorithm in which each router computes distance between itself and each possible destination i.e. its immediate neighbors. - The router share its knowledge about the whole network to its neighbors and accordingly updates table based on its neighbors. - The sharing of information with the neighbors takes place at regular intervals. - It makes use of Bellman Ford Algorithm for making routing tables. - Problems - Count to infinity problem which can be solved by splitting horizon. ○ Good news spread fast and bad news spread slowly. ○ Persistent looping problem i.e. loop will be there forever. Link State Routing: - It is a dynamic routing algorithm in which each router shares knowledge of its neighbors with every other router in the network. - A router sends its information about its neighbors only to all the routers through flooding. - Information sharing takes place only whenever there is a change. - It makes use of Dijkastra's Algorithm for making routing tables. - Problems - Heavy traffic due to flooding of packets. ○ Flooding can result in infinite looping which can be solved by using Time to leave (TTL) field.

What are the downsides of pipelining? Is it currently heavily used?

For pipelining to work, responses must come back in the order they were requested. A naive server implementation might just send the response as soon as it has been calculated. If multiple requests are sent in parallel, and the first request one takes longer to process (e.g. processing a larger image), then the responses will be out of order. This is a problem for the client since HTTP is a stateless protocol, the client has no way to match the requests with the responses. It is reliant on the order the responses came back in. So in summary the issues with HTTP pipelining are: - Some servers & most proxies don't support it. (Perhaps due to security / reliability / or performance concerns) - Some servers support it incorrectly and this can lead to client bugs. - It is not necessarily a performance win. - Susceptible to head of line blocking

What is TCP fairness? What is its goal?

If k TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K

how does fast recovery work? what does the algorithm look like?

If sender receives 3 ACKs for the same data, it supposes that segment after ACKed data was lost - this allows for fast retransmist (resending before timer expires)

What is additive increase and multiplicative increase?

Increase transmission rate (window size), probing for usable bandwidth, until loss occurs - Additive increase: increase CongWin by 1 MSS every RTT until loss detected - Multiplicative decrease: cut CongWin in half after loss is detected Details: § Sender limits transmission: □ LastByteSent - LastByteAcked <= CongWin § Roughly, rate = CongWin/RTT bytes/sec § CongWin is dynamic, function of perceived network congestion § How does sender perceive congestion? □ Loss event = timeout or 3 duplicate acks □ TCP sender reduces rate (CongWin) after loss event □ Three mechanisms ® AIMD ® Slow start ® Conservative after timeout events

What is congestion control?

Informally: too many sources sending too much data too fast for network to handle - Manifestations ~ lost packets (buffer overflow at routers) ~ long delays (queuing in router buffers)

What is a pipeline protocol? What changes in relation to previous protocols? What are its 2 generic forms?

Pipelining: sender allows multiple, "in-flight", yet to be acknowledged packets - range of sequence numbers must be increased - buffering at sender and/or receiver Generic forms: - go-back-N - selective repeat

How is checksum used to detect errors for RDT purposes?

Sender treat segment content as sequence of 16 bit integers -> takes sum -> add in carry out from the most significant bit if any -> then takes 1's comp (flipped bits) Then receiver does the same and verifies result, if not the same => error detected

Describe the Go-Back-N (GBN) pipelining protocol

Sender: - k bit sequence # in packet header - "window" of up to N, consecutive unacK'ed packets allowed - ACK(n): ACKs all packets up to, including sequence # n tiemout (n): retransmit packet n and all higher sequence # packets in window

What are routing algorithms? What are the different types?

Software that answers the question: what line should router J use when forwarding a packet to router K ? - For connectionless networks, the routing decision is made for each datagram. - For connection-oriented networks, the decision is made once, at circuit setup time. **Types: - Adaptive algorithms: use dynamic information as current topology, load, delay, etc. to select routes. ○ Isolated: each router makes its routing decisions using only the local information it has on hand. Specifically, routers do not even exchange information with their neighbors. ○ Centralized: a centralized node makes all routing decisions. Specifically, the centralized node has access to global information. ○ Distributed: algorithms that use a combination of local and global information. - Nonadaptive algorithms ○ Routes never change once initial routes have been selected. Also called static routing. ○ Routes are computed in advance, and off-line ○ The routing tables are loaded into routers ○ Shortest path routing § Based on a well-known Dijkstra algorithm ○ Flooding § Every incoming packet is sent out on every outgoing line (expect the one it arrived on) § A hop counter in the header to end the process - Global or decentralized information? ○ Global: § All routers have complete topology, link cost inff □ "link state" algorithms ○ Decentralized § Router knows physically-connected neighbors, link costs to neighbors § Iterative process of computation, exchange of info with neighbors □ "distance vector algorithms" - Static or dynamic? ○ Static: § Routes change slowly over time ○ Dynamic § Routes change more quickly Periodic update in response to link cost changes

How does a three way handshake in a TCP connection work?

Step1: Client hosts sends TCP SYN (synchronization) segment to server with no data and specifying initial seq # Step2: server hosts receives SYN, replies with SYNACK segment; server allocates buffers, and specifies initial seq #. Step3: client receives SYNACK, replies with ACK segment, which may contain data

What are the three types of switching fabrics?

Switching via memory switching via a bus switching via an interconnection network.

What does the network layer do?

The network layer's primary function is to move data into and through other networks. Network layer protocols accomplish this goal by: - packaging data with correct network address information - selecting the appropriate network routes and - forwarding the packaged data up the stack to the transport layer

What are the functions of the network layer?

The primary function of the network layer is to permit different networks to be interconnected. It does this by forwarding packets to network routers, which rely on algorithms to determine the best paths for the data to travel. These paths are known as virtual circuits. The network layer relies on the Internet Control Message Protocol (ICMP) for error handling and diagnostics to ensure packets are sent correctly.

What routing information is contained within a packet at the network layer? how does this differ from the information contained for data link layer?

The routing information contained within a packet includes the source of the sending host and the eventual destination of the remote host. This information is contained within the network layer header that encapsulates network frames at the data link layer (Layer 2). The key difference -- and importance -- between transport information contained at Layer 2 when compared to transport information contained at the network layer is that the information can move beyond the local network to reach hosts in remote network locations.

What is the transport layer? What is its role?

The transport layer provides end-to-end communication services. The standard protocols used for its functionality are TCP, UDP and DCCP which make it responsible for: - providing logical communication between application processes running on different hosts ~ send side breaks applications messages into segments and passes them to the network layer ~ receiver side reassembles segments into messages and passes them to the application layer - multiplexing and demultiplexing - congestion control - flow control - data integrity and error correction

How to set TCP timeout value?

Timeout interval = EstimatedRTT + 4 * DevRTT EstimatedRTT = (1 - a) * EstimatedRTT + a * SampleRTT ~ typically a = 0.125 SampleRTT = average of several recent measurements of time from segment transmission till ACK receipt 4 * DevRTT => margin of safety DevRTT (RTT deviation) = (1 - B) * DevRTT + B * | SampleRTT - EstimatedRTT | ~ typically B = 0.25

(Refinement) When should the exponential increase switch to linear?

When CongWin gets to 1/2 of its values before timeout - Implementation ○ Variable threshold ○ At loss event, threshold is set to 1/2 of ConWin just before the loss of event

How's the performance of rdt3.0? How long does the stop and wait operation take? Assume 1 gbps link, 15 ms propagation delay, 8000 bits packet, TCP window size is 1kb

transmission delay (Dt) = L / R = 8000 bits / 10E9 bps = 8 microsec RTT = 2 * propagation delay = 2 * 15 ms = 30 ms Sender utilization fraction = (L/R) / (RTT + L/R) = 0.00027 throughput = TCP window size / RTT = 1 kb / 30 ms = 33 kb/sec => over a 1 gbps link => very limited use of physical resources TCP windows size = TCP receive buffer for incoming data that has not been processed yet by the application

TCP fairness: Two competing sessions?

○ Additive increase gives slope of 1, as throughput increases ○ Multiple decrease decreases throughput proportionally

How does switching via a bus work?

○ Datagram from input port memory to output port memory via a shared bus ○ Bus connection: switching speed limited by bus bandwidth ○ 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers

Interactive asynchronous

○ Each local iteration caused by § Local link cost change § DV update message from neighbor

What are the two broad approaches towards congestion control?

○ End-end congestion control § No explicit feedback from network § Congestion inferred from end-system observed loss, delay § Approach taken by TCP ○ Network-assisted congestion control § Routers provide feedback to end systems □ Single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) □ Explicit rate the sender should send at

Network layer service models table.. What are some of the services for a flow of datagrams?

○ Example services for a flow of datagrams § In order datagram delivery § Guaranteed minimum bandwidth to flow § Restrictions on changes in interpacket spacing

Causes/cost of congestion: scenario 3

○ Four senders ○ Multi-hop paths ○ Timeout/retransmit ○ What happens λin as λin' and increase? ○ Another cost of congestion § When packet dropped, any "upstream transmission capacity used for that packet was wasted"

Explain the Bellman-Ford Algorithm

○ From time-to-time, each node sends its own distance vector estimates to neighbors ○ Asynchronous ○ When a node x receives new DV estimate from neighbor, it updates its own DV suing B-F equation, and then notify its neighbors which will in turn notify their neighbors

Fairness and UDP

○ Multimedia apps often do not use TCP § Do not want rate throttled by congestion control ○ Instead use UDP § Pump audio/video at constant rate, tolerate packet loss ○ Research area: TCP friendly

Fairness and TCP connections

○ Nothing prevents app from opening parallel connections between 2 hosts ○ Web browsers do this ○ Example § Link of rate R supporting 9 connections □ New app asks for 1 TCP, gets rate R/10 § New app asks for 11 TCPs, gets R/2

Causes/cost of congestion: scenario 2

○ One router, finite buffers ○ Sender retransmission of lost packet ○ Always λin = λout (goodput) ○ "perfect" retransmission only when loss § λin > λout ○ Retransmission of delayed (not lost) packets makes larger (than perfect case) for same ○ Cost of congestion § More work (retrans) for given "goodput" § Unneeded retransmissions: link carries multiple copies of packet

How does switching via an interconnection network work?

○ Overcome bus bandwidth limitations ○ Banyan networks, other interconnection nets initially developed to connect processors in multiprocessor ○ Advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric ○ Cisco 12000: switches 60 Gbps through the interconnection network

How does switching via memory work?

○ Traditional computers with switching under direct control of CPU ○ Packet copied to system's memory ○ Speed limited by memory bandwidth (2 bus crossing per datagram)

Causes/cost of congestion: scenario 1

○ Two senders, two receivers ○ One router, infinite buffers ○ No retransmission ○ Larger delays when congested ○ Maximum achievable throughput

Explain Dijkstra's algorithm

○ link costs known to all nodes ○ Computes least cost paths from one node ("source") to all other nodes ○ Gives forwarding table for that node ○ Iterative: after k iterations, know least cost path to k destinations


Related study sets

Neat pathognomonics and cool stuff

View Set

Business Innovation Final Set #2

View Set

Chapter 01 - A Preview of Cell Biology

View Set

Physical Science (PSY151) Chapter 5: Les Thomas

View Set

Econ Unit 6 Fiscal Policy: Government Taxation and Spending

View Set