Which command configures a router interface with a static IP address on a Cisco device?

  1. configure static ip 192.168.1.1
  2. ip address dhcp
  3. ip static 192.168.1.1/24
  4. ip address 192.168.1.1 255.255.255.0 ✓

Correct answer: ip address 192.168.1.1 255.255.255.0

Option D is correct because the Cisco IOS syntax for assigning a static IP address to an interface is 'ip address <address> <subnet-mask>' entered in interface configuration mode, for example 'ip address 192.168.1.1 255.255.255.0'. Option A is wrong because 'configure static ip' is not a valid Cisco IOS command; there is no such syntax in IOS. Option B is wrong because 'ip address dhcp' configures the interface to obtain an address dynamically via DHCP, not a static assignment. Option C is wrong because 'ip static' is not valid IOS syntax, and CIDR slash notation is used in some display contexts but is not the accepted form for the ip address command in classic IOS.

Topic: · cisco ios, interface configuration, static ip, ccna

Practice Cisco CCNA (200-301) Questions Free