43
Name the different layers in the TCP/IP protocol model, give a brief description of each layer, and name one protocol that is used in each layer. 1.Application Layer oProtocol: FTP, Telnet, HTTP, The application layer defines standards for accessing services across an internet such as file transfer, email, or terminal emulation. For example, any application can send an email message to anyone on an internet as long as it follows the email standards. 2.Transport Layer oProtocol: TCP, UDP The Transport layer provides communication to multiple destinations on a single host. It can also provide reliability through positive acknowledgement with retransmission, sequencing, and regulation of the flow of data. 3.Internet Layer oProtocol: IP The Internet layer performs routing of data packets (datagrams) from the source host to the target host. It also provides some error reporting and control functions. 4.Network Interface Layer oProtocol: Ethernet, FDDI The Network Interface layer accepts IP datagrams and transmits them as frames over the local physical network. TCP/IP does not specify the Network Interface layer but is network technology independent. 5.Hardware Layer 1 - n_alanzi ع ي م جل ل ق ي ف و ي ل ا م ب ك ب وا ع د ب ى ن و س ن! ت لا

t305 Q&A

Embed Size (px)

DESCRIPTION

qa

Citation preview

Name the different layers in the TCP/IP protocol model, give a brief description of each layer, and name one protocol that is used in each layer

Name the different layers in the TCP/IP protocol model, give a brief description of each layer, and name one protocol that is used in each layer.1. Application Layer

Protocol: FTP, Telnet, HTTP, The application layer defines standards for accessing services across an internet such as file transfer, email, or terminal emulation. For example, any application can send an email message to anyone on an internet as long as it follows the email standards.

2. Transport Layer

Protocol: TCP, UDP The Transport layer provides communication to multiple destinations on a single host. It can also provide reliability through positive acknowledgement with retransmission, sequencing, and regulation of the flow of data.

3. Internet Layer

Protocol: IP The Internet layer performs routing of data packets (datagrams) from the source host to the target host. It also provides some error reporting and control functions.

4. Network Interface Layer

Protocol: Ethernet, FDDI

The Network Interface layer accepts IP datagrams and transmits them as frames over the local physical network. TCP/IP does not specify the Network Interface layer but is network technology independent.

5. Hardware Layer

Protocol: Copper wire, Fiber cable The Hardware layer is the physical interconnection between computers. It is the medium over which communication takes place on the local network. TCP/IP does not specify the hardware layer.

Describe the differences between circuit switched and packet switched networks. Circuit Switched A circuit-switched network creates a dedicated circuit between the source and the target. The circuit is resevered for the communication between the source and the target. It has the advantage of having guaranteed capacity but can be costly if the capacity is not always used. The telephone system is an example of a circuit switched network.

Packet Switched Networks A packet switched network sends small amounts of data, known as packets, through the network. Each packet is self describing; it contains the source and destination addresses of the packet as well as the data itself. Each packet may take a different path through the network and thus may arrive out of order at the target. An advantage of a packet switched network is that the cost can be shared amongst all the users of the network. A disadvantage is that the capacity for an individual user is not gauranteed. As other users traffic increases there is less available for the individual user. The postal system is an example of a packet switched network.

Discuss the differences between a repeater, hub, switch, bridge, and router and explain when each would be used. repeater - A repeater is a device that repeats each bit of digital data that it receives. This repeating action cleans up the signal by retiming and regenerating before repeating the data. Repeaters are an inexpensive method of overcoming distance limitations. Repeaters can only link devices of LAN segments of similar network architectures.

hub - A hub is a device that allows attachment of multiple devices together. A hub is used to connect multiple devices together on the same physical network. A hub offers an alternative wiring system; instead of running the communication medium through a building and connecting all of the devices to the wire, the hub acts as a central connecting point. Hubs typically do not look at the traffic on the network.

switch - A switch seeks to overcome the "one-at-a-time" broadcast scheme of a hub by adding the basic design of a data PBX to the concentrator functionality of a hub. The switch is actually able to create connections, or switch, between any two attached Ethernet devices on a packet-by-packet basis. Therefore, the "one-at-a-time" broadcast limitation previously associated with Ethernet is overcome. When transmission of a frame begins the switch looks at the destination address and only sends the frame directly to that device. Devices connected to a switch do not know the switch is there and can still communicate directly with each other.

bridge - The simplest LAN connection device is the bridge. A bridge is designed for use between local area networks (LANs) that use identical protocols. Bridges learn the organization of the LANs by examining the source address of transmitted frames and can be used to isolate network traffic. Bridged networks cannot contain loops. Bridges are rather inexpensive devices and operate very fast. The main disadvantage is that there is no possibility of using an alternative route to bypass a failed or congested transmission line. This is more of a problem for long-distance transmission (WANs) than for local internets (LANs).

router - Routers are used to connect different LANs so that the devices on each LAN can communicate with the devices on the other LAN. They can optimize routes and react to failures and congestion. They can also handle multiple LAN protocols simultaneously. Therefore, routers provide flexibility and functionality not found in other connection devices.

