0% found this document useful (0 votes)
62 views79 pages

Chapter 2. Fundamental of Computer Network

Here are the steps to solve this problem: 1) We need 29 subnets. The next power of 2 greater than 29 is 32. 2) To get 32 subnets, we need 5 bits for the subnet portion (2^5 = 32 subnets) 3) That leaves 27 bits for the host portion (32 - 5 = 27 bits) 4) Each host bit allows for 2 possible addresses (0 or 1) 5) So with 27 host bits we get 2^27 - 2 possible host addresses Therefore, to get 29 subnets while maximizing hosts, we need a subnet mask that uses 5 bits for the subnet field, leaving 27 bits for hosts. The subnet mask would be 255.

Uploaded by

yabibal.eshetie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views79 pages

Chapter 2. Fundamental of Computer Network

Here are the steps to solve this problem: 1) We need 29 subnets. The next power of 2 greater than 29 is 32. 2) To get 32 subnets, we need 5 bits for the subnet portion (2^5 = 32 subnets) 3) That leaves 27 bits for the host portion (32 - 5 = 27 bits) 4) Each host bit allows for 2 possible addresses (0 or 1) 5) So with 27 host bits we get 2^27 - 2 possible host addresses Therefore, to get 29 subnets while maximizing hosts, we need a subnet mask that uses 5 bits for the subnet field, leaving 27 bits for hosts. The subnet mask would be 255.

Uploaded by

yabibal.eshetie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 79

Chapter 2

NETWORK
FUNDAMENTALS
Outline
TCP/IP Reference Model
IP addressing
Subnetting
Fixed length subnet mask (FLSM)
Variable length subnet mask (VLSM)
Supernetting
Address Resolution Protocol (ARP)
Internet Control Messaging Protocol (ICMP)
VLAN
2
The TCP/IP Model
The TCP/IP model is a four-layer model that
divides network communications into four
distinct categories or layers.
The U.S. Department of Defense (DoD) created
the TCP/IP reference model to design a network
that could survive any conditions, including a
nuclear war.
The model is often referred to as the TCP/IP stack.
The DoD model is a condensed version of the OSI

3
model
The TCP/IP Model
It is composed of four, instead of
seven, layers:
Application layer
Transport layer
Internet layer
Network Access layer

4
TCP/IP Model

Application

Transport
Internet

Network Access

5
Two Models: Side-By-Side

6
The Application Layer

The application
layer of the TCP/IP
model handles
high-level
protocols, issues of
representation,
encoding, and
dialog control.

7
The Transport Layer
• The transport layer provides
transport services from the
source host to the destination
host.
• It constitutes a logical
connection between these
endpoints of the network.
• Transport protocols segment
and reassemble upper-layer
applications into the same data
stream between endpoints.
• The transport layer data stream
provides end-to-end transport
services.

8
The Internet Layer
The purpose of the
Internet layer is to
select the best path
through the network for
packets to travel. The
main protocol that
functions at this layer is
the Internet Protocol
(IP). Best path
determination and
packet switching occur
at this layer.

9
The Network Access Layer
The network access layer is also
called the host-to-network layer.
It is the layer that is concerned
with all the issues that an IP
packet requires to make a physical
link to the network media. It
includes LAN and WAN details,
and all the details contained in the
OSI physical and data-link layers.
NOTE: ARP & RARP work at
both the Internet and Network
Access Layers.

10
The TCP/IP Protocol Suite

The DoD and OSI models are alike in design and concept and have
similar functions in similar layers.

11

11
The TCP/IP Protocol
Internet Protocols are the most popular
open-system protocol suite
Internet Protocols are used for LAN and
WAN communications.
The two best-known Internet Protocols are
Transmission Control Protocol (TCP)
Internet Protocol (IP)

