to exit config in a cisco router you can simply type end instead of ctrl+z same as exit when you want to go a step back in a config. end will simply get out of config mode