Chapter 7: TCP/IP

ATHENA

Objective

 Converting

• Decimal to binary ( binary to decimal) • Decimal to hexadecimal (hexadecimal to decimal) • Binary to hexadecimal (hexadecimal to binary)

 Understanding TCP/IP

• IP address and Subnetting

 Protocol for  TCP/IP

ATHENA

The Binary System

 Computing devices communicate with 1s

and 0s

 A groups of 8 bits = 1 byte  Binary numbers are based on the powers of 2  because there are only 2 symbols: 0 and 1

 Binary can be converted to decimal in a similar

ATHENA

way that decimal numbers are figured

The Binary System (2)

 Binary can be converted to decimal in a similar

 Example: 1010

way that decimal numbers are figured

= (1x23)+(0x22)+(1x21)+(0x20)

= (1x8)+(0x4)+(1x2)+(0x1)

=    8    +   0    +  2    +  0

ATHENA

1010 =   10

The Decimal System

 Humans use the decimal number system base on

 10 symbols are used: 0,1,2,3,4,5,6,7,8,9 

the powers of 10

ATHENA

In a decimal number, each symbol represents 10  raised to a power according to its position that  is then multiplied by that position

The Decimal System (2)

 Example:

261 = (2 x 102) + (6 x 101) + (1 x 100)

(2 x 100) + (6 x 10) + (1 x 1)

ATHENA

261 =     200    +    60     +   1

The Decimal System (3)

 Converting decimal to binary:

• Example: 49

– 49/2 = 24 with a remainder of  1 – 24/2 = 12 with a remainder of  0 – 12/2 = 6 with a remainder of  0 – 6/2 = 3 with a remainder of  0 – 3/2  = 1 with a remainder of  1 – 1/2  = 0 with a remainder of  1 – 49  = 110001

ATHENA

The Hexadecimal System

 A hexadecimal system based on power of the

 16 symbols are used:

number 16

 Example:

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

7FA2 = (7x163) + (Fx162) + (Ax161) + (2x160)

7FA2 =  28672  +    3840  +   160      +    2

ATHENA

7FA2 =  32674

The Hexadecimal System (2)

 Converting decimal to hexadecimal:

• Example: 127

– 127/16 =  7 with a remainder of 15 (F) – 127      =  7F

ATHENA

The Hexadecimal System (3)

 Converting hexadecimal to binary by divide

0

1

2

3

Binary         Dec        Hexa 0000 0 0001 1 0010 2 0011 3 0100 4

4

ATHENA

binary to 4 bit groups:

The Hexadecimal System (4)

5

6

7

8

Binary Dec        Hexa 0101 5 0110 6 0111 7 1000 8 1001 9

9

ATHENA

The Hexadecimal System (5)

A

B

C

D

E

Binary Dec         Hexa 1010 10 1011 11 1100 12 1101 13 1110 14 1111 15

F

ATHENA

The Hexadecimal System (6)

 Example:

1101 1010 0100 0110 = DA46

ATHENA

C9F7 = 1100 1001 1111 0111

IP Addresses

 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

 Range 0 to 255 (known as octets) separated by decimal

points

 Example: 140.179.220.200

ATHENA

Introducing IP Addresses

• Unique addressing allows communication

between end stations.

• Path choice is based on destination address. Location is represented by an address

ATHENA

IP Addressing

ATHENA

IP Addresses (2)

 Every IP address consists of two parts

• One identifying the Net ID (network identifier)  • One identifying the Host ID (host identifier)

ATHENA

Host Addresses

ATHENA

Network ID and Host IDs

 A Network ID is assigned to an organization by

 Host IDs are assigned locally by a system

a global authority

 Both the Network ID and the Host ID are used

administrator

ATHENA

for routing

IP Address Classes

ClassClass AA

HostID HostID 00 NetID NetID

1010 NetID NetID HostID HostID

BB

110110 HostID HostID NetID NetID

CC

1110 Multicast Address Multicast Address

DD

8 bits

8 bits

8 bits

8 bits

ATHENA

IP Address Classes

 Class A:

• 126 possible network ID •  16.777.214 host IDs per network ID • addresses begin with 0xxx, or 1 to 126 decimal

 Class B:

• 16384 possible network IDs • 65.534 host IDs per network ID • addresses begin with 10xx, or 128 to 191 decimal

ATHENA

IP Address Classes (2)

 Class C:

• 2 million possible network IDs(2.097.152) • about 254 host IDs per network ID • addresses begin with 110x, or 192 to 223 decimal

ATHENA

Special Addresses

 Addresses beginning with 01111111, or 127  decimal, are reserved for loop­back and for  internal testing on a local machine ( ping  127.0.0.1)

 10.0.0.0 – 10.255.255.255, 172.16.0.0 –

ATHENA

172.31.255.255, 192.168.0.0 –  192.168.255.255: unused Internet address

Host and Network Addresses

 A single network interface is assigned a single IP

 A host may have multiple interfaces, and

address called the host address

 Hosts that share a network all have the same IP

therefore multiple host addresses

ATHENA

network address (the network ID)

Host and Network Addresses (2)

ATHENA

In the example, 140.179.220.200 is a Class B  address so by default the Network part of the  address (also known as the Network Address) is  defined by the first two octets (140.179.x.x) and  the Host part is defined by the last 2 octets  (x.x.220.200)

IP Broadcast and Network Addresses

 An IP broadcast addresses ( that is send to all  hosts on the network) has a host ID of all 1s  An IP address that has a  host ID of all 0s is

ATHENA

called a network address and refers to an entire  network

