DIN 2012 Tutorial (Q1a) In the IEEE 802.15 standard (Bluetooth), describe the following two types of : physical links between primary and secondary stations: (i) (ii) Synchronous Connection Oriented (SCO); Asynchronous Connection Link (ACL). Synchronous Connection-oriented (SCO) link: Used when latency is more important than error free data delivery. Here the physical link is created between the primary and a secondary by reserving time slots at regular intervals. Data rate of 64Kbps for each link. Asynchronous Connectionless Link (ACL): Used when error free is more important than latency in data delivery. Here retransmission of corrupted frames is allowed. Secondary return ACL frames only if previous slot is addressed to it. Maximum data rate is 721 Kbps (Q1b) If an Ethernet destination address is 45:48:1B:2E:08:AB, (i) What type of address is this (unicast, multicast or broadcast)? (ii) Can the above Ethernet address be used as a source address? Explain. (i) The first byte in binary is 01000101. The least significant bit is 1. This means that the pattern defines an Ethernet multicast address. (ii) An Ethernet multicast address can be a destination address, but not a source address. If used as source address, the receiver will assume that there is an error, and discards the packet. (Q1c) Figure below shows five LANs interconnected with two bridges B1 and B2. Initially the forwarding tables of both B1 and B2 are empty. Construct the routing tables for B1 and B2 following sequence of events: 1. Host D sends a frame to F 2. Host A to E 3. Host E to D 4. Host F to A
A C D F LAN1 LAN3 LAN5 B1 B2 Port 1 Port 2 Port 1 Port 2 Port 3 Port 3 LAN2 LAN4 B E Step 1: D sends frames to F: Both bridges B 1 and B2 will flood the frame on all the other ports. B1 s forwarding table: D 2 B2 s forwarding table: D 1 Step 2: A sends frames to E: Both bridges B 1 and B2 will flood the frame on all the other ports. B1 s forwarding table: D 2 A 1 B2 s forwarding table: D 1 A 1 Step 3: E sends frames to D. When bridge B2 receives the frame from port 3, it already knows that D is attached to port 1 so it will explicitly forward the frame to that port. B1 receives the frame on port 2 and it just drops the frames.
B1 s forwarding table: B2 s forwarding table: D 2 A 1 E 2 D 1 A 1 E 3 Step 4: F sends frames to A. When bridge B2 receives the frame from port 2, it already knows that A is attached to port 1 so it will explicitly forward the frame to that port. B1 receives the frame on port 2 and will explicitly forward it to port 1. B1 s forwarding table: B2 s forwarding table: D 2 A 1 E 2 F 2 D 1 A 1 E 3 F 2
(Q1d) ALOHA and Slotted ALOHA are random access methods for accessing shared media (channel) used in wired and wireless LANs. Assume 100 stations share a 1 Mbps channel. If frames are 1000 bits long and each station sends 10 frames per second, find the throughput in ALOHA and Slotted ALOHA networks. Assume Frame Transmission time = Tfr, G = load, ns = number of stations and nfs = number of frame per second. (1) We can first calculate Tfr and G, and then the throughput. Tfr = (1000 bits) / 1 Mbps = 1 ms G = ns nfs Tfr = 100 10 1 ms = 1 For pure ALOHA Throughput S = G e 2G 13.53 percent This means that each station can successfully send only 1.35 frames per second. 2) We can first calculate Tfr and G (same as in 1), and then the throughput. G = ns nfs Tfr = 100 10 1 ms = 1 Tfr = (1000 bits) / 1 Mbps = 1 ms For slotted ALOHA Throughput S = G e G 36.7 percent This means that each station can successfully send only 3.67 frames per second.
(Q2a) The following is a dump from a UDP header in hexadecimal format: (i) What is the source port number? (ii) What is the destination port number? 13 31 00 35 00 2C E2 17 (iii) What is the length of the UDP datagram? (iv) What is the total length of user data? (v) Is the packet directed from a client to a server or vice versa? All numerical answers should be in decimals. (i) Source port number 4913 (1331 in hexadecimal) (ii) Destination port number 53 (0035 in hexadecimal). (iii) Datagram length 44 bytes (2C in hexadecimal) (iv) Data length 36 bytes (44 8 byte header) (v) Well known port numbers on servers are assigned low numbers. Here the destination port number was 53. So the UDP packet is directed from a client to a server (DNS service) (Q2b) The TCP congestion control policy uses receiver and congestion windows, the slow start algorithm and the threshold parameter. Assuming a maximum TCP segment size of 1 Kbyte, a TCP receiver window of 18 Kbyte and a congestion window set to 30 Kbyte when a timeout occurs, calculate the following, showing your working: (i) The new threshold parameter; (ii) How big the congestion window will be if the next 9 sets of transmissions are all successful. (i) Threshold parameter is set to half the current congestion window i.e. Threshold = 15K (ii) Congestion window will be set to one segment size and doubles with each successfully transmitted burst. After 4 bursts the congestion window = 8K. For transmission 5, congestion window will equal 15K (because it cannot exceed the threshold limit). For transmission 6, 7, 8 the congestion window increases by one segment (18 K bytes). For transmission 9, congestion window is 19K bytes. BUT
please note that the transmission window is the smallest of the receiver and congestion windows. So sender transmission window is 18 Kbytes (not 19 Kbytes). (Q2c) In the Internet email application, non-ascii characters are encoded using either base64 or quoted-printable methods. Calculate the following: (i) A non-ascii message of 1000 bytes is encoded using base64 method. What is the ratio of redundant bytes to the total message length? (ii) A message of 1000 bytes is encoded using quoted-printable method. The message consists of 90% ASCII and 10% non ASCII characters. What is the ratio of redundant bytes to the total message length? (iii) Compare the encoding efficiency in (i) and (ii). (i) 1000 (8 /24) = 333.3 334 blocks of 24 bits. Each block becomes 32 bits. There are 334 (32 / 8) = 1336 bytes in the encoded message. The ratio of redundant bytes to the entire message length is 336/1336. (ii) In quoted-printable method, each non-ascii is substituted by 3 bytes. 900 + (100 3) = 1200 bytes in the encoded message. There are 200 redundant bytes. The ratio of redundant bytes to the entire message length is 200/1200 = 1/6. (iii) The efficiency (i) = 1000/1336 = 75%. The efficiency in (ii) = 1000/1200 = 83%. (Q2d) In TELNET application (binary mode), a client sends the following sequence of bits: 11010011 00000000 11111111 (i) Show the actual sequence of bits that is sent by TELNET application. (ii) Show the TELNET negotiation for binary mode between the client and server. (iii) Calculate the minimum number of bits sent at TCP level (transport layer) to accomplish this task.
(i) The TELNET bits sequence is: 11010011 00000000 11111111 11111111 (4 bytes) The byte 11111111 is duplicated because it is the same as IAC (Interpret the next character as control); it must be repeated to be interpreted as data. (ii) The TELNET uses the Network Virtual Terminal (NVT) control character and negotiation options as follows: Client to Server: IAC DO BINARY (3 bytes) Server to Client: IAC WILL BINARY (3 bytes) (iii) TCP number of bits: If each transmission is encapsulated in a single TCP segment with 20 bytes of header, there will be 3 segments of 23, 23, and 24 bytes for the total of 70 bytes or 560 bits.
(Q3a) The Diffie-Hellman key exchange protocol allows a sender and recipient to exchange a shared secret key, which can be used subsequently to encrypt messages between them: (i) Explain the Diffie-Hellman key exchange protocol. (ii) The sender chooses a secret key = 7, and transmits the message (23, 3, 2) to the recipient. The recipient replies with message (18). What is the shared secret key? Show your working. (i) Diffie-Hellman key exchange protocol allows senders and recipients such as Alice and Bob to exchange a shared secret-key as follows: Alice and Bob have to agree on two large prime numbers: n and g where (n - 1) / 2 is a prime as well. These numbers can be public, so either of them can pick n and g and tell the other openly. Now Alice picks a large prime number (say 512-bits) x and keep it secret. Similarly, Bob picks a large prime number y. Alice initiates the key exchange protocol by sending message M1: M1 = (n, g, g x mod n) Bob responds by sending message M2: M2 = (g y mod n) Now Alice can calculate the shared secret-key K: k = (g y mod n) x mod n = g yx (mod n) = g xy (mod n) Also Bob can calculate the same secret-key k: k = (g x mod n) y mod n = g xy (mod n) The main weakness of Diffie-Hellman protocol is that neither Alice nor Bob can authenticate the origin of messages M2 and M1 respectively. One solution is to add Alice s digital signature to message M1 and Bob s digital signature to M2. (ii) Sender selects x=7. The sender can calculate the shared key (k) is g xy mod n: k = (g y mod n) x mod n, where (g y mod n) = 18, x = 7 and n = 23 Therefore k = 18 7 mod 23 = 6 (Alice). Assuming we know that Bob s y = 9, then k = 2 9 mod 23 = 6!!! (Q3b) Logical Key Hierarchy (LKH) is used for scalable rekeying in secure multicast. Figure 5.A shows a secure multicast group of 16 members:
(i) Illustrate the rekeying required when member 13 joins this group. O Group key M N Key hierarchy I J K L A B C D E F G H Group members 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Figure (ii) If the multicast group consists of 1024 (=2 10 ) members, how many rekey messages are needed to remove a single member, in case of (1) flat key and (2) LKH systems. (i) A new group key O can be delivered to member 13 as follows: 1. Group key O is encrypted with key N; 2. Key N key is encrypted key L; 3. Key L key is encrypted key G; 4. Key G key is encrypted with member13 unique key; All the above messages can be sent in one transmission from the group controller to member 13.
O Group key M N Key hierarchy I J K L A B C D E F G H Group members 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (ii) Let us assume N = 1024 In case of flat key system: N 1 = 1024-1 = 1023 messages are needed. In case of LKH, 2log 2 N 1 = 2log 2 2 10 1 = 19 messages. Thus LKH scales better for large groups. (Q3c) The Integrated Services (Int-Serv) model uses the Resource Reservation Protocol (RSVP) as a signalling mechanism for end-to-end QoS reservations. (i) Describe the Path and Resv messages in RSVP. (ii) The Figure below shows the QoS reservation for multicasting from source S1 to receiver stations Rc1, Rc2 and Rc3. Explain the reservations mergers in routers R1, R2 and R3. Figure
(i) Path message: travels from sender and reaches all receivers (downstream) in a unicast or multicast path. On the way, Path message stores the necessary QoS information in the routers. Resv message: After a receiver receives the Path message, it send Resv message. It travels toward the sender (upstream) and makes reservation on the routers that support RSVP. (ii) Rc3 requests 2 Mbps bandwidth while Rc2 requests 1 Mbps. Router R3 merges the two requests and reserves 2 Mbps (highest of the two). Same situation is true for R2, so R2 reserves 3 Mbps and R1 reserves 3 Mbps as well. The reason for differences in Rc1, Rc2 and Rc3 reservation is that different receivers could handle different grades of QoS (even from the same source) because of the multi-layer encoding of that video. (Q3c) Figure below shows the packet differentiation model in Differentiated Services. What are the packet classifier and traffic conditioner? Explain all functional entities (boxes) in this diagram
Packet classifier could be located in access router or ingress edge router. It classifies packets into different service classes based on the contents of the DS field and other fields in the IP headers of the packets, and then forwards them to a traffic conditioner for further processing. Two types of classifiers have been defined: BA (Behavior Aggregate) Classifier and MF (Multi- Field) Classifier. The BA classifier sorts packets based on the DSCP only. The MF classifier, however, categorizes packets based on DS field and other IP header fields, such as source address, destination address, protocol ID, source port, and destination port. Traffic conditioner executes control functions to assure that packets are compliant with contracted traffic profile. It measures the traffic load and marks/ remarks packets to be in-profile or out-of-profile. It may also delay or drop packets to enforce traffic characteristics to conform to the contracted profile. A traffic conditioner comprises meter, marker, dropper, and shaper. Marker sets the DS field of a packet to a particular codepoint, adding the marked packet to a particular DS behavior aggregate. The marker may be configured to mark all packets that are steered to it to a single or a set of codepoints. Meter measures the temporal properties of the stream of packets selected by a classifier against a traffic profile specified in contract. A meter passes state information to other conditioning functions to trigger a particular action for each packet. Shaper delays some or all of the packets in a traffic stream in order to bring the stream into compliance with a traffic profile. A shaper usually has a finite-size buffer, and packets may be discarded if there is not sufficient buffer space to hold the delayed packets. Dropper discards some or all of the packets in a traffic stream in order to bring the stream into compliance with a traffic profile. This process is known as policing the stream.