12
Transmission Control Protocol
(TCP)
Features of TCP
Connection establishment
Transport layer protocol
Error checking of data
Guaranteed packet delivery
Breaks data into pieces at the transmitter
and reassembles at the receiver
Only handled by the sender and receiver
13
Internet Protocol (IP)

Features
Network layer protocol
Provides addressing of sender and receiver on the
internet
Protocol defines how to route messages through a
network
Packetized
Not continuous
Delivery not guaranteed

14
IP ADDRESSING

15
PRIVATE and SPECIAL
IP Address Ranges

Class A: 10.0.0.0—10.255.255.255
Class B: 172.16.0.0—172.31.255.255
Class C: 192.168.0.0—192.168.255.255

Private addresses created by RFC 1918 are to be


used for addressing internal networks.
These IP addresses are not routable
16
Network Addresses
In classful addressing, the network address (the
first address in the block) is the one that is
assigned to the organization.
The network address defines the network to the
rest of the Internet.
Given the network address, we can find the class
of the address, the block, and the range of the
addresses in the block
It retains the netid of the block and sets the hostid
17
to zero.
Ex. Given the network address 132.21.0.0, find
the class
the block
the range of the addresses
The 1st byte is between 128 and 191. Hence,
Class B
The block has a netid of 132.21.
The addresses range from 132.21.0.0 to
132.21.255.255.
18
Default Mask
The subnet masks for various IP address classes
have certain default values.
The actual subnet mask can be derived from
these values.
The default subnet masks for various address
classes are:
Class A default mask is 255.0.0.0
Class B default mask is 255.255.0.0
Class C Default mask 255.255.255.0
19
Subnet Mask
It determines which part of an IP address is the
network field and which part is the host field
Follow these steps to determine the subnet
mask:
1. Express the subnetwork IP address in binary form.
2. Replace the network and subnet portion of the
address with all 1s.
3. Replace the host portion of the address with all 0s.
4. Convert the binary expression back to dotted-
20 decimal notation.
Subnet Mask
• A mask is a 32-bit binary number.
• The mask is ANDed with IP address to get the block
address (Network address)
Mask And IP address = Block Address

21
AND operation

22
Default mask and subnet mask

23
Exercise

1. 192.168.3.55/24
What is the subnet mask?
What is the network address?
2. 192.168.3.55/28
What is the subnet mask?
What is the network address?
What is the broadcast address?
24
SUBNETTING
The process of splitting a network into smaller
networks is called subnetting, and the smaller
networks thus formed are known as subnets
Subnets are connected to the rest of the network
through address-resolving devices called
routers.
Subnets can be freely assigned within the
organization
Internally, subnets are treated as separate networks
25 Subnet structure is not visible outside the organization
Subnetting . . .

To create a subnet address, a network


administrator borrows bits from the original host
portion and designates them as the subnet field .
A network with no subnets will have one of
these default subnet mask values depending
upon its class address.
However, when subnetting is implemented, the
actual subnet mask value is calculated to
determine valid IP addresses for hosts on a
26 subnet.
Basic Idea of Subnetting

Split the host number portion of an IP address into a


subnet number and a (smaller) host number.
Result is a 3-layer hierarchy
network prefix host number

network prefix subnet number host number

extended network prefix

27
Advantages of Subnetting

Improves efficiency of IP addresses by not


consuming an entire address space for each
physical network.
Reduces router complexity. Since external routers
do not know about subnetting, the complexity of
routing tables at external routers is reduced.
Reduced network traffic
Optimized network performance
Simplified management
Facilitated spanning of large geographical distances .
28
Addresses in a network with and without
subnetting

29
Finding the Subnet Address

Given an IP address, we can find the subnet


address the same way we found the network
address.
Apply the mask to the address
Use binary notation for both the address and the
mask and then apply the AND operation to find
the subnet address.
AND

30
Finding the Subnet Address

What is the subnetwork address if the destination address is


200.45.34.56 and the subnet mask is 255.255.240.0?

11001000 00101101 00100010 00111000

