You are on page 1of 154

Internetworking

Internetworking
What is internetwork
An arbitrary collection of networks interconnected to provide
some sort of host-to-host packet delivery service

A simple internetwork where H represents hosts and R represents


routers
What is Internet ?

It is a Global network of computers,


(servers or clients).

to exchange information.

It is a "network of networks" that includes millions of


private and public, academic, business, and government
networks (local or Global),
linked by copper wires, wireless connections, and other
technologies.
Hardware and Software of Internet

Variety of hardware and software are used to


make Internet functional.

Modem
Device that enables computers to communicate
through phone lines.
When we start internet the our modem
communicates to modem of ISP.
Continued
Computer
In addition to a modem, you need a client capable
of handling multiple data types.
Software
Two types of softwares required to enable your
PC as an Internet PC.
Communication software to establish
connection
Client software for browsing, e-mail, news.
these softwares are provided with windows itself.
Applications Of Internet
Download programs and files
E-Mail
Voice and Video Conferencing
E-Commerce
File Sharing
Information browsing
Search the web addresses for access through search
engine
Chatting and many more
Disadvantages of
Internet
Theft of personal information such as name, address, credit card
number etc.
Virus threats nothing but a program which disrupts the normal
functioning of your system.
Spamming refers to receiving unwanted e-mails in bulk, which
provide no purpose and needlessly obstruct the entire system .
Pornography This is perhaps the biggest threat related to
childrens healthy mental life. A very serious issue concerning the
Internet.

Though, internet can also create havoc, destruction and


its misuse can be very fatal,
the advantages of it outweigh its disadvantages.
Intranet
What is Intranet ?

Internal company network that uses Internet


standards (HTML, HTTP & TCP/IP protocols) &
software.

Accessed only by authorized persons, especially


members or employees of the organization
Intranet Security
Two levels of Security required:

Internal
It can be imposed by Public Key Security &
Encryption Key.

External
Through Firewall.
What is Firewall ?
Security device located between firms internal
network (intranet) & external network (internet).

Regulates access into & out of a companys network


based on a set of rules.

Note : needs to be upgraded from time to time to check latest


potential security problems.
Applications of Intranet
Sharing of company policies/rules & regulations
Access employee database
Distribution of circulars/Office Orders
Access product & customer data
Sharing of information of common interest
Launching of personal/departmental home pages
Submission of reports
Corporate telephone directories
Disadvantages

Management A company may not have person to update their


problem Intranet on a routine basis
Fear of sharing information and the loss of control
Limited bandwidth for the business
Security Unauthorized access
problem Abuse of access
Denial of service
Productivity Information overload lowers productivity
problem True purpose of the Intranet is unknown to many
employees/departments
Hidden or unknown complexity and costs
Extranet
What is Extranet ?

Extranet is an Intranet for outside authorized users


using same internet technology.

Inter-organizational information system.

enable outsiders to work together with companys


employees.
open to selected suppliers, customers & other business
partners
Examples..
Dealers/distributors have access to
product files such as :-
1. product specification,
2. pictures,
3. images, etc.
to answer the queries of the customer.
Components of
extranets ..
Some basic infrastructure components such
as the internet Including :-
TCP/IP protocols,
E-mail,
Web-browsers,
External business partners &
Tele-commuting employees place order,
check status & send E-mail.
Benefits of Extranet
Improved quality.
lower travel costs.
lower administrative & other overhead costs.
reduction in paperwork.
delivery of accurate information on time.
improved customer service.
better communication.
overall improvement in business
effectiveness.
Disadvantages
The suppliers & customer who dont
have technical knowledge feel problem.
Faceless contact.
Information can be misused by other competitors.
Fraud may be possible.
Technical Employees are required.
Layered System View

Corporate membe
Intrane
t
Extranet Clients, partners, cu
Interne Global society: comp
t
Internetworking with TCP/IP
What is IP
IP stands for Internet Protocol
Key tool used today to build scalable, heterogeneous
internetworks
It runs on all the nodes in a collection of networks and defines
the infrastructure that allows these nodes and networks to
function as a single logical internetwork

A simple internetwork showing the protocol layers


IP Service Model

Two parts
Global Addressing Scheme
Provides a way to identify all hosts in the network
Datagram (Connectionless) model for data
delivery
Best-effort delivery (unreliable service)
packets are lost
packets are delivered out of order
duplicate copies of a packet are delivered
packets can be delayed for a long time
Packet Format
Version (4 bits):
currently 4 or 6.
Also called IPv4 and IPv6
Hlen (4 bits):
number of 32-bit words in
header
usually 5 32-bit words with no
options
TOS (8 bits):
type of service (not widely used)
Length (16 bits):
number of bytes in this datagram
including the header
Ident (16 bits) and
Flags/Offset (16 bits):
used by fragmentation
Packet Format
TTL (8 bits):
number of hops/routers this
packet can travel
discard the looping packets
Originally based on time, but
changed to a hop-count based
Each router decrements it by 1
Discard the packet when it
becomes 0
Default is 64
Problems
Setting it too high the packet will loop
a lot
Setting it too low the packet will not
reach the destination
Packet Format
Protocol (8 bits):
demux key (TCP=6, UDP=17)
Checksum (16 bits):
of the header only
DestAddr & SrcAddr (32 bits)
The key for datagram delivery
Every packet contains a full
destination address
Forwarding/routing decisions are
made at each router
The source address is for the
destination to know the sender
and if it wants to reply to it
IP Fragmentation and Reassembly

