IAP, Past Papers

Internet Architecture and Protocol (IAP) Past Paper 2018 – BS 5th Term UOS

Internet Architecture and Protocol Past Paper 2018 BS 5th Term UOS

University of Sargodha (UOS) BS 5th term Internet Architecture & Protocol (IT-3513) past paper 2018, with the full question paper in text form and solved answers, including the address-allocation question worked out block by block.

Print / download (A4, high quality): Full-size paper

Internet Architecture and Protocol Past Paper 2018 (text version)

University of Sargodha – BS 5th Term Examination 2018, Subject: Computer Science
Paper: Internet Architecture & Protocol (IT: 3513) · Time: 2:30 Hours · Maximum marks: 80
Note: Objective Part is compulsory. Attempt any three questions from subjective Part.

Objective part – Q1: Write short answers of the following in 2-3 lines each on the answer sheet. (2*16)

  1. The value of total length is 002816, how many bytes of option carried by the packet?
  2. What is a socket address? Give any example
  3. Why DLCI is important in frame relay network?
  4. Give the class and network id of this IP address? 172.168.255.80
  5. Why protocols are required for exchange of data?
  6. What is the role of Identification bits in IP datagram?
  7. An address space has a total of 2048 addresses. How many bits are needed to represent an address?
  8. How broadcast and point to point networks are different?
  9. What is the role of DHCP?
  10. Which address field is changed in packet travelling through a datagram network?
  11. What is FDDI?
  12. In which layer, Proxy Server is located?
  13. What is the size of the window for host A if the value of rwnd is 3000 bytes and the value of cwnd is 3500 bytes?
  14. What is the function of HTTP protocol?
  15. Give two error detection mechanisms.
  16. When customers do not have Network layer security, which type of security must be provided?

Subjective part (3*16)

Q2. Explain the PPP in detail with sub protocols and configuration.

Q3. Explain the various attributes present in TCP header.

Q4. What is the role of routing protocol? Explain three types of routing protocols

Q5. a) Explain four cases of ARP with diagram?
b) Explain IGMP in detail?

Q6. Suppose an organization given a block of addresses 17.12.0.0/16
• How many addresses contain by this block as a whole.
• The first group has 64 customers; each needs 256 addresses. The second group has 122 customers; each needs 128 addresses
• How much addresses still remain with organization

Original paper (scanned copy)

The clean paper above is retyped by Shining Study from this original University of Sargodha question paper. Click the scan to view it full size.

Internet Architecture and Protocol Past Paper 2018 BS 5th Term UOS – original scan

Solved answers

Q1 – Short questions

(i) Total length = 0028₁₆ = 40 bytes (header + data). The option size depends on the HLEN field: options = HLEN × 4 − 20 bytes. If HLEN = 5 (the usual case), the header is 20 bytes, so there are 0 bytes of options and 20 bytes of data; if HLEN were 10 (40-byte header) there would be 20 bytes of options and no data.

(ii) Socket address: the combination of an IP address and a port number that uniquely identifies a process on the Internet, e.g. 192.168.1.10:80 (a web server).

(iii) DLCI: the Data Link Connection Identifier is a 10-bit number in the Frame Relay header that identifies the virtual circuit (PVC/SVC) on a link. Switches use it to forward frames to the correct output port; it has local significance.

(iv) First octet 172 lies in 128–191, so it is class B. Default mask 255.255.0.0, so the network ID is 172.168.0.0. (It is a public address; the private class B range is 172.16–172.31.)

(v) Protocols define the rules – format (syntax), meaning (semantics) and timing – that both sides must follow, so different devices and software can understand each other, detect errors, control flow and deliver data correctly. Without a common protocol communication is impossible.

(vi) Identification field: a 16-bit number set by the source for each datagram. When a datagram is fragmented, all fragments carry the same identification value, so the destination can identify which fragments belong to the same datagram and reassemble them.

(vii) 2048 = 2¹¹, so 11 bits are needed.

(viii) In a broadcast (multipoint) network many stations share one channel, and a frame sent by one is received by all (e.g. Ethernet LAN, wireless); a MAC protocol is needed. In a point-to-point network a dedicated link connects exactly two devices (e.g. PPP over a leased line), so no access control or addressing among many stations is needed.

(ix) DHCP: Dynamic Host Configuration Protocol automatically gives a host an IP address, subnet mask, default gateway and DNS server addresses for a lease period (DISCOVER, OFFER, REQUEST, ACK), removing manual configuration.

(x) The source and destination MAC (link-layer) addresses change at every hop; the source and destination IP addresses stay the same (unless NAT is used).

(xi) FDDI: Fiber Distributed Data Interface – a 100 Mbps LAN/MAN standard using optical fiber in a dual counter-rotating token ring (up to ~200 km); the second ring gives fault tolerance.

