Search for variable stars in the young open cluster NGC 6871.