We start with a single data stream (ie file to transfer) to some other computer:
......................................................
TCP breaks the message into datagrams
.... .... .... .... .... .... .... ....
Add the TCP header (include the port to connect to and the sequence number)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data | |U|A|P|R|S|F| |
| Offset| Reserved |R|C|S|S|Y|I| Window |
| | |G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| your data ... next 500 octets |
| ...... |
"T" is the TCP header so the whole file now looks like this:
T.... T.... T.... T.... T.... T.... T....IP Header is now added (including IP addresses)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TCP header, then your data ...... |
| |
If we represent the IP header by an "I", stream now looks like
this:
IT.... IT.... IT.... IT.... IT.... IT.... IT....
The Ethernet level (Ethernet headers added)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ethernet destination address (first 32 bits) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ethernet dest (last 16 bits) |Ethernet source (first 16 bits)|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ethernet source address (last 32 bits) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP header, then TCP header, then your data |
| |
...
| |
| end of your data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ethernet Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
If we represent the Ethernet header with "E", and the Ethernet
checksum with "C", your file now looks like this:
EIT....C EIT....C EIT....C EIT....C EIT....C
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 1500 0 0 eth1 142.150.8.0 0.0.0.0 255.255.252.0 U 1500 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 3584 0 0 lo 0.0.0.0 142.150.10.224 0.0.0.0 G 1500 0 0 eth0
traceroute: Warning: yahoo.com has multiple addresses; using 216.115.108.243 traceroute to yahoo.com (216.115.108.243), 30 hops max, 38 byte packets 1 infirewall.sub0.com (192.168.1.1) 1.083 ms 0.975 ms 0.926 ms 2 erindale.gw.utoronto.ca (142.150.10.224) 2.114 ms 2.176 ms 1.815 ms 3 mcl-erin-gpb.gw.utoronto.ca (128.100.96.105) 3.647 ms 3.715 ms 3.361 ms 4 gate-gateway.gw.utoronto.ca (128.100.96.100) 4.377 ms 5.387 ms 6.350 ms 5 border.onet.on.ca (206.248.221.5) 86.735 ms 81.070 ms 83.395 ms 6 if-3-3.core1.Toronto2.Teleglobe.net (64.86.84.205) 80.111 ms 75.567 ms 75.240 ms 7 if-10-0.core1.Scarborough.Teleglobe.net (64.86.80.241) 78.781 ms 79.592 ms 80.087 ms 8 if-8-0.core2.Scarborough.Teleglobe.net (207.45.222.206) 142.243 ms 155.188 ms 164.573 ms 9 if-3-0.core2.Chicago3.Teleglobe.net (207.45.222.182) 165.966 ms 178.405 ms 185.477 ms 10 if-3-0.core2.Denver.Teleglobe.net (64.86.83.138) 185.812 ms 188.972 ms 195.752 ms 11 if-2-0.core2.Sacramento.Teleglobe.net (64.86.83.142) 190.736 ms 226.367 ms 209.644 ms 12 if-1-0.core1.Sacramento.Teleglobe.net (64.86.83.221) 208.554 ms 209.715 ms 209.278 ms 13 if-2-0.core1.PaloAlto.Teleglobe.net (64.86.83.201) 213.645 ms 212.109 ms 216.979 ms 14 ix-5-0.core1.PaloAlto.Teleglobe.net (207.45.196.90) 218.787 ms 219.899 ms 230.148 ms 15 ge-1-2-0.msr2.pao.yahoo.com (216.115.100.154) 242.865 ms * ge-1-3-0.msr1.pao.yahoo.com (216.115.100.150) 223.229 ms 16 vlan28.bas1-m.snv.yahoo.com (216.115.100.122) 188.272 ms 186.336 ms 172.252 ms 17 img3.yahoo.com (216.115.108.243) 180.765 ms 174.863 ms 170.119 ms