Each network has some MTU (Maximum


Transmission Unit)
Ethernet (1500 bytes), FDDI (4500 bytes)
IP packets need to fit in the payload of link-layer frame
Solutions
Make all packet size small enough to fit all
Or fragment the large packets into smaller ones and reassembles
them later
Strategy
Fragmentation occurs in a router when it receives a
datagram that it wants to forward over a network which
has (MTU < datagram)
Reassembly is done at the receiving host
All the fragments carry the same identifier in the Ident field
Fragments are self-contained datagrams
Global Addresses

Properties
globally unique
hierarchical: network + host
4 Billion IP address, half are A type, is B type, and 1/8 is C type

Format

Dot notation
10.3.2.4
128.96.33.81
192.12.69.77
IP Datagram Forwarding
Strategy
every datagram contains destination's address
if directly connected to destination network, then forward to
host
if not directly connected to destination network, then forward
to some router
forwarding table maps network number into next hop
each host has a default router
each router maintains a forwarding table
Example (router R2)
IP Datagram Forwarding

Algorithm
if (NetworkNum of destination = NetworkNum of one of my interfaces)
then
deliver packet to destination over that interface
else
if (NetworkNum of destination is in my forwarding table) then
deliver packet to NextHop router
else
deliver packet to default router

For a host with only one interface and only a default router in its forwarding table, this
simplifies to

if (NetworkNum of destination = my NetworkNum)then


deliver packet to destination directly
else
deliver packet to default router
P
e

S
m
IP Address Classes
t
h

IP addresses are divided into 5 classes,


each of which is designated with the
alphabetic letters A to E.
Class D addresses are used for
multicasting.
Class E addresses are reserved for
testing & some mysterious future use.
P
3
e

1
e

S
m
IP Address Classes (Cont.)
t
h

The 5 IP classes are split up based


on the value in the 1st octet:
P
3
e

2
e

S
m
IP Address Classes (Cont.)
t
h

Using the ranges, you can determine


the class of an address from its 1 st octet
value.
An address beginning with 120 is a
Class A address, 155 is a Class B
address & 220 is a Class C address.
P
3
e

3
e

S
m Are You the Host or the
t
h
Network?
The 32 bits of the IP address are divided into
Network & Host portions, with the octets
assigned as a part of one or the other.
Network & Host Representation
By IP Address Class
Class Octet1 Octet2 Octet3 Octet4

Class A Network Host Host Host

Class B Network Network Host Host

Class C Network Network Network Host


P
3
e

4
e

S
m Are You the Host or the
t
h
Network? (Cont.)
Each Network is assigned a network
address & every device or interface
(such as a router port) on the network is
assigned a host address.
There are only 2 specific rules that
govern the value of the address.
P
3
e

5
e

S
m Are You the Host or the
t
h
Network? (Cont.)
A host address cannot be designated
by all zeros or all ones.
These are special addresses that are
reserved for special purposes.
P
3
e

6
e

S
m
Class A Addresses
t
h

Class A IP addresses use the 1st 8 bits (1st


Octet) to designate the Network address.
The 1st bit which is always a 0, is used to
indicate the address as a Class A address
& the remaining 7 bits are used to
designate the Network.
The other 3 octets contain the Host
address.
P
3
e

7
e

S
m
Class A Addresses (Cont.)
t
h

There are 128 Class A Network


Addresses, but because addresses with
all zeros arent used & address 127 is a
special purpose address, 126 Class A
Networks are available.
P
3
e

8
e

S
m
Class A Addresses (Cont.)
t
h

There are 16,777,214 Host addresses


available in a Class A address.
Rather than remembering this number
exactly, you can use the following formula to
compute the number of hosts available in any
of the class addresses, where n represents
the number of bits in the host portion:
(2n 2) = Number of available hosts
P
3
e

9
e

S
m
Class A Addresses (Cont.)
t
h

For a Class A network, there are:


224 2 or 16,777,214 hosts.
Half of all IP addresses are Class A addresses.
You can use the same formula to determine the
number of Networks in an address class.
Eg., a Class A address uses 7 bits to designate
the network, so (27 2) = 126 or there can be
126 Class A Networks.
P
4
e

0
e

S
m
Class B IP Addresses
t
h

Class B addresses use the 1 st 16 bits (two


octets) for the Network address.
The last 2 octets are used for the Host
address.
The 1st 2 bit, which are always 10,
designate the address as a Class B
address & 14 bits are used to designate the
Network. This leaves 16 bits (two octets)
to designate the Hosts.
P
4
e

1
e

S
m
Class B IP Addresses (Cont.)
t
h

So how many Class B Networks can


there be?
Using our formula, (214 2), there can
be 16,382 Class B Networks & each
Network can have (216 2) Hosts, or
65,534 Hosts.
P
4
e

2
e

S
m
Class C IP Addresses
t
h

Class C addresses use the 1st 24 bits


(three octets) for the Network address &
only the last octet for Host
addresses.the 1st 3 bits of all class C
addresses are set to 110, leaving 21
bits for the Network address, which
means there can be 2,097,150 (221 2)
Class C Networks, but only 254 (28 2)
Hosts per Network.
P
4
e

3
e

S
m
Class C IP Addresses (Cont.)
t
h
P
4
e

4
e

S
m
Special Addresses
t
h

A few addresses are set aside for


specific purposes.
Network addresses that are all binary
zeros, all binary ones & Network
addresses beginning with 127 are
special Network addresses.
P
4
e

5
e

S
m
Special Addresses (Cont.)
t
h
P
4
e

6
e

S
m
Special Addresses (Cont.)
t
h

Within each address class is a set of


addresses that are set aside for use in
local networks sitting behind a firewall
or NAT (Network Address Translation)
device or Networks not connected to
the Internet.
P
4
e

7
e

S
m
Special Addresses (Cont.)
t
h

A list of these addresses for each IP


address class:
PC Networks
Client/Server Communication
Shared databases
Shared hardware resources
Shared Internet access
Peer-to-Peer Communication
Sharing work and information with colleagues
Low cost is high priority
Attachment costs is significantly less than the attached device
A small LANs components:
Computer, hub, cable, NIC, and network operating system.
P
4
e

9
e

S
m
Subnet Mask
t
h

An IP address has 2 parts:


The Network identification.
The Host identification.
Frequently, the Network & Host portions of
the address need to be separately extracted.
In most cases, if you know the address class,
its easy to separate the 2 portions.
P
5
e

0
e

S
m
Subnet Mask (Cont.)
t
h

With the rapid growth of the internet & the


ever-increasing demand for new addresses,
the standard address class structure has
been expanded by borrowing bits from the
Host portion to allow for more Networks.
Under this addressing scheme, called
Subnetting, separating the Network & Host
requires a special process called Subnet
Masking.
P
5
e

1
e

S
m
Subnet Mask (Cont.)
t
h

The subnet masking process was


developed to identify & extract the Network
part of the address.
A subnet mask, which contains a binary bit
pattern of ones & zeros, is applied to an
address to determine whether the address
is on the local Network.
If it is not, the process of routing it to an
outside network begins.
P
5
e

2
e

S
m
Subnet Mask (Cont.)
t
h

The function of a subnet mask is to


determine whether an IP address exists on
the local network or whether it must be
routed outside the local network.
It is applied to a messages destination
address to extract the network address.
If the extracted network address matches
the local network ID, the destination is
located on the local network.
P
5
e

3
e

S
m
Subnet Mask (Cont.)
t
h

However, if they dont match, the


message must be routed outside the
local network.
The process used to apply the subnet
mask involves Boolean Algebra to filter
out non-matching bits to identify the
network address.
P
5
e

4
e

S
m
Boolean Algebra
t
h

Boolean Algebra is a process that applies


binary logic to yield binary results.
Working with subnet masks, you need only
4 basic principles of Boolean Algebra:
1 and 1 = 1
1 and 0 = 0
0 and 1 = 0
0 and 0 = 0
P
5
e

5
e

S
m
Boolean Algebra (Cont.)
t
h

In another words, the only way you can


get a result of a 1 is to combine 1 & 1.
Everything else will end up as a 0.
The process of combining binary values
with Boolean Algebra is called Anding.
P
5
e

6
e
Default Standard Subnet
S
m
t
h
Masks
There are default standard subnet
masks for Class A, B and C addresses:
P
5
e

7
e

S
m
A Trial Separation
t
h

Subnet masks apply only to Class A, B


or C IP addresses.
The subnet mask is like a filter that is
applied to a messages destination IP
address.
Its objective is to determine if the local
network is the destination network.
P
5
e

8
e

S
m
A Trial Separation (Cont.)
t
h

The subnet mask goes like this:


1. If a destination IP address is
206.175.162.21, we know that it is a
Class C address & that its binary
equivalent is:
11001110.10101111.10100010.00010101
P
5
e

9
e

S
m
A Trial Separation (Cont.)
t
h

2. We also know that the default


standard Class C subnet mask is:
255.255.255.0 and that its binary
equivalent is:
11111111.11111111.11111111.00000000
P
6
e

0
e

S
m
A Trial Separation (Cont.)
t
h

3. When these two binary numbers (the IP


address & the subnet mask) are combined
using Boolean Algebra, the Network ID of
the destination network is the result:
P
6
e

1
e

S
m
A Trial Separation (Cont.)
t
h

4. The result is the IP address of the


network which in this case is the same
as the local network & means that the
message is for a node on the local
network.
P
6
e

2
e

S
m
Routing IP Addresses
t
h

When you build a network, you need to


figure out how many network Ids your
network requires.
To do so, you must account for every
WAN connection & subnet on the
Network.
Every node & router interface requires a
Host address, or ID.
P
6
e

3
e

S
m
Routing IP Addresses (Cont.)
t
h

Theres no hard & fast rule on how you


should dole out your allotted IP
addresses.
Commonly, though, the lowest numbers
(1 through 10) are assigned to routers &
servers but how you assign addresses
is strictly up to you & your network
policies & guidelines.
P
6
e

4
e

S
m
Configuring an IP Address
t
h

The proper way to configure an IP


address on the router is through the IP
Address command, which assigns each
router interface its unique IP address.
A router with 4 interfaces needs 4
separate IP addresses because,
technically each interface (& address) is
on a different network.
P
6
e

5
e

S
Configuring an IP Address
m
t
(Cont.)
h

