CPE 464 Midterm

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

I covered (and you looked at these in lab) two different situations where an Ethernet switch will broadcast a frame. Explain these two situations:

1st when the ethernet switch doesn't have the mac address of the destination in it's mac table, 2nd when dest mac address is all 1's

You are given the subnet mask of /22 and need to write it in the traditional dot-decimal notation (e.g. 255.xxxx.xxxx.xxxx). What is the dot-decimal notation for the /22 subnet mask?

255.255.252.00/22

Given the IP address: 101.55.23.15 and subnet mask 255.255.224.0, what is the CIDR slash notation for this subnet?

101.55.0.0

Regarding flow control and error detection. Prof. Smith went over a number of ways the sender can determine that an error occurred in the data it is transmitting. Name at least 3 different ways it can detect this loss.

Negative ACK, timer expires, duplicate RRs for a single frame

Since routers do not run a protocol like the switch's spanning tree protocol to remove loops, if a routing loop was mistakenly created in the Internet between three IPSs, would an IP packet travel around this loop forever (or at least until the loop was removed or the network went down)? Explain:

No because of the time to live field in the IP packet. When the TTL field in a packet reaches zero before it reaches its destination, it will be discarded.

You have two PCs on an Ethernet network. Assume both of these machines have just booted up and neither has sent any frames. What will be the flow of frames between the two PCs if one PC is trying to send a "ping" command to the second PC. Be precise on the type of frames and the purpose of each frame (you do not need to show the entire header... just explain the Frame.)

PC1 will send a frame with an ethernet header and an ICMP request PC2 will respond with an ethernet header and an ICMP reply

What is the difference between a logical and physical topology? Use examples in your explanation.

Physical topology is how the devices are physically wired together while the logical topology is how the devices view the network, ie: using a spanning tree algorithm to eliminate cycles in the physical

What functionality does the datalink layer provide?

Provides a reliable bit stream between each individual device

We are transmitting across a cable 35,000,000 meters long with a propagation delay of 175 millisecond. Suppose we implement a 100 kbits/s channel on this cable. If a sliding window protocol is used with a window size of 10, a frame size of 8000 bits, ACK's are 96 bits and processing delay is negligible. What will be the channel utilization?

RTT = (8000bits/100kbps) + 175ms + (96bits/100kbps) + 175ms = 80ms + 175ms + 0.96ms + 175ms = 430.96ms U = (10 * 80ms)/(430.96ms) > 1 = 100%

Define the components of an Ethernet Frame

dest mac: 6 bytes, src mac: 6 bytes, ether type: 2 bytes, data: 46-1500 bytes, CRC checksm: 4 bytes

What are the negatives to breaking up the communication process into layers?

duplication of effort extra bandwidth needed for extra headers

Regarding PDUs: a. What is the PDU called at layer 2? b. What is the PDU called at layer 3? c. What is the PDU called at layer 4?

layer 2 - PDU is called a frame layer 3 - PDU is called a packet/datagram layer 4 - PDU is called a segment

Regarding endianness. What are the functions that we use to manipulate the endianness of numbers and explain how they would be used? (For your example, assume your are working with a uint32_t.)

ntohs, ntohl, - convert network order bytes to host order htons, htonl - convert host order bytes to network order

Regarding fiber - Prof. Smith discuss two ways that fiber can experience inter-symbol interference. Name and explain both of these:

Modal dispersion - Different modes in a multimode fiber has different delay times, Chromatic dispersion - due to different colors in a laser go at different speeds in a medium

From the lab- Concerning Ethernet and IP, name and explain the process that provides the translation between a layer 3 address and a layer 2 address?

the process of creating an ARP table allows for the translation between layer 2 and layer 3.

Assume we have an RTT of 100 ms on a 100mbit/s link. What will be the maximum throughput for this connection if our window size in bits is limited to 5,000,000 bits (this is the entire window size.)

throughput = window size / RTT 5,000,000 bits / 100 ms = 50 mbps

In the IEEE 802 reference model they break up the Data Link layer into two sublayers. Name the layers and explain why they broke the Data Link Layer into two parts:

(MAC) layer - responsible for controlling how devices in a network gain access to data and permission to transmit it. Logical Link Control (LLC) layer - responsible for identifying Network layer protocols and then encapsulating them and controls error checking and packet synchronization. The data link layer is responsible for linking the physical layer with the logical layer. It has two sub layers, the Logical Link control and media access control. Having this layer split in to sub layers makes it more portable and easy to interchange the MAC with a different protocol without needing to modify the higher layers

Assume we have an RTT of 20 ms on a 100mbit/s link. What will be the maximum possible throughput for this connection if our window size in bits is limited to 7mbits (this is the entire window size.)

7mbits/20ms = 350 mbits/s

What is a spanning tree? (not the algorithm, what characteristics make up a spanning tree)

A network that does not have any loop. It goes to every node once.

In a switch, what is the MAC address table?

A table that maps a port to a MAC address

How does the protocol stack know the difference between an ARP and an ICMP packet?

ARP is a LAN level broadcast. It requests "Who has this IP?" If a host has the requested IP, they will respond to the requester. In addition, all hosts have an ARP cache.ICMP packets handle IP layer errors. They are host to host.

What is the difference between CAT 3, CAT5 and CAT5E Ethernet cable? What benefits does this difference provide?

As the category number gets higher, so does the speed and Mhz of the wire. Each category brings more stringent testing for eliminating crosstalk and adding isolation between the wires through wire twisting

Both the data link and transport layer provide similar functionality. Why is this not a duplication of effort?

Because data link layer deals with reliability of individual jumps between devices while the transport layer deals with reliability of the whole trip by checking at the source and destination.

Regarding flow control. - Since Selective-Reject ARQ has the potential for higher link utilization, explain why we would ever use Go-back-N ARQ:

Because it's a lot less resource intensive on the receiver and doesn't require a buffer

A coding question: Dr. Smith says that calling the send() function is more "expensive" (takes more computer resources/will slow down your app more) then calling a function like strcpy(). Explain why he says this:

Because it's a system call that deals with the kernel

Prof. Smith says that in IPv4, for a normal subnet with hosts, it makes no sense to use a subnet mask larger than /30. Why?

Because that would mean there were only 2 hosts

Regarding optical transmission, explain the intersymbol interference and what causes it?

Because the light bounces off the cladding of the sides of the wire means that light takes different routes meaning that some move faster and interfere with the next.

This question concerns the bandwidth-delay product and link utilization. Assume the sender is using a sliding window protocol over a link with maximum bandwidth of x bits/second. The sender is transmitting x bits/second and is achieving 100% utilization of their link. At some point during the transmission the bandwidth-delay product doubles. What effect would this change in the bandwidth-delay product have on the sender's resources?

Bandwidth delay product = bandwidth * RTT. For 100% utilization, the sender must buffer the bandwidth delay product amount of data. By making the bandwidth 10 times faster, the sender must buffer 10 times more data. Memory usage will increase by 10

This question concerns the bandwidth-delay product and link utilization. Assume the sender is using a sliding window protocol over a link with maximum bandwidth of x bits/second. The sender is achieving 100% utilization of their link. Management decides to put in a new fiber link that 10 times faster than the original link. Using the concept of bandwidth-delay product, explain the effect of this change on the sender's resources:

Bandwidth delay product = bandwidth * RTTFor 100% utilization, the sender must buffer the bandwidth delay product amount of data. By making the bandwidth 10 times faster, the sender must buffer 10 times more data. Memory usage will increase by 10

Explain the difference in routing using traditional classful addressing only and routing addresses using CIDR addressing.

Classful addressing was split into four different classes. The problem was that there were a lot of unused addresses. With CIDR, an IP address is split into two groups: most significant bits are the network prefixes, the least significant bits are the host identifier

In program #2 you had to implement on the server a data structure that mapped socket numbers to handles. As I discussed in lecture, explain the three states (e.g. conditions) that a socket/handle can be in (assuming you are using an array structure and not something like a hashmap).

Client socket is opened but handle not valid. Client Socket open and client handle is valid. Socket was opened and had a handle, but then the socket was closed.

