Which is the correct RouterOS CLI command to enable a DHCP client on an interface named wan1?

Prepare for the MikroTik Certified Network Associate Exam. Enhance your skills with diverse modules, adaptive quizzes, and detailed explanations. Ace your certification with confidence!

Multiple Choice

Which is the correct RouterOS CLI command to enable a DHCP client on an interface named wan1?

Explanation:
In RouterOS, an interface gets its IP configuration by creating a DHCP client instance tied to that interface. The add command does exactly that: it creates a new DHCP client and attaches it to the specified interface, so the interface will request an IP address from a DHCP server on the network. That’s why the command to enable DHCP on wan1 is to add a DHCP client with interface=wan1. Choosing wan2 would attach the DHCP client to the wrong interface, so it wouldn’t enable DHCP on wan1. Including address=dhcp isn’t a valid parameter for configuring a DHCP client in this context—the client automatically uses DHCP to obtain an address. Using set would only modify an existing DHCP client; if none exists yet, you’d need to add one.

In RouterOS, an interface gets its IP configuration by creating a DHCP client instance tied to that interface. The add command does exactly that: it creates a new DHCP client and attaches it to the specified interface, so the interface will request an IP address from a DHCP server on the network. That’s why the command to enable DHCP on wan1 is to add a DHCP client with interface=wan1.

Choosing wan2 would attach the DHCP client to the wrong interface, so it wouldn’t enable DHCP on wan1. Including address=dhcp isn’t a valid parameter for configuring a DHCP client in this context—the client automatically uses DHCP to obtain an address. Using set would only modify an existing DHCP client; if none exists yet, you’d need to add one.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy