We discuss the analysis and numerical solution of over- and underdetermined systems of nonlinear differential-algebraic equations. Such equations allow a unified treatment of simulation and control problems for many systems arising in applications such as circuit theory or multibody systems. The general approach that we present is useful, in particular, for systems that are automatical generated, since then typically the system has redundancies. Our approach incorporates control problems via the behaviour framework. We give a general (local) existence and uniqueness theory, discuss issues like the appropriate index and consistency of initial conditions. The theoretical analysis also leads to new numerical methods for the simulation as well as the construction of feedbacks. We present some numerical examples.