07 TCPIP Fundamentals

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

Revision no.

: PPT/2K403/02

TCPIP Fundamentals
Revision no.: PPT/2K403/02

TCP/IP Addressing

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

TCP/IP Addressing (contd.)

• An IP address occupies 32 bits and includes both a network ID

and a host ID.

• A host refers to either a workstation or a server. A host is also

referred to as a node or station.

• Routers locate hosts on the Internet based on their assigned

IP addresses.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Four Bytes of an IP Address

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Four Bytes of an IP Address (contd.)

• IP addresses take the form of a dotted octet; that is, each byte

(8 bits in an octet) is separated by a dot.

• In binary format, an IP address is as follows, with each x

representing a binary bit with the value of 0 or 1.

• A complete IP address in binary format would look like this:

• 10101100.00010000.00000100.00000010

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Address Classes A through E

• Classes A through C can be assigned; classes D and E are


reserved for specific uses and are not assigned to hosts.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Binary Digits (Bits) Which Identify Network Class

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Binary Digits (Bits) Which Identify Network Class (contd.)

• Class A address, the first byte is in the 0 to 127 range and also

identifies the network; the final three bytes identify the node.

The first bit must be zero.

• There are 126 possible class A networks, each having up to

16,777,216 hosts. Virtually all class A addresses have been

assigned.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Binary Digits (Bits) Which Identify Network Class (contd.)

• Class B The first byte is in the 128 to 191 range (the first two

bits of the first byte are 1 and 0). In class B addresses, the first

two bytes identify the network and the last two bytes identify

the node on the network. There are 16,384 possible class B

networks. Each class B network can have up to 65,534 hosts.

Relatively few class B addresses remain available.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Binary Digits (Bits) Which Identify Network Class (contd.)

• Class C address, the first byte is in the 192 to 223 range (the

first three bits of the first byte are 1, 1, and 0). the first three

bytes identify the network and the last byte identifies the node.

There are 2,097,152 possible class C networks.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Binary Digits (Bits) Which Identify Network Class (contd.)

• Class D Addresses. In a class D address, the first byte is in the

224 to 239 range (the first four bits of the first byte are 1, 1, 1,

and 0). Class D addresses are used for multicast packets.

Multicasts packets are typically exchanged between routers

only.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Binary Digits (Bits) Which Identify Network Class (contd.)

• Class E : Addresses. In a class E address, the first byte is in

the 240 to 255 range (the first five bits of the byte are 1,1,1,1,

and 0). Class E addresses are reserved for experimental use

and potential future addressing modes. Class E addresses are

typically used for broadcasts.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Obtaining an IP Address

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Obtaining an IP Address (contd.)

• The Internet is a public internetwork of many networks,


packets can only be routed if an IP address corresponds to
only one host. Registering IP addresses prevents the
duplication of IP addresses.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

IPv6

• A new version of the IP called IPv6 or IPng (IP Next Generation)

is anticipated to alleviate the current shortage of addresses.

IPv6 allows IP addresses to be 16 bytes long.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Domain Name Space

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Domain Name Space (contd.)

• Domain names are easier for people to remember than IP

addresses and the names make locating resources on the

Internet much easier.

• Domain names correspond to registered IP addresses, they

also must be unique. Registering domain names prevents the

duplication of names on the Internet.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Domain Name Space (contd.)

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Country codes

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Sample Host Table

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

DNS Zones

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

DNS Zones (contd.)

• DNS is divided into partitions called zones, or subdomains. A

zone begins at a specified domain and extends downward until

either an end node is reached or another subzone begins.

• Zones represent logical divisions of the Internet. These

divisions may or may not correspond to physical segments. A

domain, such as UK, can encompass many networks. A single

network can also cross over several domains.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Master Name Server

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Master Name Server (contd.)

• The names and IP addresses for all hosts in a DNS zone are

maintained on a single server called the master name server

for the domain.

• The information maintained on the master name server is

called the authoritative database for that zone.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Master Name Server (contd.)

• Names and addresses of all IP hosts within the domain

• Names of all subzones and addresses of the name servers for

those zones

• Addresses of name servers for the root domain and other

zones within the domain that are necessary to link your

domain to the existing DNS hierarchy.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Replica Name Servers

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Replica Name Servers (contd.)

• A replica name server periodically downloads a copy of the

authoritative database from the master name server. The

process of downloading the authoritative database to the

replica name server is called a zone transfer.

• A replica name server for a domain does not need to be a part

of the domain for the replica it holds. It can be located

anywhere in the domain name space.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

DNS Resolvers

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

DNS Resolvers (contd.)

• DNS clients are called resolvers. Typically, a resolver submits

a request for an address to a server within its default domain.

The server consults its databases for addresses within the

domain or contacts a root name server for addresses outside

its domain.

• This process is similar to the way you might find a telephone

number for someone who lives in a remote city.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Subnets

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Subnets (contd.)

• The network administrator must create six subnets, or divisions of


the corporate network, from the single network IP address.

• A network administrator creates subnets for the following reasons:

• To extend the network.

• To reduce congestion.

• To reduce CPU use.

• To isolate network problems.

• To improve security.

• To use multiple media.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Defining a Subnet Mask

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Defining a Subnet Mask (contd.)

• TCP/IP allows you to extend a given IP network number into

additional network addresses by borrowing bits from the host

address bytes.

• This process of creating subnets on the network uses a

technique called subnet masking.

• The subnet mask is defined using part of the host portion of

the IP address. The host portion you use depends on the class

of network address you are assigned.


© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Default Subnet Masks

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Subnet Hierarchy

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Classful IP