Calculate even/odd parity for a byte. Even

0000000 = 0

0000001 = 1

0000010 = 1

1010101 = 0

0101010 = 1

0001111 = 0

1111000 = 0

0000111 = 1

1111111 = 1

Odd 0000000 = 1

0000001 = 0

0000010 = 0

1010101 = 1

0101010 = 0

0001111 = 1

1111000 = 1

0000111 = 0

1111111 = 0

Calculate a two-digit, decimal checksum. 32 28 93 86 8 54 95 Sum = 396 -> 96

2 14 58 5 13 88 12 13 80 Sum = 285 -> 85

26 68 72 7 14 92 46 5 Sum = 330 -> 30

102 117 110 32 115 116 117 102 102 Sum = 913 -> 13

Explain the differences between IP, UDP, and TCP. IP (Internet Protocol) The TCP/IP standard protocol that defines the IP datagram as the unit of information passed across an internet and provides the basis for connectionless, best-effort packet delivery service. IP includes the ICMP control and error message protocol as an integral part. The entire protocol suite is often referred to as TCP/IP because TCP and IP are the two fundamental protocols.

UDP (User Datagram Protocol) The protocol that allows an application program on one machine to send a dtagram to an application on another. UDP uses the IP to deliver datagrams.

Conceptually, the important difference between UDP datagrams and IP datagrams is that UDP includes a protocol port number, allowing the sender to distinguish among multiple application programs on a given remote machine.

TCP (Transmission Control Protocol) the TCP/IP standard transport level protocol that provides reliable, full duplex, stream service on which many application protocols depend. TCP allows a process on one machine to send a stream of data to a process on another. TCP is connection-oriented in the sense that before transmitting data, participants must establish a connection. All data travels in TCP segments, which each travel across the Internet in an IP datagram.

Both UDP and TCP are at the transport level. They both provide the concept of ports to allow data to be delivered to a specific application. UDP is an unreliable, connectionless, best-effort, datagram delivery mechanism. TCP is a reliable, connection-oriented, stream delivery mechanism. A UDP datagram may be lost, delayed, or duplicated but data through TCP guaranteed. TCP handles the problems of segments being lost (automatic retransmission), delayed or duplicated (ordered stream delivery).

How do TCP acknowledgements work? What are their advantages and disadvantages? A TCP acknowledgement specifies the sequence number of the next octet that the receiver expects to receive.

Advantages

One advantage is that acknowledgements are both easy to generate and unambiguous.

Another advantages are that lost acknowledgements do no necessarily force retransmission.

Disadvantages

A major disadvantage is that the sender does not receive information about all successful transmissions, but only about a single position in the stream that has been received.

How it works

A TCP acknowledgement specifies the next byte in the stream that the target is expecting. This acknowledges everything from the beginning of the stream up to the octet being requested. Because TCP uses a sliding window, several segments could be in transmission at the same time. If the acknowledgement from one segment is lost but a subsequent acknowledgement is received, this includes the acknowledgement which was lost. In this case neither the lost acknowledgement nor the segment it was acknowledging needs to be retransmitted.

Example

Example: A sender has sent 10 segments. If the first segment is lost, At each other segment arrives, the receiver sends an acknowledgement, but each acknowledgement specifies octet 101, the next highest contiguous octet it expects to receive.

What transport protocol does TFTP use? UDP, of the Transport Protocol.

What rules does TFTP use to acheive reliability? timeout.

retransmission

What makes the electronic mail protocols different from other protocols? Most require source and target to be running

SMTP works when target is down or unreachable

Sender does not wait for message to be delivered

What is the SMTP? SMTP Simple Mail Transport Protocol

The TCP/IP standard protocol for transferring electronic mail messages from one machine to another. SMTP specifies how two mail systems interact and the format of control messages they exchnage to transfer mail

What is the difference between congestion control and flow control?

Flow control is about matching the speed of a sender to the capabilities of the receiver. Congestion occurs when senders overutilize the resources within the network.

What is the purpose/use of the UDP checksum? to detect bit error, i.e., flipped bits, in the UDP segment).

Consider the BGP protocol, an autonomous system (AS) A, and some destination network X. How does A control whether or not other autonomous systems route traffic destined to X through A?

By the paths that it advertises to its neighboring ASs. If A never advertises a path to X to its neighbors, the neighbors will never route to X via A.

What is one important difference between a bridge and a router?

A bridge performs layer 2 routing, using frame addresses rather than layer 3 network address, and does not exchange routing tables with its neighbors.

Consider the scenario shown below a number of clients that communicate over a wireless link to a router, and from there to a server.

The wireless link often introduces bit errors into the transmitted frames (much more so than a wireline link). Assume that the wireless link neither detects nor corrects bit errors. The wireless link and the wired link between the router and the server have enough bandwidth so that there is only occasional congestion. In fact, it is more likely that a client packet will suffer from bit errors than be dropped at the router-to-server link due to congestion.

