0% found this document useful (0 votes)
23 views78 pages

Chapter - 2 Fundamental Network Concept

Uploaded by

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

Chapter - 2 Fundamental Network Concept

Uploaded by

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

Chapter 2:

Fundamental Network
Concepts
Outline

 Protocols and protocol layering


 Network Devices
 IP addressing
 VLAN
 Routing and Routing protocols
 Address Resolution Protocol (ARP)
What are Protocols?
 A standard used by networks for communication between
different devices connected to network.

 Agreement between Communication Devices

 It defines what is communicated, how and when is


communicated.

 It specifies:
o Format of messages
o Meaning of messages
o Rules for exchange
o Procedure for handling problems
Cont..

 Many problems can occur during communication


o Bits corrupted or destroyed

o Entire packet lost

o Packet duplicated

o Packets delivered out of order

 Need mechanisms to distinguish among:


o Multiple computers on a network
o Multiple applications on a computer
o Multiple copies of a single application on a computer
Sets of Protocols
 Work together
 Each protocol solves part of communication problem
 Known as Protocol suite or Protocol family
 Designed in layers
Protocol Layering
 Computer communication across a network is a very hard
problem.

 LAN/WAN hardware can't solve all computer communication


problems.

 Software for LAN and WAN systems is large and complicated.

 Complexity requires multiple protocols, each of which manages


a part of the problem.

 Layering is a structuring technique to organize networking


software design and implementation.
Protocol suites
 A set of related protocols that are designed for compatibility is
called a protocol suite.
 Protocol suite designers:
 Analyse communication problem

 Divide problems into sub-problems

 Design a protocol for each sub-problem

 A well-designed protocol suite:


 Is efficient and effective - solves the problem without redundancy
and makes best use of network capacity.

 Allows replacement of individual protocols without changes to


other protocols.
Layered protocol design
 Layering model is a solution to the problem of complexity in
network protocols.

 Model suggests dividing the network protocol into layers, each of


which solves part of the network communication problem.

 These layers have several constraints, which ease the design


problem.

 Network protocol designed to have a protocol or protocols for


each layer.
Cont..

 Two standard layering models:


 OSI Reference model
o Never lived up to early promises

 TCP/IP protocol suite


o Most widely used
OSI
 OSI stands for Open Systems Interconnection
 Developed by the International Organization for Standardization
(ISO)
 It allows different communication systems to communicate via
standard protocols.
 Seven layers
 A theoretical system delivered too late!
 TCP/IP is the de facto standard.
OSI Model
 A layer model
 Each layer performs a subset of the required communication
functions
 Each layer relies on the next lower layer to perform more
primitive functions
 Each layer provides services to the next higher layer
 Changes in one layer should not require changes in other layers
OSI Layers

 Defined early

 Now somewhat dated

 Does not include


internet layer!

Refer  https://www.imperva.com/learn/application-security/osi-model/
Protocol Stacks
Layers and Packet Headers

 Each layer
o Prepends header to outgoing data unit

o Removes header from incoming data unit

 Scientific layering principle:


Software implementing layer N at the destination receives exactly
the message sent by software implementing layer N at the source.
1
4
TCP/IP Protocol Suite
 It signifies transmission control protocol/Internet Protocol.
 Created by Defence Advanced Research Projects Agency (ARPA,
later DARPA) in the late 1970s.
 It is a collection of communication protocol considered as a
standard model in the field of computer networking.
 It has four layers:
 Application
 Transport
 Internet
 Network Access/ Host-to-host/ Host-to-Network/ Link Layer
TCP/IP Layers
Major Network Devices
 Network devices, also known as networking hardware, are
physical devices that allow hardware on a computer network to
communicate and interact with one another.
 Key network devices for network administration includes:
 Router
 Switch
 Gateway
 Hub
 Repeater
 Bridge
 Cable
 NIC, etc.
Hub
 Hubs work in the physical layer of the OSI model.
 It is a device for connecting multiple Ethernet devices and
