Four of the dead were soldiers. Twenty-two others were wounded, officials say.
A team carrying out Pakistan's first census in nearly 20 years was the target of the attack, police said.
It comes amid a series of bombings claimed by Islamist militants in recent weeks. The Pakistani Taliban said they carried out the attack.
The site of the blast near Bedian Road has been cordoned off.
It was not immediately clear if the two civilians killed were census workers or bystanders.
Security forces have been frequent targets for the militants.