What mechanism does TCP use to detect bit errors?

(4 points) TCP uses the Internet checksum to detect bit errors

Suppose all of the network sources send data at a constant bit rate. Would packet-switching or circuit-switching be more desirable in this case? Why?

circuit-switching is more desirable here as there are no statistical multiplexing gains to be had, and by using circuits, each connection will get a constant amount of bandwidth that matched its CBR rate. On the other hand, circuit-switching has more overhead in terms of signaling, so there is an argument that packet-switching is better here since there is no call setup overhead. Ill take either answer). Now suppose that all of the network sources are bursty that they only occasionally have data to send. Would packet-switching or circuit switching be more desirable in this case? Why? (Answer: Packet-switching is better here because there are statistical multiplexing gains when a source does not have data to send, it will not be allocated bandwidth (that would be idle). Hence this bandwidth is available for use by other sources). What is meant by demultiplexing a protocol data unit up to an upper-level protocol?

Demultiplexing refers to passing an incoming protocol data unit (PDU) up to the appropriate higher level protocol. The PDU will typically have a field that will indicate the upper layer protocol to which the PDUs payload should be passed.

Describe the end-to-end principle.Give one example in which implementing a particular functionality at a lower layer breaks this principle, and one example in which it does not. Explain.

In a system with many layers of functionality, some functionalities can be implemented at a lower layer only as a performance enhancement and they must be fully and correctly implemented.

Examples:

Doesn't break e-t-e principle: Link layer reliability in a wireless network. Another example is the Snoop protocol. Snoop preserves end-to-end semantics; it sends acks only after the receiver has received the packet. It acts only as a performance enhancer. Yet, another example is providing QoS. If a congested router does not have a way to differentiate between packets, it cannot support delay sensitive applications. Breaks e-t-e principle: I-TCP breaks the end-to-end semantic. It can send acknowledgments to the sender even before the receiver has received the packet. The slow start phase in TCP is actually a short period of time. Why?

Every received ACK increases the window by 1. So the window size grow like

1, 2, 4 (after both received, 2+2) 8, 16,

Therefore, it grows exponentially and it will soon hit the threshold value.

What is multiplexing?

Shared use of bandwidth by interleaving of signals. Combining several low speed lines into a high speed medium. Name at least three types of multiplexing. Give an example of a commonly available service that make use of each of the types of multiplexing.

Freq. Division Multiplexing - cable television

Synchronous TDM - Voice on PSTN

Statistical TDM - Packet switching/Data Services

Wave division Multiplexing - long distance telephony (optical fiber system) leased lines are commonly used with multiplexers. How are leased lines priced/ What about this pricing strategy cost justifies investments in multiplexers?

Leased lines costs are bandwidth and distance sensitive. The cost/kbps decreases more steeply as bandwidth and distance increase. Thus cost/kbps of 56 kbps line is higher than cost/kbps of T1 line as distance increases. This allows economies of scale which cost justifies investment in multiplexing . What is inverse multiplexing? Give an example of its use?Inverse multiplexing is the use of several low speed circuits to transmit high speed data. For example, 128 kbps traffic can be inverse multiplexed on to two ISDN 64kbps. of multiple T1 lines to simulate T3 speeds. What is a fundamental difference between packet switching and circuit switching?

In circuit switching, network resources are dedicated to a sending or receiving device for the duration of a call.

In packet switching, network resources are shared by packets on an as needed basis as they are transferred over the network.

What are the two types of packet switching service? How do they differ?

Connection oriented

Connnectionless

Connection-oriented - all packets between a sending and receiving device follow the same path through the network. This path is set up when the virtual circuit is set up.Connectionless - each packet is sorted over the network and may follow a different path from sending device to receiving device. State the conditions under which each of these alternatives is the preferred alternative.

Connection oriented - overhead of call set up exists but is good for long and stable data transfer between locations.

Connectionless - no overhead of call set up. However each packet needs to be routed individually. Good for short transfers. What is an analog signal?A signal where strength (amplitude) varies continuously in time. What is a digital signal?

A signal whose strength changes discretely in time.

What is the fundamental difference between analog transmission and digital transmission?

Analog transmission is not aware of signal content when signal attenuate, they are boosted using amplifiers. Digital transmission takes signal content into account. The digital data is recovered using repeaters. Data from an analog information source needs to be transmitted over a satellite microwave network using digital transmission. How should the data be encoded to make this possible?

Analog source => Digitized using a modem => Modulated onto wave for transmission.

Give an example of an everyday service that uses analog transmission.

Cable, TV, PSTN. Give an example of an everyday service that uses digital transmission.

Direct satellite broadcast, ISDN. State three services that a data link protocol supplies to sending and receiving devices to help them coordinate and communicate.

1. Flow control

2. Error control

3. Synchronization

What is a key characteristic of a voice and video transmission which distinguish them from data transmission?

Voice and video are streaming data. Data is bursty.