Give the sequence of socket function calls used for communicating between machines using UDP (calls must be in order and draw lines between client and server showing how the calls match up). Make sure it is clear how the server gets the client's addressing information. CLIENT Calls SERVER Calls

Client: 2. sk = socket() 5. sendto(sk, serverInfo) 6. recvfrom(sk, ...) 7. close(sk) Server: 1. s1 = socket() 2. bind(s1, ...) 3. getsockname(...) 4. printf(...port...) 5. recvfrom(s1, ...&from (clientInfo)...) 6. sendto(s1, ...from...) 7. close(s1)

In transmitting a signal across a wire, what is delay distortion and what problem(s) does it cause?

It's when different waves move through fiber cable taking different paths making some of them slower then others the problem caused by this is "intersymbol interference"

From the lab: What does DHCP stand for and what does it do (what is its purpose)?

DHCP means dynamic host configuration protocol. Occurs when device boots upDHCP server gives the PC the IP address, subnet mask, default gateway, and usually a DNS Server

Name and explain the algorithm used by a switch to prevent loops in the network

Each node that's added has an "id" decides that it's the root node, the lowest id, becomes the root of the tree and each of the switches decide the shortest path, links not on the shortest path are taken down

Regarding protocol stacks, explain the concept of encapsulation and how it relates to the idea of protocol layers/peer processes?

Encapsulation is when a protocol on the sending host adds data to the packet header. Each layer of the protocol adds a header to the packet to provide the required information for each protocol layer.

Assume I want to send a HTTP request (so a web request) out over an Ethernet network. List the headers in order that will be included in the outgoing frame.

Ethernet - IP - TCP - HTTP Request

A network protocol specifies two things, name and explain them

Format data: what does data look like, Rules to be followed: follow rules for 2 machines to talk

From the lab - Diagram and explain the frames sent between two PC's when one PC pings the other PC across an ethernet network. Assume both PC's were just recently rebooted. Include in your diagram what is contained in each field of the Ethernet header for each frame. You only need to include what is in the ethernet header not any other header. (Including a packet flow diagram (with arrows and labels) is required!)

ICMP Request -> <- ICMP Reply

Regarding digital transmission, explain intersymbol interference and what causes it?

In copper: higher frequencies move slower than lower frequencies therefore they may bleed into the next signal. causing intersymbol interference.

Explain how a router can use the Diffserv bits to provide different levels of quality of service to IP traffic:

In the IP header, the 8-bit TOS field, DS field or differentiated service code point (DSCP) to classify the different levels of quality of service to the traffic. For example: giving low-latency traffic for phone calls or best-effort service to file transfers.

Regarding inter-symbol interference in multi-mode fiber, explain what is inter-symbol interference and how modal dispersion can cause this in Fiber.

Inter-symbol interference is the interference due to the medium the signal is traveling throughModal dispersion is caused because of different modes in a multimode fiber has different delays

Regarding inter-symbol interference in a copper wire, explain what inter-symbol interference is and what causes this to occur in a copper wire based connection.

Intersymbol interference is when 1 bit distorts the next bit In copper different frequency components propagate at different speeds over the wire which causes bits to arrive at the wrong time or interfere with other bits

From the lab: a. What OSI layers does a switch operate on? b. In Switches what is "Address learning" and how is it done?

Layer 2 (data link) b - Address learning is the process by which switches learn and store addresses of connected devices. When processing an incoming frame, the switch checks the source MAC address of the frame and if it is not already in the address table it creates a new entry. If it is, it updates the existing entry with the connection information it has learned.

What are the benefits of using a switch over a hub?

Less conflicts

When using UDP to communicate between a client and server, how does the server get the clients address in order to send back a packet?

Listening to it's socket

Explain what makes up an ethernet MAC address (length of each part and value)

Made up of 6 bytes, first three are the organizational unique identifier, and the next three represent the network interface controller. Both are assigned by the manufacturer.

We are transmitting across a network that is 1,000,000 meters long with a propagation delay of 175 millisecond. Suppose we implement a 500 kbits/s channel on this cable. If a sliding window protocol is used with a window size of 20, a frame size of 5000 bits, ACK's are 200 bits and processing delay (on the receiver only) is 100 milliseconds. What will be the channel utilization?

