Download Internet Protocol

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Deep packet inspection wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Net bias wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

Distributed firewall wikipedia , lookup

AppleTalk wikipedia , lookup

I²C wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Network tap wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Computer network wikipedia , lookup

Airborne Networking wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
SOHO Networking Basics (IP Addressing)
V1.0 27/03/2006
SOHO Networking Basics
Author’s remarks
 Part of the materials in this set of handout is adapted from Wikipedia and Guide to
Networking Essentials (2nd edition) published by Course Technology.
 This set of materials is co-developed by Chung, C.F. Jeffrey and Alvin C. M. Kwan.
What is Internet Protocol?
The Internet Protocol (IP) is a connectionless protocol (at the network layer of OSI
Model) used by source and destination hosts for communicating data across a packetswitched inter-network. IP is well known as it is the network layer protocol adopted by
the Internet. As a connectionless protocol, IP has the following characteristics:




Data exchange occurs between source and destination hosts with no path setup – IP
can immediately start sending packets
each IP packet is individually routed through the network
Send data across the network to its destination without guaranteeing receipt
Higher layers handle packet sequencing and certain data integrity control issues
IP packets in a connectionless communication are also referred to as datagrams. Figure 1
displays the structures of two IP packets that adopt two different transport layer protocols
– User Datagram Protocol (UDP) and Transmission Control Protocol (TCP).
Teaching remark
 UDP is a connectionless protocol but TCP is a connection oriented protocol. TCP
requires a connection establishment before sending data and a connection termination
on completion of sending data. More succinctly, TCP connections have three phases:
(1) connection establishment; (2) data transfer, and (3) connection termination.
Figure 1. Structures of TCP packet and UDP packets.
1
SOHO Networking Basics (IP Addressing)
V1.0 27/03/2006
For implementing the Internet Protocol, a unique number must be assigned manually or
by Dynamic Host Configuration Protocol (DHCP) server to every device in the network
in order to allow them to identify each other. We called those unique numbers as IP
address. Any participating device – including routers, client computers, servers, and
printers – must have its own address. This allows information passed onwards on behalf
of the sender to indicate where to send it next, and for the receiver of the information to
know that it is the intended destination.
Dynamic IP Allocation with Dynamic Host Configuration Protocol
(DHCP)
Assigning IP addresses to network devices statically have a number of drawbacks.
 Every newly added network device must be manually assigned with an unused IP
address within the network.
 Network devices that are switched off still occupy IP addresses.
 Devices that are moved from a sub-network to another sub-network need to have their
IP addresses altered.
One way to reduce the above effort is to assign an IP address dynamically to each
network device when it is turned on. That can be done with the use of dynamic host
configuration protocol (DHCP), which is a client-server protocol that allows automatic IP
addresses and subnet mask assignment to network devices. Wikipedia has the following
description about the dynamic IP address allocation using DHCP
A network administrator assigns a range of IP addresses to DHCP, and each
client computer on the LAN has its TCP/IP software configured to request an IP
address from the DHCP server when that client computer's network interface
card starts up.
Dynamic IP address allocation can resolve all the mentioned problems regarding the
assignment of static IP address to network devices. Note that dynamic IP address
allocation is not suitable for systems that require a static address, such as web servers.
IP Addressing
IP Address Format (IPv4)
IP address is a logical address of 32-bit long which is written as four numbers separated
by 8-bit octets. Each number ranges from 0 to 255. Thus, the numbers used in IP
addresses range from 0.0.0.0 to 255.255.255.255 in decimal form or
00000000.00000000.00000000.00000000 to 11111111.11111111.11111111.11111111 in
binary form, though some of these values are reserved for specific purposes. An IP
address has specified the particular network a host was attached to, and a rest field, which
gave the address of the host within that network.
2
SOHO Networking Basics (IP Addressing)
V1.0 27/03/2006
IP Address Class
Originally, the 32-bit IP address consisted of an 8-bit network number field which
specified the particular network a host was attached to, and a rest field, which gave the
address of the host within that network. These mean originally, the 32-bit IP address is
designed for a few, large, networks and supported 28=256 networks only. This is
definitively not enough for the modern Internet and LANs. In order to overcome the
problem, the definition of the meaning of IP addresses was changed, to classify 5
different classes IP address and allow 3 different sizes of network and number of host
supported. The five classes are Class A, Class B, Class C, Class D and Class E. The first
three classes of IP addresses are used to large, medium, and small networks whereas the
Classes D and E addresses are normally not used.
The following table introduces you 5 different classes of IP address:
 n indicates a binary slot used for network ID.
 s indicates a binary slot used for host ID.
 x indicates a binary slot (without specified purpose).