What impact does this difference have on planning communication network infrastructure?

When data is bursty, it is hard to anticipate bandwidth and plan for peak capacity. When data is stream, one has a much better idea what bandwidth is required.

The Internet is a network originally designed to transmit data. However, is being used to deliver other types of information, including voice and video. Typically the problem has been the delay associated with downloading audio and video files. Name a product that has addressed this problem to deliver audio and video over low bandwidth connections to the Internet.

Real Audio, real Video

video signal with a frame resolution of 360 x 280 pixels needs to be transmitted.

if the signal is color with 12bit/pixel encoding and 30 frames/sec, what is bandwidth required to transmit the signal?

360 * 280 = 100,800

360 * 280 * 30 * 12 = 36,288,000

How many bits would be needed to transmit the same signal if the signal is a black and white signal?

B/w image uses 1 bit per pixel360 * 280 * 30 = 3,024,000

You have available a T1 line with 1.544 Mbs of bandwidth. What is maximum number of frames per second that can be supported with a black and white signal assuming you would like to have the same resolution?

360 * 280 * F = 1.544 x 106

F = 1.544 x 106 / (360 * 280)= 15.3

Given the same T1 line with 1.533Mbs, if I wanted 15 frame/second, what is the compression required to transmit the black and white signal?

360 * 280 * 15 * Compression factor = 1.544 x 106

Compression factor = 1.544 x 106/ (260* 280 * 15) = no compression Rank order the following media in terms of bandwidth that can be supported by assigning numbers between 1 and 4. Let 1 denote the media with the lowest bandwidth and 4 denote the media with the highest bandwidth.

twisted pair

coaxial cable

microwave

optical fiber

Give an example of an application where each of these media is the preferred choice.

twisted pair - telephone local loop

optical fiber - backbone networks

microwave - bypass, satellite

coaxial cable - cable TV

What is the difference between

an analog signal and a digital signal

An analog signal is a continuous signal. A digital signal is a discrete signal of high and low voltages.

Give two common examples of telecommunications which use unguided media.

celluar telephones

satellite

Can human voice be transmitted digitally? If so, what technology is needed to enable it?

Yes. You need a pulse code modulator (PCM)

Can a data stream from a computer be transmitted using analog transmission? If so, what technology is needed to enable it?

Yes. You need a modem.

Given that telephone quality voice requires 4000Hz of bandwith, compute the data rate in bits per second need to transmit it. Assume 8 bit encoding.

4000 * 2 * 8 = 64 Kbs

What is multiplexing? Why is it considered cost effective?

Multiplexing is a technology that enables information sources, each of which each require a given transmission capacity to share a larger transmission capacity. The cost effectiveness of multiplexing is due to economies of scale possible with facilities that have large transmission capacities. Specifically, the cost per Kbps declines with the increase in the data rate of the transmission facility.

Name the types of multiplexing of which you are aware. In each case, define it. Indicate also the type of transmission technology with each of these types of multiplexing can be used.

Frequency division multiplexing: FDM is used with analog transmission technology. FDM is the partitioning of the available bandwith of a transmission medium into lower bandwidth channels that are used to carry information. It is possible when the useful bandwidth of a transmission medium exceeds the required bandwidth of the signals to be transmitted.

Synchronous Time Division Multiplexing: STDM is used with digital transmission technology usually. It enables the interleaving of transmission signals in time and is possible when the data rate of the medium exceeds the data rate of the signals to be transmitted. In STDM, data are organized into frames which consist of time slots which are statically preassigned to each information source. Asynchrnous Time Divisiion Multiplexing: ATDM is used with digital transmission usually. It is similar to STDM except that the time slots in a frame are not preassigned. This permits ATDM to save "wasted" time slots when there is no traffic and enables it to make better use of available transmission capacity.

What is fractional T-1 service? What motivates the need for this service?

Fractional T-1 service is a tarriffed service that allows a customer to by data transmission capacity less than the T-1 rate of 1.544 Mbps. Organizations that do not need the data rates supplied by T-1 lines can purchase just what they need.

What type of switching does the PSTN use?

circuit switching

What type of switching does a public data network use?

Packet switching

Why are these different?

Circuit switching works well with stream traffic such as voice. Packet switching works well with bursty traffic such as data.

What is the difference between virtual circuits and datagram service? When is one preferred over another?Virtual circuits is one mode of packet switching in which a path (not a dedicated channel) through the network is set up for session between a sending and receiving device. All packets between these devices follow the same path through the network.

In datagram service each packet follows its own path through the packet switched network.

Virtual circuits are preferred to datagram service when a large amount of data needs to be transferred between two devices. Datagram service is prefferred due it lack of overhead on set up and its ability to deal flexibly with problems in the network.

The X.25 protocol has three layers: packet, link and physical. What is the difference between a packet layer protocol and a the link layer protocol in terms of the service that they provide.

The packet layer provides reliable connection-oriented end to end data transport. The link layer provides reliable transport over a link, not over a network as does the packet layer

