When they move over 5ft and 10ft away from you
You can use your one reaction to execute an opportunity attack to attack with the dagger if the opponent steps out of 5 foot reach. Or the Whip if the opponent steps out of 10 feet reach.
This is supported by the descriptions of the reach property (post-PHB-errata) which says:
This weapon adds 5 feet to your reach when you attack with it, as well
as when determining your reach for opportunity attacks with it.
But you only get one or the other as you only get one reaction until after your next turn.
Two-weapon fighting
Since a whip is not a light weapon you can't use two-weapon fighting with a dagger.
But that only relevant to when you are taking your turn. The rule is limited to a grant of a bonus action to attack with the second light weapon. There is no rule prohibiting you from holding any combination of two one handed weapons. Without both of them being light you can only attack with one or the other with an attack option.
Also note that you only get one bonus action regardless of how many you could have.
In my opinion the main advantage of using two one-handed weapons without being able to use two-weapon fighting is to take advantage of some special property on one weapon versus the other. For example the use of a whip and a longsword. The whip has reach but less damage. So close in you use the longsword but if you need to attack an opponent further away you can attack with the whip. And it expands you flexibility in using a reaction for taking an opportunity attack.
Rules Details
From page 69 of the Players Rules for Basic D&D 5e.
You can take only one bonus action on your turn, so you must choose
which bonus action to use when you have more than one available.
From page 74 of the Players Rules for Basic D&D 5e.
When you take the Attack action and attack with a light melee weapon
that you’re holding in one hand, you can use a bonus action to attack
with a different light melee weapon that you’re holding in the other
hand.
and
You can make an opportunity attack when a hostile creature that you
can see moves out of your reach. To make the opportunity attack, you
use your reaction to make one melee attack against the provoking
creature.
From page 70 of the Players Rules for Basic D&D 5e.
When you take a reaction, you can’t take another one until the start
of your next turn. If the reaction interrupts another creature’s turn,
that creature can continue its turn right after the reaction.
War Caster lets you cast a spell instead of an opportunity attack, which is made just before the creature leaves your reach. If your reach is 5 feet and you use War Caster to cast a ranged spell attack then, yes, the attack is made with disadvantage.
If you have a natural reach greater than 5 feet, then the attack is made when the creature is more than 5 feet away, so this doesn't apply. Similarly, it doesn't apply to melee spell attacks or spells that use saving throws. You are also good if you have the Crossbow Expert feat.
Best Answer
The errata for the PHB includes this fix for reach weapons:
So when a creature moves from 5 feet away to 10 feet away, you can make an opportunity attack with your dagger or cast a spell using War Caster. When a creature moves from 10 feet to 15, you can only make your opportunity attack with the whip.