(xii) A proxy server works at the application layer (e.g. an HTTP proxy that caches web pages for clients).

(xiii) Window size = min(rwnd, cwnd) = min(3000, 3500) = 3000 bytes.

(xiv) HTTP: the application-layer protocol of the Web; it transfers web pages and other resources between clients and servers using request methods (GET, POST…) and responses with status codes, over TCP port 80 (HTTPS 443).

(xv) Checksum (Internet checksum) and CRC (cyclic redundancy check); also parity check.

(xvi) Security must be provided at the transport layer (SSL/TLS) or the application layer (e.g. PGP for email, HTTPS), since IPsec at the network layer is not available.

Q2 – PPP (Point-to-Point Protocol)

PPP is a data-link protocol for point-to-point links (dial-up, DSL, leased lines, PPPoE). It provides framing, error detection, link configuration, authentication and support for many network-layer protocols.

Frame format (byte-oriented, HDLC-like):

| Flag | Address | Control | Protocol | Payload (data) | FCS      | Flag |
| 7E   | FF      | 03      | 1-2 B    | up to 1500 B   | 2 or 4 B | 7E   |

Flag 01111110 marks start/end (byte stuffing with escape 7D); address FF (broadcast, as there are only two ends); control 03 (unnumbered); protocol field tells what is carried (e.g. C021 LCP, C023 PAP, C223 CHAP, 8021 IPCP, 0021 IP); FCS is a CRC.

Sub-protocols:

  • LCP (Link Control Protocol): establishes, configures, tests and terminates the link; negotiates options such as MRU, authentication protocol, compression and error detection using Configure-Request/Ack/Nak/Reject, Terminate, Echo packets.
  • Authentication protocols: PAP – two-way handshake; the user sends username and password in clear text. CHAP – three-way handshake; the server sends a random challenge, the client replies with a hash (MD5) of the challenge and secret password, and the server verifies – the password is never sent and challenges repeat periodically, so it is more secure.
  • NCPs (Network Control Protocols): configure the network-layer protocol to be carried, e.g. IPCP for IP (assigns IP addresses, DNS), IPv6CP, IPXCP.

Transition phases: Dead → Establish (LCP negotiation) → Authenticate (optional PAP/CHAP) → Network (NCP) → Open (data transfer) → Terminate → Dead.

Configuration (Cisco example):

R1(config)# username R2 password cisco123
R1(config)# interface serial0/0/0
R1(config-if)# ip address 10.0.0.1 255.255.255.252
R1(config-if)# encapsulation ppp
R1(config-if)# ppp authentication chap
R1(config-if)# no shutdown
! R2 is configured the same way with "username R1 password cisco123"
R1# show interfaces serial0/0/0      ! "LCP Open, Open: IPCP"
R1# debug ppp negotiation

Q3 – TCP header fields

The TCP header is 20 bytes without options (up to 60 bytes with options):

0                   15 16                  31
+----------------------+----------------------+
|   Source port (16)   | Destination port (16)|
+----------------------+----------------------+
|            Sequence number (32)             |
+---------------------------------------------+
|        Acknowledgment number (32)           |
+------+------+--------+----------------------+
| HLEN | Rsvd | Flags  |   Window size (16)   |
| (4)  | (6)  |  (6)   |                      |
+------+------+--------+----------------------+
|    Checksum (16)     |  Urgent pointer (16) |
+----------------------+----------------------+
|           Options and padding               |
+---------------------------------------------+
  • Source and destination port (16 bits each): identify the sending and receiving application processes.
  • Sequence number (32): number of the first byte of data in this segment; in SYN it carries the initial sequence number (ISN).
  • Acknowledgment number (32): the next byte the receiver expects (valid when ACK = 1) – cumulative acknowledgment.
  • Header length / data offset (4): header length in 4-byte words (5–15 → 20–60 bytes).
  • Reserved (6): for future use.
  • Control flags (6): URG (urgent pointer valid), ACK (acknowledgment valid), PSH (push data immediately), RST (reset connection), SYN (synchronize – connection setup), FIN (finish – connection close). (Newer TCP adds ECE, CWR, NS.)
  • Window size (16): receive window (rwnd) in bytes – flow control.
  • Checksum (16): error detection over pseudo-header, header and data (mandatory in TCP).
  • Urgent pointer (16): offset of the last urgent byte when URG = 1.
  • Options (0–40 bytes): MSS, window scale factor, SACK, timestamps, NOP, end of option list.

Q4 – Routing protocols

Role: routing protocols let routers automatically exchange information about networks, discover paths, choose the best route using a metric, build and update routing tables, and react to topology changes (link failures) without manual configuration. Static routes are set by hand; dynamic routing protocols do it automatically.