RTT = tframe + tprop1 + tproc1 + tack + tproc2 + tprop2 RTT = (5000bits/500kbps) + 175ms + 0 + (200bits/500kbps) + 100ms + 175ms = 10ms + 175ms + 0 + 0.4ms + 100ms + 175ms = 460.4ms U = (20 * 10ms)/(460.4ms) = 43.44%

This question concerns the bandwidth-delay product and link utilization. Assume you have a large bandwidth-delay product and that you are trying to maximize your link utilization. Explain the effect of this large bandwidth-delay product on sender as the sender works to increase their link utilization:

Sender would have to increase the window size.

From the lab: Name and explain the algorithm used by Ethernet switches to prevent loops in the network

Spanning Tree

Regarding the internet checksum. If you receive an IP datagram with the correct checksum value in the IP header and run the checksum function across the IP header (without changing the checksum field), why do you receive a zero? Explain this based on how the Internet checksum works.

The checksum is initially calculated by computing the 1's complement sum of all the bytes in the IP header with the checksum bytes as 0's. The 1's complement of this sum is written to the checksum bits in the header. Once the packet is received, computing the 1's complement sum with the checksum field as is will result in a value of all 1's, which is -0.

In a layered protocol stack, what does the term encapsulation refer to?

The control information + data is treated as one unit by the lower level protocols

What are two issues that moving to CIDR addressing was trying to solve?

The netmask allows for a hierarchical addressing structure so higher level ISPs can route on shorter netmasks and lower level ISPs can route the address on a longer netmask.

Explain the differences between the network layer and the transport layer

The network layer routes and chooses a destination for the next hop, while the transport layer does error checking and flow control.

On a receiving machine, how would the protocol stack know that an Ethernet Frame contained an ICMP request?

The protocol field in the IP header

Using the picture I drew of a router in lecture, explain how a router can use the TOS bits from the IP header to provide lower delay for voice traffic than data traffic (for full credit you must draw the picture and explain how it works).

The router uses the first 6 bits of the TOS bits (call DiffServ or Differentiated Services Code Point bits) and separates the incoming traffic. It sorts the incoming traffic into buffers/queues which are used by the outgoing interface. To provide a lower delay for voice traffic than data traffic, the router would prioritize packets with the DiffServ bits which indicated voice traffic.

This question concerns the bandwidth-delay product and link utilization. Assume a sender is transmitting at 100% utilization. At some point during the transmission the bandwidth-delay product doubles. How would the sender need to adapt to this change in the bandwidth-delay product in order to continue to achieve 100% link utilization:

The sender would have to increase the window size.

Name and explain the process used to generate the MAC address table?

The src is added first then if it doesn't know the MAC address then it broadcasts until it can

On a receiving machine, how would the protocol stack know that an Ethernet Frame contained an ARP request?

The type field in the ethernet header

What is the purpose of the spanning tree algorithm? Explain the algorithm and why its used.

To make sure that a packet doesn't get stuck in a loop

In lecture we discussed both Stop and Wait and Sliding windows flow control algorithms. I also presented an equation for calculating link utilization. Using the link utilization equation explain the benefits of using the sliding windows flow control algorithm over Stop and Wait. Your explanation must use the link utilization equation.

WS = windows size; Tf = transmission time of frame; Tp = propagation timeUtilization for sliding window = (WS Tf) / (Tf + 2Tp)Utilization for stop and wait = Time spent Transmitting Data / Round Trip TimeIn a stop and wait algorithm, once a frame is sent, it waits until an ack is received. Depending on the size of the window in a sliding window algorithm, the link utilization can be greater than a stop and wait algorithm

I covered two different situations where a switch will broadcast a frame. Explain these two situations:

When the switch doesn't know the interface for the destination MAC address, When the MAC address table is full

Assume we are studying a system that has a fixed frame size of 1000 bytes and a transmission rate of 1 Mb/s with a one way propagation delay of 500 milliseconds. You can ignore the time to put the ACK on the wire, any headers, and any processing time on the sender or receiver. Use this information for questions below a. Assume you are using a Stop-and-Wait flow control algorithm, what will be the utilization of this link? b. What will the utilization be if you are using a sliding window protocol with a window size of 7? Sane question but use a window size of 3? c. Using a sliding windows flow control algorithm, what window size would you need in order to achieve 100% utilization?

