All questions of Routing for Computer Science Engineering (CSE) Exam

Cryptographic hash function takes an arbitrary block of data and returns
  • a)
    fixed size bit string
  • b)
    variable size bit string
  • c)
    both (a) and (b)
  • d)
    none of the mentioned
Correct answer is option 'A'. Can you explain this answer?

Bijoy Joshi answered
Fixed size output of cryptographic hash function

A cryptographic hash function is a mathematical algorithm that takes an arbitrary block of data and returns a fixed-size bit string. This output is known as the hash value or message digest.

Properties of hash function

A cryptographic hash function has three main properties:

1. Deterministic: The same input will always produce the same output.

2. Quick computation: The function should be computationally efficient.

3. Pre-image resistant: Given a hash value, it should be difficult to find the input that produced it.

Applications of Cryptographic Hash Function

Cryptographic hash functions are widely used in computer security applications, including:

1. Digital signatures

2. Password storage

3. Message authentication

4. Data integrity verification

5. Blockchain technology

Conclusion

In conclusion, a cryptographic hash function takes an arbitrary block of data and returns a fixed-size bit string, making it a fundamental tool in computer security applications.

In cryptography, what is cipher?
  • a)
    algorithm for performing encryption and decryption
  • b)
    encrypted message
  • c)
    both (a) and (b)
  • d)
    none of the mentioned
Correct answer is option 'A'. Can you explain this answer?

In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure.When using a cipher the original information is known as plaintext, and the encrypted form as ciphertext.

Which of the following defines the Cookie visibility?
  • a)
    Document Path
  • b)
    LocalStorage
  • c)
    SessionStorage
  • d)
    All of the mentioned
Correct answer is option 'D'. Can you explain this answer?

Shruti Tiwari answered
Answer: d
Explanation: Cookie visibility is scoped by document origin as local Storage and session Storage are, and also by document path.

Which of the following can be used to configure the scope of the Cookie visibility?
  • a)
    Path
  • b)
    Domain
  • c)
    Both a and b
  • d)
    None of the mentioned
Correct answer is option 'D'. Can you explain this answer?

Navya Iyer answered
Understanding Cookie Visibility Configuration
Cookies are small pieces of data that are stored on the user's computer by the web browser while browsing a website. They have specific properties that determine their visibility and scope.
Cookie Visibility Configuration: Key Parameters
To control the visibility of cookies, two main parameters are often considered:
  • Path: This parameter defines the URL path that must exist in the requested URL for the browser to send the cookie. If the path is set to "/example", the cookie will be sent only for requests to URLs that start with "/example".
  • Domain: This parameter specifies which hosts can receive the cookie. If the domain is set to "example.com", the cookie will be sent to all subdomains (like "sub.example.com") as well, unless restricted further.

Why 'None of the Mentioned' is Correct
The correct answer being "None of the mentioned" implies that the options provided (Path and Domain) do not inherently configure the scope of cookie visibility by themselves. Instead, they work in tandem with other aspects:
  • Neither parameter alone fully defines the cookie's behavior without the context of the HTTP request and the browser's handling of cookies.
  • Additional attributes like Secure, HttpOnly, and SameSite can also influence how cookies are managed and accessed, which were not mentioned in the options.

In summary, while Path and Domain are crucial for cookie visibility, they are not standalone configurations and should be viewed as part of a broader context concerning cookie management. Therefore, the answer "None of the mentioned" is appropriate as it reflects the complexity and interdependence of these parameters.

The URL Connection class can be used to read and write data to the specified resource referred by the URL
  • a)
    True
  • b)
    False
Correct answer is option 'A'. Can you explain this answer?

Krithika Gupta answered
Answer: a
Explanation: The URL Connection class can be used to read and write data to the specified resource referred by the URL.

FTP server listens for connection on port number
  • a)
    20
  • b)
    21
  • c)
    22
  • d)
    23
Correct answer is option 'B'. Can you explain this answer?

Maheshwar Saha answered
FTP Server and Port Numbers

FTP (File Transfer Protocol) is a standard network protocol used for transferring files between a client and a server on a computer network. In order for the FTP client to connect to the FTP server, the server needs to listen for incoming connections on a specific port number.

The Port Number for FTP Server

The correct answer to the question is option 'B', which is port number 21. Port numbers are used to identify specific services or applications running on a computer network. In the case of FTP, port number 21 is designated as the default control connection port.