The IP Address command is entered


from the config-if mode because the
action affects only that interface.
Both the IP address & the subnet mask
are defined in the command.
P
6
e

6
e

S
m
Verifying an IP Address
t
h

IP addresses are verified using PING,


Trace & Telnet.
It is important that you know that PING
is used to verify IP address connections
to the Network Layer & that Telnet is
used to verify network IP address
connections to the Application Layer.
P
6
e

7
e

S
m
Verifying with Telnet
t
h

The reason you need to verify IP


addresses is to ensure that the various
parts of a network can properly
communicate with the other parts.
Eg., if you can Telnet (Terminal Emulation
Protocol) into a router from a remote
location on the same network, you can
verify that the interface & route are up
and available.
P
6
e

8
e

S
m
Verifying with Telnet (Cont.)
t
h

Because Telnet operates on the OSI


Models Application Layer, when its
functioning, its safe to assume that all
lower layers are also functioning.
P
6
e

9
e

S
m
Verifying with PING
t
h

The PING (Packet Internet Groper)


command verifies OSI Layer 3 (Network
Layer) connectivity.
It sends out ICMP (Internet Control
Message Protocol) messages to verify
both the logical addresses & the
Physical connection.
Subnetting
Peter Smith
P
7
e

1
e

S
m
Introduction
t
h

Subnetting is the foundation underlying the


expansion of both Local Networks & the
Internet in todays world.
Subnetting has become essential
knowledge for the Administrator of any
network.
There are 2 fundamental reasons why
subnetting has so much importance in
todays networking environment:
P
7
e

2
e

S
m
Introduction (Cont.)
t
h

1) The world is running out of available


IP addresses. There just isnt an
unlimited number of IP addresses
available & subnetting helps extend
the existing addresses until either the
next version of IP is rolled out or some
other technology charges on the
scene.
P
7
e

3
e

S
m
Introduction (Cont.)
t
h

2) Subnetting reduces the size of the


routing tables stored in routers.
Subnetting extends the existing IP
address base & restructures the IP
address. As a result, routers must
have a way to extract from a IP
address both the Network address &
the Host address.
P
7
e

4
e

S
m
Introduction (Cont.)
t
h

There are only 3 usable IP address classes:


Class A
Class B
Class C
Class A networks have the highest number
of available hosts.
Class C networks have the fewest number
of hosts.
P
7
e

5
e

S
m
Subnetting Networks ID
t
h

A 3-step example of how the default


Class A subnet mask is applied to a
Class A address:
P
7
e

6
e

S
m
Subnetting Networks ID (Cont.)
t
h

In the previous slide, the default Class A


subnet mask (255.0.0.0) is ANDd with the
Class A address (123.123.123.001) using
Boolean Algebra, which results in the Network
ID (123.0.0.0) being revealed.
The default Class B subnet mask
(255.255.0.0) strips out the 16-bit network ID &
the default Class C subnet mask
(255.255.255.0) strips out the 24-bit network
ID.
P
7
e

7
e
Subnetting, Subnet & Subnet
S
m
t
h
Mask
Subnetting, a subnet & a subnet mask
are all different.
In fact, the 1st creates the 2nd & is
identified by the 3rd.
Subnetting is the process of dividing a
network & its IP addresses into
segments, each of which is called a
subnetwork or subnet.
P
7
e

8
e
Subnetting, Subnet & Subnet
S
m
t
h
Mask (Cont.)
The subnet mask is the 32-bit number
that the router uses to cover up the
network address to show which bits are
being used to identify the subnet.
P
7
e

9
e

S
m
Subnetting
t
h

A network has its own unique address,


such as a Class B network with the
address 172.20.0.0 which has all zeroes in
the host portion of the address.
From the basic definitions of a Class B
network & the default Class B subnet
mask, you know that this network can be
created as a single network that contains
65,534 individual hosts.
P
8
e

0
e

S
m
Subnetting (Cont.)
t
h

Through the use of subnetting, the


network from the previous slide can be
logically divided into subnets with fewer
hosts on each subnetwork.
It does not improve the available shared
bandwidth only, but it cuts down on the
amount of broadcast traffic generated
over the entire network as well.
P
8
e

1
e

S
m
Subnetting (Cont.)
t
h

The 2 primary benefits of subnetting


are:
1. Fewer IP addresses, often as few as one,
are needed to provide addressing to a
network & subnetting.
2. Subnetting usually results in smaller
routing tables in routers beyond the local
internetwork.
P
8
e

2
e

S
m
Subnetting (Cont.)
t
h

Example of subnetting: when the


network administrator divides the
172.20.0.0 network into 5 smaller
networks 172.20.1.0, 172.20.2.0,
172.20.3.0, 172.20.4.0 & 172.20.5.0
the outside world stills sees the network
as 172.20.0.0, but the internal routers
now break the network addressing into
the 5 smaller subnetworks.
P
8
e

3
e

S
m
Subnetting (Cont.)
t
h

In the example, only a single IP address


is used to reference the network &
instead of 5 network addresses, only
one network reference is included in the
routing tables of routers on other
networks.
P
8
e

4
e
Borrowing Bits to Grow a
S
m
t
h
Subnet
The key concept in subnetting is borrowing
bits from the host portion of the network to
create a subnetwork.
Rules govern this borrowing, ensuring that
some bits are left for a Host ID.
The rules require that two bits remain
available to use for the Host ID& that all of the
subnet bits cannot be all 1s or 0s at the same
time.
P
8
e

