Chapter 2. Fundamental of Computer Network
Chapter 2. Fundamental of Computer Network
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
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 . . .
27
Advantages of Subnetting
29
Finding the Subnet Address
30
Finding the Subnet Address
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.
35
The mask is
11111111 11111111 11111111 11100000
or
255.255.255.224
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
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.
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
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
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