Embed
Email

tcp ip

Document Sample

Shared by: jinesh gandhi
Stats
views:
15
posted:
12/11/2011
language:
pages:
40
SLIP means Serial Line Internet Protocol. SLIP is the result of the

integration of modem protocols .

It is a simple Internet link protocol conducting neither address or error

control, this is the reason that it is quickly becoming obsolete in

comparison to PPP.

This protocol sends a frame composed only of data to be sent followed by

an end of transmission character (the END character, the ASCII code of

which is 192).

Flag Data Flag









2

The Point-to-Point Protocol (PPP) provides IP packet transport over a serial

link, a connection using a modem and telephone lines, or a cellular handset

using wireless technologies.

PPP physical interface is a serial port, which can be connected to a modem

and allows the use of the Public Switched Telephone Network (PSTN) for

global access.

PPP allows the client computer to receive its information from the host it dials

into. Most internet dial-up connections today are made using PPP over modem

or ISDN.

PPP Frame format :

LCP protocol is used to setup configure, test, maintain and terminate the

link connection.









NCP protocol is a set of control protocols which facilitates the encapsulation

of data coming from network layer protocols into the PPP frame.

SLIP PPP

SLIP is an older protocol and it supported PPP is supported IP and other protocols.

only IP.

Error correction and detection is not Error correction and detection is possible in

possible in this protocol. this protocol.

It does not provides any authentication. It provides authentication and security.



Flag Data Flag Flag Addr Ctrl Protocol Data FCS Flag



SLIP is not an approved Internet standard. PPP is an approved Internet standard.

IP Protocol

• IP protocol is part of the Internet layer of the TCP/IP protocol suite

• Data circulates on the Internet in the form of datagrams (also known as

packets). Datagrams are encapsulated data, i.e. data to which headers are

added relating to information about their transport (such as the

destination IP address).



• IP protocol determines the recipient of the message using 3 fields:

• The IP address field: machine address

• The subnet mask field: a subnet mask enables the IP protocol to establish

the part of the IP address which relates to the network

• The default gateway field: enables the Internet protocol to know which

machine to deliver a datagram to if ever the destination machine is not on

the local area network.

• Version (4 bits): this is the version of IP protocol being used (currently

version 4 IPv4 is being used) in order to verify the validity of the datagram. It

is coded over 4 bits.



• Header length or IHL for Internet Header Length (4 bits): this is the number

of 32 bit words making up the header This field is coded over 4 bits.



• Service type (8 bits): indicates the way in which the datagram must be

processed.



• Total length (16 bits): indicates the total size of the datagram in bytes. The

size of this field being 2 bytes, the total size of the datagram cannot exceed

65536 bytes. Used jointly with the header size, this field makes it possible to

determine where the data is located

• TTL or Time to Live (8 bits): This field specifies the maximum number of

routers through which the datagram may pass. So this field is decremented with

each passage through a router and when it reaches the critical value of 0, the

router destroys the datagram. This prevents the network being overloaded with

lost datagrams.



• Protocol (8 bits): This field, in decimal notation, makes it possible to find out

which protocol the datagram comes from.

• ICMP: 1 • IGMP: 2

• TCP: 6 • UDP: 17



• Header checksum (16 bits): This field contains a value coded over 16 bits

which enables the integrity of the header to be monitored in order to establish

whether it has been altered during transmission. The checksum is the addition

of one to all the 16 bit words of the header (checksum field excluded). This is

done so that when the header fields are added together (inclusive checksum), a

number with all the bits positioned at 1 is obtained.



• Source IP address (32 bits): This field represents the IP address of the

originator machine, it enables the recipient to respond.

• Destination IP address (32 bits): IP address of the message recipient.

• Fragmentation of IP datagrams



• As we have previously seen, the maximum size of a datagram is 65536

bytes. However, this value is never reached because networks do not have

sufficient capacity to send such large packets. In addition, networks on the

Internet use different technologies and the maximum size of a datagram

varies depending on the network type.



• The maximum size of a frame is called the MTU (Maximum Transfer

Unit); it will lead to the fragmentation of the datagram if it is larger than the

network's MTU.

• To take into account fragmentation, each datagram has several fields permitting

their reassembly:

• Fragment offset field (13 bits): field providing the position of the beginning of the

fragment in the initial datagram. The unit of measure for this field is 8 bytes (the first

fragment having a zero value).

Offset = 0/8 = 0

0 1399





Big original packet



Offset = 1400/8 =175

1400 2799

Byte Byte

0 3999









Offset = 2400/8 = 350

2400 3999



• Identification field (16 bits): number allocated to each fragment in order to enable

reassembly.



• Total length field (16 bits): this is recalculated for each fragment.

•Flag field (3 bits): this comprises of three bits:

–The first is not used.