Understanding Port Numbers

Port numbers range from 0 to 65535 and are divided into three categories:

1. Well-known ports: These ports range from 0 to 1023 and are assigned to specific services or applications. Examples include HTTP (port 80), FTP (port 21), SSH (port 22), and Telnet (port 23).

2. Registered ports: These ports range from 1024 to 49151 and are assigned by the Internet Assigned Numbers Authority (IANA) to specific services or applications.

3. Dynamic or private ports: These ports range from 49152 to 65535 and can be used by any service or application on an ad-hoc basis.

The Role of Port 21 in FTP

Port number 21 is reserved for FTP control connections. When an FTP client initiates a connection to an FTP server, it sends a request to the server's IP address on port 21. The server listens for incoming connections on this port and responds to the client's request.

The control connection is responsible for sending commands from the client to the server and receiving responses from the server. It handles tasks such as authentication, file system navigation, and file transfer control.

Conclusion

In summary, the FTP server listens for connections on port number 21. This port is reserved for FTP control connections, which handle commands and responses between the client and server. Understanding port numbers is essential for establishing successful network connections and ensuring the proper functioning of specific services and applications.

Which of the following directive of Cache Control Header of HTTP response indicates that resource is cachable by only client and server?
  • a)
    Public
  • b)
    Private
  • c)
    Nocache/nostore
  • d)
    Maxage
Correct answer is option 'B'. Can you explain this answer?

Private
The 'Private' directive of the Cache Control Header in an HTTP response indicates that the resource is cachable by only the client and server. This means that intermediate proxies, such as caching servers, are not allowed to cache the response.

Cache Control Header
The Cache Control Header is used in HTTP responses to specify caching directives for the resource being requested. It provides instructions to the client and intermediate caches on how to handle the response and cache the resource.

Directives in Cache Control Header
The Cache Control Header can include various directives to control caching behavior. Some commonly used directives include:
- 'Public': Indicates that the resource can be cached by any cache, including the client, server, and intermediate proxies.
- 'Private': Indicates that the resource is cachable by only the client and server, and should not be cached by intermediate proxies.
- 'No-cache': Indicates that the resource should not be served from cache without first revalidating it with the server.
- 'No-store': Indicates that the resource should not be stored in any cache, including the client, server, and intermediate proxies.
- 'Max-age': Specifies the maximum amount of time in seconds that the resource can be cached before it is considered stale.

Explanation of 'Private' Directive
The 'Private' directive is used when the resource contains sensitive or user-specific information that should not be cached by intermediate proxies. This directive ensures that the response is only cached by the client and server, preventing any potential privacy or security issues.

When the 'Private' directive is included in the Cache Control Header of an HTTP response, it instructs intermediate caches not to store a cached copy of the resource. Instead, the response is delivered directly to the client and stored in the client's cache if needed. This allows the client to re-use the cached response for subsequent requests without relying on intermediate caches.

By using the 'Private' directive, the server can have more control over the caching behavior of sensitive resources and ensure that they are not inadvertently cached by intermediate proxies. This directive helps in maintaining the privacy and security of the transmitted data.

What is route poisoning?
  • a)
    It sends back the protocol received from a router as a poison pill, which stops the regular updates. The use of variable length subnet masks is permitted
  • b)
    It is information received from a router that can’t be sent back to the originating router.RIPv2 supports classless routing
  • c)
    It prevents regular update messages from reinstating a route that has just come up
  • d)
    It describes when a router sets the metric for a downed link to infinity
Correct answer is option 'D'. Can you explain this answer?

Samridhi Ahuja answered
Route Poisoning:
Route poisoning is a technique used in distance-vector routing protocols to prevent routing loops and ensure efficient routing in a network.

Explanation:
- Definition: Route poisoning involves a router setting the metric for a downed link to infinity, making the route unusable. This prevents regular update messages from reinstating a route that has just come up.
- Preventing Routing Loops: By setting the metric to infinity for a downed link, route poisoning helps in preventing routing loops. It informs other routers in the network that the route is no longer available.
- Efficient Routing: Route poisoning helps in quickly propagating information about a failed link throughout the network, allowing routers to update their routing tables and find alternative paths.
- Example: For example, in a network using the RIP (Routing Information Protocol) routing protocol, when a router detects that a link has failed, it sends an update with a metric of 16 (infinity) to inform other routers about the unavailability of that route.
- Impact on Convergence: Route poisoning helps in faster convergence of the network by promptly updating routing tables when a link goes down.
- Protocol Support: Route poisoning is commonly used in distance-vector routing protocols like RIP to maintain network stability and prevent routing anomalies.
In conclusion, route poisoning plays a crucial role in ensuring efficient and loop-free routing in network environments using distance-vector routing protocols by marking failed routes as unreachable with an infinite metric.