making them act as a single network segment.
 It has multiple inputs and output ports in which a signal
introduced at the input of any port appears at the output of
every port except the original incoming port.
 Hubs do not perform packet filtering or addressing function,
they send the data packets to all the connected devices.
Bridge
 Bridge operates at the data link layer.
 It add on the functionality of filtering content by reading the
MAC addresses of the source and destination.
 It is also used for interconnecting two LANs working on the
same protocol.
 It has a single input and single output port, thus making it a 2
port device.
Switch
 A switch is a multiport bridge with a buffer and a design that
can boost its efficiency(a large number of ports imply less
traffic) and performance.
 A switch is usually considered as a data link layer device, but it
may also operate in network layer; a device that operates
simultaneously at more than one of these layers is known as a
multilayer switch.
 It can check the errors before forwarding the data, which
makes it more efficient and improves its performance.
 A switch is the better version of a hub.
Router
 Operates at the network layer to join multiple networks together

 It is a device like a switch that routes data packets based on their IP


addresses.

 Routers normally connect LANs and WANs and have a dynamically


updating routing table based on which they make decisions on routing
the data packets.

 Routers perform the traffic directing functions on the Internet.

 A data packet is typically forwarded from one router to another


through the networks until it reaches its destination IP address.

 Routers may also be used to connect two or more logical groups of


computer devices known as subnets, each with a different
subnetwork address.
Cables and Connection
 Without configuration, Routing device is a driverless car. It is
expensive, adorable but without driver it is useless.
 Configuration guides it to take proper action. Routing device
does not have any display interface. You have to connect it
with PC, tablet , laptop or other device in order to configure
it.
 We do have different option for connecting different network
devices, basically Router, Switches, Hub, Server, PC (and other
end devices)…
Router Interfaces
 A router supports many interface among those Serial, Ethernet
and Console are the must have interfaces. Every router has at
least these interfaces.
 Serial Interface
 Serial interface connects router with WAN network.

 In WAN network, communication takes place between two types


of device, i.e. DTE and DCE.
o DTE (Data Terminal Equipment): is an end device. It ends
communication line. It converts data into signal and vice versa.

o DCE (Data Communication Equipment): provides a path for


communication.
Ethernet interface
• Ethernet interface is used to connect local network to router,
PC to switch, switch to switch, and switch to router.

• Ethernet interface uses UTP cable for connection. UTP


(Unshielded twisted pair) cable has four pairs of wires twisted
inside it.
Cont..
 UTP cable used for:
 Ethernet connections
 Serial connections
 Console connections
 ISDN (Integrated Service Digital Network) connections
 Modular and fixed interface connections

 Different type of connections need different type of


configuration including:
 Straight-through
 Crossover
 Rollover
Straight-through Cable
 Straight-through cable is used to connect DTE to DCE devices.
It has same pin assignments on each end.

Side A Side B
White Green -------------- White Green
Green -------------- Green
White Orange -------------- White Orange
Blue -------------- Blue
White Blue -------------- White Blue
Orange -------------- Orange
White Brown -------------- White Brown
Brown -------------- Brown
Cont..

 A straight-through cable connects unlike devices:


 PC to Switch
 PC to Hub
 Router to Switch
 Switch to Server
 Hub to Server
Cross Over Cable
 In crossover cable TX and RX wires are connected at opposite
position on the end of cable.

Side A Side B
White Green -------------- White Orange
Green -------------- Orange
White Orange -------------- White Green
Blue -------------- Blue
White Blue -------------- White Blue
Orange -------------- Green
White Brown -------------- White Brown
Brown -------------- Brown
Cont..

 Crossover cable is used to connects alike devices.


 Two computers
 Two hubs
 A hub to a switch
 Two router interfaces
 A cable modem to a router
Console interface
 All interfaces except console, are by default administratively
down on router and switch.
 You have to connect with device (router or switch) via console
interface to configure other interfaces and make them active.
 Rollover (also known as Console) cable is used to connect