a) (assuming working with byes) RTT = (8000 bits/1MBps) + 500ms + 500ms = 1ms + 1000ms = 1001 ms U = (1 * 8ms)/1008ms = 0.07% b) (7 * 8ms)/1008ms = 0% (3 * 8ms)/1001ms = 0.2997% c) U= (W * 8ms)/1008ms w = 126

Regarding CIDR: a. Assume I want to use a netmask of 255.255.224.0 what would be the slash notation? b. Using CIDR addressing, assume my ISP gives me a network address of 15.75.128.0/18. I decide to break my network up into subnets using a /25 mask. How many subnets can I have? c. Building on part b, how many hosts can each subnet have using the /25 mask?

a) /19 b) 126 c) 126

Regarding IP and TCP checksums: a. What does the checksum in the IP header cover (so what bytes are checked)? b. What does the checksum in the TCP header cover (so what bytes are checked)? c. What is in the TCP Pseudo header and why is it used as part of TCP error detection?

a) 2 bytes - 11 and 12 b) 2 bytes - 17 and 18 c) Instead of computing the checksum over only the actual data fields of the TCP segment, a 12-byte TCP pseudo header is created and placed in a buffer after the tcp segment itself. The checksum is then computed over the entire set of data. When the TCP segment arrives at its destination the receiving software performs the same process and does the checksum calculation and if there is a mismatch it indicates that an error has occurred.

IP addressing: Given IP address: 22.99.150.3 with a top tier netmask of /12 A. What is the network address for this IP using the /12 netmask? B. Assume the network provider with the /10 netmask decides to work with lower tier ISPs. Assume it uses a /18 to break up its address space. How many lower tier ISPs can it support? C. Assume you are a customer of one of the /18 ISPs and they give you network using a /22 netmask. What is this customer network address? D. This customer (with the /22 netmask) decides to break up their network using a subnet mask of /28. What subnet is the address 22.99.150.3 on? E. Using the /22 netmask and the /28 subnet mask, how many subnets can this customer have? F. What is the dot-decimal notation for the /28 subnet mask? G. Using the /22 netmask and the /28 subnet mask, how many hosts can this customer have on each subnet?

a) 22.96.0.0 b) 256 c) 22.99.148.0/22 d) 22.99.150.0 e) 64 f) 255.255.255.240 g) 14

IP addressing: Given IP address: 65.195.133.10 with a top tier netmask of /10 A. What is the network address for this IP using the /10 netmask? B. Assume the network provider with the /10 netmask decides to work with lower tier ISPs. Assume it uses a /12 to break up its address space. Give the network addresses for these lower tier ISPs. C. Still working with the /12 netmask. Which lower tier ISP network address will the original IP address (65.195.133.10) use? D. One of the lower level ISP (so the /12 netmask ISPs) needs to support 42 different customers. What netmask would it use to break up its address space? E. Assume a different lower level ISP breaks up the addresses using a /25 netmask. What is the network part of the address (65.195.133.10) give the /25 netmask? F. Assume you are a customer that purchase addresses from the lower tier ISP that uses the /25 netmask to break up its address space. You decide to use a /29 subnet mask: a. What is the dot-decimal notation of your subnet mask b. What subnet is the original IP on (65.195.133.10)? c. How many subnets can this customer have? d. How many hosts per subnet can this customer have?

a) 65.192.0.0 b) 65.192.0.0, 65.208.0.0, 65.224.0.0, 65.240.0.0 c) 65.192.0.0 d) /18 e) 65.195.133.0 f) a) 255.255.255.248 b) 65.195.133.8 c) 16 d) 6