11111111 11111111 11110000 00000000

11001000 00101101 00100000 00000000

The subnetwork address is 200.45.32.0.


 AND
31
Finding the Subnet Address

If the byte in the mask is 255, copy the


byte in the address.
If the byte in the mask is 0, replace the byte
in the address with 0.
If the byte in the mask is neither 255 nor 0,
we write the mask and the address in binary
and apply the AND operation.
32
Finding the Subnet Address
What is the subnetwork address if the destination address
is 19.30.80.5 and the mask is 255.255.192.0?

33
Comparison of a default mask and a subnet mask

34
A company is granted the site address 201.70.64.0
(class C). The company needs six subnets. Design
the subnets.

The number of 1s in the default mask is 24 (class C).

The company needs six subnets. This number 6 is not a


power of 2. The next number that is a power of 2 is 8 (2 3). We
need 3 more 1s in the subnet mask. The total number of 1s in
the subnet mask is 27 (24 + 3).
The total number of 0s is 5 (32 - 27).

35
The mask is
11111111 11111111 11111111 11100000
or
255.255.255.224

The number of subnets is 8.


The number of addresses in each subnet is 2 5 (5 is
the number of 0s) or 32.
The number of host is 32-2=30

36
37
Exercise:
You have a network that needs 29 subnets
while maximizing the number of host
addresses available on each subnet.
How many bits must you borrow from the
host field to provide the correct subnet
mask?

38
Class C subnetting

192.168.1.153/27
1. What is the subnet mask?
2. how many subnets?
3. how many hosts?
4. what are the valid hosts?
5. what are the valid subnet?
6. what are the broadcast address for each subnet?

39
Class B subnetting

172.16.0.0
255.255.255.224
1. how many subnets?
2. how many hosts?
3. what are the network address of each subnet?
4. what are the broadcast address for each subnet?
5. what are the valid hosts?
40
Class B subnetting
255.255.240.0/20
1. how many subnets?
2. how many hosts?
3. what are the valid subnet?
4. what are the broadcast address for each
subnet?
5. what are the valid hosts?

41
subnetting

255.255.0.0 (/20)
1. how many subnets?
2. how many hosts?
3. what are the valid subnet?
4. what are the valid hosts?
5. what are the broadcast address for each
subnet?
42
Subnetting

A company would like to break its Class B


private IP address 172.16.0.0 into as many
subnets as possible provided that they can get at
least 300 clients per subnet. Find ranges of IP
addresses for each subnet and new mask.

43
If an Ethernet port on a router were
assigned an IP address of 172.16.112.1/25,
what would be the valid subnet address of
this host?

A.172.16.112.0
B.172.16.0.0
C.172.16.96.0
D.172.16.255.0
44
A company is granted the site address 181.56.0.0
(class B). The company needs 1000 subnets.
Design the subnets.

The number of 1s in the default mask is 16 (class B).


The company needs 1000 subnets. This number is not a
power of 2. The next number that is a power of 2 is 1024
(210). We need 10 more 1s in the subnet mask.
The total number of 1s in the subnet mask is 26 (16 + 10).
The total number of 0s is 6 (32 - 26).

45
A company is granted the site address 181.56.0.0 (class B).
The company needs 1000 subnets. Design the subnets.

The mask is

11111111 11111111 11111111 11000000


or
255.255.255.192.
The number of subnets is 1024.
The number of addresses in each subnet is 26 (6 is the number of
0s) or 64.

46
47
SUPERNETTING
Supernetting is combining a group of networks into one
large supernetwork.
Supernetting is the opposite of subnetting
Converting network bits to host bits
In subnetting you borrow bits from the host part,
Supernetting is done by borrowing bits from the network
side.
Supernetting is the process of summarizing a bunch of
contiguous Subnetted networks back in a single large
network.
Supernetting is also known as route summarization and
48 route aggregation
SUPERNETTING
Supernetting is mainly done for optimizing the routing
tables.
A routing table is the summary of all known networks.
Routers share routing tables to find the new path and
locate the best path for destination.
Without Supernetting, router will share all routes from
routing tables as they are.
With Supernetting, it will summarize them before
sharing.
Route summarization reduces the size of routing