Ethernet (802.3) uses a CSMA/CD protocol. Wi-Fi (802.11) uses a CSMA/CA protocol. Why doesnt wireless use CSMA/CD?

It cant. Collisions that occur at the receiver may not occur at the sender in a wireless network, i.e. the two transmitters may not be in range of each other.

Pick the best match for each MAC layer method.

1 FDM0. successively reduces group of colliding stations

4 TDM1. each station given a dedicated frequency

2 Pure ALOHA2. stations may transmit at any time

8 Slotted ALOHA3. 802.3

6 CSMA4. each station given a dedicated time slot

7 Non-persistent CSMA5. 802.11

3 CSMA/CD with backoff6. wait for idle channel, then transmit

9 Binary countdown7. if channel is busy, wait a random time and retry

0 Tree walk8. stations use any time slot

5 MACAW9. highest numbered station has priority

Two bits of data are sent via one of the following four 6-bit codewords:

000000 000111 111000 111111

What is the Hamming distance of this set? How many single-bit errors can it detect? How many single-bit errors can it correct?

The Hamming distance is three, which means that any two single-bit errors can be detected or any one bit error can be corrected.

The standard Ethernet data rate is 10 Mbps and its minimum packet size is 64 bytes. What implication does this have for the end-to-end propagation delay?The minimum packet size limits the round-trip delay because we have to be able to detect a collision that occurs at the other end of a cable. This means that the round-trip delay can be no more than 64*8/10M sec = 51.2 usec. The end-to-end delay is therefore limited to half that or 26.6 usec.

Why doesnt the link state routing method suffer from the count-to-infinity problem?

With link state routing all nodes get the latest information about the complete state of the network directly from the source. The count-to-infinity problem occurs because nodes end up using outdated second-hand information when it appears to give more favorable routes. There is no memory of where the information about the state of the network came from, so it cannot be conclusively updated.

How are the SYN and ACK bits in the TCP header used?

The SYN bit marks the packet as requesting a connection with a new source sequence number. The ACK bit means that the source is acknowledging the destinations sequence number and is ready to accept data starting with the byte indicated by the acknowledgement sequence number. In particular, with the three-way handshake, only the first packet sent by each side has the SYN bit set, while every packet except the very first one from the host that initiated the connection has the ACK bit set.1. Answer True or False for the following statements

[ T ] (a) In general, the higher the frequency used, the higher the potential bandwidth and therefore the higher the potential data rate.

[ T ] (b) The higher the data rate, the more cost-effective is the transmission facility.

[ F ] (c) Statistical TDM requires higher data rate support as many devices as synchronous TDM.

[ F ] (d) When using the stop-and-wait data link flow control protocol, greater link utilization can be achieved if the bit length of the link is greater than the frame length.

[ T ] (e) When you are connecting to an ISP using a modem from your PC, the ISP must also be equipped with one or more modems to receive the transmission.

[ T ] (f) With Go-back-N error control protocol, it is not required that each individual frame be acknowledged.

[ T ] (g) One of the transmission impairments is noise. Noise can be divided into four categories: thermal noise, intermodulation noise, crosstalk and impulse noise.

[ F ] (h) UTP Category 3 can be used in Fast Ethernet networks.

[ T ] (i) The information field is present only in I-frames and some unnumbered frames in HDLC.

[ F ] (j) If the data rate of a digital signal is N bps, then a very good representation can be achieved with the bandwidth of N/2 Hz.

[ T ] (k) Examples of DTEs are computers and terminals.

[ T ] (l) The telephone network service was designed to receive, switch and transmit analog signals in the voice-frequency range of about 300 to 3400 Hz.

2. List the seven layers defined in the ISO OSI Reference Model and state the functions of the lowest three layers.

Layer 1: Physical concerned with transmission of data (bit stream) over physical medium

Layer 2: Data Link concerned with the reliable transfer of information across the physical link; sends blocks of data (frames) with the necessary synchronization, error control and flow control

Layer 3: Network concerned with reliable transmission of packets from source to destination node; responsible for establishing, maintaining and terminating connections

Layer 4: Transport

Layer 5: Session

Layer 6: Presentation

Layer 7: Application

3. One hundred 9600-bps lines are to be multiplexed using TDM. Ignoring overhead bits,

a. What is the total capacity required for synchronous TDM?

synchronous TDM: 100 x 9600 bps = 960,000 bps

b. Assuming that we wish to limit average line utilization of 80%, and assuming that each line is busy 50% of the time, what is the capacity required for statistical TDM?

statistical TDM: 100 x 9600 bps x 0.5/0.8 = 600,000 bps

1. To evaluate the performance of sliding-window protocol on a link joining endpoints A and B, one must consider two cases. Describe what is meant by each case and state the utilization of the link for each case.

(a) Case 1: N > 2a + 1

a. the ACK for frame 1 reaches A before A has exhausted its window. Thus A can transmit continuously with no pause, and utilization is 1.

(b) Case 2: N < 2a + 1

A exhausts its window at t0 + N and cannot send more frames until t0 + 2a + 1 (the ACK arrives). Thus, line utilization is N/(2a + 1).

1. Synchronous and asynchronous transmission are simple techniques used for digital data communication. 2. Generate the transmitted bit pattern of a character string ABCD based on the following assumptionsa. - asynchronous transmission

- 7-bit ASCII code plus a parity bit (even parity)

- one start (binary 0) and one stop bit (binary 1)

- least significant bit is transmitted first

- the ASCII code for 'A' is 65

M L

A = 65 = 1000001, with even parity bit --> 01000001

B = 66 = 1000010, with even parity bit --> 01000010

C = 67 = 1000011, with even parity bit --> 11000011

D = 68 = 1000100, with even parity bit --> 01000100

Thus, the transmitted bit pattern is

0 10000010 1 0 01000010 1 0 11000011 1 0 00100010 1

b. What is the communication overhead (in %) for the above transmission?

Show your calculation. [2 marks]

Overhead = (control bits / total bits) * 100

= ((1 start, 1 stop, 1 parity bit) / 10 bits) * 100 = (3/10)*100

= 30%

6. The following questions deal with CRC error detecting code. 7. Given a message M = 1010001101, determine the CRC using the polynomial P = x5 + x4 + x2 + 1.

Show your work.

1101010110

----------------------

110101 | 101000110100000

110101

---------

111011

110101

---------

111010

110101

---------

111110

110101

---------

101100

110101

---------

110010

110101

---------

01110 Thus, CRC = 01110

(b) What is the transmitted message T?

T = 101000110101110

a. How does the receiver check whether the message T was transmitted without any errors?

[Note that students can show the division as part of the answer. Full marks should be given if they state the answer without the division. This will allow students to answer and get full marks even if they did not get the first two parts. ]

The received message T is divided by P and if the remainder is zero then T is error-free otherwise it contains errors.

1. (a) Name two types of frame errors in the transmission of frames and describe each can occur.

(1) Lost Frame -- A frame fails to arrive at the receiver. A noise burst may damage a frame to the extent that the receiver is not aware that a frame has been transmitted.

(2) Damaged Frame -- A recognizable frame does arrive but some of the bits are in error.

a. After transmitting several frames, the transmitter receives a NAK i frame. Describe how the transmitter reacts in the following error control protocolsb. (i) Go-back-N -- the transmitter retransmits frames numbered i and its subsequent frames it may have transmitted.

(ii) Selective-reject -- the transmitter retransmits frame i only.

c. Describe what happens if a NAK is lost during transmission in the Go-back-N error control protocol. If a NAK is lost, the transmitter will eventually time out on the associated frame and retransmit that frame and all subsequent frames.

8. Imagine that you have trained your St. Bernard, Bernie, to carry a box of 10 floppy disks instead of a flask of brandy. (When your disk fills up, you consider that an emergency.) These floppy disks each contain 1,400,000 bytes. The dog can travel to your side, wherever you may be, at 18 km/hour. For what range of distances does Bernie have a higher data rate than transmitting data via a 28,000-bps modem link? Show your calculations.

The dog can carry 10 * 1,400,000 bytes = 14,000,000 bytes = 112,000,000 bits.

A speed of 18 km/hour = 0.005 km/sec.

The time to travel distance x is x/0.005 second, yielding a data rate of

112,000,000 / (x/0.005) = 560,000/x bps.

Thus, for x < 20 km, the dog has a higher rate.

9. A communication protocol is an agreement required between two or more communication engities and consists of three essential components. Name and describe briefly each component.

Syntax: data format and signal levels

Semantics: control information for coordination and error handling

Timing: speed matching and sequencing

1. Define or explain the following terms:

1. count to infinity problem:

A problem with distance vector routing that causes it to react slowly of link failures since only a count of hops rather than the full path is exchanged between routers.

2. packet:

a small unit of communication. It can be variable or fixed size, but there is a fixed maximum size.

3. virtual circuit vs. packet switched:

Virtual circuits involve using a connection establishment message to store traffic connection state in a network. Virtual circuits tend to provide static routing for a single connection and thus ensure in-order delivery of packets.

4. ISDN: Integrated Services Digital Network. A way to provide 2 64kbps circuit switched channels over a single pair of copper wire.

5. flooding: a way to send information from a source to a destination by sending the traffic over all links. It its pure form is generally leads to infinite traffic, but it can be useful as a basis of comparison. Also, by adding ways to control the flood it becomes a practical algorithm.

2. Consider using a 4khz channel and 16 discrete levels to send data.

1. What is the maximum possible transmission rate if the channel is noiseless?

2 H log2 N = 2 4,000 log2 16 = 32,000

2. What if the signal to noise ratio is 30dB?

X dB = 10 log10(S/N) 10 = 30 log10(S/N) S/N = 1,000

H log2(1 + S/N) = 4,000 log2(1 + 1,000) 4,000 log2(1024) = 40,000