console interface with PC. In rollover cable all wires have
opposite position on each end.
How to access the IOS CLI?
 Before we can enter any commands, we need access to the CLI.
There are three options to do so:
 Console
 Telnet
 SSH
 IOS follows a command hierarchy, with each level offering
different set of commands.

 All commands are assigned a privilege level, from 0 to 15, and can
only be accessed by users with the necessary privilege.

 RJ-45(Registered Jack): is a connector used to make straight-


through, crossover, and rollover cables.
Command Hierarchy
 User EXEC level: This is the level that a connected user is
allowed initially. User EXEC allows access to a limited set of
basic monitoring commands.
o A “>“ sign denotes User EXEC mode.
 Privileged EXEC level: Privileged EXEC level allows access to
all router commands including router configuration and
management commands.
o This level is usually password protected for security reasons.

o A “#“ sign denotes privileged EXEC mode.

o The user can enter privileged EXEC mode by typing enable key
word from the User EXEC mode.
Cont..

 Global configuration mode: "Global configuration mode"


provides commands to change the system's configuration. This
is typically represented by “(config)#“ sign.
 Interface configuration mode: provides commands to change
the configuration of a specific interface of the router. An
interface configuration mode is denoted by “(config-if)#“.
Cont..
 A summary of Cisco IOS router command prompt is given
below:
Prompt Explanation

Router> User EXEC mode

Router# Privileged EXEC mode

Router(config)# Global configuration mode. # sign indicates this is only


accessible at privileged EXEC mode.

Router(config-if)# Interface level configuration mode.

Router(config-router)# Routing engine level within configuration mode.

Router(config-line)# Line level (console, vty, tty) within configuration mode.


Subnetting and IP
Addressing
IP Addressing
 An IP Address has 32 bits divided into four octets.
 To make the address easier to read, people use decimal
numbers to represent the binary digits.
 Example: 192.168.1.1
 Dotted decimal notation
 When binary IP addresses are written in decimal format
MAC to IP Address Comparison
 MAC address:
 Identifies a specific NIC in a computer on a network

 Each MAC address is unique

 TCP/IP networks can use MAC address in communication

 Network devices cannot efficiently route traffic using MAC


addresses because they:
 Are not grouped logically

 Cannot be modified

 Do not give information about physical or logical network


configuration
Cont..

 IP Addressing
 Devised for use on large networks
 IP addresses have a hierarchical structure and do provide
logical groupings
 IP address identifies both a network and a host

❐ Study about classfull and classless IP Addresses.


 Class A, B, C, D, and E
 Private IP address ranges
 CIDR and VLSM
IP Address Types
 Public IP Address
 can be accessed directly over the internet and is assigned to your
network router by your internet service provider (ISP).

 You must have public IP address to connect to the public Internet.

 Private IP Address
 the address your network router assigns to your device.

 Each device within the same network is assigned a unique private


IP address to talk to each other locally.

 Private IP address range:


o Class A: 10.0.0.0 — 10.255.255.255
Read more from here.
o Class B: 172.16.0.0 — 172.31.255.255
o Class C: 192.168.0.0 — 192.168.255.255
IP Address Default Classes
Five Different classes of IPv4 Addresses

ℎ = 2𝑛−2 𝑛 = 2𝑛

Refer: https://youtu.be/vcArZIAmnYQ
Subnetting
 A subnet is a logical division of an IP network.
It is the process of dividing a network into two or more
networks.
Reasons for subnetting:
 To match the physical layout of the organization
 To match the administration structure of the organization
 To plan for future growth
 To reduce network traffic
Network Addressing
 IP addresses identify both the network and the host
 The division between the two is not specific to a certain number of
octets

 Subnet Mask address:


◌ Indicates how much of the IP address represents the network or
subnet
◌ A TCP/IP host must have a nonzero host identifier
 Broadcast address:
