Chapter 2. Network Fundamental Concepts
Chapter 2. Network Fundamental Concepts
Chapter 2. Network Fundamental Concepts
NETWORK FUNDAMENTALS
Outline
• Protocols and protocol layering (TCP/ IP)
• Frame, IP Packet, TCP and UDP segment
• Network devices
• IP addressing (Subnetting and Suppernetting)
• Address resolution protocol (ARP)
• ICMP
• VLAN
• Routing
• Routing protocols
What is Computer Network?
Network Fundamentals
5 Session
4 Transport Transport
3 Network Internet
Application
Transport
Internet
Network
Access
The Application Layer
The application
layer of the
TCP/IP model
handles high-
level protocols,
issues of
representation,
encoding, and
dialog control.
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.
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.
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 of
the issues that an IP packet
requires to actually 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.
The TCP/IP Protocol Suite
The DoD and OSI models are alike in design and concept and have
similar functions in similar layers.
22
The TCP/IP Protocol
• Internet Protocols are 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)
The TCP/IP Protocol
• Protocols are rules for communication on a
network or between two hosts
• The Transmission Control Protocol/Internet
Protocol is a protocol stack, or grouping of
many related protocols, each working
together within a prescribed standard.
• TCP/IP is the most popular model for
connection to the Internet and within most
networks
Transmission Control Protocol(TCP)
Features
• Connection establishment
• Transport layer protocol
• Error checking of data
• Guaranteed packet delivery
• Breaks data into pieces at transmitter and
reassembles at receiver
• Only handled by the sender and receiver
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
• Dealt with at every router on the way from sender to
receiver
TCP/IP Protocols Suite
• FTP - File Transport Protocol at the application layer.
• Telnet - Remote session at the application layer.
• SMTP - Simple Mail Transport Protocol at the application layer.
• DHCP - Dynamic host configuration protocol is used to assign IP addresses dynamically to network
cards. It works at the application layer.
• TCP - Transport Control protocol is a connection oriented reliable protocol working at the transport
layer.
• UDP - User Datagram Protocol is a connection less unreliable protocol working at the transport layer.
• ICMP - Internet Control Message Protocol is used to perform network error reporting and status. It
works at the transport layer.
• IGMP - Internet Group Management Protocol is used to manage multicast groups and it works at the
transport layer.
• IP - Internet Protocol is used for software addressing of computers and works at the network layer.
• ARP - Address Resolution Protocol is used to resolve the hardware address of a card to package the
Ethernet data. It works at the network layer.
• RARP - Reverse Address Resolution Protocol used for disk less computers to determine their IP
address using the network. It works at the network layer.
Bits, Frame, IP Packet, TCP Segment, UDP Segment
Reading Assignment
Networking Devices
• NIC
• Repeater
• Hub
• Bridge
• Switch
• Router
• Brouter
• Others?-Explore!
Network Interface Card (NIC)
At source:
• Receives the data packet from the Network
Layer
• Attaches its MAC address to the data packet
• Attaches the MAC address of the destination
device to the data packet
• Converts data in to packets suitable for the
particular network (Ethernet, Token Ring, FDDI)
• Converts packets in to electrical, light or radio
signals
• Provides the physical connection to the media
NIC…
As a destination device
Provides the physical connection to the
media
Translates the signal in to data
Reads the MAC address to see if it matches
its own address
If it does match, passes the data to the
Network Layer
Repeater
• Allows the connection of segments
• Extends the network beyond the maximum length of a single
segment
• Functions at the Physical Layer of the OSI model
• A multi-port repeater is known as a Hub
• Connects segments of the same network, even if they use different
media
• Has three basic functions
• Receives a signal which it cleans up
• Re-times the signal to avoid collisions
• Transmits the signal on to the next segment
Advantages and disadvantages
Repeater
• Advantages – Can connect different types of
media, can extend a network in terms of
distance, does not increase network traffic
• Disadvantages – Extends the collision domain,
can not connect different network architectures,
limited number only can be used in network
Hub
• A central point of a star topology
• Allows the multiple connection of devices
• Can be more than a basic Hub – providing additional
services (Managed Hubs, Switched Hubs, Intelligent
Hubs)
• In reality a Hub is a Repeater with multiple ports
• Functions in a similar manner to a Repeater
• Works at the Physical Layer of the OSI model
• Passes data no matter which device it’s addressed to; and
this feature adds to congestion
Advantages and…
Hub
• Advantages – Cheap, can connect different media
types
• Disadvantages – Extends the collision domain, can
not filter information, passes packets to all
connected segments
Bridge
• Like a Repeater or Hub it connects
segments
• Works at Data Layer – not Physical
• Uses Mac address to make decisions
• Acts as a ’filter’, by determining whether
or not to forward a packet on to another
segment
Bridge…
• Builds a Bridging Table, keeps track of
devices on each segment
• Filters packets, does not forward them, by
examining their MAC address
• It forwards packets whose destination
address is on a different segment from its
own
• It divides a network in to multiple collision
domains – so reducing the number of
collisions
Bridge..
Uses the Spanning Tree Protocol (STP) – to decide whether to pass a packet
on to a different network segment
G Transmits to
B, bridge will
A Transmits to pass it to
C, bridge will Segment A
not pass it to
Segment B
Advantages and…
Bridge
Switch
• Advantages - Limits the collision domain,
can provide bridging, can be configured to
limit broadcast domain
• Disadvantages – More expensive than a
hub or bridge, configuration of additional
functions can be very complex
Router
• Works at Network Layer in an intelligent manner
• Can connect different network segments, if they are
in the same building or even on the opposite side of
the globe
• Works in LAN, MAN and WAN environments
• Allows access to resources by selecting the best
path
• Can interconnect different networks – Ethernet
with Token Ring
• Changes packet size and format to match the
requirements of the destination network
Router…
• Two primary functions – to determine the ‘best path’ and
to share details of routes with other routers
• Routing Table – a database which keeps track of the routes
to networks and the associated costs
• Static Routing – routes are manually configured by a
network administrator
• Dynamic Routing – adjust automatically to changes in
network topology, and information it receives from other
routers
• Routing Protocol – uses a special algorithm to route data
across a network eg RIP
Advantages and…
Router
• Advantages – Limits the collision domain,
can function in LAN or WAN, connects
differing media and architectures, can
determine best path/route, can filter
broadcasts
• Disadvantages – Expensive, must use
routable protocols, can be difficult to
configure (static routing), slower than a
bridge
Brouter
• Functions both as Bridge and a Router – hence
name
• Can work on networks using different protocols
• Can be programmed only to pass data packets
using a specific protocol forward to a segment –
in this case it is functioning in a similar manner to
a Bridge
• If a Brouter is set to route data packets to the
appropriate network with a routed protocol such
as IP, it is functioning as a Router
Gateways
• Allow different networks to communicate by offering
a translation service from one protocol stack to
another
• They work at all levels of the OSI model – due to the
type of translation service they are providing
• Address Gateway – connects networks using the same
protocol, but using different directory spaces such as
Message Handling Service
• Protocol Gateway – connects network using different
protocols. Translates source protocol so destination
can understand it
• Application Gateway – translates between
applications such as from an Internet email server to a
messaging server
IP ADDRESSING
What is an IP Address?
Dotted-decimal notation
Change the following IP address from binary notation
to dotted-decimal notation.
129.11.11.239
Find the error in the following IP address
111.56.045.78
There are no leading zeroes in Dotted-decimal notation
(045)
75.45.301.14
• In decimal notation each number <= 255
• 301 is out of the range
Finding the class in Binary notation
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
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?
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?
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?
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?
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.
• 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
A company is granted the site address 181.56.0.0 (class B).
The company needs 1000 subnets. Design the subnets.
200.1.0.0/24
200.1.1.0/24
200.1.2.0/24
200.1.3.0/24
Answer: 200.1.0.0/22
Example 2
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
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.
We need to make a supernetwork out of 16 class C blocks.
What is the supernet mask?
Solution
255.255.240.0
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?
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.
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.
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, is, sending information on the
wire).
• ARP has to know the physical address of the
machine to which it is going to send datagrams
• IP is used to determine routes and move packets
from network to network.
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.
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, ARP is used to find the MAC address of the gateway.
ICMP- INTERNET CONTROL MESSAGING PROTOCOL