5
e
Borrowing Bits to Grow a
S
m
t
h
Subnet (Cont.)
For each IP address class, only a
certain number of bits can be borrowed
from the host portion for use in the
subnet mask.
P
8
e

6
e
Borrowing Bits to Grow a
S
m
t
h
Subnet (Cont.)
Bits Available for Creating Subnets

Address Class Host Bits Bits Available for


Subnet

A 24 22

B 16 14

C 8 6
P
8
e

7
e

S
m
Subnetting a Class A Network
t
h

The default subnet mask for a class A


network is 255.0.0.0 which allows for
more than 16,000,000 hosts on a single
network.
The default subnet mask uses only 8
bits to identify the network, leaving 24
bits for host addressing .
P
8
e

8
e

S
Subnetting a Class A Network
m
t
(Cont.)
h

To subnet a Class A network, you need to


borrow a sufficient number of bits from the 24-
bit host portion of the mask to allow for the
number of subnets you plan to create, now &
in the future.
Example: To create 2 subnets with more than
4 millions hosts per subnet, you must borrow 2
bits from the 2nd octet & use 10 masked (value
equals one) bits for the subnet mask
(11111111.11000000) or 255.192 in decimal.
P
8
e

9
e

S
Subnetting a Class A Network
m
t
(Cont.)
h

Keep in mind that each of the 8-bit


octets has binary place values.
When you borrow bits from the Host ID
portion of the standard mask, you dont
change the value of the bits, only how
they are grouped & used.
P
9
e

0
e

S
m
Class A Subnet Masks (Cont.)
t
h

A sample of subnet mask options available for Class A addresses.


P
9
e

1
e

S
m
Class A Subnet Masks (Cont.)
t
h

All subnet masks contain 32 bits; no


more, no less.
However a subnet mask cannot filter
more than 30 bits. This means 2 things:
One, that there cannot be more than 30
ones bits in the subnet mask.
Two, that there must always be at least 2
bits available for the Host ID.
P
9
e

2
e

S
m
Class A Subnet Masks (Cont.)
t
h

The subnet mask with the highest value


(255.255.255.252) has a binary
representation of:
11111111.11111111.11111111.11111100
The 2 zeroes in this subnet mask
represent the 2 positions set aside for the
Host address portion of the address.
P
9
e

3
e

S
m
Class A Subnet Masks (Cont.)
t
h

Remember that the addresses with all


ones (broadcast address) & all zeroes
(local network) cannot be used as they
have special meanings.
P
9
e

4
e

S
m
Subnetting Class B & Class C
t
h

The table on slide 76 Class A Subnet


Masks is similar to the tables used for Class
B & Class C IP addresses & subnet masks.
The only differences are that you have fewer
options (due to a fewer number of bits
available) & that youre much more likely to
work with Class B & Class C networks in real
life.
P
9
e

5
e

S
Subnetting Class B & Class C
m
t
(Cont.)
h

A sample of the subnet masks available for Class B networks.


P
9
e

6
e

S
Subnetting Class B & Class C
m
t
(Cont.)
h

A list of the subnet masks available for Class C networks.


P
9
e

7
e
Knowing How to Calculate
S
m
t
h
Subnets
To determine the number of subnets &
hosts per subnet available for any of the
available subnet masks, 2 simple
formulas to calculate these numbers:
P
9
e

8
e

S
m
Class C Subnets
t
h

Knowing the relationships in this table will


significantly reduce the time you spend
calculating subnetting problems.
P
9
e

9
e

S
m
Class C Subnets (Cont.)
t
h

To determine the total length of the


subnet mask, add 24 to the number of
borrowed (subnet) bits.
P
1
e

0
e

0
S
m
Class B Subnets
t
h

To calculate the number of subnets &


hosts available from a Class B subnet
mask, you use the same host & subnet
formulas described for calculating Class
C values.
Using these formulas I have constructed
a table that contains the Class B subnet
& host values.
P
1
e

0
e

1
S
m
Class B Subnets (Cont.)
t
h
P
1
e

0
e

2
S
m
A Short Broadcast
t
h

A broadcast is a message that every


node on a network or subnetwork
receives & examines.
Cisco IOS supports 2 different types of
broadcast messages:
Flooded
Directed
P
1
e

0
e

3
S
m
A Short Broadcast (Cont.)
t
h

Generally speaking, routers do not


propagate broadcasts, which is one of
the benefits of installing a router in the
first place.
P
1
e

0
e

4
S
m
A Short Broadcast (Cont.)
t
h

Flooded broadcasts (those with the


nominal broadcast address of
255.255.255.255) are not forwarded by the
router & are considered local traffic only.
Directed broadcasts, which contain all 1s
in the Host portion of the IP address, are
addressed to a specific subnetwork & are
allowed to pass.
Overivew of NAT
NAT: Network Address
Translation
Private Network
Private IP network is an IP network that is not directly
connected to the Internet

IP addresses in a private network can be assigned arbitrarily.


Not registered and not guaranteed to be globally unique

Generally, private networks use addresses from the following


experimental address ranges (non-routable addresses):
10.0.0.0 10.255.255.255
172.16.0.0 172.31.255.255
192.168.0.0 192.168.255.255

