TCP/IP BASICS
TCP/IP and the OSI Model
TCP/IP BASICS The network protocol of the Internet Composed of six main protocols IP Internet Protocol UDP User Datagram Protocol TCP Transmission Control Protocol ARP Address Resolution Protocol ICMP Internet Control Message Protocol IGMP Internet Group Message Protocol
Internet Protocol Works at layer 3 of the OSI model Responsible for routing packets to the correct destination Allows interconnecting large numbers of sub networks Every device must have a unique IP address
User Datagram Protocol Connectionless Does not guarantee delivery Does not maintain packet sequence Implements ports for multiplexing information between applications Provides for a checksum value for data integrity
Transmission Control Protocol Connection based Guarantees delivery Maintain packet sequence Implements ports for multiplexing information between applications Provides for a checksum value for data integrity
Address Resolution Protocol Used to resolve an IP address to an Ethernet (MAC) address Only used for outgoing packets Resolved addresses are stored in the ARP table Remember that the MAC address is set at the factory. The IP address is set by the network administrator
Internet Control Message Protocol Used to pass control information between two computers or routers Used by the ping command Used to report routing problems
Internet Group Message Protocol Controls multicast broadcasts Used to tell routers to pass a multicast IP address
IP Addresses A unique 32 bit number that identifies the device on the IP network Assigned by the network administrator IP addresses are controlled by Internet Assigned Numbers Authority (IANA) Are allocated in blocks
IP Addresses IP addresses are represented in dotted decimal notation Each is number is called an octet An octet is between 0 and 255 (8 bits) An IP address if made up of 4 octets Sample IP addresses 10.20.100.1 127.0.0.1 172.16.13.254 192.168.1.114
IP Addresses 10.20.100.1 Dotted Decimal 10.20.100.1 Binary 00001010 00010100 01100100 00000001 Hex 0A146401 Dotted Hex 0A.14.64.01
IP Addresses 127.0.0.1 Dotted Decimal 127.0.0.1 Binary 01111111 00000000 00000000 00000001 Hex 7F000001 Dotted Hex 7F.00.00.01
IP Addresses 172.16.13.254 Dotted Decimal 172.16.13.254 Binary 10101100 00010000 00001101 11111110 Hex AC100DFE Dotted Hex AC.10.0D.FE
IP Addresses 192.168.1.114 Dotted Decimal 192.168.1.114 Binary 11000000 10101000 00000001 01110010 Hex C0A80172 Dotted Hex C0.A8.01.72
IP Networks IP networks are groups of IP addresses IP networks are assigned based on class type Referred to as networks or nets Computers on the same network are local Computers on different networks are remote
IP Address Classes There are 5 IP address class types CLASS A CLASS B CLASS C CLASS D CLASS E
Class A Used for large sized networks Provides IP addresses for up to 16777214 devices The first number of the dotted quad address is from 1 to 126 The first bit of the binary address is 0
Class B Used for medium sized networks Provides IP addresses for up to 65534 devices The first number of the dotted quad address is from 128 to 191 The first two bits of the binary address are 10
Class C Used for small sized networks Provides IP addresses for up to 254 devices The first number of the dotted quad address is from 192 to 223 The first three bits of the binary address are 110
Class D Used for multicast (see RFC 1112) Designed to be used by large numbers of receiving devices The first number of the dotted quad address is from 224 to 239 The first four bits of the binary address are 1110 244.0.0.1 refers to all connect IP devices on the directly connected network
Class E Reserved for future addressing modes The first number of the dotted quad address is from 240 to 254 The first four bits of the binary address are 1111
The Netmask The Netmask is used to define the local network It is a 32 bit binary number like the IP address It defines the network portion of an IP address
The Netmask The standard netmasks Class A 255.0.0.0 Class B 255.255.0.0 Class C 255.255.255.0
IP Address Parts The IP address is composed of two logical parts Network portion Host portion
IP - Network Portion The network portion is determined by the netmask Every position where the netmask is a one, the corresponding bit in the IP address is part of the network portion
IP - Host Portion The host portion is also determined by the netmask Every position where the netmask is a zero, the corresponding bit in the IP address is part of the host portion
IP Address Samples Sample IP addresses and netmasks IP Address Netmask 10.20.100.1 255.0.0.0 127.0.0.1 255.0.0.0 172.16.13.254 255.255.0.0 192.168.1.114 255.255.255.0
IP Address 10.20.100.1 Address in binary 00001010 00010100 01100100 00000001 Netmask in binary 11111111 00000000 00000000 00000000 Network Portion 00001010 Host Portion 00010100 01100100 00000001
IP Address 127.0.0.1 Address in binary 01111111 00000000 00000000 00000001 Netmask in binary 11111111 00000000 00000000 00000000 Network Portion 01111111 Host Portion 00000000 00000000 00000001
IP Address 172.16.13.254 Address in binary 10101100 00010000 00001101 11111110 Netmask in binary 11111111 11111111 00000000 00000000 Network Portion 10101100 00010000 Host Portion 00001101 11111110
IP Address 192.168.1.114 Address in binary 11000000 10101000 00000001 01110010 Netmask in binary 11111111 11111111 11111111 00000000 Network Portion 11000000 10101000 00000001 Host Portion 01110010
Network Number The network number is the network portion of the IP address combined with a host portion of all zeros 10.0.0.0 127.0.0.0 172.16.0.0 192.168.1.0
IP Network Defined Every host on a local IP network must have the same network number Any destination address that does not have the same network number is remote To communicate with a remote host, a gateway (router) must be used