TCP/IP
Transmission Control Protocol / Internet Protocol
OSI 7 LAYERS
= " All People Seem To Need Data Professionals!"The TCP/IP layers Versus OSI model

The following services use TCP protocol:
DNS, SMTP,FTP,Telnet, NTP, HTTP, X-windows,
The following Services use UDP protocol:
DNS, SNMP,DHCP, BooTP,NTP, TFTP,
We find in the network layer several protocols:
RFC 792 . Ensured that the ICMP message will find appropriate
host within a group of subnets. Example of service: Ping command.
address that do not know yet their IP address (example Diskless PC)

IP Address Space
An IP Address is 32 bits in length. A unique IP Address is required for all hosts using TCP/IP.
|
IP Address |
|||||||||||||||||||||||||||||||
|
32 BITS |
|||||||||||||||||||||||||||||||
|
8 bits or 1 byte |
8 bits or 1 byte |
8 bits or 1 byte |
8 bits or 1 byte |
||||||||||||||||||||||||||||
|
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
1 or 0 |
|
First Octet |
Second Octet |
Third Octet |
Fourth Octet |
||||||||||||||||||||||||||||
|
0-255 dotted decimal notation |
0-255 dotted decimal notation |
0-255 dotted decimal notation |
0-255 dotted decimal notation |
||||||||||||||||||||||||||||
|
(255-0)+1 = 256 different possible decimal numbers |
(255-0)+1 = 256 different possible decimal numbers |
(255-0)+1 = 256 different possible decimal numbers |
(255-0)+1 = 256 different possible decimal numbers |
||||||||||||||||||||||||||||
Structure of the IP address
|
4 octets |
1st Octet |
2nd Octet |
3rd Octet |
4th Octet |
|
32 bits |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
Classes of IP .(
The usable range restrictions)Certain addresses in the IP address space have been reserved for special purposes, and are not allowed as host addresses. The rules for these IP address are
Broadcast
|
Address Class |
Bit Pattern in the 1st Octet |
Range of Address |
|
|
7 6 5 4 3 2 1 0 bits |
|
|
Class A |
0 x x x x x x x |
1 - 126 |
|
Class B |
1 0 x x x x x x |
128 - 191 |
|
Class C |
1 1 0 x x x x x |
192 - 223 |
|
Class D |
1 1 1 0 x x x x |
224 - 239 |
|
Class E |
1 1 1 1 x x x x |
240 - 255 |
|
CLASS |
Subnet Mask |
Network bits |
Network |
Host Bits |
Host |
|
Class A |
255.0.0.0 |
8 |
126 |
24 |
15,777,206 |
|
Class B |
255.255.0.0 |
16 |
16,383 |
16 |
65,533 |
|
Class C |
255.255.255.0 |
24 |
2,097,151 |
8 |
254 |
|
|
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
|
Base 2 (Binary) |
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|
Base 16 (Hex) |
268,435,456 |
16,777,216 |
1,048,576 |
65,536 |
4, 096 |
256 |
16 |
1 |
|
Sub-net Bits |
Class A host |
Class B Host |
Class C host |
|
0 |
16,777,214 |
65,534 |
254 |
|
1 |
8,388,606 |
32,766 |
126 |
|
2 |
4,194,302 |
16,382 |
62 |
|
3 |
2,097,150 |
8,190 |
30 |
|
4 |
1,048,574 |
4,094 |
14 |
|
5 |
524,286 |
2,094 |
6 |
|
6 |
262,142 |
1,022 |
2 |
|
7 |
131,070 |
510 |
-- |
|
8 |
65,533 |
254 |
-- |
|
Sub-net Bits |
First Sub-net |
Interval Between Sub-net |
Number of Sub-nets |
|
2 |
64 |
64 |
2 |
|
3 |
32 |
32 |
6 |
|
4 |
16 |
16 |
14 |
|
5 |
8 |
8 |
30 |
|
6 |
4 |
4 |
62 |
|
7 |
2 |
2 |
126 |
|
8 |
1 |
1 |
254 |
|
Bits Added To Mask |
Decimal Value |
Number of Subnet |
|
1 |
128 |
0 |
|
2 |
192 |
2 |
|
3 |
224 |
6 |
|
4 |
240 |
14 |
|
5 |
248 |
30 |
|
6 |
252 |
62 |
|
7 |
254 |
126 |
|
8 |
255 |
254 |
|
9 |
255.128 |
510 |
|
10 |
255.192 |
1022 |
|
11 |
255.224 |
2046 |
|
12 |
255.240 |
4094 |
|
13 |
255.248 |
8190 |
|
14 |
255.252 |
16,382 |
|
15 |
255.254 |
32,766 |
|
16 |
255.255 |
65,534 |
|
SubNet Bit Pattern 3rd Octect |
Subnet Value |
Subnet Address |
|
||
|
000xxxxx |
0 |
135.120.0.0 |
Not Usable |
||
|
001xxxxx |
32 |
135.120.32.0 |
Ok |
||
|
010xxxxx |
64 |
135.120.64.0 |
Ok |
||
|
011xxxxx |
96 |
135.120.96.0 |
Ok |
||
|
100xxxxx |
128 |
135.120.128.0 |
Ok |
||
|
101xxxxx |
160 |
135.120.160.0 |
Ok |
||
|
110xxxxx |
192 |
135.120.192.0 |
Ok |
||
|
111xxxxx |
224 |
135.120.224.0 |
Not Usable |
||
|
Function |
Example |
Comments |
|||
|
135.120.32.0 |
|
|||
|
First Host |
135.120.32.1 |
|
|||
|
Last Host |
135.120.32.254 |
|
|||
|
Sub-Net BroadCast |
135.120.32.255 |
|
|||
|
135.120.64.0 |
|
|||
|
Bits |
1st Octet Network |
2nd Octet Network |
3rd Octet Network |
4thOctect Host |
|
Total Available |
|
|
Borrow |
76543210 |
76543210 |
76543210 |
7 6 5 4 3 2 1 0 |
|
Network |
Host |
|
0 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
0 0 0 0 0 0 0 0 |
|
1 |
256 |
|
1 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 0 0 0 0 0 0 0 |
|
2 |
128 |
|
2 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 1 0 0 0 0 0 0 |
|
4 |
64 |
|
3 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 1 1 0 0 0 0 0 |
|
8 |
32 |
|
4 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 1 1 1 0 0 0 0 |
|
16 |
16 |
|
5 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 1 1 1 1 0 0 0 |
|
32 |
8 |
|
6 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 1 1 1 1 1 0 0 |
|
64 |
4 |
|
7 |
Xxxxxxxx |
Xxxxxxxx |
Xxxxxxxx |
1 1 1 1 1 1 1 0 |
|
128 |
2 |
|
Network |
First |
Fixed High |
# of Networks |
# of Hosts per network |
|
Class C |
192 - 223 |
110 |
(2^21) = 2, 097,152 |
(2^8) - 2 = 254 |
2 Subnets and 62 Hosts per Subnet
|
Subnet |
Host Range |
|
1 |
(x . x . x .65 ) - (x . x . x .126 ) |
|
2 |
(x . x . x .129 ) - (x . x . x .190 ) |
|
|
|
6 Subnets and 30 Hosts per Subnet
|
Subnet |
Host Range |
|
1 |
( x . x . x . 33 ) - ( x . x . x . 62 ) |
|
2 |
( x . x . x . 65 ) - ( x . x . x . 94 ) |
|
3 |
( x . x . x . 97 ) - ( x . x . x . 126 ) |
|
4 |
( x . x . x . 129) - ( x . x . x . 158 ) |
|
5 |
( x . x . x . 161) - ( x . x . x . 190 ) |
|
6 |
( x . x . x . 193) - ( x . x . x . 222 ) |
14 Subnets and 14 Hosts per Subnet
|
Subnet |
Host Range |
|
1 |
(x . x . x .17 ) - (x . x . x .30 ) |
|
2 |
(x . x . x .33 ) - (x . x . x .46 ) |
|
3 |
(x . x . x .49 ) - (x . x . x .62 ) |
|
4 |
(x . x . x .65 ) - (x . x . x .78 ) |
|
5 |
(x . x . x .81 ) - (x . x . x .94 ) |
|
6 |
(x . x . x .97 ) - (x . x . x .110 ) |
|
7 |
(x . x . x .113 ) - (x . x . x .126 ) |
|
8 |
(x . x . x .129 ) - (x . x . x .142 ) |
|
9 |
(x . x . x .145 ) - (x . x . x .158 ) |
|
10 |
(x . x . x .161 ) - (x . x . x .174 ) |
|
11 |
(x . x . x .177 ) - (x . x . x .190 ) |
|
12 |
(x . x . x .193 ) - (x . x . x .206 ) |
|
13 |
(x . x . x .209 ) - (x . x . x .222 ) |
|
14 |
(x . x . x .225 ) - (x . x . x .238 ) |
Other Sub-Nets for 5 and 6 bits results in
255.255.255.
30 Subnets 6 Hosts per Subnet
62 Subnets 2 Hosts per Subnet
|
Dec |
Hex |
|
Dec |
Hex |
|
Dec |
Hex |
|
Dec |
Hex |
|
Dec |
Hex |
|
Dec |
Hex |
|
Dec |
Hex |
|
Dec |
Hex |
|
0 |
0 |
|
32 |
20 |
|
64 |
40 |
|
96 |
60 |
|
128 |
80 |
|
160 |
a0 |
|
192 |
c0 |
|
224 |
e0 |
|
1 |
1 |
|
33 |
21 |
|
65 |
41 |
|
97 |
61 |
|
129 |
81 |
|
161 |
a1 |
|
193 |
c1 |
|
225 |
e1 |
|
2 |
2 |
|
34 |
22 |
|
66 |
42 |
|
98 |
62 |
|
130 |
82 |
|
162 |
a2 |
|
194 |
c2 |
|
226 |
e2 |
|
3 |
3 |
|
35 |
23 |
|
67 |
43 |
|
99 |
63 |
|
131 |
83 |
|
163 |
a3 |
|
195 |
c3 |
|
227 |
e3 |
|
4 |
4 |
|
36 |
24 |
|
68 |
44 |
|
100 |
64 |
|
132 |
84 |
|
164 |
a4 |
|
196 |
c4 |
|
228 |
e4 |
|
5 |
5 |
|
37 |
25 |
|
69 |
45 |
|
101 |
65 |
|
133 |
85 |
|
165 |
a5 |
|
197 |
c5 |
|
229 |
e5 |
|
6 |
6 |
|
38 |
26 |
|
70 |
46 |
|
102 |
66 |
|
134 |
86 |
|
166 |
a6 |
|
198 |
c6 |
|
230 |
e6 |
|
7 |
7 |
|
39 |
27 |
|
71 |
47 |
|
103 |
67 |
|
135 |
87 |
|
167 |
a7 |
|
199 |
c7 |
|
231 |
e7 |
|
8 |
8 |
|
40 |
28 |
|
72 |
48 |
|
104 |
68 |
|
136 |
88 |
|
168 |
a8 |
|
200 |
c8 |
|
232 |
e8 |
|
9 |
9 |
|
41 |
29 |
|
73 |
49 |
|
105 |
69 |
|
137 |
89 |
|
169 |
a9 |
|
201 |
c9 |
|
233 |
e9 |
|
10 |
a |
|
42 |
2a |
|
74 |
4a |
|
106 |
6a |
|
138 |
8a |
|
170 |
aa |
|
202 |
Ca |
|
234 |
ea |
|
11 |
b |
|
43 |
2b |
|
75 |
4b |
|
107 |
6b |
|
139 |
8b |
|
171 |
ab |
|
203 |
Cb |
|
235 |
eb |
|
12 |
c |
|
44 |
2c |
|
76 |
4c |
|
108 |
6c |
|
140 |
8c |
|
172 |
ac |
|
204 |
Cc |
|
236 |
ec |
|
13 |
d |
|
45 |
2d |
|
77 |
4d |
|
109 |
6d |
|
141 |
8d |
|
173 |
ad |
|
205 |
Cd |
|
237 |
ed |
|
14 |
e |
|
46 |
2e |
|
78 |
4e |
|
110 |
6e |
|
142 |
8e |
|
174 |
ae |
|
206 |
Ce |
|
238 |
ee |
|
15 |
f |
|
47 |
2f |
|
79 |
4f |
|
111 |
6f |
|
143 |
8f |
|
175 |
af |
|
207 |
Cf |
|
239 |
ef |
|
16 |
10 |
|
48 |
30 |
|
80 |
50 |
|
112 |
70 |
|
144 |
90 |
|
176 |
b0 |
|
208 |
d0 |
|
240 |
f0 |
|
17 |
11 |
|
49 |
31 |
|
81 |
51 |
|
113 |
71 |
|
145 |
91 |
|
177 |
b1 |
|
209 |
d1 |
|
241 |
f1 |
|
18 |
12 |
|
50 |
32 |
|
82 |
52 |
|
114 |
72 |
|
146 |
92 |
|
178 |
b2 |
|
210 |
d2 |
|
242 |
f2 |
|
19 |
13 |
|
51 |
33 |
|
83 |
53 |
|
115 |
73 |
|
147 |
93 |
|
179 |
b3 |
|
211 |
d3 |
|
243 |
f3 |
|
20 |
14 |
|
52 |
34 |
|
84 |
54 |
|
116 |
74 |
|
148 |
94 |
|
180 |
b4 |
|
212 |
d4 |
|
244 |
f4 |
|
21 |
15 |
|
53 |
35 |
|
85 |
55 |
|
117 |
75 |
|
149 |
95 |
|
181 |
b5 |
|
213 |
d5 |
|
245 |
f5 |
|
22 |
16 |
|
54 |
36 |
|
86 |
56 |
|
118 |
76 |
|
150 |
96 |
|
182 |
b6 |
|
214 |
d6 |
|
246 |
f6 |
|
23 |
17 |
|
55 |
37 |
|
87 |
57 |
|
119 |
77 |
|
151 |
97 |
|
183 |
b7 |
|
215 |
d7 |
|
247 |
f7 |
|
24 |
18 |
|
56 |
38 |
|
88 |
58 |
|
120 |
78 |
|
152 |
98 |
|
184 |
b8 |
|
216 |
d8 |
|
248 |
f8 |
|
25 |
19 |
|
57 |
39 |
|
89 |
59 |
|
121 |
79 |
|
153 |
99 |
|
185 |
b9 |
|
216 |
d9 |
|
249 |
f9 |
|
26 |
1a |
|
58 |
3a |
|
90 |
5a |
|
122 |
7a |
|
154 |
9a |
|
186 |
ba |
|
218 |
da |
|
250 |
fa |
|
27 |
1b |
|
59 |
3b |
|
91 |
5b |
|
123 |
7b |
|
155 |
9b |
|
187 |
bb |
|
219 |
db |
|
251 |
fb |
|
28 |
1c |
|
60 |
3c |
|
92 |
5c |
|
124 |
7c |
|
156 |
9c |
|
188 |
bc |
|
220 |
dc |
|
252 |
fc |
|
29 |
1d |
|
61 |
3d |
|
93 |
5d |
|
125 |
7d |
|
157 |
9d |
|
189 |
bd |
|
221 |
dd |
|
253 |
fd |
|
30 |
1e |
|
62 |
3e |
|
94 |
5e |
|
126 |
7e |
|
158 |
9e |
|
190 |
be |
|
222 |
de |
|
254 |
fe |
|
31 |
1f |
|
63 |
3f |
|
95 |
5f |
|
127 |
7f |
|
159 |
9f |
|
191 |
bf |
|
223 |
df |
|
255 |
ff |