<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc" -->

---
title: Why Do We Need Source IP Addresses in IP Headers? «...
description: A networking blog post exploring why IP packet headers include source IP addresses. The core argument is that connectionless services (like UDP-based DNS...
canonical: https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why Do We Need Source IP Addresses in IP Headers? « ipSpace.net blog | daily.dev
og:description: A networking blog post exploring why IP packet headers include source IP addresses. The core argument is that connectionless services (like UDP-based DNS...
og:url: https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc
og:image: https://api.daily.dev/og/posts/XiT5SXEkc.png
og:image:alt: Why Do We Need Source IP Addresses in IP Headers? « ipSpace.net blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Do We Need Source IP Addresses in IP Headers? « ipSpace.net blog

**[ipSpace.net Blog](https://daily.dev/sources/ipspace)** · 4 min read · 0 upvotes · 0 comments

## Summary

A networking blog post exploring why IP packet headers include source IP addresses. The core argument is that connectionless services (like UDP-based DNS queries) require a return address in the packet itself, since there is no persistent session to store that information. While TCP could theoretically store remote IP addresses in a session table and avoid needing source IPs in headers, the IP architects chose consistency: all IP packets carry a source address. The post also touches on how TCP's use of the 4-tuple (source/destination IPs and ports) as connection identifiers prevents easy IP address changes during active sessions, complicating roaming and live VM migration.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2023/09/need-source-ip-address-in-packet-header>

## Questions this post answers

### Why does an IP packet header need to include a source IP address?

IP packets need a source address because connectionless services have no persistent session to store the sender's address. When using UDP (e.g., for DNS queries), there is no connection setup phase where endpoints exchange addresses, so the return address must be embedded in each packet. TCP could theoretically use a session table, but IP architects chose consistency: every IP packet carries a source address regardless of transport.

_Developers building network-aware systems track protocol design decisions like this on daily.dev._

### Why can't I change a node's IP address while TCP sessions are open?

TCP uses the 4-tuple of source IP, destination IP, source port, and destination port as the connection identifier. Changing the node's IP address during an active session breaks this identifier, invalidating the connection. Multipath TCP works around this by introducing connection tokens as an alternative identifier, allowing IP address changes without dropping sessions.

_Engineers dealing with live VM migration or mobile roaming challenges find relevant networking discussions on daily.dev._

## Similar posts on daily.dev

- [IP Addressing, Part III: Inside the IP Packet](https://daily.dev/posts/ip-addressing-part-iii-inside-the-ip-packet-2htt89y0h) · The Polymathic Engineer · 0 upvotes · 0 comments
- [SSH has no Host header](https://daily.dev/posts/ssh-has-no-host-header-6e4y3tuie) · Lobsters · 0 upvotes · 0 comments
- [Understanding IP Addresses: What They Reveal and How VPNs Change Your Online Connections](https://daily.dev/posts/understanding-ip-addresses-what-they-reveal-and-how-vpns-change-your-online-connections-akqxy6mce) · SitePoint · 0 upvotes · 0 comments
- [The world in which IPv6 was a good design](https://daily.dev/posts/the-world-in-which-ipv6-was-a-good-design-tj3i8ov0s) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why Do We Need Source IP Addresses in IP Headers? « ipSpace.net blog","url":"https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc"},"datePublished":"2026-08-11T08:54:50.693Z","dateModified":"2026-08-11T09:01:28.905Z","description":"A networking blog post exploring why IP packet headers include source IP addresses. The core argument is that connectionless services (like UDP-based DNS...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"ipSpace.net Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ipSpace.net Blog","logo":"https://media.daily.dev/image/upload/s--xS7E82MT--/f_auto,q_auto/v1786438303/logos/ipspace?_a=BAMAMicg0","url":"https://daily.dev/sources/ipspace"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"networking","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ipSpace.net Blog","item":"https://daily.dev/sources/ipspace"},{"@type":"ListItem","position":3,"name":"Why Do We Need Source IP Addresses in IP Headers? « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-do-we-need-source-ip-addresses-in-ip-headers-ipspace-net-blog-xit5sxekc#faq","mainEntity":[{"@type":"Question","name":"Why does an IP packet header need to include a source IP address?","acceptedAnswer":{"@type":"Answer","text":"IP packets need a source address because connectionless services have no persistent session to store the sender's address. When using UDP (e.g., for DNS queries), there is no connection setup phase where endpoints exchange addresses, so the return address must be embedded in each packet. TCP could theoretically use a session table, but IP architects chose consistency: every IP packet carries a source address regardless of transport. Developers building network-aware systems track protocol design decisions like this on daily.dev."}},{"@type":"Question","name":"Why can't I change a node's IP address while TCP sessions are open?","acceptedAnswer":{"@type":"Answer","text":"TCP uses the 4-tuple of source IP, destination IP, source port, and destination port as the connection identifier. Changing the node's IP address during an active session breaks this identifier, invalidating the connection. Multipath TCP works around this by introducing connection tokens as an alternative identifier, allowing IP address changes without dropping sessions. Engineers dealing with live VM migration or mobile roaming challenges find relevant networking discussions on daily.dev."}}]}
```