In Novell’s use of RIP, there are two metrics used to make routing decisions.Select the two metrics.
  • a)
    Ticks
  • b)
    Hops
  • c)
    Loops
  • d)
    Counts
Correct answer is option 'A,B'. Can you explain this answer?

Garima Bose answered
Novell is a software company that was founded in 1979 and is known for its network operating system, Novell NetWare. The company initially focused on creating networking software and services, but later expanded its offerings to include collaboration, security, and identity management solutions.

Novell gained popularity in the 1980s and 1990s with its NetWare operating system, which was widely used in corporate environments for networking and file sharing. NetWare was known for its reliability, security, and scalability, making it a popular choice for businesses.

In addition to NetWare, Novell also developed other software products such as GroupWise for email and collaboration, ZENworks for endpoint management, and eDirectory for identity management.

However, with the rise of the internet and the increasing popularity of Microsoft's Windows operating system, Novell's market share declined. In 2003, Novell acquired the Linux distribution, SUSE, in an effort to expand its offerings in the open-source software market.

Despite its efforts to adapt to the changing technology landscape, Novell struggled to regain its former dominance. In 2011, the company was acquired by Attachmate, and later, in 2014, Attachmate was acquired by Micro Focus International.

Today, Novell is a subsidiary of Micro Focus International and continues to offer a range of software and services for enterprise IT management, focusing on areas such as hybrid IT, security, and analytics.

What is the constraint on the data per cookie?
  • a)
    2 KB
  • b)
    1 KB
  • c)
    4 KB
  • d)
    3 KB
Correct answer is option 'C'. Can you explain this answer?

Answer: c
Explanation: Each cookie can hold upto only 4 KB. In practice, browsers allow many more than 300 cookies total, but the 4 KB size limit may still be enforced by some.

Which command displays RIP routing updates?
  • a)
    Show IP route
  • b)
    Debug IP rip
  • c)
    Show protocols
  • d)
    Debug IP route
Correct answer is option 'B'. Can you explain this answer?

Ujwal Roy answered
Answer: b
Explanation: The debug IP rip command is used to show the Internet Protocol (IP) Routing Information Protocol (RIP) updates being sent and received on the router.

Which of the following explains Cookies nature?
  • a)
    Non Volatile
  • b)
    Volatile
  • c)
    Intransient
  • d)
    Transient
Correct answer is option 'D'. Can you explain this answer?

Krithika Kaur answered
Answer: d
Explanation: Cookies are transient by default; the values they store last for the duration of the web browser session but are lost when the user exits the browser.

Which NetWare protocol provides link-state routing?
  • a)
    NLSP
  • b)
    RIP
  • c)
    SAP
  • d)
    NCP
Correct answer is option 'A'. Can you explain this answer?

Answer: a
Explanation: NetWare Link Services Protocol (NLSP) provides link-state routing. SAP (Service Advertisement Protocol) advertises network services. NCP (NetWare Core Protocol)provides client-to-server connections and applications. RIP is a distance vector routingprotocol.

Network layer firewall has two sub-categories as
  • a)
    stateful firewall and stateless firewall
  • b)
    bit oriented firewall and byte oriented firewall
  • c)
    frame firewall and packet firewall
  • d)
    none of the mentioned
Correct answer is option 'A'. Can you explain this answer?

Nandini Joshi answered
Network Layer Firewall: Stateful Firewall and Stateless Firewall

Stateful Firewall
- Keeps track of the state of network connections
- Examines the state of incoming packets to determine whether they are part of an existing connection or a new connection
- If the packet is part of an existing connection, it is allowed to pass through the firewall
- If the packet is not part of an existing connection, the firewall determines whether it meets the criteria for a new connection and either allows or blocks it accordingly
- Examples of stateful firewalls include Cisco ASA, Check Point Firewall, and Fortinet FortiGate