◌ When the entire host portion of an IP address is all binary ones
◌ Example: 190.55.255.255 and 199.192.65.63
◌ Class C subnet mask is 255.255.255.0
Cont..

Considerations before subnetting:


 In any network (or subnet) one can use most of the IP
addresses for host addresses.
 One loses two addresses for every network or subnet.
1. Network Address - One address is reserved to that of the
network.

2. Broadcast Address – One address is reserved to address


all hosts in that network or subnet.
Subnet Masking
 When network administrators create subnets:
◌ They borrow bits from the original host field to make a set
of subnetworks
◌ The number of borrowed bits determines how many
subnetworks and hosts will be available
 Class C addresses also can be subdivided
◌ Not as many options or available masks exist because only
the last octet can be manipulated with this class
Subnet Masking Example

 Class B Subnet Masks


Subnet Masking Example..

 Class C Subnet Masks


Network Address Example

 Network address 172.19.0.0 with /16 network mask


Network Network Host Host
172 19 0 0
Subnet mask: 255.255.0.0
First valid host IP address: 172.19.0.1
Last valid host IP address: 172.19.255.254
Total Number of Host address supported: 65,534

Host Portion
• Subnet Address: all 0’s
• First Host: all 0’s and a 1 in rightmost bit
• Last Host: all 1’s and a 0 in rightmost bit
• Broadcast: all 1’s
Subnetting Steps
 Determine the subnet identifiers (IP addresses):
 Write the last masking octet as a binary number
 Determine the binary places of the last masking digit
 Calculate the subnets:
 Began with the major network number (subnet zero) and
increment by the considering the bit and its respective
place value.
 Stop counting when you reach the value of the mask
 Determine the valid ranges for your hosts on each subnet
 Take the ranges between each subnet identifier
 Remove the broadcast address for each subnet
Subnetting Formulas
 You should memorize these two formulas:
 𝟐𝒏 = number of usable subnets (where n is the number of
bits borrowed)
 = number of usable hosts per subnet (Where x is the
𝟐𝑛−2
number of bits remaining in the host field after borrowing)
Subnetting Exercises
1. A service provider has given you the Class C network range
200.50.10.0. Your company must break the network into 8
separate subnets.
a) Determine the subnets with their mask after subnetting
b) Determine the broadcast address
c) Determine the number of hosts your subnets support
d) Determine the valid host address range

2. Your company would like to break the class B private IP address


range 172.16.0.0 into as many subnets as possible, provided that
they can get at least 200 clients per subnet.

3. What is the network address of the IP address 192.168.100.115 if


it has a subnet mask of 255.255.255.240?
More Examples found in 1 and 2 links.
Subnetting types
 Two types of subnetting: FLSM (Fixed Length Subnet Mask)
and VLSM (Variable Length Subnet Mask).
FLSM VLSM

All subnets are equal in size. Subnets are variable in size.

All subnets have equal number of hosts. Subnets have variable number of hosts.

All subnets use same subnet mask. Subnets use different subnet masks.

It is easy in configuration and It is complex in configuration and


administration. administration.

It wastes a lot of IP addresses. It wastes minimum IP addresses.

It is also known as classfull Subnetting. It is also known as classless Subnetting.

It supports both classfull and classless It supports only classless routing


routing protocols. protocols.

Read more from here.


VLSM Exercise

Do the VLSM subnetting for


the network design in the
diagram considering the
following requirements.

A. Development department has 74 computers.


B. Administration department has 28 computers.
C. Production department has 52 computers.
D. All departments are connected with each other via wan links.
E. Each wan link requires two IP addresses.
F. The given address space is 192.168.1.0/24.
Collision and Broadcast Domain

Collision Domain:
 A collision domain is, as the name implies, a part of a network
where packet collisions can occur.
 A collision occurs when two devices send a packet at the same
time on the shared network segment.
 The packets collide and both devices must send the packets
again, which reduces network efficiency.
 Collisions are often in a hub environment, because each port