–The second (called DF: Don't Fragment) indicates if the datagram can be fragmented

or not. If a datagram has this bit positioned at one and the router cannot route it without

fragmenting it, the datagram is rejected with an error message.

–The second (called MF: More Fragments), indicates if the datagram is a fragment of

data (1). If the indicator is at zero, this indicates that the fragment is the last (so the

router must be in possession of all the previous fragments) or the datagram has not

been subject to fragmentation.



3 Bit flag field







This is called as more Bit 1 is reserved

fragmentation bit This is don’t fragment bit







•Options: Options are not required for every datagram. They are used for network testing

and Debugging

• Internet Protocol version 6 (IPv6) is a network layer for packet-switched internetworks.

It is designated as the successor of IPv4, the current version of the Internet Protocol, for

general use on the Internet.



• The main change brought by IPv6 is a much larger address space that allows greater

flexibility in assigning addresses.



• IPv6 has has 128 bit address space which is four time wider in bits in compared to

• IPv4 which has 32 bit address space.

• Example of IPv4



192.168.0.1



• Example of IPv6



FEDC:BA98:7654:3210:FEDC:BA98:7654:3210

The fields in the IPv6 header format are defined as follows:



Version indicates the IP version (in this case, 6).



Payload Length is the length of the IP packet, excluding this header, in octets.

Extension headers, discussed in the next section, are considered part of the

payload and are therefore included in this length.



Next Header is the value identifying the header immediately following the IPv6

header. The next header is either an upper-layer header (such as ICMP, TCP,

or UDP) or it is an IPv6 extension header.



Hop Limit is same as TTL in IPv4.



Source Address/Destination Address are 128-bit fields for the IPv6 source

and destination addresses.

 IPv6 Provides authentication and privacy using options in the

extension header.

• This protocol works at Internet layer of TCP/IP reference

model



• The ICMP reports errors and sends control message on behalf

of IP



• The ICMP messages are encapsulated inside IP Datagram (

The value of The protocol field in the IP datagram is 1 to

indicate that the IP datagram is an ICMP Message)

• Ping command uses ICMP as a base to test whether the Destination

is reachable or not



• Ping command Verifies IP-level connectivity to another TCP/IP

computer by sending Internet Control Message Protocol (ICMP)

Echo Request messages. The receipt of corresponding Echo Reply

messages are displayed if Destination is reachable.



• When a router cannot forward or deliver an IP Packet, it sends a

destination unreachable message back to source.

Example C:\> ping 192.168.0.4 –t



• Another Utility that uses ICMP is trace route (tracert command),

which provide List of all the router along the path to a specified

location

Example C:\> tracert www.sify.com

• This protocol used in Transport layer of TCP/IP reference model.



• TCP is reliable and connection oriented protocol.

Meanings of the different fields:



• Source port (16 bits): Port related to the application in progress on the source

machine .



• Destination port (16 bits): Port related to the application in progress on the

destination machine.



• Sequence number (32 bits): When the SYN flag is set to 0, the sequence

number is that of the first word of the current segment.

When SYN is set to 1, the sequence number is equal to the initial sequence number

used to synchronies the sequence numbers (ISN).



• Acknowledgement number (32 bits): The acknowledgement number, also

called the acquittal number relates to the (sequence) number of the last segment

expected and not the number of the last segment received.

• Data offset (4 bits): This makes it possible to locate the start of the data in the packet.

Here, the offset is vital because the option field is a variable size .





• Reserved (6 bits): A currently unused field but provided for future use.





• Flags (6x1 bit): The flags represent additional information:

– URG: if this flag is set to 1 the packet must be processed urgently

– ACK: if this flag is set to 1 the packet is an acknowledgement.

– PSH (PUSH): if this flag is set to 1 the packet operates according to the PUSH method.

– RST: if this flag is set to 1 the connection is reset.

– SYN: The TCP SYN flag indicates a request to establish a connection.

– FIN: if this flag is set to 1 the connection is interrupted.





• Window (16 bits): Field making it possible to know the number of bytes that the recipient

wants to receive without acknowledgement

• Checksum (CRC): The checksum is conducted by taking the sum of the header data

field, so as to be able to check the integrity of the header.



• Urgent pointer (16 bits): Indicates the sequence number after which information

becomes urgent .



• Options (variable size): Various options.



• Padding: Space remaining after the options is padded with zeros to have a length

which is a multiple of 32 bits .



• Data: Actual information.

• This protocol used in Transport layer of TCP/IP reference model.



• UDP is unreliable and connectionless protocol.

• Source Port (16 bits): The port number of the sender. Cleared to zero if not used.

Like in TCP, this field indicates which application sent the data contained within the IP

packet.



• Destination Port (16 bits): Again, indicates which application is to receive the data

contained within the IP packet.



• Length (16 bits): The length in bytes of the UDP header and the encapsulated data.

The minimum value for this field is 8. Since all UDP headers are 8 bytes long, if you

subtract 8 from this number you'll find out the size of the data being sent.



• Checksum (16 bits): Since UDP is not responsible for ensuring that the data actually

arrives, a checksum is optional. If the checksum is cleared to zero, then checksum is

disabled. If the computed checksum is zero, then this field must be set to 0xFFFF.



• Data: Again, this will be the actual data being sent and will not include any additional

headers.

• An IP (Internet Protocol) address is a unique identifier for a node or host connection

on an IP network.



• An IP address is a 32 bit binary number usually represented as 4 decimal values,

each representing 8 bits, in the range 0 to 255 (known as octets) separated by

decimal points. This is known as "dotted decimal" notation.

Example: 140.179.220.200



• It is sometimes useful to view the values in their binary form.

140 .179 .220 .200

10001100.10110011.11011100.11001000



• Every IP address consists of two parts, one identifying the network and one

identifying the node. The Class of the address and the subnet mask determine which

part belongs to the network address and which part belongs to the node address.

• There are 5 different address classes. You can determine which class any IP address

is in by examining the first 4 bits of the IP address.

• Class A addresses begin with 0xxx, or 1 to 126 decimal.

• Class B addresses begin with 10xx, or 128 to 191 decimal.

• Class C addresses begin with 110x, or 192 to 223 decimal.

• Class D addresses begin with 1110, or 224 to 239 decimal.

• Class E addresses begin with 1111, or 240 to 254 decimal.

• An address mask determines which portion of an IP address identifies the

network and which portion identifies the Host.

• Like the IP address the Mask is represented by four octets.

• If a given bit a Mask is 1, corresponding bit of IP address is in the network

portion of the Address, and if given bit Mask is 0, the corresponding bit of the IP

address is in Host portion.

• For ex: consider class C address 192.15.28.16. In the given IP address

192.15.28 correspond to network address and 16 correspond to Host address.

• So as to differentiate Network and Host addresses we have to use Mask

255.255.255.0

A Subnet mask used to determine what subnet an IP address belongs

to.

An IP address has two components, the network address and the host

address.

For example, consider the IP address 150.215.017.009.

Assuming

this is part of a Class B network, the first two numbers (150.215) represent

the Class B network address, and the second two numbers (017.009) identify

a particular host on this network.

Continue…

• Subnetting enables the network administrator to further divide the host part

of the address into two or more subnets.



In this case, a part of the host address is reserved to identify the particular subnet.

• This is easier to see if 150.215.017.009

• we show the IP address in binary format.

• The full address is:



• 10010110.11010111.00010001.00001001



• The Class B network part is:

• 10010110.11010111



• and the host address is

• 00010001.00001001

• If this network is divided into 14 subnets, however, then the first 4 bits of the

host address are reserved for identifying the subnet.

• The subnet mask is the network address plus the bits reserved for identifying

the sub network. (By convention, the bits for the network address are all set to

1, though it would also work if the bits were set exactly as in the network

address.) In this case, therefore, the subnet mask would be

11111111.11111111.11110000.00000000



• It's called a mask because it can be used to identify the subnet to which an IP

address belongs by performing a bitwise AND operation on the mask and

the IP address. The result is the subnetwork address:



Subnet Mask 255.255.240.000 11111111.11111111.11110000.00000000

IP Address 50.215.017.009 10010110.11010111.00010001.00001001

Subnet Address 150.215.016.000 10010110.11010111.00010000.00000000



The subnet address, therefore, is 150.215.016.000.

Registered and Unregistered IP Address



• Registered IP address are required for computers which are accessible

from the Internet but not every computer that is connected to internet

• The workstation use unregistered private IP address. These address are

assigned by the network administrator without obtaining them from an ISP(

Internet service provider) or IANA (Internet assign numbering Authority)

• These are special network addresses in each class. These address are to

be used on private networks and are called unregistered address

We can choose any unregistered address while building

Our own private network



CLASS NETWORK ADDRESS



A 10.0.0.0 through 10.255.255.255



B 172.16.0.0 through 172.31.255.255



C 192.1680.0 through 192.168.255.255


Related docs
Other docs by jinesh gandhi
IEEE 488
Views: 3  |  Downloads: 0
Unguided Mrdeia_ Wireless Communcation_
Views: 14  |  Downloads: 0
Lissajous__curve
Views: 4  |  Downloads: 0
Data link layer
Views: 14  |  Downloads: 0
Distributed Databases
Views: 2  |  Downloads: 0
CDMA BASICS - UKU
Views: 11  |  Downloads: 0
Distributed dbms
Views: 2  |  Downloads: 0
The 8051 Microcontrollers
Views: 11  |  Downloads: 0
Presentation1
Views: 1  |  Downloads: 0
aggregation example
Views: 2  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!