Stateless Firewall
- Does not keep track of the state of network connections
- Examines each packet individually and makes decisions based on predetermined rules
- If the packet matches a rule, it is allowed to pass through the firewall
- If the packet does not match any rules, it is blocked
- Stateless firewalls are less complex and less resource-intensive than stateful firewalls
- Examples of stateless firewalls include Linux iptables and Cisco IOS Access Control Lists

Conclusion
- Network layer firewalls can be categorized into stateful and stateless firewalls
- Stateful firewalls keep track of network connections and examine the state of incoming packets to make decisions
- Stateless firewalls examine each packet individually and make decisions based on predetermined rules
- Each type of firewall has its advantages and disadvantages, and the choice between them depends on the specific requirements of the network and the organization using it.

The Cookie manipulation is done using which property?
  • a)
    cookie
  • b)
    cookies
  • c)
    manipulate
  • d)
    none of the mentioned
Correct answer is option 'A'. Can you explain this answer?

Nisha Das answered
Answer: a
Explanation: There are no methods involved: cookies are queried, set, and deleted by reading and Writing the cookie property of the Document object using specially formatted strings.

Which attribute is used to extend the lifetime of a cookie?
  • a)
    Higherage
  • b)
    Increaseage
  • c)
    Maxage
  • d)
    Lifetime
Correct answer is option 'C'. Can you explain this answer?

Prasad Unni answered
The correct answer is option 'C' - Maxage.

Explanation:
To understand why the Max-age attribute is used to extend the lifetime of a cookie, let's first understand what a cookie is and how it works.

A cookie is a small piece of data that is stored on a user's computer by a website. It is sent back and forth between the user's browser and the website's server, allowing the website to remember certain information about the user. Cookies are commonly used for various purposes such as session management, personalization, and tracking.

When a cookie is created, it can have an expiration date specified. This expiration date determines how long the cookie will be stored on the user's computer. If no expiration date is specified, the cookie is considered a session cookie and will be deleted when the user closes their browser.

The Max-age attribute is used to set the maximum age of a cookie in seconds. By setting a value for Max-age, you can extend the lifetime of a cookie beyond the user's current session. The Max-age value indicates the number of seconds the cookie should be stored on the user's computer before it expires.

By increasing the Max-age value, you effectively extend the lifetime of the cookie. For example, if you set Max-age to 3600 (1 hour), the cookie will be stored on the user's computer for 1 hour before it expires. If you want the cookie to remain valid for a longer period, you can increase the Max-age value accordingly.

The Max-age attribute can be set when creating a cookie or when modifying an existing cookie. By updating the Max-age value, you can effectively extend the lifetime of the cookie.

In conclusion, the Max-age attribute is used to extend the lifetime of a cookie by specifying the maximum number of seconds the cookie should be stored on the user's computer before it expires.

How can you set a Cookie visibility scope to local Storage?
  • a)
    /
  • b)
    %
  • c)
    *
  • d)
    All of the mentioned
Correct answer is option 'A'. Can you explain this answer?

Kunal Gupta answered
Introduction

In web development, cookies are small pieces of data that are stored on the user's computer by websites. They are used to remember information about the user, such as their preferences or login credentials. Cookies have a visibility scope, which determines which websites and pages can access them. One of the visibility scopes is local storage, which allows cookies to be accessed only by the website that created them.

Setting Cookie Visibility Scope to Local Storage

To set the cookie visibility scope to local storage, you need to include specific attributes when creating the cookie. These attributes are:

1. Domain: The domain attribute specifies the domain that is allowed to access the cookie. To set the cookie visibility scope to local storage, you should set the domain attribute to the current domain.

2. Path: The path attribute specifies the URL path that is allowed to access the cookie. To set the cookie visibility scope to local storage, you should set the path attribute to the root path ("/") so that all pages within the domain can access the cookie.

3. Secure: The secure attribute specifies whether the cookie should only be sent over secure connections (HTTPS). Setting the secure attribute to true ensures that the cookie is only accessible over a secure connection, further enhancing its visibility scope.

By including these attributes when creating a cookie, you ensure that the cookie is only accessible by the website that created it and can be stored in the local storage of the user's browser.

Example

Here is an example of setting the cookie visibility scope to local storage in JavaScript:

```javascript
document.cookie = "cookieName=cookieValue; domain=example.com; path=/; secure=true";
```

In this example, the cookie is created with the name "cookieName" and the value "cookieValue". The domain is set to "example.com" to restrict access to the current domain, and the path is set to "/" to allow access to all pages within the domain. Finally, the secure attribute is set to true to ensure the cookie is only sent over secure connections.