on a hub is in the same collision domain. By contrast, each port
on a bridge, a switch or a router is in a separate collision
domain.
Cont..

 Collision domain Example


Cont..
Broadcast domain
 A broadcast domain is a domain in which a broadcast is
forwarded.
 A broadcast domain contains all devices that can reach each
other at the data link layer (OSI layer 2) by using broadcast.
 All ports on a hub or a switch are by default in the same
broadcast domain.
 All ports on a router are in the different broadcast domains
and routers don’t forward broadcasts from one broadcast
domain to another.
Cont..

 Broadcast domain Example


VLAN (Virtual LAN)

 VLANs (Virtual LANs) are logical grouping of devices in the


same broadcast domain.
 VLANs are usually configured on switches by placing some
interfaces into one broadcast domain and some interfaces
into another.
 VLANS are mutually isolated and packets can only pass
between them through a router.
 The hosts grouped within a VLAN are unaware of the
VLAN’s existence.
 VLANs can be spread across multiple switches.
Cont..
Cont..
Access & trunk ports:
 Each port on a switch can be configured as either an access or a
trunk port.
 An access port is a port that can be assigned to a single VLAN.
 A trunk interface is an interface that is connected to another
switch. This type of interface can carry traffic of multiple VLANs.

VLAN Benefits:
 Security
 Cost reduction
 Better performance
 Shrink broadcast domains
 Improved IT staff efficiency
 Simpler project and application management
Configuring VLAN
 By default, all ports on a switch are in the VLAN 1. We can
verify that by typing the show vlan command from the IOS
enable mode of a switch:
 Two steps are required to create a VLAN and assign a switch
port to the VLAN:
1. create a VLAN using the vlan NUMBER global mode command
2. assign a port to the VLAN by using two interface subcommands.
• The first command is the switchport mode access command.
This command specifies that the interface is an access interface.
• The second command is the switchport access vlan
NUMBER command. This command assigns the interface to a VLAN.
Cont..
Inter VLAN Communication
 Each VLAN has its own subnet and broadcast domain, which
means that frames broadcast onto the network are only
switched between the ports within the same VLAN.
 For inter-VLAN communication, a layer 3 device (usually a
router) is needed.
 This layer 3 device needs to have an IP address in each
subnet (VLAN) and have a connected route to each of those
subnets.
 The hosts in each subnet can use the router's IP addresses as
their default gateway.
Cont..
Three options are available for routing between VLANs:
1. Use a router, with one router LAN interface connected
to the switch for each and every VLAN.
 Since you need one Ethernet interface on your router to
connect to each VLAN, this option is not really scalable
and rarely used today.
Cont..
2. Use one router interface with trunking enabled. This
option is called Router On A Stick (ROAS) and allows all
VLANs to communicate through a single interface.

2. Use a Layer 3 switch, a device that performs both the


switching and routing operations.
Configuring Router On A Stick
 To enable inter-VLAN communication, you can divide a single
physical interface on a router into logical interfaces (sub-
interfaces). This scenario called router on a stick (ROAS).

 To configure trunking on a router the following commands are


used:
o (config)#interface Type Number.SUBINTERFACE –
creates the subinterface and enters the subinterface command
mode.

o (config-subif)#encapsulation dot1Q VLAN_ID – sets


the subinterface to trunk and associates it with a specific VLAN.

o (config-subif)#ip address IP_ADDRESS SUBNET_MASK


– sets the ip address for the subinterface.
Configuring Router On A Stick: Example
VLAN Trunking Protocol (VTP)
 A Cisco proprietary messaging protocol used by Cisco switches to
exchange VLAN information.

 It synchronizes VLAN information (such as VLAN ID and Name) with


switches inside the same VTP domain, which simplifies network
administration.

 NOTE – VTP does not


advertise information about
which switch ports are
assigned to which VLAN.
Cont..
 Each Cisco switches operate in one of the three VTP modes:

 VTP Server mode: the default mode for switches. A switch


operating in this mode can create, update and delete VLANs.

 VTP Client mode: a switch operating in this mode can’t change


