Getting ready for the midterm of CS407 (Routing and Switching)? Here is everything in one place: solved MCQs, subjective questions with answers and short notes and key terms, gathered from past papers and files shared by students. No duplicates and all the answers are checked and verified. Use the tabs above to switch between Objective, Subjective and Short Notes & Key Terms, and tap Show answer only after you have tried the question yourself. Best of luck with your exam!
Part 1: Objective (MCQs)
Q1. Which of the following is an example of an end device?
- Switch
- Router
- Network printer
- Firewall
Show answer
Answer: (c) Network printer
Q2. In a peer-to-peer network, a host can:
- Act only as a server
- Act only as a client
- Act as both a client and a server
- Not share files
Show answer
Answer: (c) Act as both a client and a server
Q3. Which intermediary device provides network access for end devices?
- Router
- Switch
- Printer
- IP phone
Show answer
Answer: (b) Switch
Q4. Which of the following is a disadvantage of peer-to-peer networking?
- Easy to set up
- Lower cost
- No centralized administration
- Simple file sharing
Show answer
Answer: (c) No centralized administration
Q5. Which device interconnects individual networks to form an internetwork?
- Host
- Medium
- Router
- NIC
Show answer
Answer: (c) Router
Q6. A LAN is best described as a network that:
- Covers an entire city
- Provides access to end devices in a small geographical area
- Spans multiple countries
- Connects only storage arrays
Show answer
Answer: (b) Provides access to end devices in a small geographical area
Q7. A network that covers a city and is typically operated by a single large organization is a:
- PAN
- LAN
- MAN
- SAN
Show answer
Answer: (c) MAN
Q8. The Internet is best described as:
- A single network owned by one company
- A worldwide collection of interconnected networks
- A LAN with many hosts
- A SAN
Show answer
Answer: (b) A worldwide collection of interconnected networks
Q9. Which Internet access technology uses the telephone line and splits it into voice, download, and upload channels?
- Cable
- DSL
- Satellite
- Cellular
Show answer
Answer: (b) DSL
Q10. A SAN is designed to:
- Support file servers and provide data storage, retrieval, and replication
- Connect home devices wirelessly
- Span a city
- Provide VoIP service
Show answer
Answer: (a) Support file servers and provide data storage, retrieval, and replication
Q11. Which component converts information into an acceptable form for transmission?
- Decoder
- Encoder
- Receiver
- Channel
Show answer
Answer: (b) Encoder
Q12. Which delivery option sends one packet to all hosts in a network?
- Unicast
- Multicast
- Broadcast
- Encapsulation
Show answer
Answer: (c) Broadcast
Q13. Which rule controls how quickly a sender transmits so the receiver can process the data?
- Access method
- Flow control
- Response timeout
- Message size
Show answer
Answer: (b) Flow control
Q14. Which rule determines when a host is allowed to send a message?
- Access method
- Message size
- Flow control
- Encoding
Show answer
Answer: (a) Access method
Q15. A frame acts like an envelope because it:
- Encrypts the data
- Provides the addresses of the source and destination hosts
- Amplifies the signal
- Measures the distance to the destination
Show answer
Answer: (b) Provides the addresses of the source and destination hosts
Q16. Multicast transmission is designed to:
- Send one packet to a selected group of hosts, conserving bandwidth
- Send to every host on the network
- Send to exactly one host
- Encode the signal
Show answer
Answer: (a) Send one packet to a selected group of hosts, conserving bandwidth
Q17. If a question receives no answer within an acceptable time, which rule governs the reaction?
- Response timeout
- Flow control
- Access method
- Message size
Show answer
Answer: (a) Response timeout
Q18. Which rule explains why messages are usually broken into smaller parts?
- Message size
- Access method
- Message timing
- Flow control
Show answer
Answer: (a) Message size
Q19. Which organization is responsible for producing RFC documents?
- IRTF
- IETF
- IAB
- ISOC
Show answer
Answer: (b) IETF
Q20. The Internet Research Task Force (IRTF) focuses on:
- Short-term standards development
- Long-term research related to the Internet and TCP/IP
- Allocation of IP addresses
- Oversight of IANA
Show answer
Answer: (b) Long-term research related to the Internet and TCP/IP
Q21. The Internet Architecture Board (IAB) has how many members?
- 5
- 7
- 13
- 20
Show answer
Answer: (c) 13
Q22. TCP/IP is considered an open standard because:
- It is owned by a single vendor
- Its protocols are freely available for any vendor to implement
- It runs only on Cisco hardware
- It is a proprietary suite
Show answer
Answer: (b) Its protocols are freely available for any vendor to implement
Q23. Which vendor-proprietary protocol suite has been replaced by the open TCP/IP suite?
- AppleTalk
- HTTP
- DHCP
- IP
Show answer
Answer: (a) AppleTalk
Q24. Which of the following is an IRTF research group?
- Internet Engineering Steering Group
- Crypto Forum Research Group
- Working Group #1
- Internet Society
Show answer
Answer: (b) Crypto Forum Research Group
Q25. Which is a benefit of the layered model?
- It prevents a technology change in one layer from affecting the other layers
- It forces the use of a single vendor
- It removes the need for protocols
- It merges all layers into one
Show answer
Answer: (a) It prevents a technology change in one layer from affecting the other layers
Q26. How many layers does the OSI model have?
- 4
- 5
- 7
- 8
Show answer
Answer: (c) 7
Q27. Path determination and logical (IP) addressing belong to which OSI layer?
- Data link
- Network
- Transport
- Session
Show answer
Answer: (b) Network
Q28. Which OSI layer is responsible for physical (MAC) addressing and frames?
- Physical
- Data link
- Network
- Presentation
Show answer
Answer: (b) Data link
Q29. The protocol data unit (PDU) at the transport layer is called a:
- Bit
- Frame
- Packet
- Segment
Show answer
Answer: (d) Segment
Q30. How many layers does the TCP/IP model have?
- 3
- 4
- 5
- 7
Show answer
Answer: (b) 4
Q31. Which TCP/IP layer determines the best path through the network?
- Application
- Transport
- Internet
- Network access
Show answer
Answer: (c) Internet
Q32. The TCP/IP Application layer covers which OSI layers?
- Application, Presentation, and Session
- Transport and Network
- Data link and Physical
- Network only
Show answer
Answer: (a) Application, Presentation, and Session
Q33. Which OSI layer represents data as bits and signals on the media?
- Physical
- Data link
- Network
- Transport
Show answer
Answer: (a) Physical
Q34. Cisco IOS stands for:
- Internetwork Operating System
- Internal Operating Software
- Integrated Operating Service
- Interface Output System
Show answer
Answer: (a) Internetwork Operating System
Q35. Which part of an operating system interacts directly with the computer hardware?
- Shell
- Kernel
- GUI
- Application
Show answer
Answer: (b) Kernel
Q36. Which part of an operating system interfaces with applications and users?
- Kernel
- Shell
- Hardware
- Driver
Show answer
Answer: (b) Shell
Q37. When a Cisco router boots, the IOS image is copied from flash into which memory?
- NVRAM
- ROM
- RAM
- Processor
Show answer
Answer: (c) RAM
Q38. Which access method is out-of-band and requires a direct physical connection?
- Telnet
- SSH
- Console
- Web interface
Show answer
Answer: (c) Console
Q39. A Telnet session requires:
- A console cable
- An active network interface with an IP address
- A dial-up modem on the AUX port
- Nothing; it works without configuration
Show answer
Answer: (b) An active network interface with an IP address
Q40. Which prompt identifies user EXEC mode?
- #
- >
- (config)#
- ?
Show answer
Answer: (b) >
Q41. Which command moves a user from user EXEC mode to privileged EXEC mode?
- disable
- enable
- configure terminal
- exit
Show answer
Answer: (b) enable
Q42. Which command enters global configuration mode from privileged EXEC mode?
- enable
- configure terminal
- show running-config
- ip address
Show answer
Answer: (b) configure terminal
Q43. Which mode is entered from global configuration mode to configure a specific interface?
- Interface configuration mode
- User EXEC mode
- ROM monitor mode
- Hostname mode
Show answer
Answer: (a) Interface configuration mode
Q44. Which of the following is a line configuration mode?
- Interface Fa0/0
- Console line
- Serial0/0/0
- Loopback0
Show answer
Answer: (b) Console line
Q45. SSH is preferred over Telnet because it:
- Works without an IP address
- Encrypts session data and provides stronger authentication
- Is faster
- Uses the AUX port
Show answer
Answer: (b) Encrypts session data and provides stronger authentication
Q46. Which key completes a partially typed command or keyword?
- Ctrl-A
- Tab
- Ctrl-E
- Ctrl-R
Show answer
Answer: (b) Tab
Q47. Which key combination moves the cursor to the beginning of the line?
- Ctrl-A
- Ctrl-E
- Ctrl-R
- Ctrl-Z
Show answer
Answer: (a) Ctrl-A
Q48. Which symbol gives context-sensitive help at any prompt?
- #
- ?
- !
- >
Show answer
Answer: (b) ?
Q49. The IOS message "% Incomplete command" means:
- The command was typed incorrectly
- Required keywords or arguments were left off
- The command is ambiguous
- The device is offline
Show answer
Answer: (b) Required keywords or arguments were left off
Q50. The IOS message "% Ambiguous command" means:
- Not enough characters were typed for the interpreter to recognize the command
- Too many characters were typed
- The command was entered in the wrong mode
- A hardware failure occurred
Show answer
Answer: (a) Not enough characters were typed for the interpreter to recognize the command
Q51. Which command displays the loaded IOS version and hardware information?
- show version
- show flash
- show running-config
- show processes
Show answer
Answer: (a) show version
Q52. The default hostname of a Cisco IOS switch is:
- Router
- Switch
- Cisco
- Default
Show answer
Answer: (b) Switch
Q53. Which is a valid hostname rule?
- The hostname must contain spaces
- The hostname must start with a letter
- The hostname may be longer than 64 characters
- The hostname must start with a digit
Show answer
Answer: (b) The hostname must start with a letter
Q54. Which command is the recommended way to set an encrypted privileged EXEC password?
- enable password
- enable secret
- line console 0
- banner motd
Show answer
Answer: (b) enable secret
Q55. Which command set secures the VTY lines?
- line vty 0 15, then password and login
- interface vty 0 15, then shutdown
- enable vty
- ip vty secure
Show answer
Answer: (a) line vty 0 15, then password and login
Q56. Which command displays the running configuration?
- show startup-config
- show running-config
- show flash
- show arp
Show answer
Answer: (b) show running-config
Q57. Which media type uses patterns of light to represent bits?
- Copper
- Fiber-optic
- Wireless
- Coaxial
Show answer
Answer: (b) Fiber-optic
Q58. Which copper cable is the most common networking media in LANs?
- STP
- UTP
- Coaxial
- Fiber-optic
Show answer
Answer: (b) UTP
Q59. Which cable offers better noise protection than UTP but is more expensive and harder to install?
- UTP
- STP
- Wireless
- Fiber-optic
Show answer
Answer: (b) STP
Q60. Which data link sublayer defines the hardware media access processes and data link addressing?
- LLC
- MAC
- Physical
- Network
Show answer
Answer: (b) MAC
Q61. Which frame field is used for error detection?
- Start frame
- Type
- FCS
- Address
Show answer
Answer: (c) FCS
Q62. A receiving node discards a frame when:
- The CRC values match
- The CRC values differ
- The frame has a type field
- A start frame is detected
Show answer
Answer: (b) The CRC values differ
Q63. Usable data transferred over a period of time, after protocol overhead is removed, is called:
- Bandwidth
- Throughput
- Goodput
- Latency
Show answer
Answer: (c) Goodput
Q64. In a network with several segments, throughput cannot exceed:
- The fastest link on the path
- The slowest link on the path
- The average of all links
- The router's memory size
Show answer
Answer: (b) The slowest link on the path
Q65. Which IEEE standard family is commonly known as Wi-Fi?
- 802.3
- 802.11
- 802.16
- 802.1Q
Show answer
Answer: (b) 802.11
Q66. The network layer provides:
- Delivery only within a single switch
- End-to-end delivery of data across networks
- Electrical signaling on the cable
- Application services to users
Show answer
Answer: (b) End-to-end delivery of data across networks
Q67. Which IPv4 header field identifies the payload type, such as ICMP, TCP, or UDP?
- TTL
- Protocol
- Version
- Identification
Show answer
Answer: (b) Protocol
Q68. Which device decrements the IPv4 TTL field?
- Each router that processes the packet
- Each host that receives the packet
- Only the destination host
- The switch
Show answer
Answer: (a) Each router that processes the packet
Q69. When the TTL of a packet reaches zero at a router, the router:
- Forwards the packet anyway
- Discards the packet and sends an ICMP Time Exceeded message to the source
- Changes the destination address
- Sends an ARP request
Show answer
Answer: (b) Discards the packet and sends an ICMP Time Exceeded message to the source
Q70. Which protocol value (in hexadecimal) identifies ICMP in the IPv4 header?
- 0x06
- 0x11
- 0x01
- 0x00
Show answer
Answer: (c) 0x01
Q71. The IPv4 Version field always contains which binary value?
- 0100
- 0110
- 1000
- 0011
Show answer
Answer: (a) 0100
Q72. IP is connectionless, which means:
- A connection is set up before any data is sent
- No connection is established with the destination before sending
- Every packet is acknowledged
- Packets always arrive in order
Show answer
Answer: (b) No connection is established with the destination before sending
Q73. IP's "best effort" characteristic means:
- Delivery is guaranteed
- Packet delivery is not guaranteed
- Packets are encrypted
- Routes are always static
Show answer
Answer: (b) Packet delivery is not guaranteed
Q74. The subnet mask 255.255.255.0 written as a prefix length is:
- /16
- /24
- /26
- /32
Show answer
Answer: (b) /24
Q75. In a subnet mask, the bits set to 1 represent:
- Host bits
- Network bits
- Broadcast bits
- Loopback bits
Show answer
Answer: (b) Network bits
Q76. The broadcast address of 10.1.1.0/24 is:
- 10.1.1.0
- 10.1.1.1
- 10.1.1.254
- 10.1.1.255
Show answer
Answer: (d) 10.1.1.255
Q77. The first host address on 10.1.1.0/24 is:
- 10.1.1.0
- 10.1.1.1
- 10.1.1.2
- 10.1.1.254
Show answer
Answer: (b) 10.1.1.1
Q78. The last host address on 10.1.1.0/24 is:
- 10.1.1.255
- 10.1.1.254
- 10.1.1.253
- 10.1.1.0
Show answer
Answer: (b) 10.1.1.254
Q79. Which of the following is a private address block?
- 8.8.8.0/24
- 172.16.0.0/12
- 209.165.200.0/27
- 224.0.0.0/4
Show answer
Answer: (b) 172.16.0.0/12
Q80. The IPv4 loopback address range is:
- 127.0.0.0 to 127.255.255.255
- 169.254.0.0/16
- 192.0.2.0/24
- 240.0.0.0/4
Show answer
Answer: (a) 127.0.0.0 to 127.255.255.255
Q81. Link-local addresses are in which block?
- 10.0.0.0/8
- 169.254.0.0/16
- 192.0.2.0/24
- 172.31.0.0/16
Show answer
Answer: (b) 169.254.0.0/16
Q82. The IPv4 multicast address range is:
- 0.0.0.0 to 127.255.255.255
- 128.0.0.0 to 191.255.255.255
- 224.0.0.0 to 239.255.255.255
- 240.0.0.0 to 255.255.255.254
Show answer
Answer: (c) 224.0.0.0 to 239.255.255.255
Q83. The address 224.4.4.4/24 is an example of:
- A broadcast address
- A unicast address
- A multicast address
- An IPv6 address
Show answer
Answer: (c) A multicast address
Q84. Which destination address is used for a limited broadcast?
- 255.255.255.255
- 0.0.0.0
- 127.0.0.1
- 192.168.0.255
Show answer
Answer: (a) 255.255.255.255
Q85. Which body manages the top-level allocation of IPv4 and IPv6 addresses?
- IETF
- IANA
- ISOC
- IAB
Show answer
Answer: (b) IANA
Q86. Which Regional Internet Registry serves the Africa region?
- ARIN
- LACNIC
- AfriNIC
- RIPE NCC
Show answer
Answer: (c) AfriNIC
Q87. Borrowing 2 bits from a /24 network creates how many subnets?
- 2
- 4
- 8
- 16
Show answer
Answer: (b) 4
Q88. Borrowing 3 bits from a /24 network gives a new prefix of:
- /25
- /26
- /27
- /28
Show answer
Answer: (c) /27
Q89. How many usable host addresses does each subnet have with a /27 prefix?
- 14
- 30
- 62
- 126
Show answer
Answer: (b) 30
Q90. The network 192.168.100.0/24 must support 25 hosts on each LAN. What is the smallest suitable prefix?
- /26
- /27
- /28
- /29
Show answer
Answer: (b) /27
Q91. Which single summary route covers 172.20.0.0/16 through 172.23.0.0/16?
- 172.20.0.0/12
- 172.20.0.0/14
- 172.20.0.0/16
- 172.16.0.0/14
Show answer
Answer: (b) 172.20.0.0/14
Q92. VLSM (Variable Length Subnet Masking) means:
- All subnets use the same mask
- Subnets can use different mask lengths
- It applies only to IPv6
- Broadcast traffic is removed
Show answer
Answer: (b) Subnets can use different mask lengths
Q93. Hosts on a subnet use the router interface address as their:
- DNS server
- Default gateway
- Broadcast address
- Loopback address
Show answer
Answer: (b) Default gateway
Q94. The startup configuration file is stored in which memory?
- RAM
- ROM
- NVRAM
- Flash
Show answer
Answer: (c) NVRAM
Q95. Which router memory is volatile and loses its contents when power is removed?
- ROM
- NVRAM
- RAM
- Flash
Show answer
Answer: (c) RAM
Q96. A serial WAN interface is used to:
- Connect LAN hosts to a switch
- Connect routers to external networks over longer distances
- Manage the router remotely
- Store the IOS image
Show answer
Answer: (b) Connect routers to external networks over longer distances
Q97. The first step a router takes with an incoming Layer 3 packet is to:
- Encapsulate the packet in a new frame
- Look up the destination in the routing table
- De-encapsulate the packet by removing the Layer 2 frame header and trailer
- Forward the packet out the exit interface
Show answer
Answer: (c) De-encapsulate the packet by removing the Layer 2 frame header and trailer
Q98. If the destination IP address belongs to a network directly connected to the router, the router:
- Sends the packet to the next-hop router
- Checks the ARP cache and forwards the frame to the host on the local subnet
- Drops the packet
- Sends the packet to the Gateway of Last Resort
Show answer
Answer: (b) Checks the ARP cache and forwards the frame to the host on the local subnet
Q99. Which dynamic routing protocol supports unequal-cost load balancing?
- RIP
- OSPF
- EIGRP
- Static routes
Show answer
Answer: (c) EIGRP
Q100. In the output of "show ip route", the code "O" indicates a route learned through:
- Static routing
- OSPF
- A directly connected interface
- EIGRP
Show answer
Answer: (b) OSPF
Part 2: Subjective Questions
Q1. Differentiate between a LAN and a WAN.
A LAN provides access to users and end devices in a small geographical area such as a home, office, or campus. A WAN provides access to other networks over a wide geographical area, usually through a service provider.
Q2. Define a client and a server.
A server is a host running software that provides information or services to other hosts, such as a web server or email server. A client is a host running software that requests information from a server and displays it, such as a web browser.
Q3. List two advantages and two disadvantages of peer-to-peer networking.
Advantages: easy to set up, less complex, lower cost because dedicated servers may not be needed, and suitable for simple tasks such as file and printer sharing. Disadvantages: no centralized administration, less secure, not scalable, and a host acting as both client and server may slow down.
Q4. What is an intermediary network device? Give three examples and their roles.
An intermediary device interconnects end devices and manages how data flows across the network. Examples: a switch provides network access for hosts; a router interconnects networks and selects paths; a firewall provides security by permitting or denying data flow. Wireless access points are also examples of network access devices.
Q5. Define bandwidth, throughput, and goodput.
Bandwidth is the capacity of a medium to carry data, measured in kb/s or Mb/s. Throughput is the measure of bits actually transferred across the medium over a period of time. Goodput is the measure of usable data transferred, which is throughput minus the overhead for sessions, acknowledgements, and encapsulation.
Q6. Why can one slow segment limit the throughput of an entire network?
Throughput cannot be faster than the slowest link on the path from source to destination. Even if most segments have high bandwidth, one low-throughput segment creates a bottleneck for the whole path.
Q7. Explain unicast, multicast, and broadcast with one example each.
Unicast sends a packet from one host to one individual host, such as a web page request. Multicast sends a packet from one host to a selected group of hosts, such as a video stream. Broadcast sends a packet to all hosts on the local network, such as a DHCP request.
Q8. What are encoding and decoding in network communication?
Encoding converts information into an acceptable form for transmission, for example converting bits into electrical, light, or radio signals depending on the media. Decoding reverses the process at the destination so the message can be interpreted.
Q9. Why is flow control needed?
A sending host can transmit faster than the destination can receive and process data. Without flow control, the receiver may be overwhelmed and data may be lost. Flow control lets source and destination negotiate a correct rate of transmission.
Q10. What is the purpose of a frame, and what are its main fields?
A frame acts like an envelope, holding the source and destination addresses and the data for transmission on a particular medium. Main fields include the start frame, source and destination addresses, type field, data, and the trailer containing the FCS.
Q11. Why is TCP/IP called an open standard, and why is that beneficial?
Its protocols are freely available to the public, and any vendor can implement them in hardware or software. Open standards encourage competition and innovation and prevent a single company from monopolizing the market or gaining an unfair advantage.
Q12. Give four benefits of the layered model.
It assists protocol design through defined interfaces between layers; it fosters competition; it prevents technology or capability changes in one layer from affecting other layers; and it provides a common language for describing networking functions.
Q13. Compare the OSI and TCP/IP models.
The OSI model has seven layers and is a reference model. The TCP/IP model has four layers and is the model the Internet protocol suite actually follows. TCP/IP's Application layer covers the OSI Application, Presentation, and Session layers. TCP/IP's Internet layer corresponds to the OSI Network layer, and its Network Access layer covers the OSI Data Link and Physical layers. TCP/IP does not have separate Session or Presentation layers.
Q14. Name the PDU (data unit) at each OSI layer, from top to bottom.
Application, Presentation, and Session layers use data; Transport uses segments; Network uses packets; Data Link uses frames; Physical uses bits.
Q15. Differentiate between the kernel and the shell of an operating system.
The kernel is the portion of the OS that communicates directly with the hardware and manages how hardware resources are used. The shell is the user interface portion that interacts with applications and users, through either the CLI or the GUI.
Q16. Differentiate between the CLI and the GUI.
The CLI (command-line interface) is text-based: the user enters commands at a prompt, and the system returns text output. The GUI (graphical user interface) uses images, multimedia, and text, and actions are performed by interacting with on-screen objects. Cisco network devices are most commonly accessed through the CLI.
Q17. Compare console and Telnet access to a Cisco device.
Console access is out-of-band. It uses a direct cable from a computer's serial or USB port to the console port, works without any network services configured, and is typically used for initial configuration. Telnet is remote, in-band access over the network. It requires an active network interface with an IP address and sends data unencrypted.
Q18. Why is SSH preferred over Telnet?
SSH provides stronger password authentication and encrypts the session data, so the user ID, password, and management session details are kept private. Telnet does not encrypt its traffic.
Q19. Differentiate between user EXEC mode and privileged EXEC mode.
User EXEC mode (prompt ends in >) is the most basic mode and allows only limited, view-only monitoring commands. Privileged EXEC mode (prompt ends in #) allows detailed examination, debugging and testing, file manipulation, and access to configuration commands. Users move from user EXEC to privileged EXEC with the enable command.
Q20. What is context-sensitive help, and how is it used?
Context-sensitive help lists the commands, keywords, or arguments available in the current mode. It is accessed by typing a question mark (?) at any prompt, and the response appears immediately without pressing Enter. It is useful when you are unsure of a command name or the next argument.
Q21. Explain the three types of IOS error messages.
"Ambiguous command" means not enough characters were entered for the interpreter to identify a unique command. "Incomplete command" means required keywords or arguments were left off. "Incorrect command" (invalid input) means the interpreter cannot understand part of the command, and a caret (^) marks where the problem occurs.
Q22. State two rules for naming a device hostname.
Any two of the following: the name must start with a letter; it must contain no spaces; it must end with a letter or digit; it may use only letters, digits, and dashes; it must be less than 64 characters long.
Q23. Why should "enable secret" be used instead of "enable password"?
The enable secret command stores the password in an encrypted form, which gives greater security. The enable password command is the older method and does not provide the same protection.
Q24. Explain how the FCS field and CRC detect transmission errors.
The sending node calculates a logical summary of the frame contents, called the CRC value, and places it in the FCS field. The receiving node calculates its own CRC over the frame it received and compares the two values. If they match, the frame is accepted. If they differ, the frame is considered damaged and is discarded.
Q25. Explain the roles of the LLC and MAC sublayers of the data link layer.
The LLC (Logical Link Control) is the upper sublayer; it provides services to network layer protocols and identifies which network layer protocol the frame carries, such as IPv4 or IPv6. The MAC (Media Access Control) is the lower sublayer; it defines hardware media access processes, provides data link addressing, and delimits data according to the physical requirements of the medium.
Q26. What is the purpose of the TTL field in the IPv4 header?
TTL (Time to Live) limits the lifetime of a packet. The sender sets an initial value, and each router decrements it by one. If it reaches zero, the router discards the packet and sends an ICMP Time Exceeded message. This prevents packets from circulating forever. The traceroute command relies on this field.
Q27. For the network 10.1.1.0/24, identify the network address, the first and last host addresses, and the broadcast address.
Network address: 10.1.1.0. First host: 10.1.1.1. Last host: 10.1.1.254. Broadcast address: 10.1.1.255.
Q28. The network 192.168.100.0/24 must be divided into subnets that each support at least 25 hosts. Find the prefix, the number of subnets, and the usable hosts per subnet.
25 hosts need 5 host bits, because 2^5 − 2 = 30. That leaves 3 bits for the network portion, so borrow 3 bits from the host portion. The prefix is /27 (255.255.255.224). This gives 2^3 = 8 subnets, each with 2^5 − 2 = 30 usable host addresses.
Q29. Summarize the networks 172.20.0.0/16, 172.21.0.0/16, 172.22.0.0/16, and 172.23.0.0/16 into a single route.
Write the second octets in binary: 00010100, 00010101, 00010110, 00010111. The first 6 bits of the second octet match, plus the first 8 bits of the first octet, giving 14 matching bits. The summary is 172.20.0.0/14, with mask 255.252.0.0.
Q30. A router receives a packet destined for 172.16.0.10. Its routing table contains 172.16.0.0/12, 172.16.0.0/18, and 172.16.0.0/26. Which route is used, and why?
The router uses 172.16.0.0/26, because it is the longest match. It has the greatest number of far-left bits matching the destination address. All three routes match the packet, but the longest match is always preferred. The packet also satisfies the requirement that the route's prefix bits must match.
Part 3: Short Notes & Key Terms
- Host (end device)
- A computer or device that participates directly in network communication and can send and receive messages. Examples: workstations, laptops, file and web servers, network printers, VoIP phones, security cameras and smartphones. A host can act as a client, a server, or both.
- Server and client
- A server is a host with software that provides information or services such as email or web pages. A client is a host with software that requests and displays that information, for example a web browser. Each service needs its own server software.
- Peer-to-peer network
- A network in which one computer acts as both client and server. Advantages: easy to set up, less complex, lower cost, good for simple file and printer sharing. Disadvantages: no centralized administration, not as secure, not scalable, and performance can slow when a host is both client and server.
- Intermediary devices
- Devices that interconnect end devices and manage data flow. They regenerate and retransmit signals, maintain pathway information, direct data along alternate paths on link failure, apply QoS priorities, and permit or deny traffic based on security settings. Examples: switches and wireless access points (network access), routers (internetworking), firewalls (security).
- Network media
- The channel over which a message travels. Three types: metallic wires (copper), glass or plastic fibers (fiber-optic), and wireless. Selection criteria: distance the signal must travel, installation environment, amount and speed of data, and cost.
- NIC, port and interface
- A NIC (network interface card) provides the physical connection from a host to the network. A physical port is a connector on a networking device where media plugs in. An interface is a specialized port on an internetworking device that connects to an individual network; router ports are called interfaces.
- Physical and logical topology
- A physical topology diagram shows the physical location of intermediary devices, configured ports and cable installation. A logical topology diagram shows devices, ports and the IP addressing scheme.
- LAN, WAN, MAN, WLAN, SAN
- LAN: access for users and end devices in a small area. WAN: access to other networks over a wide area. MAN: larger than a LAN but smaller than a WAN (for example a city), usually operated by a single entity. WLAN: a LAN that connects users wirelessly. SAN: a network for file servers providing storage, retrieval and replication, using Fiber Channel.
- The Internet
- A worldwide collection of interconnected networks that cooperate using common standards. It is not owned by any individual or group. Organizations that help maintain standards include IETF, ICANN and IAB.
- Internet access technologies
- Cable: Internet signal shares the coaxial TV cable and needs a cable modem. DSL: always-on connection over a telephone line split into voice, download and upload channels; speed depends on distance from the central office. Cellular: uses the cell phone network. Satellite: needs a clear line of sight. Dial-up: inexpensive, low bandwidth, uses any phone line and a modem.
- Encoding and decoding
- Encoding converts information into another acceptable form for transmission. Decoding reverses the process to interpret the information. Messages are converted into bits, then encoded as sounds, light waves or electrical impulses depending on the media.
- Rules of communication
- Message format and encapsulation (a frame acts like an envelope with source and destination addresses), message size, message timing, access method (when a host may send), flow control (negotiated sending rate) and response timeout (how long to wait for a reply).
- Unicast, multicast, broadcast
- Unicast: one host to one host. Multicast: one host to a selected group of hosts. Broadcast: one host to all hosts on the network. In all three the source address is the unicast address of the originating host.
- Protocol suite and TCP/IP
- A protocol suite is a set of protocols that work together to provide comprehensive network communication. TCP/IP is an open standard: its protocols are freely available and any vendor may implement them. It replaced proprietary suites such as Apple's AppleTalk and Novell's IPX/SPX.
- Standards organizations
- ISOC oversees the IAB. IAB manages and develops Internet standards and has 13 members. IETF develops, updates and maintains Internet and TCP/IP technologies and produces RFC documents through working groups. IRTF focuses on long-term research (for example anti-spam, crypto forum, peer-to-peer and router research groups) while the IETF focuses on shorter-term standards.
- Benefits of the layered model
- Assists protocol design through defined interfaces, fosters competition, prevents changes in one layer from affecting other layers, and provides a common language for describing networking functions.
- OSI model
- Seven layers from top to bottom: Application, Presentation, Session, Transport, Network, Data Link, Physical. Data units: data (layers 7 to 5), segments (transport), packets (network), frames (data link), bits (physical). Designed by ISO as a framework for open systems protocols.
- TCP/IP model
- Four layers: Application (data representation, encoding and dialog control), Transport (communication between diverse devices), Internet (best path through the network) and Network Access (hardware and media). The Application layer covers the OSI Application, Presentation and Session layers.
- Cisco IOS, kernel and shell
- Cisco IOS (Internetwork Operating System) is the collection of network operating systems used on Cisco devices. The kernel interacts directly with the hardware; the shell is the user interface, available as a CLI (text commands) or a GUI (graphical). IOS functions include security, addressing, interface configuration, routing, QoS and resource management.
- Accessing an IOS device
- Console: out-of-band management port that works even with no network services configured. AUX: out-of-band access through a modem on a telephone line. Telnet: remote CLI over the network, requires an active interface with an IP address, unencrypted. SSH: like Telnet but encrypts session data and offers stronger authentication, so it is the best practice. Terminal emulators include PuTTY, Tera Term, HyperTerminal and OS X Terminal.
- IOS modes
- User EXEC (prompt Switch>): limited, view-only monitoring. Privileged EXEC (Switch#): full monitoring, debugging and file manipulation, entered with enable and left with disable. Global configuration (Switch(config)#): entered with configure terminal. From global configuration you reach sub-modes such as interface mode (Fa0/0, S0/0/0) and line mode (console, AUX, VTY).
- IOS command structure and errors
- A command is followed by keywords and arguments. Commands are not case-sensitive and can be abbreviated to a unique prefix (conf for configure, show int for show interfaces). Context-sensitive help is the ? key. Error messages: ambiguous command, incomplete command, and incorrect command (invalid input, marked with ^).
- CLI hot keys
- Tab completes a partial command. Up and Down arrows scroll through previous commands. Ctrl-A moves to the beginning of the line and Ctrl-E to the end. Ctrl-R redisplays a line. Ctrl-C aborts the current command or exits configuration mode. Ctrl-Shift-6 interrupts a process such as ping or traceroute.
- Basic device configuration
- Give the device a unique hostname (default for a switch is Switch). Hostname rules: start with a letter, no spaces, end with a letter or digit, only letters, digits and dashes, fewer than 64 characters. Secure privileged EXEC with enable secret (encrypted), not the older enable password. Secure user EXEC by setting password and login on line console 0 and line vty 0 15. Configure a banner for legal notice.
- Bandwidth, throughput, goodput, latency
- Bandwidth: capacity of a medium to carry data, measured in kb/s or Mb/s. Throughput: bits actually transferred over a period of time, usually less than bandwidth. Goodput: usable data transferred, which is throughput minus protocol overhead. Latency: time, including delays, for data to travel from one point to another. Throughput cannot exceed the slowest link on the path.
- Copper and fiber cabling
- UTP: most common LAN cable, four twisted pairs, RJ-45 connector. STP: better noise protection but more expensive and harder to install. Coaxial: a copper conductor with insulation, a braided shield and a jacket. Fiber-optic: glass strands carrying light; longer distances, higher bandwidth and immune to EMI and RFI. Copper carries electrical pulses, fiber carries light, wireless carries microwave patterns.
- Wireless standards
- IEEE 802.11 is Wi-Fi (uses CSMA/CA). IEEE 802.16 is WiMAX, a point-to-multipoint wireless broadband technology. Wireless standards cover both the data link and physical layers.
- Data link layer
- Accepts Layer 3 packets and packages them into frames, controls media access and performs error detection. Two sublayers: LLC (upper, identifies the network layer protocol and lets IPv4 and IPv6 share the same interface) and MAC (lower, hardware media access and addressing). Frame fields include start frame, source and destination addresses, type, data and the trailer with FCS.
- FCS and CRC
- The sender computes a CRC value from the frame contents and places it in the Frame Check Sequence field of the trailer. The receiver recomputes the CRC and compares. If the values differ, the frame is discarded.
- Network layer
- OSI Layer 3. Four basic processes: addressing end devices, encapsulation, routing and de-encapsulation. Commonly implemented protocols are IPv4 and IPv6; IPX, AppleTalk and CLNS/DECNet are legacy. IP is connectionless, best effort (unreliable) and media independent.
- IPv4 header fields
- Version: 4-bit value, always 0100 for IPv4. Differentiated Services: 8 bits; 6-bit DSCP for QoS plus 2-bit ECN. Time to Live: 8-bit hop limit decremented by each router; at zero the packet is discarded and ICMP Time Exceeded is sent. Protocol: payload type, ICMP 0x01, TCP 0x06, UDP 0x11. Also source and destination IP addresses (32 bits each). The header is 20 bytes without options.
- Subnet mask and prefix length
- A subnet mask is 32 bits; 1s mark the network portion and 0s mark the host portion. Prefix length is the number of 1 bits, written as /n (255.255.255.0 is /24). A host compares the network portion of the destination with its own to decide between local delivery and sending to the default gateway.
- Types of addresses in an IPv4 network
- Network address (all host bits 0), host addresses, and broadcast address (all host bits 1). First host is network address plus 1 and last host is broadcast minus 1. For 10.1.1.0/24: network 10.1.1.0, hosts 10.1.1.1 to 10.1.1.254, broadcast 10.1.1.255.
- Directed and limited broadcast
- A directed broadcast goes to all hosts on a specific network, for example 172.16.4.255 for 172.16.4.0/24; routers do not forward it by default. A limited broadcast uses 255.255.255.255 and is never forwarded by routers, so routers form the boundary of a broadcast domain.
- Private and public addresses
- Private blocks (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255), 192.168.0.0/16. Private addresses are not propagated by Internet routers and are translated to public addresses using NAT.
- Special IPv4 addresses
- Loopback: 127.0.0.0/8, commonly 127.0.0.1, used by a host to send traffic to itself. Link-local: 169.254.0.0/16, assigned automatically when no IP configuration is available. TEST-NET: 192.0.2.0/24 for documentation. Multicast: 224.0.0.0 to 239.255.255.255. Experimental: 240.0.0.0 to 255.255.255.254.
- IANA and RIRs
- IANA manages allocation of IPv4 and IPv6 addresses and delegates to Regional Internet Registries: AfriNIC (Africa), APNIC (Asia/Pacific), ARIN (North America), LACNIC (Latin America and some Caribbean islands), RIPE NCC (Europe, Middle East and Central Asia). RIRs allocate to ISPs, which supply addresses to customers.
- Subnetting and VLSM
- Subnetting divides a network into smaller subnets to create smaller broadcast domains, limit traffic and provide basic security. Bits are borrowed only from the host portion; each borrowed bit doubles the number of subnets and halves the hosts. Usable hosts = 2^n minus 2, where n is the number of host bits. VLSM allows subnets of unequal size by subnetting the subnets again.
- Router memory
- RAM (volatile): IOS in use, running-config, IP routing table, ARP cache and packet buffers. ROM: bootup instructions, basic diagnostics (POST) and a limited IOS. NVRAM: startup-config, kept when power is off. Flash: non-volatile storage of the IOS image, which is copied into RAM at boot.
- Router connections
- Management ports (console and AUX) configure and troubleshoot the router and do not forward packets. In-band interfaces (Ethernet LAN, serial WAN, DSL) carry user traffic. Each active router interface must be on a different IP network.
- Configuring a router interface
- To be available an interface needs an IP address and subnet mask (ip address) and must be activated with no shutdown, since interfaces are shut down by default. An optional description (up to 240 characters) helps troubleshooting. Save running-config to NVRAM so it survives a restart.
- Router boot process
- At boot the router loads two files into RAM: the IOS image from flash and the startup configuration from NVRAM. Changes are made in the running configuration and take effect immediately, but must be saved to NVRAM to persist.
- Verifying interfaces
- show ip interface brief: summary of all interfaces with IPv4 address and status. show ip route: the IPv4 routing table in RAM. show running-config interface: commands configured on one interface. show interfaces and show ip interface give detailed information. show version displays IOS and hardware information.
- How a router forwards a packet
- Step 1: de-encapsulate the Layer 3 packet by removing the Layer 2 header and trailer. Step 2: examine the destination IP address and find the best path in the routing table. Step 3: encapsulate the packet in a new Layer 2 frame and send it out the exit interface. IP addresses stay the same end to end, while Layer 2 addresses change at every hop.
- Path determination outcomes
- Directly connected network: forward to the host on the local subnet. Remote network: forward to another router. No route determined: use the Gateway of Last Resort if a default route exists; otherwise drop the packet and send an ICMP unreachable message to the source.
- Routing metrics and load balancing
- A metric is the value used to measure distance to a network; the lowest metric wins. RIP uses hop count, OSPF uses cost based on bandwidth, EIGRP uses bandwidth, delay, load and reliability. Equal-cost load balancing sends traffic over multiple paths with identical metrics. Only EIGRP supports unequal-cost load balancing.
- Routing table entries
- Entries are added for local routes, directly connected interfaces, static routes and dynamic routing protocols. Route source codes: L (local interface address), C (directly connected), S (static), D (EIGRP) and O (OSPF). An entry shows route source, destination network, administrative distance, metric, next hop, route timestamp and outgoing interface.
No comments:
Post a Comment
Please give us your feedback & help us to improve this site.