nerdexam
Cisco

300-915 · Question #19

Mosquitto was installed correctly on the Cisco IR829 router as a Cisco IOx application. When the sensor is connected to the broker on the Cisco IR829 router with the default port, the connection is…

The correct answer is C. Use the correct username and password. MQTT Error Code 5 specifically means "Connection Refused: Not Authorized," which is an application-layer rejection by the broker itself - meaning the network connection succeeded but Mosquitto denied it due to missing or incorrect credentials. This is a pure authentication…

IoT Security and Management

Question

Mosquitto was installed correctly on the Cisco IR829 router as a Cisco IOx application. When the sensor is connected to the broker on the Cisco IR829 router with the default port, the connection is refused (Error Code 5). Which action should be done to resolve the issue?

Options

  • AInsert in the IOS config: ip nat inside source static tcp <CAF IP> 1883 interface GigabitEthernet0
  • BInsert in the package_config.ini file under section ports: tcp: ["8883"]
  • CUse the correct username and password.
  • DInsert in the package.yaml file under section ports: tcp: ["1883"]

How the community answered

(38 responses)
  • A
    11% (4)
  • B
    8% (3)
  • C
    55% (21)
  • D
    26% (10)

Explanation

MQTT Error Code 5 specifically means "Connection Refused: Not Authorized," which is an application-layer rejection by the broker itself - meaning the network connection succeeded but Mosquitto denied it due to missing or incorrect credentials. This is a pure authentication failure, resolved by providing the correct username and password configured in Mosquitto.

Why the distractors are wrong:

  • A (NAT/static mapping): A NAT issue would prevent the TCP connection from reaching the broker at all - you'd get a network-level timeout or refusal, not an MQTT Error Code 5. The sensor is reaching the broker.
  • D (package.yaml port 1883): If port 1883 weren't exposed in the IOx package definition, the sensor couldn't establish any TCP connection to begin with - again, you'd see a network error, not an MQTT-layer error code.
  • B (port 8883 in package_config.ini): Port 8883 is for MQTT over TLS/SSL; switching ports doesn't resolve a credentials problem and would actually require additional TLS configuration on the client side.

Memory tip: Think of MQTT error codes as HTTP status analogues - Code 5 ("Not Authorized") maps to HTTP 401/403. If you see it, always think credentials, not networking.

Topics

#Mosquitto MQTT#Cisco IOx#MQTT authentication#Connection troubleshooting

Community Discussion

No community discussion yet for this question.

Full 300-915 Practice