Subnet Mask

 Default subnet masks: • Class A : 255.0.0.0

(11111111.00000000.00000000.00000000)

• Class B : 255.255.0.0

(11111111.11111111.00000000.00000000)

• Class C : 255.255.255.0

(11111111.11111111.11111111.00000000)

ATHENA

Subnet Mask (2)

 Applying a subnet mask to an IP address to

 Performing a bitwise logical AND operation  between the IP address and the subnet mask  results in the Network Address ( also call  Network Number)

ATHENA

identify the NetID and HostID • The network bits are presented by the 1s in the mask • The host bits are presented by the 0s

Subnet Mask (3)

 For example:

• 10001100.10110011.11110000.11001000

(140.179.240.200   Class B IP Address) • 11111111.11111111.00000000.00000000  (255.255.000.000   Default Class B Subnet) • ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ mask • 10001100.10110011.00000000.00000000

(140.179.000.000   Network Address)

ATHENA

Addressing Without Subnets

ATHENA

Subnet Addressing

ATHENA

Subnet Addresses

 An organization can subdivide it’s host address

 To create subnet address, administrator borrows

space into groups called subnets

some bits from host field

ATHENA

1010 NetID NetID HostID SubnetID HostID SubnetID

Subnet Mask

ATHENA

 Subnets not in use—the default

ATHENA

Subnet Mask Without Subnets

 Network number extended by eight bits

ATHENA

Subnet Mask with Subnets

 Network number extended by ten bits

ATHENA

Subnet Mask with Subnets

An Example

 You are assigned a Class C network number of  200.133.175.0 (apologies to anyone who may  actually own this domain address). You want to  utilize this network across multiple small groups  within an organization. You can do this by  subnetting that network with a subnet address

ATHENA

An Example (2)

 We will break this network into 14 subnets of 14  nodes each. This will limit us to 196 nodes on  the network instead of the 254 we would have  without subnetting, but gives us the advantages  of traffic isolation and security. To accomplish  this, we need to use a subnet mask 4 bits long

ATHENA

An Example (3)

 Recall that the default Class C subnet mask is   255.255.255.0

 Extending this by 4 bits yields a mask of   255.255.255.240

(11111111.11111111.11111111.00000000  binary)

ATHENA

(11111111.11111111.11111111.11110000  binary)

An Example (4)

This gives us 16 possible network numbers, 2 of which  cannot be used:

Subnet bits

Host Addresses

Network  Number

Broadcast  Address

0000

200.133.175.0

Reserved

None

0001

200.133.175.16

.17 thru .30

200.133.175.31

0010

200.133.175.32

.33 thru .46

200.133.175.47

ATHENA

An Example (5)

Subnet bits

Host Addresses

Network  Number

Broadcast  Address

….

….

….

….

…..

…..

…..

…..

1101

209 thru .222

200.133.175.20 8

200.133.175.22 3

1110

225 thru .238

200.133.175.22 4

200.133.175.23 9

1111

Reserved

None

200.133.175.24 0

ATHENA

Protocol

 Protocols are the rules and procedures for

communicating

 Three points to think about protocols

• Many protocols, each has it sown advantages and restrictions • Protocols work at various OSI layers, the layer in which it works

describes its function

• Several may work together in a protocol stack or suite: Levels in  protocol stack map or correspond to the layers of the OSI model

ATHENA

TCP/IP

 Transmission Control Protocol/ Internet

 Provides routable, enterprise networking

Protocol

 Access to worldwide internet  Protocols written for TCP/IP:

• SMTP , FTP, SNMP

ATHENA

protocol

TCP/IP (2)

 The function of the TCP/IP protocol stack, or  suite, is the transfer of information from one  network device to another. In doing so, it closely  maps the OSI reference model in the lower  layers, and supports all standard physical and  data link protocols

ATHENA

TCP/IP (3)

 DNS (Domain Name System) is a system used in  the Internet for translating names of domains  and their publicly advertised network nodes into  addresses

 WINS (Windows Internet Naming Service) is a  Microsoft­developed standard for Microsoft  Windows NT that automatically associates NT  workstations with Internet domain names

ATHENA

TCP/IP (4)

 POP3 (Post Office Protocol) is an Internet

ATHENA

standard for storing e­mail on a mail server until  you can access it and download it to your  computer. It allows users to receive mail from  their inboxes using various levels of security

TCP/IP (5)

 SMTP (Simple Mail Transport Protocol) governs

 SNMP (Simple Network Management Protocol)  is a protocol that provides a means to monitor  and control network devices, and to manage  configurations, statistics collection, performance  and security

ATHENA

the transmission of e­mail over computer  networks. It does not provide support for  transmission of data other than plain text

TCP/IP (6)

 FTP (File Transfer Protocol) is a reliable

 HTTP (Hypertext Transfer Protocol) is the

connection­oriented service that uses TCP to  transfer files between systems that support FTP

ATHENA

Internet standard that supports the exchange of  information on the World Wide Web, as well as  on internal networks. It supports many different  file types, including text, graphic, sound, and  video

TCP/IP (7)

 Telnet is a standard terminal emulation protocol

ATHENA

used by clients for the purpose of making  remote terminal connections to Telnet server  services; enables users to remotely connect to  routers to enter configuration commands

TCP/IP (8)

 Ping (Packet Internet Groper) is a diagnostic

 Traceroute is a program that is available on

utility used to determine whether a computer is  properly connected to devices

ATHENA

many systems, and is similar to PING, except  that traceroute provides more information than  PING

Summary

 This topic examined: • Common Protocols • TCP/IP  • IP address and Subnetting

ATHENA