Setting communication protocols for a DB2 instance is part of the main task of configuring TCP/IP or SSL communications for a DB2 instance.
Set Communication protocol:
Run with db2inst1 user
This parameter contains the name of the TCP⁄IP port which a database server will use to await communications from remote client nodes.
Set a port on which application /client will communicate
db2 update dbm cfg using SVCENAME 50021
The system administrator for the database server must reserve a port (number n) and define its associated TCP/IP service name in the services file at the server.
The database server port (number n) and its TCP/IP service name need to be defined in the services file on the database client.
On Linux and UNIX systems, the services file is located in: /etc/services
cat /etc/services | grep 50021