Conclusion

Setting the cookie visibility scope to local storage involves including the domain, path, and secure attributes when creating the cookie. By specifying the current domain, setting the path to the root path, and enabling the secure attribute, you can restrict access to the cookie and ensure it is stored in the local storage of the user's browser.

 Which protocol should you select if the network diameter is more than 17 hops?
  • a)
    RIPv1
  • b)
    RIPv2
  • c)
    EIGRP
  • d)
    Both a and b
Correct answer is option 'A'. Can you explain this answer?

The correct answer is option 'A' - RIPv1.

Explanation:
RIPv1 (Routing Information Protocol version 1) is the best choice when the network diameter is more than 17 hops. Here's why:

1. Limitations of RIPv1:
RIPv1 has a limitation of supporting a maximum hop count of 15. This means that it can only handle networks with a diameter of up to 15 hops. If the network diameter exceeds 15 hops, RIPv1 will not be able to accurately calculate and maintain the routing tables.

2. Network Diameter:
The network diameter refers to the maximum number of hops between any two nodes in the network. In this case, the network diameter is more than 17 hops, which exceeds the maximum hop count supported by RIPv1.

3. RIPv2:
RIPv2 (Routing Information Protocol version 2) is an enhanced version of RIPv1 that overcomes some of its limitations, including the maximum hop count. RIPv2 supports a maximum hop count of 16, which allows it to handle slightly larger networks compared to RIPv1.

4. EIGRP:
EIGRP (Enhanced Interior Gateway Routing Protocol) is another routing protocol that is commonly used in larger networks. Unlike RIPv1 and RIPv2, EIGRP is a distance vector protocol that uses more advanced algorithms to calculate routes and maintain routing tables. EIGRP can handle larger network diameters and provides faster convergence compared to RIPv1 and RIPv2.

5. Conclusion:
Considering the limitations of RIPv1, it is not suitable for networks with a diameter of more than 17 hops. RIPv2 or EIGRP would be better choices in such scenarios. However, since the given options only include RIPv1 and RIPv2, RIPv1 is the only suitable choice among them.

In summary, when the network diameter exceeds 17 hops, RIPv1 is the most appropriate protocol to select from the given options.

Which one of the following algorithm is not used in asymmetric-key cryptography?
  • a)
    rsa algorithm
  • b)
    diffie-hellman algorithm
  • c)
    electronic code book algorithm
  • d)
    none of the mentioned
Correct answer is option 'C'. Can you explain this answer?

Anirban Khanna answered
The asymmetric algorithm as outlined in the Diffie-Hellman paper uses numbers raised to specific powers to produce decryption keys. RSA (Rivest-Shamir-Adleman), the most widely used asymmetric algorithm, is embedded in the SSL/TLS protocol which is used to provide communications security over a computer network.

Which type of Ethernet framing is used for TCP/IP and DEC net?
  • a)
    Ethernet 802.3
  • b)
    Ethernet 802.2
  • c)
    Ethernet II
  • d)
    Ethernet SNAP
Correct answer is option 'C'. Can you explain this answer?

Prasad Unni answered
Answer: c
Explanation: Ethernet 802.3 is used with NetWare versions 2 through 3.11, Ethernet 802.2 is used withNetWare 3.12 and later plus OSI routing, Ethernet II is used with TCP/IP and DEC net,and Ethernet SNAP is used with TCP/IP and AppleTalk.

Cookies were originally designed for
  • a)
    Client side programming
  • b)
    Server side programming
  • c)
    Both a and b
  • d)
    None of the mentioned
Correct answer is option 'B'. Can you explain this answer?

Shruti Tiwari answered
Answer: b
Explanation: Cookies were originally designed for server side programming, and at the lowest level, they are implemented as an extension to the HTTP protocol.

Chapter doubts & questions for Routing - 6 Months Preparation for GATE CSE 2025 is part of Computer Science Engineering (CSE) exam preparation. The chapters have been prepared according to the Computer Science Engineering (CSE) exam syllabus. The Chapter doubts & questions, notes, tests & MCQs are made for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests here.

Chapter doubts & questions of Routing - 6 Months Preparation for GATE CSE in English & Hindi are available as part of Computer Science Engineering (CSE) exam. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.

Top Courses Computer Science Engineering (CSE)