Can you please explain the 2 interface commands and what exactly they do?
rate-limit cpu direction both pps 2000 action log
From Cisco's documentation
medium p2p is useful to force the interface on p2p mode. protocols such as ISIS and OSPF can make use of that feature when configured on LAN interfaces.
the rate-limit cpu direction command adds the ability to rate-limit packets destined to the supervisor and log a message. Please note, packets won't be dropped. If you want packets to be dropped, you need to use the hardware rate-limit command.