Final answer:
The correct command to block login attempts for 30 seconds after 2 failed attempts within 10 seconds is 'login block-for 30 attempts 2 within 10'. This sets a penalty period where additional login attempts are denied for the specified duration.
Step-by-step explanation:
To configure a router to block login attempts for a specified period upon a certain number of failed attempts, one must use the correct command syntax. In this case, the scenario describes wanting to block login attempts for 30 seconds if there are 2 failed login attempts within 10 seconds. The correct command out of the given options that will achieve this is:
- login block-for 30 attempts 2 within 10
This command means that the login will be blocked for 30 seconds if there are 2 consecutive failed login attempts within a span of 10 seconds. The sequence is as follows: 'block-for' sets the penalty period for blocked login attempts, 'attempts' specifies the number of failed attempts that trigger the block, and 'within' sets the time frame in which the consecutive failed attempts must occur to trigger the blocking.