its VLAN configuration. Received VTP updates will be processed
and forwarded.

 VTP Transparent mode: a switch operating in this mode


doesn’t participate in VTP. It doesn’t advertise its VLAN
configuration for others switches.

 The configuration syntax is:


Sw1(config)#vtp mode MODE_NAME
Sw1(config)#vtp domain DOMAIN_NAME
Sw1(config)#vtp password PASSWORD
Cont..
 To exchange VTP messages, the following requirements must
be met:
 A switch has to be configured as either a VTP server or VTP
client.
 VTP domain name has to be the same in both switches.
 VTP versions have to match.
 If present, VTP domain password has to be the same.
 The link between the switches has to be configured as a trunk
link.
Routing and Routing protocols
 Routing is done by IP Router, when it searches the routing table
and decide which interface to end a packet out.

 Routing is carried out in a router


by consulting routing table.

 No unique format for routing


tables, typically routing table
contains:
 Network ID or Destination corresponding to the route
 Subnet mask to match the destination network
 Next Hop, an IP address of next hop router
 Outgoing interface the packet should go out to reach the
destination network
 Metric – commonly the minimum number of hops (routers
crossed) to the destination network
Cont..
 Three important routing elements :
 Algorithm: can be differentiate based on several key
characteristics
 Database: table in routers or routing table
 Protocol: the way information for routing to be gathered and
distributed
 Routing Algorithm design goals
 Optimality - compute the best route
 Simplicity/low overhead - efficient with a minimum software
and utilization overhead
 Robustness/stability - perform correctly in the face of unusual
circumstances
 Rapid convergence - responds quickly when the network
changes
 Flexibility - accurate adapt to a variety of network
Routing Protocols
 Routing protocols are the set of rules used by the routers to
communicate between source and destination.
 They do not move the information from source to destination
instead update the routing table.
 Routing protocol jobs:
 create routing table entries
 keep routing table up-to-date
 compute the best choice for the next hop router
 Metrics used in IP routing protocols:
 Bandwidth  Hop count
 Cost  Load
 Delay  Reliability
Routing Algorithm Types
Routing Algorithm: Static Routing
 Manually configured routing table
 Network Administrator manually assigns the path from source
to destination network
 A static route includes the network address and subnet mask
of the remote network, along with the IP address of the
next-hop router or exit interface.
 Can’t react dynamically to network change such as router’s
crash
 Work well with small network or simple topology because of
its scalability reasons (you have to configure each route on
each router).
 Default Static Route used when the routing table does not
contain a path for a destination network, it just matches all
packets.
ip route 0.0.0.0 0.0.0.0 NEXT_HOP_IP/EXIT_INT
(Static Routing) Cont..
Advantages:
 No overhead on router CPU
 No bandwidth usage between links
 Security (Only Admin add routes)
Disadvantages:
 Admin must really understand inter-network
information how each router is connected
 Admin must update all routes
(Static Routing) Cont..

Along with ping and traceroute, useful commands to verify static routes include:
 show ip route
 show ip route static
 show ip route [NETWORK]
Routing Algorithm: Dynamic Routing
 Network protocol adjusts automatically for topology or
traffic changes
 A routing protocol can dynamically choose a different route if
a link goes down, so this type of routing is fault-tolerant.
 Dynamic routing protocols are used by routers to share
information about the reachability and status of remote
networks.
 Dynamic routing protocols perform several activities,
including the following:
o Network discovery
o Updating and maintaining routing tables
Cont..
 There are several dynamic routing protocols for IP. Here
are some of the more common dynamic routing
protocols for routing IP packets:
o RIP (Routing Information Protocol)
o IGRP (Interior Gateway Routing Protocol)
o EIGRP (Enhanced Interior Gateway Routing Protocol)
o OSPF (Open Shortest Path First)
o IS-IS (Intermediate System–to–Intermediate System)
o BGP (Border Gateway Protocol)

You might also like