We wish to transmit across a cable 3000 meters long with a propagation delay of 3 millisecond. Suppose we implement a 1000 Kbit per second channel on this cable with a fixed frame size of 1000 bits. If a windowing protocol is used, how large a window size do we need inorder to have 100% link utilization? Building off of part a, now assume the return propagation delay (so from receiver to the sender) is 5 milliseconds and that ACKs are piggybacked on the frame. What will the channel utilization be with a window size of 3? Building off part a, if a stop-and-wait protocol is used, what will be the channel utilization if the frame size is 15,000 bits? You may assume that the channel is error-free.

a) Bandwidth delay product (BDP) gives max window size for 100% utilization. BDP = bit rate * RTT. RTT = tframe + tprop1 + tprop2 (error free) tframe = frame size/bit rate = 1000 bits/1000kbps = 1ms tprop1 = tprop2 = 3ms. RTT = 1ms + 3ms + 3ms = 7ms BDP = 1000 kbps * 7ms = 7000 bits b) U = (window * tframe)/RTT U = (3 * 1ms)/(1ms + 3ms + 5ms) = 33.3% c) stop-and-wait w = 1 tframe = 15,000 bits / 1000kbps = 15ms U = (1 * 15ms)/(15ms + 3ms + 3ms) = 15ms/21ms = 71.42%

Regarding Selective Reject and Go-Back-N protocols. a. What are the advantages and disadvantages of Go-Back-N over Selective Reject? b. Regarding network utilization, why would we use Go-Back-N when selective reject can have a higher link utilization?

a) Go-back-n resends good data while selective reject does not. It has better link utilization without using resources on the receiver than selective reject, but selective reject has better link utilization when there are errors. b) Selective reject using more resources on the receiver and requires more memory than go-back-n so in resource limited situations it would be better use Go-Back-N.

Regarding sliding window flow control algorithms. Assume you send packets 3, 4, 5, 6 and 7 and packet 5 is lost. If you are using a go-back-n algorithm to recover from errors, when the recovered packet 5 arrives at the receiver what is the highest value the receiver can RR? a. Same situation but assume you are using Selective-Reject algorithm. What is the highest value the receiver can RR?

a) RR6 b) RR8

Regarding channel utilization: We are transmitting across a channel that is 5,000,000 meters long with a one way propagation delay of 150 millisecond. Suppose we implement a 10 kbits/s channel on this cable with a frame size of 1000 bits, ACK's are 500 bits and processing delay (on the receiver only) is 100 milliseconds. The processing delay on the sender is so small you can ignore it. a. Using a stop and wait protocol, what will be the channel utilization? b. Assume you are using a sliding window protocol, what is the minimum window size that will give you 100% utilization of this link:

a)Total time = tframe + tprop1 + tproc1+ tack + tprop2 + tproc2= (1000bits/10kbps) + 150ms + 0 + (500bits/10kbps) + 150ms + 100ms = 100ms + 150ms + 50ms + 150ms + 100ms = 550ms U = (1 * 100ms)/(550ms) = 18.18% b) window size of 5.5 or 6

In socket programming, what information is needed to name a socket?

address_family, type, protocol

List the functions calls in order on both the client and server needed setup and use a STREAMS based communication.

client: 1 socket(), 3 connect(), 4 send()/sevc(), 5 close() server: 1 socket(), 2 bind() + listen(), 3 accept(), 4 send()/recv(), 5 close()

TCP is a connection oriented service. Explain how this connection oriented service is done via the Sockets API (so the function calls). Make sure your answer links the socket functions to the different aspects of what makes up a connection oriented service.

setup: connect() client side/accept() server side, use: send()/secv client side, send()/recv server side, close() teardown

TCP is a connection oriented service. Explain how this connection oriented service is setup via the Sockets API (so the function calls). Make sure your answer links the socket functions to the different aspects of what makes up a connection oriented service.

setup: connect() client side/accept() server side, use: send()/secv client side, send()/recv server side, close() teardown


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

Chapter 4 - Life Policy Provisions and Options

View Set

Ch.27 Female Reproductive System

View Set

Edexcel GCSE Psychology: Williams et al(1981)

View Set

Ch 5, 6, & 9 STI's, breast cancer and violence

View Set

Segundo Parcial Economía Financiera

View Set

http://www.readtheory.org. UKULELE

View Set

Business Finance Ch 9 Reading - Connect

View Set