Could be that you have a collapsed sewerage pipe and the ant nest has fallen into that. That would explain the ants coming up the pipe and the pipe being blocked, Could be expensive if that is what it is.
The ants would still have to navigate the waste air trap though. Not beyond their capabilities - they are pretty tough and determined.