Migration of two ions during electrolysis of glass waveguide