Typically snmp is udp port 161 and snmp traps are udp port 162. If you are using non-standard ports, then all of the associated devices just need to be configured to either listen or transmit on the new port. Obviously, to traverse a firewall, the appropriate port must also be open.