1. A cellular phone system needs to accommodate many users. Explain how the system uses space, frequency, and time division multiplexing.

Space Division: many cells permit re-use of the same channels in any two non-adjacent cells.

Frequency Division: the cellular band is divided into 800 separate channels.

Time Division: frequencies are only allocated when they are in use. Since most cell phones in a single cell are not in use at any one time, this is a type of time division multiplexing.

2. List the seven layers of the ISO/OSI reference model and for each layer provide an example of a function commonly performed at that layer.

Application: mail header format

Presentation: encryption

Session: cursor movement

Transport: byte ordering

Network: routing, congestion control

Link: sending frames, link errors

Physical: representation of 0's,1's

Consider routing in a network with 200 routers, and on average every router is connected to 4 other routers. Routing information is exchanged every 100msec. How much network bandwidth is used under link-state and distance vector routing to exchange this information. Assume sequence numbers are used to damp flood packets for link-state. Please explain any assumptions you make about the size of routing table entries.

Link-state:

For each link, each router sends (2 bytes should be fine)

For each route update, each router sends a sequence number (4 bytes is safe)

Therefore each routing message contains: 4 links x 2 bytes/link + 4 bytes = 12 bytes.

Each routing message travels over every link (flooding with sequence numbers) 200 routers x 4 links/router / (2 end-points per link) = 400 links.

Routing messages are send 1/100msec = 10 messages/second

So 200 routers x 10 msgs/sec-router x 400 links x 12 bytes/msg = 9.6M bytes/secDistance Vector:

Each routing table entry contains 3 bytes

Each host maintains a 200 entry routing table

At each update, each router sends all of its neighbors its entire table

So 200 routers x 10 updates/sec-router x 4 link/router x 3 x 200 bytes/link = 4.8 MB/sec

(15 points) In a broadcast channel, link bandwidth is wasted due to multiple hosts trying to send at once and canceling each others communication. A simple model of this problem is that time is divided into discrete slots. If a network has n hosts, and the probability of any single host trying to use a slot is p, what fraction of slots are wasted due to collisions?

A collision is two or more stations sending a once. Let P(x) denote the probability of x stations sending at once. P(>=2) = 1 - P(0) - P(1)

P(0) = (1-P)n P(1) = n p (1-P)n-1

(>=2) = 1 - (1-P)n - n p (1-P)n-1

Define or explain the following terms:

ATM cell

The packet used in ATM. Has fixed size of 53 bytes, consisting of 5 byte header and 48 byte payload. virtual circuit vs. packet switched

Virtual circuit the path in connection-oriented packet switching: the path is established by the connection request and all packets of the connection use that path. Packet-switched means the network transfers packets from source to destination by store-and-forward routing. The routing can be either along a virtual circuit, or each packet can be routed independently (datagram or connectionless). Frequence Division Multiplexing

Providing multiple channels on the same physical media (wired or wireless) by shifting the channels to distinct carrier frequencies separated by a sufficient gap to accomodate the signals on the channels. Limits on information exchange.

a) If we wish to send 1,000 octets per second through a 800hz channel, what is the minimum signal to noise ratio in decibels?

1000 octets per second is equivalent to 8000 kb/s. Shannon's result for a noisy channel states:

data rate = bandwidth * log2(1 + S/N) Thus 8000 = 800 log2(1+S/N). Hence log2(1+S/N)=10. Hence 1+S/N = 2**10=1024. Hence S/N=1023, which in decibels is 10*log10(1023), or 10*log10(1000) approximately, which is 10*log10(103). Hence approx. 30 db.

b) Explain why using additional bits per baud will not increase the maximum transmission rate through a channel with a fixed bandwidth and signal to noise ratio?

Obviously, Shannon's result makes it clear that using additional bits per baud does not increase the data rate. The question is why. To increase the data rate by increasing the bits per baud, (1) we need more more signal levels in order to encode more bits per baud, and (2) we need to make sure that the bauds per second does not decrease. This means having more levels in the same time interval. But this is not possible because the bandwidth constrains the magnitude of a level change in a given interval of time, and the noise imposes a minimum distance between levels (otherwise the levels cannot be distinguished). Layering: What is the difference between a protocol and a service interface? Explain your answer in terms of a the ISO seven layer model.

| ^ | ^

V | V |

------------------------------------------- SERVICE

| ^ | ^

V | V |

_____ _____

| | PROTOCOL | |

| | | |

|_____| |_____|

| ^ | ^

V | V |

------------------------------------------- SERVICE

| ^ | ^

V | V |

_____ _____

| | | |

| | PROTOCOL | |

|_____| |_____|

| ^ | ^

V | V |

------------------------------------------- SERVICE

| ^ | ^

V | V |

A protocol is the rules (message formats and semantics) followed by peer entities, ie, entities in the same layer at different sites, for communicating with each other. A service is the rules (service primitive formats and semantics) followed by entities in adjacent layers for communicating with each other at the same site.