• In a classful IP address hierarchy, the IP address conforms to

the standard number of bits for the network address and host

address for each type of class.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Classless IP

• In a classless hierarchy, the rules that apply to the number of

bits that make up the network and host address for each class

vary. This is possible by using a subnet mask.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Number of Subnets vs. Hosts

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Number of Subnets vs. Hosts (contd.)

• The number of bits borrowed for the subnet address

determines the total number of possible subnets for that

network and the number of host addresses available to assign

to a subnet.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Two Subnets with the Same Host Address

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Two Subnets with the Same Host Address (contd.)

• The subnet address divides one network into smaller

networks,the same host addresses can be used on different

subnets, Routers on the Internet use only the network address

of an IP address when routing traffic to a subnetted network.

• Routers within the subnetted network use the subnet address,

network address, and host address to route traffic between

each subnet.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

GAMES Unlimited Subnets

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

GAMES Unlimited Subnets (contd.)

• GAMES Unlimited was assigned a class A address. Using a

one-byte subnet mask, every host and router at GAMES

Unlimited can be configured to recognize the first two bytes of

each IP address as a network address and the final two bytes

as the host address.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

BJC Corporation Subnets

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

BJC Corporation Subnets (contd.)

• BJC Corporation was assigned a class B address. Using a

subnet mask, every host and router within BJC Corporation

can be configured to recognize the first three bytes of each IP

address as a network address and the final byte as the host

address.

• Each host and router is configured with a subnet mask of

255.255.255.0 (decimal) or

• 11111111.11111111.11111111.00000000 (binary).
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

BJC Corporation Subnets (contd.)

• Each IP address used at BJC Corporation has three parts:

• A network component in the first two bytes. The class B

network number for BJC is 132.132.0.0.

• A subnet component in the third byte. Each network, or

subnet, is assigned a unique value for the third byte.

• A host component in the fourth byte. Within each subnet, each

host is assigned a unique host value.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Using Partial Octets for Class C


IP Addresses

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Using Partial Octets for Class C IP Addresses (contd.)

• In the figure, three bits of a class C address are used to define

a subnet.

• The mask is 11111111.11111111.11111111.11100000 (binary) or

255.255.255.224 (decimal).

• Partial octets allow fewer subnets than when a full octet is

used to define the subnet, but more hosts are on each subnet.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Possible Subnets for a Class C Address

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Subnet Mask with Three Bits for Subnet Address

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Subnet Mask with Three Bits for Subnet Address (contd.)

• A class A network address of 98.0.0.0. Instead of using the

whole second octet for the subnet mask, you could borrow

only the first three bits of the host address for the subnet

address.

• The subnet mask then becomes 255.224.0.0.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

No Buffer Zone for Additional Subnets

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

No Buffer Zone for Additional Subnets (contd.)

• Because you started assigning host addresses from the left,

adding another bit to the subnet address will require that your

hosts addresses be reassigned to free up the extra bit.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Buffer Zone for Additional Subnets

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Buffer Zone for Additional Subnets (contd.)

• If you started assigning host values from the right-most bit in

the host address field, as shown in the following figure, adding

the seventh subnet is as simple as changing the subnet mask

because the extra bit is not used by any host addresses. No

reassignment of hosts is necessary.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Calculating Subnets and Hosts for a Class B Network

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Calculating Subnets and Hosts for a Class B Network


(contd.)

• To assign subnet mask and address values, complete the

following:

• Determine the number of available subnet address values and

the number of available host address values per subnet:

• Available subnets = 2 n –2

• Available hosts = 2 m –2

• In the formulas, n = the number of masked address bits and m

= the number of unmasked address bits.


© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Calculating the Subnet Address with a Delta Value

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Calculating the Subnet Address with a Delta Value (contd.)

A. Identify the rightmost [1] bit in the subnet mask and convert its
binary value to decimal. The number you obtain is referred to
as delta.

B. Add delta to the original network address to obtain the first


subnet address value.

C. Add delta to the last subnet address value you obtained in


step b to determine the next subnet address value.

D. Continue the process of adding delta to the most recently


determined subnet address to calculate further subnets.

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Calculating Subnet Addresses

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Calculating Subnet Addresses (contd.)

• A subnet with all bits set to 1 or all bits set to 0 might not be

recognized by all protocols or all routers.

• Therefore, in this example with a 3-bit subnet mask, there are

six possible subnet addresses.

• (For routers that support all 0s and all 1s, eight subnet

addresses are possible.)

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Assigning IP Addresses within Subnet 128

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Assigning IP Addresses within Subnet 128 (contd.)

• The first two bytes of each address must be 132.132.

• The first three bits of the third byte must be [100], the binary

equivalent of 128. Therefore, the number you assign to the

third byte must fall within the range of 128 (1000000) through

159 (10011111).

• The two addresses 132.132.128.0 and 132.132.159.255 cannot

be used. (All node bits in 132.132.128.0 are set to zero and all

node bits in 132.132.159.255 are set to one) .

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Exercise

• Exercise 7.2 Binary to Decimal Conversion and Address


Classes
• Exercise 7.3 Assigning and Managing IP Subnets
• Exercise 7.4Establishing Subnets
• Exercise 7.5 Planning Your Network

© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K403/02

Design & Published by:


CMS Institute, Design & Development Centre, CMS House, Plot No. 91, Street No.7,
MIDC, Marol, Andheri (E), Mumbai –400093, Tel: 91-22-28216511, 28329198
Email: courseware.inst@cmail.cms.co.in
www.cmsinstitute.co.in
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute

You might also like