IP protocol version Number4 bits header length 4
IP protocol version Number[4 bits] header length (4 Bytes)[4 bits] “type” of data: Priority [3 bits] Delay[1 bit] Throughput[1 bit] Reliability[1 bit] max number remaining hops (decremented at each router) how much overhead with TCP? q 20 bytes of TCP q 20 bytes of IP q = 40 bytes + app layer overhead 32 bits head. “type” of ver len service length fragment 16 -bit identifier flags offset upper Checksum: 1’s add of time to layer 16 bits words in header live 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, typically a TCP or UDP segment) A packet is unique in Internet by: Id + S. IP Add + D. IP Add + Upper L. IP ﻓﺮﻣﺖ ﺑﺴﺘﻪ total datagram length (1 Byte) fragmentation/ Reassembly/ DF, MF Flags upper layer protocol to deliver payload to (rfc 1700) 1 : ICMP 6 : TCP 17 : UDP e. g. timestamp, record route taken, specify list of routers to visit. 3
IP Fragmentation and Reassembly data 0………. 3979 20 Byte Example q 4000 byte datagram q MTU = 1500 bytes length ID fragflag =4000 =x =0 offset =0 4000 Bytes 0………. 1479 length ID fragflag =1480 =x =1 offset =0 1480… 2959 ﺩیﺘﺎگﺮﺍﻡ 3 یک ﺩیﺘﺎگﺮﺍﻡ ﺑﺰﺭگ ﺑﻪ کﻮچک ﺗﺒﺪیﻞ ﻣیﺸﻮﺩ length ID fragflag offset =1480 =x =1 =1480 ﺑﺎﺷﺪ 8 ﺑﺎیﺪ ﺿﺮیﺐ fragment ﻃﻮﻝ ﻫﺮ length ID fragflag offset =1040 =x =0 =2960 1480=185*8 10
ICMP پﺮﻭﺗکﻞ TCP/IP Protocol Suite 13
ICMP: Internet Control Message Protocol Type 0 3 3 3 4 8 9 10 11 12 Code description 0 echo reply (ping) 0 dest. network unreachable 1 dest host unreachable 2 dest protocol unreachable 3 dest port unreachable 6 dest network unknown 7 dest host unknown 0 source quench (congestion control - not used) 0 echo request (ping) 0 route advertisement 0 router discovery 0 TTL expired 0 bad IP header ﻣیﺰﺑﺎﻧﻬﺎ ﻭ ﺭﻭﺗﺮﻫﺎ ﺑﺮﺍی ﺗﺒﺎﺩﻝ ﺍﻃﻼﻋﺎﺕ ﺷﺒکﻪ ﺍﺯ . آﻦ ﺍﺳﺘﻔﺎﺩﻩ ﻣیکﻨﻨﺪ v ، ﺷﺒکﻪ ، ﺩﺭ ﺩﺳﺘﺮﺱ ﻧﺒﻮﺩﻥ ﻣیﺰﺑﺎﻥ : گﺰﺍﺭﺵ ﺧﻄﺎ پﺮﻭﺗکﻞ ، پﻮﺭﺕ ping ﺩﺭﺧﻮﺍﺳﺖ ﻫﺎی ﺑﺎﺯگﺸﺘی ﻣﺎﻧﻨﺪ ﻗﺮﺍﺭ ﻣیگیﺮﻧﺪ IP ﺩﺭﻭﻥ ﺑﺴﺘﻪ ICMP پیﺎﻣﻬﺎی Code ،Type ﺩﺍﺭﺍی ﻣﻮﺍﺭﺩ ICMP پیﺎﻣﻬﺎی ﺑﺎیﺖ( ﻣیﺒﺎﺷﻨﺪ 8) ﺑﻪ ﻫﻤﺮﺍﻩ آﺪﺭﺱ ﻣﺒﺪﺍ ﻭ ﻣﻘﺼﺪ v v 14
ICMP ﻓﺮﻣﺖ ﺑﺴﺘﻪ ﻫﺎی TCP/IP Protocol Suite 15
tracert ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ : ﻣﺜﺎﻝ C: Usersvahid>tracert shahed. ac. ir Tracing route to shahed. ac. ir [217. 218. 141. 33] over a maximum of 30 hops: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 ms 2 ms 192. 168. 1. 1 * * * Request timed out. 104 ms 78 ms 65 ms 172. 23. 133. 90 82 ms 78 ms 87 ms 10. 132. 75. 249 56 ms 97 ms 79 ms 10. 132. 92. 35 58 ms 87 ms 78 ms 10. 132. 92. 44 94 ms 80 ms 87 ms 10. 21. 252. 202 * * * Request timed out. 64 ms 79 ms 10. 21. 22. 97 * * * Request timed out. 108 ms 126 ms 125 ms 10. 22. 71. 98 * * * Request timed out. 1510 ms 1765 ms 1668 ms 10. 73. 130 2040 ms 1569 ms * 10. 201. 22. 61 1153 ms 1685 ms 1473 ms 10. 201. 42. 10 101 ms 94 ms 135 ms 10. 201. 42. 9 98 ms 87 ms 89 ms 217. 218. 189. 197 91 ms 123 ms 119 ms 217. 218. 146. 222 106 ms 121 ms 89 ms shahed. ac. ir [217. 218. 141. 33] Trace complete. 18
DHCP client-server scenario DHCP server A 223. 1. 1. 1 223. 1. 1. 2 223. 1. 1. 4 B 223. 1. 2. 1 223. 1. 2. 9 223. 1. 3. 27 223. 1. 2. 2 223. 1. 1. 3 223. 1. 3. 2 E arriving DHCP client needs address in this network 20
DHCP client-server scenario DHCP server: 223. 1. 2. 5 DHCP discover arriving client src : 0. 0, 68 dest. : 255, 67 yiaddr: 0. 0 transaction ID: 654 DHCP offer src: 223. 1. 2. 5, 67 dest: 255, 68 yiaddrr: 223. 1. 2. 4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0. 0, 68 dest: : 255, 67 yiaddrr: 223. 1. 2. 4 transaction ID: 655 Lifetime: 3600 secs time DHCP ACK src: 223. 1. 2. 5, 67 dest: 255, 68 yiaddrr: 223. 1. 2. 4 transaction ID: 655 Lifetime: 3600 secs Yiaddr: (client) IP address. Server's response to client. Ciaddr: Client IP address. Filled in by client if it knows it's IP address (from previouse requests or from manual configurations) 21
- Slides: 24