{"id":21869,"date":"2026-11-10T14:25:36","date_gmt":"2026-11-10T11:25:36","guid":{"rendered":"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/"},"modified":"2026-11-10T14:25:36","modified_gmt":"2026-11-10T11:25:36","slug":"what-is-tcp-ip","status":"publish","type":"post","link":"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/","title":{"rendered":"What Is TCP\/IP? TCP vs UDP, the TCP\/IP Layers and How It Works"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#The_TCPIP_Layers\" >The TCP\/IP Layers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#What_Is_TCP_and_How_Does_It_Work\" >What Is TCP and How Does It Work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#TCP_vs_UDP\" >TCP vs UDP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#IP_Addresses_and_Ports\" >IP Addresses and Ports<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#Useful_Commands\" >Useful Commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#Is_TCPIP_a_program\" >Is TCP\/IP a program?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#Which_is_faster_TCP_or_UDP\" >Which is faster, TCP or UDP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/sunucun.com.tr\/blog\/what-is-tcp-ip\/#Where_do_I_change_TCPIP_settings\" >Where do I change TCP\/IP settings?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\"><strong>TCP\/IP<\/strong> is the <strong>suite of communication protocols<\/strong> the internet and most local networks run on. It is named after its two key protocols: <strong>IP (Internet Protocol)<\/strong> addresses and routes packets to their destination, and <strong>TCP (Transmission Control Protocol)<\/strong> makes sure they arrive complete, in order and without errors. Loading a web page, sending email or connecting to a server over SSH all happen over TCP\/IP.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_TCPIP_Layers\"><\/span>The TCP\/IP Layers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The TCP\/IP model (RFC 1122) has four layers. Data gains a header at each layer on the way down and is unwrapped in reverse on the other side.<\/p>\n\n\n\n<div class=\"snc-table-wrap\"><table>\n<thead><tr><th>Layer<\/th><th>Role<\/th><th>Example protocols<\/th><th>OSI equivalent<\/th><\/tr><\/thead>\n<tbody>\n<tr><td><strong>Application<\/strong><\/td><td>Services used by programs<\/td><td>HTTP\/HTTPS, DNS, SMTP, IMAP, FTP, SSH<\/td><td>Application, Presentation, Session (7-5)<\/td><\/tr>\n<tr><td><strong>Transport<\/strong><\/td><td>Data between applications, port numbers<\/td><td>TCP, UDP<\/td><td>Transport (4)<\/td><\/tr>\n<tr><td><strong>Internet<\/strong><\/td><td>Addressing and routing<\/td><td>IPv4, IPv6, ICMP<\/td><td>Network (3)<\/td><\/tr>\n<tr><td><strong>Link<\/strong><\/td><td>Delivery on the same physical network<\/td><td>Ethernet, Wi-Fi, ARP<\/td><td>Data link, Physical (2-1)<\/td><\/tr>\n<\/tbody><\/table><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The 7-layer <strong>OSI model<\/strong> is a reference model used in teaching; real internet protocols follow the TCP\/IP model.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Is_TCP_and_How_Does_It_Work\"><\/span>What Is TCP and How Does It Work?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">TCP is <strong>connection-oriented<\/strong>. Before sending data, both sides set up a connection with the <strong>three-way handshake<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The client sends <strong>SYN<\/strong>.<\/li>\n<li>The server replies <strong>SYN-ACK<\/strong>.<\/li>\n<li>The client sends <strong>ACK<\/strong>; the connection is open.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">TCP then numbers segments, waits for acknowledgements, retransmits lost data and adapts its sending rate (flow and congestion control). That reliability adds a little latency. TCP&#8217;s current specification is RFC 9293, published in 2022.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TCP_vs_UDP\"><\/span>TCP vs UDP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"snc-table-wrap\"><table>\n<thead><tr><th><\/th><th>TCP<\/th><th>UDP<\/th><\/tr><\/thead>\n<tbody>\n<tr><td><strong>Connection<\/strong><\/td><td>Handshake first<\/td><td>Connectionless<\/td><\/tr>\n<tr><td><strong>Reliability<\/strong><\/td><td>Acknowledgements, retransmission, ordering<\/td><td>No guarantee; lost packets aren&#8217;t resent<\/td><\/tr>\n<tr><td><strong>Overhead<\/strong><\/td><td>Higher<\/td><td>Lighter, lower latency<\/td><\/tr>\n<tr><td><strong>Used for<\/strong><\/td><td>Web (HTTP\/1.1, HTTP\/2), email, file transfer, SSH<\/td><td>DNS queries, live audio\/video, games, VoIP, QUIC\/HTTP\/3<\/td><\/tr>\n<\/tbody><\/table><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Think of TCP as registered mail and UDP as an ordinary letter. In games or video calls a late packet is useless, so UDP is preferred. HTTP\/3 uses QUIC, which runs over UDP and provides reliability itself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"IP_Addresses_and_Ports\"><\/span>IP Addresses and Ports<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The IP address gets the packet to the right device; the <strong>port number<\/strong> gets it to the right application. A web server listens on TCP 443 for HTTPS and TCP 22 for SSH; DNS mostly uses UDP 53. An IP address plus a port forms a <strong>socket<\/strong> (e.g. 203.0.113.10:443). See <a href=\"https:\/\/sunucun.com.tr\/blog\/what-is-an-ip-address\/\">what is an IP address<\/a> and <a href=\"https:\/\/sunucun.com.tr\/blog\/what-is-a-port\/\">what is a port<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Useful_Commands\"><\/span>Useful Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>ping example.com<\/code>: reachability and latency via ICMP (see <a href=\"https:\/\/sunucun.com.tr\/blog\/what-is-ping-how-to-ping\/\">what is ping<\/a>).<\/li>\n<li><code>tracert<\/code> (Windows) \/ <code>traceroute<\/code> (Linux, macOS): routers on the path.<\/li>\n<li><code>ipconfig \/all<\/code> (Windows) or <code>ip addr<\/code> (Linux): IP settings.<\/li>\n<li><code>netstat -an<\/code> or <code>ss -tulpn<\/code> on Linux: open TCP\/UDP connections and listening ports.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">On your own server you decide which ports are open with the firewall. See our <a href=\"https:\/\/sunucun.com.tr\/en\/vds-server\">VDS server<\/a> and <a href=\"https:\/\/sunucun.com.tr\/en\/vps-server\">VPS server<\/a> plans.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Is_TCPIP_a_program\"><\/span>Is TCP\/IP a program?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. It is a set of protocols built into Windows, macOS, Linux, Android and iOS; nothing to install.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Which_is_faster_TCP_or_UDP\"><\/span>Which is faster, TCP or UDP?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">UDP has less overhead and lower latency but no delivery guarantee. Use TCP where correctness matters (web, files, email) and UDP for real-time traffic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Where_do_I_change_TCPIP_settings\"><\/span>Where do I change TCP\/IP settings?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">On Windows: Settings &gt; Network &amp; internet &gt; your connection &gt; IP assignment, for IP, subnet mask, gateway and DNS. Automatic (DHCP) is right for most home users.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TCP\/IP is the suite of communication protocols the internet and most local networks run on. It is named after its two key protocols: IP (Internet Protocol) addresses and routes packets to their destination, and TCP (Transmission Control Protocol) makes sure they arrive complete, in order and without errors. Loading a web page, sending email or&hellip;<\/p>\n","protected":false},"author":1,"featured_media":21873,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1523],"tags":[],"class_list":["post-21869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-network"],"_links":{"self":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/comments?post=21869"}],"version-history":[{"count":0,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21869\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media\/21873"}],"wp:attachment":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media?parent=21869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/categories?post=21869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/tags?post=21869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}