3
Private Addresses

H1 H2 H3 H4

10.0.1.2 10.0.1.3 10.0.1.2 10.0.1.3

10.0.1.1 10.0.1.1
Private network 1 Private Private network 1
Internet
R1 128.195.4.119 128.143.71.21 R2

21 3.168.112.3

4
Network Address Translation
(NAT)
NAT is a router function where IP addresses
possibly port numbers) of IP datagrams are replaced at
(and
the boundary of a private network

NAT is a method that enables hosts on private


networks to communicate with hosts on the Internet

NAT is run on routers that connect private networks to


the
IP packet
public withtoanother
Internet, replaceIPthe
address-port pair. pair of an
IP address-port

5
Basic operation of NAT
Private Internet
network

Source = 10.0.1.2 Source = 128.143.71.21


Destination = 213.168.112.3 Destination = 213.168.112.3

private address: 10.0.1.2 NAT


device public address: 213.168.112.3
public address: 128.143.71.21

H1 H5
Source = 213.168.112.3 Source = 213.168.112.3
Destination = 10.0.1.2 Destination = 128.143.71.21

Private Public
Address Address
10.0.1.2 128.143.71.21

NAT has address translation table


device
One to address translation
one
6
Pooling of IP addresses
Scenario: Corporate network has many hosts but only
a
small number of public IP addresses
NAT solution:
Corporate network is managed with a private address space
NAT device, located at the boundary between the corporate
network and the public Internet, manages a pool of public IP
addresses
When a host from the corporate network sends an IP
datagram to a host in the public Internet, the NAT device picks a
public IP address from the address pool, and binds this address
to the private address of the host

7
Pooling of IP addresses

Private Internet
networ
k
Source = 10.0.1.2 Source = 128.143.71.21
Destination = 213.168.112.3 Destination = 213.168.112.3

private address: 10.0.1.2 ::S rrr..-.


NAT
public address: 213.168.112.3 D
public address: device

H1 H5

Private Public
Address Address

10.0.1.2

Pool of addresses: 128.143.71.0-128.143.71.30

7
Supporting migration between network service
providers

Scenario: In CIDR, the IP addresses in a corporate network are


obtained from the service provider. Changing the service provider
requires changing all IP addresses in the network.

NAT solution:
Assign private addresses to the hosts of the corporate network
NAT device has static address translation entries which bind the
private address of a host to the public address.
Migration to a new network service provider merely requires
an update of the NAT device. The migration is not noticeable to
the hosts on the network.
Note:
The difference to the use of NAT with IP address pooling is that
the mapping of public and private IP addresses is static.

9
Supporting migration between network service
providers

Source = 128.143.71.21
ISP 1
Destination = 213.168.112.3
allocates address
Source = 10.0.1.2 block
Destination = 213.168.112.3 128.143.71.0/24 to
128.143.71.21
privat network:
private address: 10.0.1.2
NAT
public address: 128.143.71.21
devic
128.195.4.120
e
H1 128.195.4.120
ISP 2
Private allocates address
network block
Source = 128.195.4.120
Destination = 213.168.112.3 128.195.4.0/24 to
private network:

Private Public
Address Address

10.0.1.2
128.195.4.120

10
IP masquerading
Also called: Network address and port
translation
(NAPT), port address translation (PAT).
Scenario: Single public IP address is mapped to
multiple
hosts in a private network.
NAT solution:
Assign private addresses to the hosts of the corporate
network
NAT device modifies the port numbers for outgoing traffic

11
IP masquerading

Source = 10.0.1.2 Source = 128.143.71.21


Source port = 2001 Source port = 2100

private address: 10.0.1.2


NAT 128.143.71.21
H1 Private network Internet
devi
ce
private address: 10.0.1.3

H2 Source = 10.0.1.3 Source = 128.143.71.21


Source port = 3020 Destination = 4444

Private Public
Address Address
10.0.1.2/2001 128.143.71.21/2100
10.0.1.3/3020 128.143.71.21/4444

12
Load balancing of servers
Scenario: Balance the load on a set of identical
servers, which are accessible from a single IP address

NAT solution:
Here, the servers are assigned private addresses
NAT device acts as a proxy for requests to the server from the
public network
The NAT device changes the destination IP address of
arriving packets to one of the private addresses for a server
A sensible strategy for balancing the load of the servers is to
assign the addresses of the servers in a round-robin fashion.

13
Load balancing of servers

Private network

Sou
rc
Des e
tina = 12
tion
10.0.1.2 = 10 8.195. Source = 128.195.4.120
.0 . 1 4 .12
.2 0 Destination = 128.143.71.21
S1
NAT Source = 213.168.12.3
device Destination = 128.143.71.21
Internet
128.143.71.21
10.0.1.3

S2 20
4.1
5.
28.19
= 1 .0.1.4
10.0.1.4 = 10
rce
Sou inatio n
t
Des Inside network Outside network
Private Public Public
Address Address Address
S3
10.0.1.2 128.143.71.21 128.195.4.120
10.0.1.4 128.143.71.21 213.168.12.3

14
Concerns about NAT
Performance:
Modifying the IP header by changing the IP address requires
that NAT boxes recalculate the IP header checksum
Modifying port number and IP address requires that NAT
boxes recalculate TCP and UDP checksum (pseudo header)

Fragmentation
Care must be taken that a datagram that is fragmented
before it reaches the NAT device, is not assigned a different IP
address or different port numbers for each of the fragments.

15
Concerns about NAT
End-to-end connectivity:
NAT destroys universal end-to-end reachability of hosts on
the Internet.
A host in the public Internet often cannot initiate
communication to a host in a private network.
The problem is worse, when two hosts that are in a private
network need to communicate with each other.

16
Overview of DHCP
DHCP Dynamic Host Control
Protocol
Dynamic Assignment of IP
addresses
Dynamic assignment of IP addresses is desirable
for
several reasons:
IP addresses are assigned on-demand
Avoid manual IP configuration
Support mobility of laptops

19
20

DHCP Message Types


Value Message Type

1 DHCPDISCOVER

2 DHCPOFFER

3 DHCPREQUEST

4 DHCPDECLINE

5 DHCPACK

6 DHCPNAK

7 DHCPRELEASE

8 DHCPINFORM
Message Types
DHCPDISCOVER: Broadcast by a client to find available DHCP
servers."

DHCPOFFER: Response from a server to a DHCPDISCOVER and


offering IP address and other parameters."

DHCPREQUEST: Message from a client to servers that does one of


the following:"
Requests the parameters offered by one of the servers and
declines all other offers."
Verifies a previously allocated address after a system or network
change (a reboot for example)."
Requests the extension of a lease on a particular address.

21
Contd.
DHCPACK: Acknowledgement from server to client with parameters, including
IP address."

DHCPNACK: Negative acknowledgement from server to client, indicating that


the client's lease has expired or that a requested IP address is incorrect."

DHCPDECLINE: Message from client to server indicating that the offered


address is already in use."

DHCPRELEASE: Message from client to server canceling remainder of a lease


and relinquishing network address."

DHCPINFORM: Message from a client that already has an IP address


(manually configured for example), requesting further configuration parameters
from the DHCP server.

22
Client Server Interactions
The client broadcasts a DHCPDISCOVER message on its local
physical subnet. "
The DHCPDISCOVER message may include some options
such as network address suggestion or lease duration."

Each server may respond with a DHCPOFFER message that includes


an available network address (your IP address) and other
configuration options."
The servers record the address as offered to the client to prevent
the same address being offered to other clients in the event of
further DHCPDISCOVER messages being received before the first
client has completed its configuration.

23
DHCP Interaction (simplified)
Argon
00:a0:24:71:e4:44 DHCP Server

DHCP Request


00:a0:24:71:e4:44
Sent to 255.255.255.255

Argon
128.143.13
7.144 DHCP
00:a0:24:71 DHCP Response: Server
:e4:44 IP address: 128.143.137.144
Default gateway: 128.143.137.1 IE ru
..

Netmask: 255.255.0.0

24
Contd.
T\If the client receives one or more DHCPOFFER messages
from one or more servers. "
The client chooses one based on the configuration
parameters offered and broadcasts a DHCPREQUEST
message that includes the server identifier option to indicate
which message it has selected and the requested IP
address option, taken from your IP address in the selected
offer."
In the event that no offers are received, if the client has
knowledge of a previous network address, the client may
reuse that address if its lease is still valid, until the lease
expires.

25
DHCP Operation
DHCP Client
00:a0:24:71:e4: DHCP Server
44
DHCPDISCOVER
DCHP DISCOVER Sent to 255.255.255.255

DHCP Server

DHCP Client
00:a0:24:71:e4: DHCPOFFER DHCP Server
44

DHCPOFFER
DCHP OFFER

.
.
DHCP Server

26
Contd.
The servers receive the DHCPREQUEST broadcast from the client.
" Those servers not selected by the DHCPREQUEST message use
the message as notification that the client has declined that
server's offer. "
The server selected in the DHCPREQUEST message commits
the binding for the client to persistent storage and responds with a
DHCPACK message containing the configuration parameters for
the requesting client.

27
DHCP Operation
DHCP Client
00:a0:24:71:e4: DHCP Server
44
DHCPREQUEST

DCHP REQUEST DHCPACK

At this time, the DHCP DHCP Server


client can start to use the IP
address
DHCP Client
00:a0:24:71:e4: DHCP Server
44
Renewing a Lease (sent DHCPREQUEST

when 50% of lease has


expired) DHCPACK

If DHCP server sends


DHCPNACK, then address
is released when timer DHCP Server

expires
28
Contd.
The combination of client hardware and assigned
network address constitute a unique identifier for the
client's lease and are used by both the client and server
to identify a lease referred to in any DHCP messages. "
The your IP address field in the DHCPACK messages is
filled in with the selected network address.

29
Contd.
The client receives the DHCPACK message with configuration
parameters. "
The client performs a final check on the parameters, for
example with ARP for allocated network address, and notes
the duration of the lease and the lease identification cookie
specified in the DHCPACK message. At this point, the client
is configured."
If the client detects a problem with the parameters in the
DHCPACK message (the address is already in use on the
network, for example), the client sends a DHCPDECLINE
message to the server and restarts the configuration
process.

30
Contd.
The client should wait a minimum of ten seconds before
restarting the configuration process to avoid excessive network
traffic in case of looping."

On receipt of a DHCPDECLINE, the server must mark the


offered address as unavailable (and possibly inform the system
administrator that there is a configuration problem)."

If the client receives a DHCPNAK message, the client restarts


the configuration process.

31
Contd.
The client may choose to relinquish its lease on a
network address by sending a DHCPRELEASE message
to the server."

The client identifies the lease to be released by including


its network address and its hardware address."

32
DHCP Operation
DHCP Client
00:a0:24:71:e4: DHCP Server
44
DHCPRELEASE

DCHP RELEASE

At this time, the DHCP DHCP Server


client has released the IP
address

33
Lease Renewal
When a server sends the DHCPACK to a client with IP
address and configuration parameters, it also registers the
start of the
lease time for that address.
This lease time is passed to the client as one of the options
in
the DHCPACK message, together with two timer values, T1 and
T2.
The client is rightfully entitled to use the given address for
the
duration of the lease time.

34
Contd.
On applying the receive configuration, the client also starts
the
timers T1 and T2. At this time, the client is in the BOUND state.
Times T1 and T2 are options configurable by the server but
T1
must be less than T2, and T2 must be less than the lease time.
According to RFC 2132, T1 defaults to (0.5 * lease time)
andT2 defaults to (0.875 * lease time).

35
Contd.
When timer T1 expires, the client will send a DHCPREQUEST
(unicast) to the server that offered the address, asking to extend the
lease for the given configuration. The client is now in the RENEWING
state"

The server would usually respond with a DHCPACK message


indicating the new lease time, and timers T1 and T2 are reset at the
client accordingly."

The server also resets its record of the lease time. "

Under normal circumstances, an active client would continually renew
its lease in this way indefinitely, without the lease ever expiring.

36
Contd.
If no DHCPACK is received until timer T2 expires, the
client enters the REBINDING state."
Client now broadcasts a DHCPREQUEST message to
extend its lease. "

This request can be confirmed by a DHCPACK message


from any DHCP server on the network."

37
Contd.
If the client does not receive a DHCPACK message after
its lease has expired, it has to stop using its current TCP/
IP configuration. "
The client may then return to the INIT state, issuing a
DHCPDISCOVER broadcast to try and obtain any valid
address."

38
DHCP Pros
It relieves the network administrator of a great deal of manual
configuration work. "

The ability for a device to be moved from network to network and to


automatically obtain valid configuration parameters for the current
network can be of great benefit to mobile users."

Because IP addresses are only allocated when clients are actually


active, it is possible, by the use of reasonably short lease times and
the fact that mobile clients do not need to be allocated more than one
address, to reduce the total number of addresses in use in an
organization.

39
DHCP Cons
Uses UDP, an unreliable and insecure
protocol.
DNS cannot be used for DHCP configured
hosts.

40
Overview of DNS
DNS Domain Name Service

41
Outline
What is DNS?

What services does it


provide?

How does it operate?


format
Message
of messages
Types

42
What DNS?
is
DNS is a host name to IP address translation
service
DNS is
a distributed database implemented in a
hierarchy of name servers
an application level for messag exchang
protocol
betwee clients and servers e e
n

43
Wh DNS?
y
It is easier to remember a host name than
it is to remember an IP address.
A name has more meaning to a user than a
4 byte number.

Applications such as FTP, HTTP, email,


etc., all require the user to input a

destination.
The user generally enters a host name.

The application takes the host name


supplied by the user and forwards it to
DNS for translation to an IP address. 44
How does it work?
DNS works by exchanging messages between
client and server machines.

A client application will pass the destination host


name to the DNS process (in Unix referred to as
the gethostbyname() routine) to get the IP
address.
The then sits and waits for the response
application
to return.

45
Distributed, Hierarchical
Database
Root DNS Servers

com DNS servers org DNS servers edu DNS servers

pbs.org poly.edu umass.edu


yahoo.com amazon.com
DNS servers DNS serversDNS servers
DNS servers DNS servers

Client wants IP for www.amazon.com 1st approx:


;
client a root server to find "com" DNS
queries server
client "com" DNS server to get
queries "amazon.com"
DNS server "amazon.com" DNS server to IP
address for "www.amazon.com"
get
client 46
DNS: Root name servers
contacted by local name server that cannot resolve
name
root name server:
contacts authoritative name server if name mapping not known
gets mapping
returns mapping to local name server
Verisign Dulles, VA
Cogent Comm. Herndon, VA
U Maryland College Park, MD US DoD
Vienna, VA
ARL Aberdeen, MD
Verisign RIPE London

Autonomica, Stockholm

NASA Mt View, CA WIDE Tokyo


Internet Systems Consortium. Palo Alto, CA

13 root name
server operators
USC-ISI Marina del Rey, CA
ICANN Los Angeles, CA worldwide

49
TLD and Authoritativ Servers
e
Top-level domain (TLD) servers:
responsible for com, org, net, edu, etc, and all
top-level country domains uk, fr, ca, jp.
Network Solutions maintains servers for com
TLD
Educause for edu TLD

Authoritative DNS servers:


organization's DNS servers, providing
authoritative hostname to IP mappings for
organization's servers (e.g., Web, mail).
can be maintained by organization or
service
provider
Local Server
Name
does not strictly belong to
hierarchy
each ISP (residential ISP, company, has
university)
one.
also called "default name server"
when host makes DNS query is to its
query, sent
local DNS
acts asserver
proxy, query into hierarchy
forwards

51
Thank you!

You might also like