1. Distance-vector routing (e.g. RIP): each router knows only its neighbours and sends its whole routing table (destination + distance) to neighbours periodically (RIP every 30 s). Uses the Bellman–Ford algorithm; metric is hop count (max 15). Simple, but slow convergence and the count-to-infinity problem, reduced by split horizon, poison reverse and hold-down timers.

2. Link-state routing (e.g. OSPF, IS-IS): each router learns the full topology by flooding link-state advertisements (LSAs) about its own links to all routers in the area; every router then runs Dijkstra’s shortest-path-first algorithm to build its routing table. Metric is cost (based on bandwidth). Fast convergence, scalable with areas, but needs more memory and CPU.

3. Path-vector routing (e.g. BGP): used between autonomous systems. Each route advertisement carries the full list of ASes (AS path) it passes through; a router rejects a path containing its own AS (loop prevention) and chooses routes by policy and attributes rather than just shortest distance. Runs over TCP port 179.

(Also classified as interior gateway protocols – RIP, OSPF, EIGRP (hybrid) – and exterior gateway protocols – BGP.)

Q5(a) – Four cases of ARP

ARP finds the MAC address for a known IP address of the next hop. The sender broadcasts an ARP request; the owner of the IP replies with a unicast ARP reply.

  1. Host to host on the same network: the sender is a host and the destination is on the same network → ARP for the destination’s IP.
  2. Host to a host on another network: the sender is a host and the destination is on another network → ARP for the default router’s IP.
  3. Router to a host on another network: the sender is a router forwarding to another network → ARP for the next router’s IP (from the routing table).
  4. Router to a host on the same network: the sender is a router and the destination is on its directly connected network → ARP for the destination host’s IP.
Case 1:  Host A ---------------------------> Host B          (same LAN)
         target IP in ARP = IP of B

Case 2:  Host A ----> Router R1 ====> ... ----> Host B      (B on other net)
         target IP = IP of default router R1

Case 3:  Router R1 ----> Router R2 ====> ... ----> Host B
         target IP = IP of next-hop router R2

Case 4:  Router R2 ----> Host B                             (B on R2's LAN)
         target IP = IP of B

Q5(b) – IGMP

The Internet Group Management Protocol (network layer, carried in IP with protocol number 2, TTL 1) is used between hosts and their local multicast router to manage multicast group membership. It does not route multicast packets itself; it tells the router which groups have members on each network so that multicast routing protocols (PIM, DVMRP) can forward traffic there.

Messages (IGMPv2): General Query – sent by the router to 224.0.0.1 to ask which groups have members; Group-Specific Query – asks about one group (after a leave); Membership Report – a host announces it wants to join a group (also answers queries); Leave Group – a host leaving sends to 224.0.0.2.

Operation: to join, a host sends a membership report for the group; the router adds the group to its list for that interface. The router sends periodic general queries (every 125 s); each host sets a random timer and the first to respond sends a report – others hearing it cancel theirs (report suppression), reducing traffic. When a host leaves, the router sends group-specific queries; if no report comes back within the timeout, the router stops forwarding that group. The maximum response time field limits how long hosts wait. IGMPv3 adds source filtering (receive only from specific sources). Switches use IGMP snooping to forward multicast only to ports with members.

Q6 – Address allocation from 17.12.0.0/16

Total addresses = 232−16 = 65,536 (17.12.0.0 – 17.12.255.255).

Group 1: 64 customers × 256 addresses = 16,384 addresses. Each needs a /24 (2⁸ = 256).

Customer 1 : 17.12.0.0/24   – 17.12.0.255
Customer 2 : 17.12.1.0/24   – 17.12.1.255
...
Customer 64: 17.12.63.0/24  – 17.12.63.255
Group 1 range: 17.12.0.0 – 17.12.63.255

Group 2: 122 customers × 128 addresses = 15,616 addresses. Each needs a /25 (2⁷ = 128).

Customer 1  : 17.12.64.0/25    – 17.12.64.127
Customer 2  : 17.12.64.128/25  – 17.12.64.255
Customer 3  : 17.12.65.0/25    – 17.12.65.127
...
Customer 122: 17.12.124.128/25 – 17.12.124.255
Group 2 range: 17.12.64.0 – 17.12.124.255

Allocated = 16,384 + 15,616 = 32,000. Remaining = 65,536 − 32,000 = 33,536 addresses, from 17.12.125.0 to 17.12.255.255.

Answers prepared by Shining Study for revision. Check them against your class notes and teacher’s guidance.

About Saif R

An educator and technology enthusiast passionate about empowering students through quality education and digital learning. Dedicated to making academic resources and opportunities accessible to everyone.