An alternative to having a separate timer thread for a packet level re-transmission timeouts is to have each connection thread call the UNIX sleep function (which suspends a thread for a specified amount of time) whenever the thread needs a time-based pause. Why would using sleep make it more difficult to process ACK packets?

The problem is that sleep is a blocking call, and it would be difficult to wakeup a sleeping process when the ack arrives. It is a specific instance of the problem that is experienced when trying to have a thread wait on the OR of two or more conditions.

Explain why using a timestamp as an initial sequence number for a three-way handshake and then incrementing the sequence number with each packet limits the number of connections per unit time, but not the number of bytes/sec.

The initial time stamp is used in the connect request and connect ack packets. Once the initial sequence number has been agreed upo,. it cant be re-used until the maximum lifetime of the packet on the network has been exceeded to prevent a stale packet form being confused with a new one. However, once the connection is established, any sequence number can be used for each packet as long as the sequence number is not repeated within the maximum lifetime of a packet. (10 points)

Why should the tick rate of the clock from part a be neither too fast nor too slow.

If the tick rate is too fast, it will role over before the maximum packet lifetime and could cause an old connection request to be confused with a current one. If it is too slow, it will limit the rate at which connections can be made (10 points)

way to combine multiple samples that assigns a greater weight to recent values than older ones. Avg = a Sample + (1- a ) Avg (3 points)

An alternative to having a separate timer thread for a packet level re-transmission timeouts is to have each connection thread call the UNIX sleep function (which suspends a thread for a specified amount of time) whenever the thread needs a time-based pause. Why would using sleep make it more difficult to process ACK packets?

The problem is that sleep is a blocking call, and it would be difficult to wakeup a sleeping process when the ack arrives. It is a specific instance of the problem that is experienced when trying to have a thread wait on the OR of two or more conditions.

(18 points) Bandwidth is growing faster than latency (and we are getting very close to speed of light latencies for some networks). Describe two specific changes that have either been made, or will likely be required to adapt existing networking systems to accommodate this trend.

To efficiently use the network, a protocol must be able to have a window size at least as large as the end-to-end delay bandwidth product. The TCP option to shift the bits of the window size to permit more outstanding bytes is one way to meet this need. (9 points)

Since more data can be transferred in the same roundtrip time, making requests and responses larger can reduce the apparent latency of a message. For example, a directory protocol could request the contents of the entire directory rather than one file at a time. (9 points)

(Traffic Shaping

Token bucket and leaky bucket are ways to limit traffic data rates. Explain how they are different in terms of their ability to permit bursts onto the network, and ensure the average data rate.

Leaky bucket permits a network device to accept a large burst of data and then slowly transmit it onto the network. A token bucket permits the burst to go directly onto the network (if there are tokens available). Either approach will ensure that the average traffic rate will be maintained. (108 points)

Traffic shaping can be performed on a per connection or per host basis, give one example where you would want to do it each way.

Per connection traffic shaping is useful when there are several different classes of traffic using the same link and hosts. By performing shaping on a per connection basis, applications with different (even conflicting) resource requirements can be accommodated. (5 points)

Per host traffic shaping is useful when two connections represent traffic that must travel over the same resource constrained link. By shaping the traffic as a unit, we can ensure that the capacity of the single link is not exceeded. (5 points)

go-back-n and selective-repeat are retransmission strategies used with sliding window protocols. Describe and discuss the relative advantages of each. How does using one or the other change the requirements for buffers in the sending and receiving windows?

Selective-repeat is good for communication channels with high probability of packet corruption or loss since it conserves bandwidth by only re-transmitting the damaged packet. Go-back-n is useful for more reliable links since it permits the receiver side to have only one buffer since all packets will arrive in order even after a loss. Go-back-n has less efficient utilization of link bandwidth since packets that were received correctly may still need to be re-transmitted. With go-back-n, packets will arrive in-order so the receive window is reduced to one.

Define and explain the following terms:

a) forbidden region: illegal combinations of time/sequence numbers that could permit data from old connections to be accepted as part of a current connection. Caused by node crashes or sequence number wrap around. b) flow control: matching rates between producers and consumers. Can be done at the link or network layers. c) two army problem: explains the problem of communicating over an unreliable network. The problem is that two parties can never know if the last message sent was correctly received. This problem relates to deleting a connection between two hosts. d) MTU: Maximum Transfer Unit. The largest packet/frame size that can travel over a network or link. e) bit stuffing: a way to prevent the occurrence of a frame boundary string from occurring in data. After a specific sub-string of the pattern is seen, a bit is inserted to prevent the target string from appearing. Error correction and detection.

What is the minimum number of error recovery bits required to recover from an n bit error? Explain why this number of bits is sufficient.

let n = m + r, m is the message length, r is the number of error recovery bits. To be able to recover from a d bit error we need to have n choose d invalid messages for every valid message. n choose d is the number of ways you can flip exactly d bits in an n bit message. There are 2m valid messages so: [(n choose d) + 1] 2m