CS407 – Routing and Switching: Midterm Important Subjective (36 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS407 Course Page · CS407 MCQ Pack (150 MCQs)
-
Differentiate between bandwidth, throughput and goodput.
Topic: Network Fundamentals and IOS
Bandwidth is the capacity of a medium to carry data; it measures the amount of data that can flow from one place to another in a given amount of time and is typically measured in kb/s or Mb/s. Throughput is the actual measure of the transfer of bits across the media over a given period of time; because of factors such as the amount and type of traffic and latency, throughput usually does not match the specified bandwidth, and it can never be faster than the slowest link in the path. Goodput is the measure of usable data transferred over a given period of time; it is throughput minus the traffic overhead for establishing sessions, acknowledgements and encapsulation.
-
What factors affect the throughput of a network?
Topic: Network Fundamentals and IOS
Throughput is influenced by: (1) the amount of traffic on the network, (2) the type of traffic being transmitted, and (3) the latency created by the number of network devices encountered between source and destination. Latency is the amount of time, including delays, for data to travel from one point to another. In addition, the properties of the physical media and the technologies chosen for signalling also play a role, and a single low-throughput segment in the path creates a bottleneck for the entire network.
-
Compare UTP, STP and coaxial cable.
Topic: Network Fundamentals and IOS
Unshielded Twisted-Pair (UTP) is the most common networking media; it consists of four pairs of colour-coded twisted wires encased in a flexible plastic sheath and is terminated with RJ-45 connectors; twisting protects against signal interference. Shielded Twisted-Pair (STP) provides better noise protection than UTP by combining shielding (to counter EMI and RFI) with wire twisting (to counter crosstalk), but it is significantly more expensive and difficult to install, and also uses RJ-45 connectors. Coaxial cable has two conductors sharing the same axis: a copper conductor surrounded by flexible plastic insulation, a woven copper braid or metallic foil that acts as the second wire and as a shield against electromagnetic interference, and an outer cable jacket.
-
What are the advantages of fiber-optic cabling over copper cabling?
Topic: Network Fundamentals and IOS
Optical fiber is a thin transparent strand of very pure glass in which bits are encoded as light impulses. It permits transmission of data over longer distances and at higher bandwidths (data rates) than any other networking media. Unlike copper wires, fiber-optic cable transmits signals with less attenuation and is completely immune to EMI and RFI. It is used in enterprise backbone cabling, fiber-to-the-home (FTTH) access networks, long-haul networks connecting countries and cities, and submarine networks.
-
Differentiate between the LLC and MAC sublayers of the data link layer.
Topic: Network Fundamentals and IOS
The data link layer is divided into two sublayers. Logical Link Control (LLC) is the upper sublayer; it defines the software processes that provide services to the network layer protocols and places information in the frame that identifies which network layer protocol (such as IPv4 or IPv6) is being used for the frame, allowing multiple Layer 3 protocols to use the same interface and media. Media Access Control (MAC) is the lower sublayer; it defines the media access processes performed by the hardware and provides data link layer addressing and delimiting of data according to the physical signalling requirements of the medium and the data link protocol in use.
-
Explain the role of the FCS field and the CRC in error detection at the data link layer.
Topic: Network Fundamentals and IOS
Data link layer protocols add a trailer to each frame for error detection. The transmitting node creates a logical summary of the contents of the frame, known as the cyclic redundancy check (CRC) value, and places it in the Frame Check Sequence (FCS) field of the frame. When the frame arrives, the receiving node calculates its own CRC of the frame and compares it with the received value. If the two values are the same, the frame is considered to have arrived as transmitted; if they differ, the frame is discarded. This mechanism discovers most errors caused on the media by interference, distortion or loss.
-
Describe the major IOS modes of operation and the commands used to move between them.
Topic: Network Fundamentals and IOS
The Cisco IOS uses a hierarchical modal structure. User EXEC mode is the first and most basic mode, identified by the prompt ending with '>'; it allows only a limited number of basic monitoring (view-only) commands and no configuration changes. Privileged EXEC mode, identified by the prompt ending with '#', is reached from user EXEC mode with the enable command (disable returns to user EXEC); it allows configuration and management commands. Global configuration mode, identified by the prompt Switch(config)#, is reached from privileged EXEC mode with the configure terminal command; changes made here affect the operation of the device as a whole. From global configuration mode, specific sub-configuration modes such as interface mode and line mode can be entered to configure a particular part of the device.
-
Compare console, Telnet, SSH and AUX methods of accessing a Cisco IOS device.
Topic: Network Fundamentals and IOS
Console access uses a management port to provide out-of-band access through a direct cable connection with terminal emulation software; it works even when no networking services are configured, such as during initial configuration, and displays startup, debugging and error messages by default. Telnet establishes a CLI session remotely through a virtual interface over a network; it requires active networking services and at least one interface configured with an IP address, but sends data (including passwords) unencrypted. SSH provides a remote login similar to Telnet but with stronger password authentication and encryption of the session data, so it is the recommended best practice. AUX access uses a telephone dialup connection with a modem attached to the router's auxiliary port; it is also out-of-band and does not require networking services, but the console port is preferred for troubleshooting.
-
Describe the four basic processes used by the network layer to exchange data between end devices.
Topic: Network Layer and IPv4 Addressing
(1) Addressing end devices: end devices must be configured with a unique IP address for identification on the network; an end device with a configured IP address is called a host. (2) Encapsulation: the network layer receives the PDU from the transport layer and adds IP header information, such as the source and destination IP addresses, producing a packet. (3) Routing: the network layer directs packets to a destination host on another network; routers select paths and direct packets toward the destination, and each route the packet takes is called a hop. (4) De-encapsulation: when the packet arrives at the destination host, the host checks the IP header; if the destination IP address matches its own, the header is removed and the Layer 4 PDU is passed up to the appropriate transport layer service.
-
What are the characteristics of the IP protocol?
Topic: Network Layer and IPv4 Addressing
IP is the network layer service implemented by the TCP/IP suite and was designed as a protocol with low overhead, providing only the functions necessary to deliver a packet from source to destination. Its basic characteristics are: (1) Connectionless - no connection with the destination is established before sending data packets. (2) Best effort (unreliable) - packet delivery is not guaranteed; IP does not track and manage the flow of packets, and such functions, if required, are performed by other protocols at other layers. (3) Media independent - operation is independent of the medium (copper, fiber or wireless) carrying the data.
-
Explain the Time-to-Live (TTL) field of the IPv4 header.
Topic: Network Layer and IPv4 Addressing
The TTL field contains an 8-bit binary value used to limit the lifetime of a packet. It is specified in seconds but is commonly referred to as the hop count. The packet sender sets the initial TTL value, and it is decreased by one each time the packet is processed by a router (hop). If the TTL field decrements to zero, the router discards the packet and sends an ICMP Time Exceeded message to the source IP address. The traceroute command uses this field to identify the routers used between the source and the destination.
-
Differentiate between unicast, broadcast and multicast communication in an IPv4 network.
Topic: Network Layer and IPv4 Addressing
Unicast is the process of sending a packet from one host to an individual host; the source and destination addresses in the packet are the unicast host addresses of the two end devices. Broadcast is the process of sending a packet from one host to all hosts in the network, using the broadcast address of the network (all 1s in the host portion); it is normally restricted to the local network. Multicast is the process of sending a packet from one host to a selected group of hosts that subscribe to a multicast group, possibly in different networks; it conserves bandwidth because a single packet serves the whole group. Multicast uses the address range 224.0.0.0 to 239.255.255.255, and examples include video/audio broadcasts, routing information exchange and software distribution.
-
Differentiate between directed broadcast and limited broadcast.
Topic: Network Layer and IPv4 Addressing
A directed broadcast is sent to all hosts on a specific network; it is useful for sending a broadcast to all hosts on a non-local network - for example, a packet addressed to 172.16.4.255 reaches all hosts of the 172.16.4.0/24 network. Routers do not forward directed broadcasts by default, although they may be configured to do so. A limited broadcast is used for communication limited to the hosts on the local network only; such packets always use the destination IPv4 address 255.255.255.255, and routers never forward a limited broadcast, which is why an IPv4 network is also called a broadcast domain and routers form its boundary.
-
What are private IPv4 addresses? Why are they not propagated on the Internet?
Topic: Network Layer and IPv4 Addressing
Private addresses are blocks of addresses used in networks that require limited or no Internet access. The private address blocks are 10.0.0.0/8 (10.0.0.0 to 10.255.255.255), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255), as defined in RFC 1918. Packets with a source or destination private IP address are not propagated by Internet routers; Internet routers and firewalls block or translate these addresses. Private addresses are usually converted to public IP addresses using NAT (Network Address Translation) so that internal hosts can access the Internet.
-
Write a short note on loopback and link-local IPv4 addresses.
Topic: Network Layer and IPv4 Addressing
The loopback address 127.0.0.1 is a special address that hosts use to direct traffic to themselves; it lets TCP/IP applications and services running on the same device communicate with one another while bypassing the lower layers of the TCP/IP stack, and pinging it tests the TCP/IP configuration of the local host. The whole block 127.0.0.0 to 127.255.255.255 is reserved and no address from it should ever appear on any network. Link-local addresses are in the block 169.254.0.0/16 (169.254.0.0 to 169.254.255.255); they can be automatically assigned to the local host by the operating system when no IP configuration is available, for example in a small peer-to-peer network or when a host cannot obtain an address from a DHCP server.
-
Why is subnetting needed?
Topic: Subnetting, Routers and Packet Forwarding
State its benefits. In a flat network all devices share one IP network, so broadcasts used to locate services and devices (such as DHCP requests) reach every host, creating significant traffic that slows network operations as the network grows. Subnetting segments a network by dividing it into multiple smaller network spaces called subnets, which may be based on geographic location, organizational unit or device type. Its benefits are: it creates smaller broadcast domains, it limits the amount of traffic on other network segments, it reduces overall network traffic and improves network performance, and it provides low-level security. A router is required to subnet a network; each router interface is on a different subnet and is used by the devices on that subnet as the default gateway.
-
Describe the four types of memory used in a Cisco router and the function of each.
Topic: Subnetting, Routers and Packet Forwarding
RAM (volatile DRAM) stores the applications and processes in use: the Cisco IOS (copied into RAM during bootup), the running configuration file, the IP routing table, the ARP cache and the packet buffer; it loses all its content when the router is powered down or restarted. ROM is firmware that does not lose its contents without power; it stores the bootup instructions, the basic diagnostic software that performs the power-on self-test (POST), and a limited backup version of the IOS. NVRAM is non-volatile and is used as permanent storage for the startup configuration file (startup-config). Flash is non-volatile memory used as permanent storage for the IOS image and other system-related files; the IOS is copied from flash into RAM during bootup.
-
Explain the router bootup process. Which two files are loaded into RAM?
Topic: Subnetting, Routers and Packet Forwarding
When a Cisco router is powered on, the ROM software provides the startup instructions and performs the power-on self-test (POST) of all components. The router then loads two files into RAM: (1) the IOS image file, which is stored in flash memory and copied into RAM to facilitate the basic operation of the device's hardware components (using flash also allows the IOS to be upgraded or new features added), and (2) the startup configuration file, which is stored in NVRAM and contains the commands used to initially configure the router, creating the running configuration file stored in RAM. All configuration changes are made to the running-config and implemented immediately; they should be saved back to NVRAM as the startup-config so they survive a restart or power loss.
-
What three major steps does a router perform with a packet received from one network and destined for another network?
Topic: Subnetting, Routers and Packet Forwarding
Step 1: The router de-encapsulates the Layer 3 packet by removing the Layer 2 frame header and trailer. Step 2: It examines the destination IP address of the IP packet to find the best path in the routing table. Step 3: If a path to the destination is found, it encapsulates the Layer 3 packet into a new Layer 2 frame and forwards the frame out the exit interface. During this process the Layer 3 IP addresses remain unchanged, while the Layer 2 data link addresses change at every hop, and the packet may be re-encapsulated in a different type of Layer 2 frame than the one in which it was received.
-
What are the three possible outcomes of the path determination (routing table search) process?
Topic: Subnetting, Routers and Packet Forwarding
(1) Directly connected network: if the destination IP address belongs to a device on a network directly connected to one of the router's interfaces, the packet is forwarded directly to the destination device. (2) Remote network: if the destination belongs to a remote network, the packet is forwarded to another router. (3) No route determined: if the destination belongs to neither a connected nor a remote network, the router checks for a Gateway of Last Resort (set when a default route is configured); if a default route exists, the packet is forwarded to the Gateway of Last Resort, otherwise the packet is discarded and the router sends an ICMP unreachable message to the source IP address of the packet.
-
Compare static routing with dynamic routing.
Topic: Static and Dynamic Routing
Static routes are manually entered into the routing table by the administrator; they are not automatically updated and must be manually reconfigured whenever the network topology changes. Their benefits are improved security and resource efficiency - they use less bandwidth than dynamic protocols and no CPU cycles are used to calculate and communicate routes - but they lack automatic reconfiguration. Dynamic routing protocols allow routers to automatically learn about remote networks from other routers through network discovery, share reachability and status information, and maintain their routing tables; when a topology change makes a path unusable, the protocol determines a new best path without involving the administrator.
-
Describe the four types of IPv4 static routes.
Topic: Static and Dynamic Routing
(1) Standard static route: a manually configured route to a specific remote network, configured with the ip route command using a network and mask with a next-hop IP or exit interface; it is identified in the routing table by the code S. (2) Default static route: a route that matches all packets, configured as ip route 0.0.0.0 0.0.0.0; it creates a Gateway of Last Resort and is used when no more specific match exists, for example at an edge router connected to an ISP or on a stub router. (3) Summary static route: several contiguous networks summarized into a single static route to reduce the number of routing table entries, possible when the networks are contiguous and all routes use the same exit interface or next-hop. (4) Floating static route: a static route configured with a higher administrative distance than the primary route, used as a backup path that is only selected when the primary route fails.
-
What is a floating static route? How does administrative distance make it work?
Topic: Static and Dynamic Routing
A floating static route is a static route used to provide a backup path to a primary static or dynamic route in the event of a link failure; it is only used when the primary route is not available. Administrative distance (AD) represents the trustworthiness of a route, and when multiple paths to a destination exist the router chooses the one with the lowest AD. By default a static route has an AD of 1, so the administrator increases the AD of the floating static route above that of the primary route - for example, an AD of 95 for a backup to an EIGRP-learned route (AD 90). While the primary route is active it is preferred; if it is lost, the floating static route is installed and used in its place.
-
Define convergence. What is split horizon and what problem does it solve?
Topic: Static and Dynamic Routing
A network has converged when all routers have complete and accurate information about the entire network; convergence time is the time it takes routers to share information, calculate best paths and update their routing tables, and a network is not completely operable until it has converged. Split horizon is a routing loop prevention technique used by distance vector protocols: it prevents routing information from being sent back out the same interface from which it was received. For example, a router will not advertise a network out of the interface through which it learned about that network, which prevents false information from circulating and creating routing loops.
-
Differentiate between distance vector and link-state routing protocols.
Topic: Static and Dynamic Routing
A distance vector protocol advertises routes by distance (a metric such as hop count) and vector (the direction of the next-hop router or exit interface). A router using it does not know the entire path or the topology of the network; it knows only the distance to a remote network and which interface to use, like following sign posts. Examples are RIPv1, RIPv2, IGRP and EIGRP. A link-state protocol creates a complete view (topological map) of the network by gathering link-state information from all other routers; routers flood link-state packets, build a link-state database, and run Dijkstra's SPF algorithm to compute the best path to each network. Link-state protocols do not use periodic updates after convergence - an update is sent only when the topology changes - so they converge faster. Examples are OSPF and IS-IS.
-
Differentiate between classful and classless routing protocols.
Topic: Static and Dynamic Routing
Classful routing protocols do not send subnet mask information in their routing updates; they were created when network addresses were allocated based on classes (A, B or C). Because no mask is sent, they cannot support variable length subnet masks (VLSM) or classless interdomain routing (CIDR), and they create problems in discontiguous networks. The only classful protocols are RIPv1 and IGRP, both legacy. Classless routing protocols include the subnet mask in their updates and therefore support VLSM and CIDR; examples are RIPv2, EIGRP, OSPF and IS-IS. Link-state routing protocols are classless by nature.
-
Describe the five steps of the link-state routing process.
Topic: Static and Dynamic Routing
Step 1: Each router learns about its own links and directly connected networks by detecting that an interface is in the up state and configured with an IP address and subnet mask. Step 2: Each router meets its neighbors on directly connected networks by exchanging Hello packets; neighbors that use the same link-state protocol form an adjacency, and Hellos act as keepalives. Step 3: Each router builds a Link-State Packet (LSP) containing the state of each directly connected link, including neighbor ID, link type and bandwidth. Step 4: Each router floods the LSP to all neighbors, who store it in a database and flood it onward until all routers in the area have received it; LSPs are sent only at startup or when the topology changes. Step 5: Each router uses the link-state database to construct a complete map of the topology and, using the SPF algorithm, builds an SPF tree and computes the best path to each destination network, which is then added to the routing table.
-
State the advantages and disadvantages of link-state routing protocols.
Topic: Static and Dynamic Routing
Advantages: (1) They build a topological map (SPF tree) of the network, so each router can independently determine the shortest path to every network. (2) Fast convergence, because on receiving an LSP a router immediately floods it out all interfaces except the one it was received on. (3) Event-driven updates: after the initial flooding, an LSP is sent only when the topology changes and contains only information about the affected link; there are no periodic updates. (4) Hierarchical design using areas allows better route aggregation and isolates routing issues within an area. Disadvantages: they require additional memory to create and maintain the link-state database and SPF tree, more CPU processing because the SPF algorithm is more demanding than distance vector algorithms such as Bellman-Ford, and the flooding of link-state packets can affect available bandwidth, particularly at initial startup or on unstable networks.
-
Describe the three databases maintained by OSPF.
Topic: OSPF
OSPF creates and maintains three databases (tables), all kept in RAM. (1) The adjacency database creates the neighbor table, listing the neighboring routers with which routing information is exchanged. (2) The link-state database (LSDB) creates the topology table; it holds the link-state advertisements received from all routers in the area and therefore describes the complete topology of the network. (3) The forwarding database creates the routing table; after the CPU processes the neighbor and topology tables using Dijkstra's SPF algorithm, the best routes are placed in the forwarding database, from which the routing table is made and forwarding decisions are taken.
-
Why are a DR and BDR elected on multiaccess networks? What is a DROTHER?
Topic: OSPF
Multiaccess networks such as Ethernet can interconnect many OSPF routers over a common link, which creates two problems: creating an adjacency with every other router would produce an excessive number of adjacencies, and the flooding of LSAs between all of them would become excessive. The solution is the Designated Router (DR), which is elected to be the collection and distribution point for LSAs sent and received on the network. A Backup Designated Router (BDR) is also elected so it can take over in case the DR fails. All other routers on the network, which are neither the DR nor the BDR, are called DROTHERs; they form adjacencies only with the DR and BDR. Point-to-point links do not require a DR or BDR.
-
How does a Cisco router determine its OSPF router ID?
Topic: OSPF
The router ID is a 32-bit value expressed in dotted decimal (IPv4 address) format that uniquely identifies the router in the OSPF domain and is used in the DR/BDR election. It is determined by the following criteria in preferential order: (1) The router ID explicitly configured with the router-id command in OSPF router configuration mode - this is the recommended method. (2) If not configured, the router chooses the highest IPv4 address of any configured loopback interface. (3) If no loopback interfaces are configured, the router chooses the highest active IPv4 address of any of its physical interfaces; the interface does not need to be OSPF-enabled, only active and in the up state. Once selected, the router ID does not change until the router is reloaded or the OSPF process is cleared with the clear ip ospf process command.
-
What is the difference between single-area OSPF and multiarea OSPF?
Topic: OSPF
State the benefits of multiarea OSPF. In single-area OSPF, all routers are in one area called the backbone area (area 0). In multiarea OSPF, the autonomous system is divided into multiple areas in a hierarchical fashion; all areas must connect to the backbone area (area 0), and routers interconnecting the areas are called Area Border Routers (ABRs). Benefits of the hierarchical multiarea design include: smaller routing tables, because network addresses can be summarized between areas; reduced link-state update overhead, which minimizes processing and memory requirements; and reduced frequency of SPF calculations, because a topology change is localized within an area - LSA flooding stops at the area boundary and only routers in the affected area need to rerun the SPF algorithm.
-
Differentiate between standard and extended IPv4 ACLs.
Topic: Access Control Lists
A standard ACL can be used to permit or deny traffic only from source IPv4 addresses; the destination of the packet and the ports involved are not evaluated. Numbered standard ACLs use the ranges 1 to 99 (expanded range 1300 to 1999). An extended ACL filters IPv4 packets based on several attributes: protocol type, source IPv4 address, destination IPv4 address, source TCP or UDP ports, destination TCP or UDP ports, and optional protocol information for finer control. Numbered extended ACLs use the ranges 100 to 199 (expanded range 2000 to 2699). Because extended ACLs provide a much greater degree of control, they are used more often than standard ACLs. Both types can be created as numbered or named ACLs.
-
State the general guidelines for placing standard and extended ACLs, and explain the 'three Ps' rule.
Topic: Access Control Lists
Extended ACLs should be located as close as possible to the source of the traffic to be filtered, so that undesirable traffic is denied near its source without crossing the network infrastructure and wasting bandwidth. Standard ACLs do not specify destination addresses, so they should be placed as close to the destination as possible; placing a standard ACL at the source would effectively block that traffic from reaching any other network. ACLs are commonly used in firewall routers between the internal and external network and on border routers at the edges of the network. The 'three Ps' summarize how ACLs are applied: one ACL per protocol, one ACL per direction (inbound or outbound), and one ACL per interface.
-
Explain how an ACL processes packets, including the role of the implicit deny.
Topic: Access Control Lists
An ACL is a sequential list of permit or deny statements called access control entries (ACEs). When traffic passes through an interface configured with an ACL, the router compares the information in the packet (source and destination IP addresses, ICMP message type, and Layer 4 information such as TCP/UDP source and destination ports) against each ACE in sequential order. Processing continues until a match is found; the packet is then permitted or denied based on the first matching statement and no other ACEs are examined, so the order of statements is important. If no match is found by the end of the list, the traffic is denied, because the last statement of every ACL is an implicit deny that is automatically inserted even though it is not physically present. For this reason, an ACL without at least one permit statement blocks all traffic. ACLs do not act on packets that originate from the router itself.
-
What is a wildcard mask? Explain its matching rules and the keywords 'host' and 'any'.
Topic: Access Control Lists
A wildcard mask is a string of 32 binary digits used by the router in ACL statements to determine which bits of an address to examine for a match. Unlike a subnet mask, which uses 1s and 0s to identify the network, subnet and host portions of an address, a wildcard mask follows these rules: a wildcard mask bit 0 means 'match the corresponding bit value in the address', and a wildcard mask bit 1 means 'ignore the corresponding bit value in the address'. Two keywords simplify common cases: the host keyword substitutes for the mask 0.0.0.0, meaning all address bits must match so that only one specific host is matched; the any keyword substitutes for the IP address and the mask 255.255.255.255, meaning the entire IPv4 address is ignored and any address is accepted.