Have you read the description in the manual already?
In the instance containing the second database, you have to:
- establish a connection to the first database using CATALOG TCPIP NODE and CATALOG DATABASE commands
- use the CREATE WRAPPER command to register the wrapper in db2
- use CREATE SERVER to make db2 known in db1
- use CREATE USER MAPPING (if necessary)
- use CREATE NICKNAME to make tables in db1 known in db2 via nicknames