Appeal from a judgment of the County Court of Albany County (Breslin, J.), rendered June 21, 2005, convicting defendant upon his plea of guilty of the crime of attempted criminal possession of a weapon in the third degree.
*819Defendant pleaded guilty to a reduced charge of attempted criminal possession of a weapon in the third degree in satisfaction of a two-count indictment. In accordance with the plea agreement, County Court sentenced defendant to 21k years in prison followed by IV2 years of postrelease supervision. Defendant now appeals claiming that his sentence was harsh and excessive, his plea was not voluntary and he received ineffective assistance of counsel.
The People argue that the plea bargain included a waiver by defendant of his right to appeal and, thus, that he is precluded from challenging the agreed-upon sentence as harsh and excessive (see People v Lopez, 6 NY3d 248, 253 [2006]). We agree. While there is no particular prescribed litany that must be set forth to establish a valid waiver of the right to appeal, the record of the plea as a whole must nevertheless reveal that defendant understood that a separate and distinct right was being relinquished (see id. at 256-257). Here, at the commencement of the plea, County Court recited the terms of the plea, and then the prosecutor interjected that defendant must also waive his right to appeal as part of the bargain. The court inquired of defense counsel, who conferred with defendant, and then both stated on the record their agreement to those terms. At subsequent points in the plea colloquy, defense counsel stated that he had explained the waiver of the right to appeal to defendant and, thereafter, when asked by the court whether he was “giv[ing] up [his] right to appeal,” defendant responded, “Yes sir.” Although not reflecting the preferred way to effectively elicit a waiver of the right to appeal (see id. at 257), the record as a whole is sufficient to reveal a knowing and intelligent waiver of that right (see id.; see also People v Seaberg, 74 NY2d 1, 11 [1989]; compare People v Cain, 29 AD3d 1157, 1157-1158 [2006]; People v Popson, 28 AD3d 870, 871 [2006]).
Defendant failed to preserve for our review his arguments regarding the voluntariness of his plea and effectiveness of his counsel (see People v Cain, 29 AD3d 1032, 1032-1033 [2006]) and, in any event, our interest of justice review of such issues reveals both to be without merit.
Carpinello, Mugglin and Kane, JJ., concur.