Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong.

Similar presentations


Presentation on theme: "1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong."— Presentation transcript:

1 1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong

2 2 IP Layer Defines a virtual network on top of difference kinds of hardware platform using IP address function of IP –route packet –fragmentation –handle type of service –send and receive error and control message using ICMP

3 3 IP Attributes Handle data unit called IP datagrams connectionless protocol-doesn ’ t promise reliable delivery best effort delivery packets maybe lost, out of sequence, or duplicated due the various reasons

4 4 IP Encapsulation With Ethernet frame Ethernet Header IP HeaderData datagram

5 5 IP Reframe IP will reframe the packet when A send data to B A B IP 172.28.80.96 MAC 00:50:ba:49:9d:b9 IP 172.28.85.24 MAC 00:02:7a:d2:b3:00 MAC dest MAC src type IP src IP dest MAC dest MAC src type IP src IP dest 00:00:1a:2b:3c:4d 00:50:ba:49:9d:b9 0x800 172.28.80.96 172.28.85.24 00:02:7a:d2:b3:00 00:00:2a:3b:4c:5d 0x800 172.28.80.96 172.28.85.24 Packet to routerPacket from router IP 172.28.80.1 MAC 00:00:1a:2b:3c:4d IP 172.28.85.1 MAC 00:00:2a:3b:4c:5d Change MAC address, IP address be the same

6 6 The Internet Protocol (IP) App Transport Network Link TCP / UDP IP Data H dr Data H dr TCP Segme nt IP Datagr am Protocol Stack

7 7 The Internet Protocol (IP) Characteristics of IP CONNECTIONLESS: mis-sequencing UNRELIABLE: may drop packets… BEST EFFORT:… but only if necessary DATAGRAM:individually routed A R1 R2 R4 R3 B Sour ce Destina tion DH DH Architectu re Links Topology Transpar ent

8 8 The IP Datagram Offset within original packet Flags :3 vers : 4 TTL : 8 TOS : 8 Header Checksum : 16 hlen: 4 Total Length :16 Identification : 16 FRAG Offset : 13 Protocol :8 SRC IP Address : 32 DST IP Address : 32 (OPTIONS)(PAD) <= 64 KBytes Data. 0 151631 20 Bytes

9 9 IP Header Details Ver : version = 4 hlen : header length in 32 bit words, hlen = 5 with no option TOS : type of service, desired quality of services Prec.DTR0C 0 1 2 3 4 5 6 7 Bitsif 0if 1 0-2Precedence 3Normal delayLow delay 4Normal throughputHigh throughput 5Normal reliabilityHigh reliability 6Normal cost Low cost 7 Reserves

10 10 IP Header Details Total Length : max size datagrams include header (64KB) Identification, Flag, Fragmentation : use to segmentation and reassembly packet TTL : Time to Live, maximum number of routers through with the datagrams may pass (hop count) –decrease at each router to prevent forever looping –normally set to 30 –if TTL == 0 discard and send ICMP TTL exceeded to source IP

11 11 IP Header Details Protocol : higher level protocol that provide data –1 = datagrams carries an ICMP messages –6 = datagrams carries an TCP segments –17 = datagrams carries an UDP datagrams Header checksum : 16 bits one ’ s complement, note that there is no data checksum

12 12 IP Header Details Source address : 32 bits IP source address Destination address : 32 bits IP destination address Option and Padding : (maximum 40 bytes) addition information to control functions such as routing and security

13 13 Type of Service in some Internet Protocol ApplicationDTRC TELNET1000Minimize delay FTP control data 1010 0101 0000 0000 Minimize delay Maximize throughput Meaning From RFC 1349 TFTP1000Minimize delay SMTP command phase data phase 1010 0101 0000 0000 Minimize delay Maximize throughput DNS UDP query TCP query zone transfer SNMPMaximize reliability0010 100100 001001 000000 000000 Minimize delay Maximize throughput

14 14 Routing Process of choosing a path over which to send datagrams IP routes packet by looking at the IP network number Routing components –determine what path are available –selecting the best path for a particular purpose –using those paths to reach other network devices which perform routing are routers (Historically call IP gateways)

15 15 Routing Table Every router contains a routing table of the network numbers The table record –Which connection can be used to reach a particular network –plus some indication of the performance or cost of using connection

16 16 Routing Table Form Routing table form network, gateway, other

17 17 Routing Protocol Routing protocol manages and updates routing table on each network node UNIX often implemented using one of the two daemons –routed : basic routing daemon for interior routing, normally with RIP –gated : sophisticated daemon for interior and exterior routing, with additional protocol such as OSPF, BGP

18 18 Fragmentation Fragmentation : processed used by IP to reduced size of datagram that are too long for network interface MTU e.g. fragment 2000 bytes to Ethernet MTU 1500 Bytes fragmentation should be reassembled at final destination (expensive process) how? –each fragment has it own header –each fragment carries the same 16 bits identification header –each fragment must be aligned with eight-octet boundary

19 19 Fragmentation Flag Identification number –16 bits integer value used to identify all fragments –This ID is not a sequence number Flags : 3 bits control fragmentation Fragment offset : indicate the distance of fragment data from the start of original datagram, measure in 8 octets unit RDFMF 0 = last fragment 1 = more fragment 0 = may fragment 1 = don ’ t fragment Reserve must be 0

20 20 Fragmentation ……..232000..2000...232100.. 1479...23201851480.. 2000 original Ethernet with MTU 1500 20 bytes Other headeridentflagsoffsetdata Identification number More fragment Post 0 Last fragment Post 185 * 8 = 1480

21 21 Problem in fragmentation The end node has know way of knowing how many fragments there be. The end node has to manage enough buffer space to handle reassembly process. If any fragments lost, all datagram must be discarded End node starts a timer when received the first fragment, if any fragments fails to alive(usually 30 sec), all datagrams must be discarded Since the IP service is connectionless. No attempt is made by IP to recover these situations, though ICMP error massage may be generated

22 22 Avoiding Fragmentation For datagrams with in the same physical network, the MTU is known. TCP/UDP then use the MTU to limit the message size pass to IP, message will never be fragmented. For datagram pass to difference network, unknown MTU. Standard recommend that all networks supporting TCP/IP have an MTU of at least 576 bytes 512 bytes data + 20 bytes TCP header + 20 bytes IP header with options to guarantee that a packet of 576 bytes or less is never fragmented


Download ppt "1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong."

Similar presentations


Ads by Google