Assuming your are connecting to DB2 for Linux, UNIX, or Windows, the license file is free, but must be placed on the path with the type 4 driver. The license file is included when you download the driver.
If you are connecting to DB2 for z/OS or DB2 for i/Series, you will need a DB2 Connect license.