Simple definition
ICE (Interactive Connectivity Establishment) is a mechanism used by real-time applications to find a usable network path between two peers, especially across NAT devices and firewalls.
Technical definition
ICE gathers and tests several connectivity candidates: local addresses, public-facing addresses discovered with STUN, and relay addresses provided by TURN. Peers exchange these candidates and run connectivity checks to select a pair that can carry the media.
How it works / role
ICE automates network traversal. It prioritizes candidates, performs connectivity checks, and keeps the best valid path. Direct communication is normally preferred, while a TURN relay is used as a fallback when NAT behavior or filtering prevents a direct path.
What is it used for?
Improve the reliability of WebRTC, voice, and video sessions when endpoints are located behind different networks or NAT devices.
Practical example
A browser behind a corporate NAT exchanges ICE candidates with an Internet peer. If direct connectivity fails, the media can be relayed through a TURN server.
Common issues
- STUN or TURN service is unreachable
- UDP ports are blocked or firewall rules are too restrictive
- Incorrect private or public candidates are advertised
- TURN credentials are invalid or expired
Key takeaway: ICE selects the transport path; STUN helps discover public addressing, while TURN relays traffic when direct connectivity is not possible.