Wouldn't you be able to do this via Active Directory group policy?
I don't know why they wanted to go ip-based or even bother with cookies since AD queries are practically free.
In ASP.net with all the builtin integrations for AD that's a one day project.