We consider the problem of optimal estimation of the linear functional $A_{N}\xi ={\sum _{k=0}^{N}}a(k)\xi (k)$ depending on the unknown values of a stochastic sequence $\xi (m)$ with stationary increments from observations of the sequence $\xi (m)+\eta (m)$ at points of the set $\mathbb{Z}\setminus \{0,1,2,\dots ,N\}$, where $\eta (m)$ is a stationary sequence uncorrelated with $\xi (m)$. We propose formulas for calculating the mean square error and the spectral characteristic of the optimal linear estimate of the functional in the case of spectral certainty, where spectral densities of the sequences are exactly known. We also consider the problem for a class of cointegrated sequences. We propose relations that determine the least favorable spectral densities and the minimax spectral characteristics in the case of spectral uncertainty, where spectral densities are not exactly known while a set of admissible spectral densities is specified.