

















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















































































1. Which Python library is commonly used to create TCP network connections? A. os B. socket C. json D. hashlib Answer: B. socket The socket module provides Python interfaces for network communication, including TCP and UDP connections. 2. Which socket type is normally used for TCP communication? A. SOCK_RAW B. SOCK_DGRAM C. SOCK_STREAM D. SOCK_PACKET Answer: C. SOCK_STREAM
TCP uses a reliable byte-stream service represented by SOCK_STREAM.
3. Which socket type is associated with UDP? A. SOCK_STREAM B. SOCK_DGRAM C. SOCK_TCP D. SOCK_RELIABLE Answer: B. SOCK_DGRAM UDP uses datagrams, represented in Python by SOCK_DGRAM. 4. Which Python statement imports the socket module? A. include socket B. using socket C. import socket D. require(socket) Answer: C. import socket Python uses the import statement to load modules. 5. Which method connects a client socket to a remote host? A. listen() B. bind() C. accept() D. connect() Answer: D. connect() The client uses connect() to establish a connection to a specified remote address and port.
9. Which Python method receives data from a TCP socket? A. recv() B. readnet() C. getdata() D. pull() Answer: A. recv() recv() reads bytes received from a connected socket. 10. Why is exception handling important in a network-remediation script? A. It guarantees Internet connectivity B. It prevents all attacks C. It allows the script to handle failures without terminating unexpectedly D. It automatically repairs every network problem Answer: C. It allows the script to handle failures without terminating unexpectedly Network operations can fail for many reasons, so controlled exception handling improves reliability. 11. Which Python construct is used for exception handling? A. try/except B. check/fail C. error/catch D. test/recover Answer: A. try/except
Python uses try and except blocks to detect and handle exceptions.
12. Which exception is commonly raised when a socket connection attempt times out? A. KeyboardInterrupt B. socket.timeout C. SyntaxError D. MemoryError Answer: B. socket.timeout Socket operations configured with a timeout can raise socket.timeout when the operation exceeds the allowed period. 13. What is the primary benefit of setting a timeout on a network operation? A. It increases bandwidth B. It prevents the script from waiting indefinitely C. It disables DNS D. It guarantees successful connections Answer: B. It prevents the script from waiting indefinitely A timeout gives a network automation script a defined failure point. 14. Which Python method can set a socket timeout? A. socket.timeout() B. settimeout() C. timeout_socket() D. configure_timeout() Answer: B. settimeout()
C. User authentication D. Disk partitioning Answer: B. Name-to-address resolution DNS translates human-readable domain names into IP addresses and can provide other service records.
18. Which DNS record maps a hostname to an IPv4 address? A. AAAA B. MX C. A D. PTR Answer: C. A An A record maps a hostname to an IPv4 address. 19. Which DNS record maps a hostname to an IPv6 address? A. AAAA B. A C. PTR D. NS Answer: A. AAAA AAAA records provide IPv6 address mappings. 20. Which DNS record identifies mail servers for a domain? A. CNAME B. MX C. PTR D. SOA
Answer: B. MX MX records identify mail exchange servers responsible for receiving email for a domain.
21. What does a PTR record provide? A. Reverse DNS mapping B. Mail routing C. IPv6 addressing D. DNS zone transfer authorization Answer: A. Reverse DNS mapping PTR records map IP addresses back to hostnames. 22. Which record creates an alias for another hostname? A. MX B. PTR C. CNAME D. TXT Answer: C. CNAME A CNAME creates an alias that points to another canonical hostname. 23. What is the purpose of an NS record? A. Identifies authoritative name servers B. Identifies email servers C. Maps IPv4 addresses D. Stores passwords Answer: A. Identifies authoritative name servers NS records identify the DNS servers authoritative for a zone.
27. Which Windows command can query DNS records? A. nslookup B. netstat C. tasklist D. diskpart Answer: A. nslookup nslookup is available on Windows and can query DNS servers and records. 28. What does ipconfig /flushdns do on Windows? A. Changes the computer's IP address B. Clears the local DNS resolver cache C. Restarts the DNS server D. Deletes DNS zones Answer: B. Clears the local DNS resolver cache The command removes locally cached DNS entries so future lookups can obtain current information. 29. Which Linux command can display current IP addressing information? A. ip addr B. dnsflush C. showip D. routeip Answer: A. ip addr
The ip addr command displays network interfaces and their assigned addresses.
30. Which command is commonly used to test basic IP connectivity? A. ping B. mkdir C. passwd D. whoami Answer: A. ping Ping uses ICMP echo requests to test reachability and measure response time. 31. Why might ping fail even when a remote service is functioning? A. ICMP may be blocked by a firewall B. DNS must always be disabled C. TCP cannot exist without ping D. The remote system must be offline Answer: A. ICMP may be blocked by a firewall Some systems and network devices block ICMP while continuing to permit application traffic. 32. Which tool is useful for identifying the path packets take toward a destination? A. traceroute/tracert B. chmod C. passwd D. tar
Answer: A. The host is prepared to accept connection requests on that port A listening socket indicates that an application is waiting for incoming connections.
36. What is a common first step when troubleshooting a network outage? A. Reinstall the operating system B. Verify physical and basic network connectivity C. Delete all DNS records D. Disable every firewall Answer: B. Verify physical and basic network connectivity Troubleshooting should generally begin with foundational connectivity before moving to higher layers. 37. Which OSI layer is primarily associated with IP addressing and routing? A. Physical B. Data Link C. Network D. Presentation Answer: C. Network Layer 3 handles logical addressing and routing, including IP. 38. Which OSI layer contains TCP and UDP? A. Transport B. Network
C. Session D. Physical Answer: A. Transport TCP and UDP are Layer 4 transport protocols.
39. Which OSI layer is associated with Ethernet MAC addressing? A. Application B. Transport C. Data Link D. Presentation Answer: C. Data Link MAC addressing and Ethernet framing operate at the Data Link layer. 40. DNS is generally classified as an application-layer service because: A. It uses application-level protocols for name resolution B. It operates only at Layer 1 C. It replaces IP D. It is a physical networking technology Answer: A. It uses application-level protocols for name resolution DNS operates at the application layer while relying on lower-layer protocols for transport. 41. What port does traditional DNS commonly use for UDP queries? A. 22 B. 25
A. Hostname-to-IP resolution B. IP-to-hostname resolution C. Password recovery D. Disk recovery Answer: A. Hostname-to-IP resolution Forward DNS resolves names to addresses and related records.
45. What is a reverse lookup zone used for? A. IP-to-hostname resolution B. Hostname-to-IP resolution C. Email encryption D. Network segmentation Answer: A. IP-to-hostname resolution Reverse DNS uses PTR records to resolve addresses to names. 46. Which Python library is useful for performing DNS queries programmatically? A. dnspython B. django C. numpy D. flask Answer: A. dnspython The third-party dnspython package provides programmatic DNS resolution and record handling. 47. What is the purpose of validating a DNS record after modifying it?
A. To verify that the intended name resolves correctly B. To increase CPU speed C. To encrypt the DNS zone D. To remove all caching Answer: A. To verify that the intended name resolves correctly Validation confirms that configuration changes produce the expected DNS behavior.
48. Which result from a DNS query most directly confirms an A record? A. An IPv4 address B. A MAC address C. A username D. A process ID Answer: A. An IPv4 address An A record returns an IPv4 address for the queried hostname. 49. If a hostname resolves to an incorrect IP address, which area should be investigated first? A. DNS records and caching B. Keyboard configuration C. Printer drivers D. Screen resolution Answer: A. DNS records and caching Incorrect name resolution commonly results from incorrect records or stale DNS caches.
53. What is the root of the DNS hierarchy represented by? A.. B. / C. root: D. * Answer: A.. The DNS root is represented by a trailing dot. 54. Which component normally provides DNS resolution information to a client through DHCP? A. DNS server address B. MAC address only C. CPU identifier D. Disk serial number Answer: A. DNS server address DHCP commonly supplies clients with DNS resolver addresses. 55. What is DHCP primarily responsible for? A. Dynamically assigning network configuration B. Resolving domain names C. Encrypting DNS D. Managing application logs Answer: A. Dynamically assigning network configuration DHCP can provide IP addresses, subnet masks, gateways, DNS servers, and other configuration.
56. Which DHCP setting identifies the default router? A. DNS suffix B. Default gateway/router option C. Hostname record D. MX record Answer: B. Default gateway/router option The default gateway tells the host where to send traffic destined for other networks. 57. A host has a valid IP address but cannot reach devices on another subnet. What configuration should be checked? A. Default gateway B. Screen resolution C. Local hostname only D. File extension associations Answer: A. Default gateway Traffic leaving the local subnet generally requires a correctly configured default gateway. 58. A host can ping an IP address but cannot access the same destination by hostname. What is a likely problem? A. DNS resolution B. RAM C. Monitor D. Keyboard Answer: A. DNS resolution Successful IP connectivity combined with hostname failure strongly suggests a name-resolution issue.