Class A (0.0.0.0 – 127.255.255.255)
From: 0.0.0.0 = 00000000.00000000.00000000.00000000
To: 127.255.255.255 = 01111111.11111111.11111111.11111111
Pattern: 0nnnnnnn.ssssssss.ssssssss.ssssssss
Class A IP addresses support large-sized networks and supports 167,77,214 hosts per network.
Class B (128.0.0.0 – 191.255.255.255)
From: 128.0.0.0 = 10000000.00000000.00000000.00000000
To: 191.255.255.255 = 10111111.11111111.11111111.11111111
Pattern: 10nnnnnn.nnnnnnnn.ssssssss.ssssssss
Class B IP addresses support medium-sized networks and supports 65,534 hosts per network.
Class C (192.0.0.0 – 223.255.255.255)
From: 192.0.0.0 = 11000000.00000000.00000000.00000000
To: 223.255.255.225 = 11011111.11111111.11111111.11111111
Pattern: 110nnnnn.nnnnnnnn.nnnnnnnn.ssssssss
Class C IP addresses support small-sized networks and supports 254 hosts per network. We
almost always use Class C in a SOHO network.
Class D (224.0.0.0 – 239.255.255.255) (For multicast only)
From: 224.0.0.0 = 11100000.00000000.00000000.00000000
To: 239.255.255.255 = 11101111.11111111.11111111.11111111
Pattern: 1110XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX
Class D IP addresses will not be used normally.
Class E (240.0.0.0 – 255.255.255.255) (Reserved for the future)
From: 240.0.0.0 = 11110000.00000000.00000000.00000000
To: 255.255.255.255 = 11111111.11111111.11111111.11111111
Pattern: 1111XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX
Class E IP addresses will not be used normally.
Table 1. IP address classes.
3
SOHO Networking Basics (IP Addressing)
V1.0 27/03/2006
Such a change was enough to work in the short run, only. The principal problem was that
most sites were too big for a “class C” network number, and received a “class B” number
instead. With the rapid growth of the Internet, the available pool of class B addresses
(basically 214, or about 16,000 total) was rapidly used up. Classful networking was
replaced by Classless Inter-Domain Routing (CIDR), starting in about 1993, to solve this
problem (and others). However the discussion of CIDR is beyond the scope of the ACSA
and ALCS curricula.
Special Address Ranges
Some IP addresses are reserved for special uses. Table 2 gives some special address
ranges.
Addresses
CIDR Equivalent
Purpose
Class
Total # of
addresses
0.0.0.0 0.255.255.255
0.0.0.0/8
Zero Addresses
A
16,777,216
10.0.0.0 10.255.255.255
10.0.0.0/8
Private IP addresses
A
16,777,216
127.0.0.0 127.255.255.255
127.0.0.0/8
Localhost Loopback
Address
A
16,777,216
169.254.0.0 169.254.255.255
169.254.0.0/16
Zeroconf
B
65,536
172.16.0.0 172.31.255.255
172.16.0.0/12
Private IP addresses
B
1,048,576
192.0.2.0 192.0.2.255
192.0.2.0/24
Documentation and
Examples
C
256
192.88.99.0 192.88.99.255
192.88.99.0/24
IPv6 to IPv4 relay
Anycast
C
256
192.168.0.0 192.168.255.255
192.168.0.0/16
Private IP addresses
C
65,536
4
SOHO Networking Basics (IP Addressing)
198.18.0.0 198.19.255.255
V1.0 27/03/2006
198.18.0.0/15
Network Device
Benchmark
C
131,072
224.0.0.0 239.255.255.255
224.0.0.0/4
Multicast
D
268,435,456
240.0.0.0 255.255.255.255
240.0.0.0/4
Reserved
E
268,435,456
Table 2. Special IP address ranges.
It is important to note that there is a range of IP addresses reserved for private use within
each of the Classes A, B and C. Those addresses are often used for network devices on a
LAN.
Subnet
Sub-network (usually known as a subnet) is the “all ones” bit pattern that masks the
network portion of an IP address in a classful network. Subnetting an IP network allows
you to break down what appears (logically) to be a single large network into smaller ones.
It was introduced to allow a single site to have a number of local area networks. It
reduces the number of entries in the Internet-wide routing table (by hiding information
about all the individual subnets inside a site). As a side benefit, it also resulted in reduced
network overhead, by dividing the parts which receive IP broadcasts. Note that only
devices which have IP address within the same subnet can communicate with each other.
You will need a router for communication between subnets.
A subnet mask is created by setting high-order bits to one in a 32-bit binary number. A
logical AND operation is done on a selected IP address and its subnet mask to compute
the subnet number that the current network device resides. Only network devices of
same subnets can communicate among themselves. Below are some examples regarding
the use of subnet masks.
Example 1:
5
SOHO Networking Basics (IP Addressing)
V1.0 27/03/2006
Example 2:
Example 2: (continued)
Example 3:
Note that a subnet mask must be set to have successive ones followed by successive
zeroes. Thus it is illegal to have a subnet mask of 255.255.255.1 but 255.255.255.128 is
fine.
6