Dual topological states in the layered titanium-based oxypnictide superconductor BaTi2Sb2O