Introduction to TCP/IP
Dec 21, 2015
Introduction to TCP/IP
Protocols are a set of rules that govern how computers exchange data over a network
There is two type of protocols: LAN protocols: defines how
communication is carried out over various LAN media
Exp: NetBEUI, IPX/SPX, TCP/IP WAN protocols: defines how
communication is carried out over various WAN media
Exp: SLIP, HDLC,PPP
TCP/IP
The Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols was developed as a part of the research done by the Defense Advanced Research Projects Agency (DARPA)
It is the protocol of the internet It is route information from the source to destination by
performing the following tasks: Defining the packet and addressing the scheme Moving data between link layer and transport layer Routing the packets to remote hosts Performing fragmentation and reassembly of packets
TCP/IP suite protocols
IP (Internet protocol)Best effort delivery routing of the packetsConnectionless and unreliable
ICMP ( Internet Control Message Protocol)Defines an small number of messages used for
diagnostic and management purposesICMP uses IP to carry out the following function:
• Announces network error• Announces network congestion• Assists troubleshooting • Announces timeouts
Cont…
ARP ( Address Resolution Protocol) Determine the MAC address for known IP
address Two messages ARP Request and ARP reply
RARP ( Reverse Address Resolution Protocol) Determine the IP address when MAC address
known Two messages RARP Request and RARP reply
Cont...
DHCP (Dynamic Host Configuration Protocol) Provides automatic configuration of IP addresses
DNS (Domain Name System) Resolves hosts names to their respective IP
addresses
SNMP Simple network management protocol Monitor remote devices
Cont…
SMTP (Simple mail Transfer protocol) Transfer mail over internet
NNTP ( Network News Transfer protocol) Used to setup Bulletin Discussions over internet
FTP ( File Transfer protocol) Download or upload files over internet Uses connection oriented protocol (TCP)
TFTP ( Trivial File Transfer protocol) Copy files from one device to anther Uses a connectionless protocol (UDP)
IP Addressing
Different devices within an internetwork are identified by an IP address
IP address
Network ID
Host ID
Uniquely identifiesnetwork to which host is attached
Identifies hostuniquely given the
network
Cont…
The network part has not been allocated a fixed address space
It is 32 bits, dotted-decimal notation, 4 byte
Network Host
0-2550-2550-2550-255
Cont…
0.0.0.0 reserved for network addresses 255.255.255.255 reserved for broadcast
address Numbers assigned to network or host 1-254
Subnet Mask
To determine which part from the IP address is network ID and which is Host ID
Anding operation with the IP address to determine the network address
Cont…
0010 0010 . 0011 0000 . 0011 0110 . 0001 1011 36 . 48 . 54 .27
1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 255.255.255. 0
0010 0010 . 0011 0000 . 0011 0110 . 0000 0000 36 . 48 . 54 . 0
36.48.54.255
36.48.255.255
36.255.255.255
Default Gateway (router)
The network ID of the destination used to check whether the destination is in the same network with the computer or not
Yes, use the ARP to determine the MAC address and forward the frame to it
No, send it to the router (using the ip of the router) and the router looks into the Routing table for the destination network and forwarding the packet to the corresponding interface.
IP address classes
A001 to 126224 – 2 = 16,777,214
B128 to 191216- 2 = 65,534
C192 to 22328- 2 = 254
D224 to 239
E240 to 254
Problems
IPv4 address scheme is limited by its 32 bits problems for the long-term growth of the internet
Class D and class E reserved Networks 0.0.0.0 , 255.0.0.0 , 127.0.0.0 are reserved for
protocol operations
Class A and Class B addresses were gone and goes to individual organizations like HP (3 As) unused IP addresses within these blocks is very large
Class C networks used to entire country in some countries in Asia and Africa because they arrive late to the internet
limited number of hosts
reduce the number of available globally unique IP address
Cont…
The global internet routing table is huge and continues to grow go beyond the capacity of routers
Solutions
Subnet masking Address allocation for private internet Hierarchical addressing Variable-length subnet masks Route summarization Classes interdomain routing Network address translation
Subnet addressing
Networks divided into subnets thus saving IP address spaces, reduce broadcasting and use the network address more efficient
Done by reserving bits from host address• Any number of bits can be borrowed as
long as two bits remain.• Computers see subnetwork address in 3
parts ( Net,subnet,host )
Subnetting a class C network
In a class C network (exp: 200.36.48.0)Network address part 200.36.48 can’t be
changeReserved bits from host part
• Reserving one bit : cannot be use to create subnet because only two numbers are possible 0,1 . 0 reserved for networks while 1 reserved for broadcasting
• Minimum two bits for subnetting
Cont…
With to bits , 4 numbers are possible00 reserved for network
01 200.36.48.01000000 200.36.48.6410 200.36.48.10000000
200.36.48.12811 Reserved for broadcast
The direct broadcast address for the produced two subnet will be:200.36.48.01111111 200.36.48.127200.36.48.10111111 200.36.48.191
Cont...
From the remaining 6 bits in the host part 62 hosts
The range of IP addresses in each subnet:
1. 200.36.01000001 to 200.36.01111110
200.36.48.65 to 200.36.48.126
2. 200.36.10000001 to 200.36.10111110
200.36.48.129 to 200.36.48.190
The default subnet mask for this network will be
255.255.255.11000000 255.255.255.192
In a class C network
Cont…
See in the notesSubnetting in class C using 3 bitsClass B Subnetting
Private addressing
IP can be assigned to devices in private network .But this IPs may conflict with IPs over the internet
Sol1: assigned to them public IP address exhausting IP address space
Sol2: use IP networks numbers called private internets must be no internet connectivity
Cont…
Address Allocation for Private Internets
It is a set of networks that will never be assigned to any organization as a registered network number
IPv6 Is the successor to the currently used IPv4 Specification completed in 1994 Makes improvements to IPv4 (no revolutionary
changes) significant increase of the IP address to 128 bits
(16 bytes) IPv6 will solve – for the foreseeable future – the
problems with IP addressing IPv4 has a maximum of 232 4 billion addresses IPv6 has a maximum of 2128 = (232)4 4 billion x 4
billion x 4 billion x 4 billion addresses improves routing, security and
Quality of Service (QoS)
Cont…
The 128-bit IPv6 address is written as eight 16-bit integers (using hexadecimal digits for each integer)
Exp:
CEDF:BP76:3245:4464:FACE:2E50:3025:DF12
IPv6 Prefix (subnet mask)
IPv4 subnet mask called as address prefix in IPv6 and it used to determine which part of the IP is network ID and which is host ID
Its format: the IP address with a slash (/) followed by the prefix length
Exp: CEDF:BP76:3245:4464:FACE:2E50:3025:DF12 /64
The prefix is a decimal value that indicates the number of high order contiguous bits that is the network portion of the IP address