49
updates dramatically.
A supernetwork

50
A supernetwork

51
Comparison of subnet, default, and supernet masks

52
Example 1

Supernet the following IP addresses to a single


network
200.1.0.0/24
200.1.1.0/24
200.1.2.0/24
200.1.3.0/24
53
Answer: 200.1.0.0/22
Example 2
Supernet the following IP Addresses
172.168.197.0/24
172.168.198.0/24
172.168.199.0/24
172.168.200.0/24
172.168.204.0/24
172.168.206.0/24

54
Example 3:
Four class C addresses appear to
networks outside as a single network
 4 address-contiguous networks:
213.2.96.0 11010101.00000010.01100000.00000000
213.2.97.0 11010101.00000010.01100001.00000000
213.2.98.0 11010101.00000010.01100010.00000000
213.2.99.0 11010101.00000010.01100011.00000000
 What is the Supernet mask?
255.255.252.0
 What is the Supernet address?
213.2.96.0/22
55
11010101 . 00000010 . 011000 00 . 00000000
In subnetting, we need the first address
of the subnet and the subnet mask to
define the range of addresses.
In supernetting, we need the first
address of the supernet and the supernet
mask to define the range of addresses.

56
We need to make a supernetwork out of 16 class
C blocks. What is the supernet mask?

Solution
We need 16 blocks. For 16 blocks we need to change four 1s to 0s
in the default mask. So the mask is
11111111 11111111 11110000 00000000
or
255.255.240.0

57
A supernet has a first address of 205.16.32.0 and
a supernet mask of 255.255.248.0. A router
receives three packets with the following
destination addresses:
205.16.37.44
205.16.42.56
205.17.33.76
Which packet belongs to the supernet?

58
We apply the supernet mask to see if we can find
the beginning address.
205.16.37.44 AND 255.255.248.0  205.16.32.0
205.16.42.56 AND 255.255.248.0  205.16.40.0
205.17.33.76 AND 255.255.248.0  205.17.32.0
Only the first address belongs to this supernet.

59
A supernet has a first address of 205.16.32.0
and a supernet mask of 255.255.248.0. How
many blocks are in this supernet and what is
the range of addresses?

Solution

The supernet has 21 1s. The default mask has 24 1s. Since the difference is 3,
there are 23 or 8 blocks in this supernet.
The blocks are 205.16.32.0 to 205.16.39.0.
The first address is 205.16.32.0.
The last address is 205.16.39.255.
60
ARP (Address Resolution Protocol)
ARP is used for mapping a network address ( IPv4
Address) to a physical address/Ethernet address (MAC
address)
The MAC address is always used for direct
communications (i.e, sending information on the wire).
ARP has to know the physical address of the machine to
which it is going to send datagrams/frames
IP is used to determine routes and move packets from
network to network.

61
ARP
ARP is responsible for finding a map to any local
physical address that IP may request.
 If ARP does not have a map in memory, it has to
find one on the network.
ARP uses a local broadcast, asking all the
systems on the network if they have the IP that is
being resolved.

62
How ARP works?
ARP broadcasts a packet that contains the IP address and
MAC of the originating host; these can then be stored at the
target machine.
The target stores the address and responds with a packet
that contains its MAC address. The originating machine
then stores this in the local ARP cache. The two systems
now have each other’s IP and MAC addresses and can
communicate.
ARP can resolve only the address of a local machine.
When an IP address is determined to be on a remote subnet,
IP sends the packet to the default gateway; in this case,
63 ARP is used to find the MAC address of the gateway.
How ARP works?

64
Internet Control Messaging Protocol
(ICMP)
Internet Control Message Protocol (ICMP), a
part of the Internet layer, is responsible for
reporting errors and messages regarding the
delivery of IP datagrams.
ICMP always reports error message to the
original source
It is a protocol for the exchange of error messages
and other vital information between (Physical)
65 Internet entities such as hosts and routers.
ICMP
ICMP warns you when a destination host is
unreachable, or informs you of how long it took
to get to a destination host.
ICMP Error messages include the following:
Destination unreachable
Source Quench
Time exceeded
Redirection
Parameter problem, etc…

66
ICMP
Destination unreachable
The ICMP destination unreachable message is
generated by a router to inform the source host that the
destination address is unreachable.
Source Quench
Source quench is a message from one host computer to another
telling it to reduce the pace at which it is sending packet to that
host.
Time exceeded
The ICMP Time Exceeded message notifies a host when a packet
it sent has been discarded because it was "out of time.
67
ICMP
Redirection error
An ICMP redirect is an error message sent by a
router to the sender of an IP packet .
Redirects are used when a router believes a packet is
being routed sub optimally and it would like to
inform the sending host that it should forward
subsequent packets to that same destination through a
different gateway
Parameter error
The Parameter Problem error message generally means
that something is wrong with the IP datagram itself,
68
and that the datagram is being discarded
VLAN- Virtual Local Area Network
A VLAN is a logical grouping of workstations, servers and
network devices that appear to be on the same LAN despite
their geographical distribution.
VLAN can be grouped by function, department, or
application, regardless of their physical segment location.
VLANs function by logically segmenting the network into
different broadcast domains so that packets are only switched
between ports that are designated for the same VLAN
The router interconnecting each shared hub typically
provides segmentation and can act as a broadcast firewall.

69
70
Why VLAN?
Routers in VLAN topologies provide
Broadcast filtering
Security
Traffic flow management
VLAN addresses
Scalability
Security, and
Network management
Switches may not bridge any traffic between VLANs
Traffic should only be routed between VLANs.
A VLAN allows several networks to work virtually as
71
one LAN.
Routing
Routing is used for taking a packet from
one device and sending it through the
network to another device on a different
network
Routers route traffic to all networks by
selecting the best route to reach remote
network
Routers communicate with one another to
72maintain their routing tables through the
Routers
A router is a network layer device that
uses one or more routing metrics to
determine the optimal path along which
network traffic should be forwarded.
Routers must maintain routing tables and
make sure other routers know of changes
in the network topology.
When packets arrive at an interface, the
router must use the routing table to
73
determine where to send them.
Routing

74
Routing Protocol
A routing protocol specifies how routers
communicate with each other to distribute
information that enables them to select routes
between any two nodes on a computer network
Routing protocols are created for routers
Routing protocols have been designed to allow
the exchange of routing tables between routers
Routing protocols use various combinations of
metrics for determining the best path for data.
75
Routing Metrics
Routing metrics are values used in determining the
advantage of one route over another
Bandwidth – The data capacity of a link.
Delay – The length of time required to move a packet
along each link from source to destination
Load – The amount of activity on a network resource
such as a router or a link
Reliability – Usually a reference to the error rate of each
network link
Hop count – The number of routers that a packet must
travel through before reaching its destination.
77
Routing Table
A routing table is a database that keeps track of
paths, like a map, and uses these to determine
which way to forward traffic.
It contains the information necessary to forward a
packet along the best path toward its destination.
A routing table is used to store route information
about directly connected and remote networks.
A routing table is a set of rules, often viewed in
table format, that is used to determine where data
78
packets traveling over an IP network will be
Routing Table
Routing Table contains information like:
The network address
The subnet mask
Protocol type
Destination/next-hop associations
the IP address of the router used to reach that
network.
Outgoing interfaces: the outgoing interface
the packet should go out to reach the destination
80
network.
Routing Table

82

You might also like