Unit 2 CN
Unit 2 CN
Unit 2 CN
Messages
The ICMP messages are usually divided into two categories:
The Time Exceeded Error Message: This is the same as the Time to Live network-
based event
Query messages: The query messages are those messages that help the host to get
the specific information of another host. For example, suppose there are a client and a server,
and the client wants to know whether the server is live or not, then it sends the ICMP message
to the server
The Traceroute: This is a tool that is used by the network administrator in order to
map out the potential path, or route, that the data packet can take.
The Ping: In this scenario, there are two types of ICMP messages that are used: Echo
Request and Echo Reply. First, the echo request is sent out and then the echo reply is
transmitted back.
SNMP components –
There are 3 components of SNMP:
1. SNMP Manager –
It is a centralized system used to monitor network. It is also known as Network
Management Station (NMS)
2. SNMP agent –
It is a software management software module installed on a managed device.
Managed devices can be network devices like PC, routers, switches, servers, etc.
3. Management Information Base –
MIB consists of information on resources that are to be managed. This information
is organized hierarchically. It consists of objects instances which are essentially
variables.
SNMP Protocols
SNMP uses two other protocols which are as follows −
1) SMI:
SMI stands for Structure Management Information. SMI represents the general rules for
naming objects, defining object types (including range and length), and showing how to encode
objects and values.
SMI does not determine the number of objects an entity should handle or name the objects to
be managed or define the relationship between the objects and their values.
2) MIB:
MIB stands for Management information base. For each entity to be handled, this protocol
must represent the number of objects, name them as per the rules represented by SMI, and
relate a type to each named object. MIB generates a collection of named objects, their types,
and their relationships to each other in an entity to be managed.
3. First IP address of the Block must be evenly divisible by the size of the block. in
simple words, the least significant part should always start with zeroes in Host Id.
Since all the least significant bits of Host Id is zero, then we can use it as Block Id
part.
Example:
Check whether 100.1.2.32 to 100.1.2.47 is a valid IP address block or not?
1. All the IP addresses are contiguous.
2. Total number of IP addresses in the Block = 16 = 2 4.
3. 1st IP address: 100.1.2.00100000
Since, Host Id will contains last 4 bits and all the least significant 4 bits are zero.
Hence, first IP address is evenly divisible by the size of the block.
All the three rules are followed by this Block. Hence, it is a valid IP address block.
Advantages of CIDR:
CIDR can be used to effectively manage the available IP address space.
CIDR can reduce the number of routing table entries.
Disadvantages of CIDR:
it is no longer possible to determine by looking at the first octet to determine how
many bits of an IP address represent the network ID and how many the host ID.
Internet Protocol version 6 (IPv6):
Internet Protocol version 6 (IPv6): It is the most recent version of the Internet
Protocol (IP), the communications protocol that provides an identification and location system
for computers on networks and routes traffic across the Internet. ... IPv6 is intended to replace
IPv4.IPv6 was developed by Internet Engineering Task Force (IETF) to deal with the problem of
IP v4 exhaustion. IP v6 is a 128-bits address having an address space of 2^128, which is way
bigger than IPv4. In IPv6 we use Colon-Hexa representation.
The IPv6 (Internetworking Protocol, version 6) is designed to overcome the shortfalls of the
IPv4.
Packet Format of IPv6:
The IPv6 packet is shown in the diagram. Each packet is composed of base header and the
payload. The payload consists of two fields, optional extension headers and the data from
upper layer.
1. Version : This is 4 bit field, which defines the version number of an IP and its value is 6 for
IPv6.
2. Priority : This is 4 bit field, which defines the priority of the packet with respect to the traffic
congestion.
3. Flow label : This is 24 bit field, which is designed to provide facility of specially handling the
specific flow of the data.
4. Payload length : This is 16 bit field, which defines the length of an IP datagram excluding the
base header.
5. Next header : This is 8 bit field, which defines the header that follows the base header in the
datagram.
6. Hop limit : This is 8 bit field, which serves the same purpose as the TTL( Time to Live field in
IPv4) field. It is a mechanism that limits the life span of the data in computer networks.
7. Source address : This is 128 bit source address field, which identifies the original source of
the datagram.
8. Destination address : It is 128 bit destination address field, which identifies the original
destination of the datagram.
Priority field of IPv6: Defines the priority of each packet with respect to other packets from the
same source.
The IPv6 divides the traffic into two categories:
Congestion-Controlled Traffic : If source can adjust itself with traffic slowdown due to
congestion, the traffic is referred to as congestion controlled traffic.
Non Congestion-Controlled Traffic : Non-Congestion - Controlled Traffic is a type of
traffic which can accept a minimum delay.
1. Unicast Address –
Unicast Address identifies a single network interface. A packet sent to a unicast address is
delivered to the interface identified by that address.
2. Multicast Address –
Multicast Address is used by multiple hosts, called as Group, acquires a multicast destination
address. These hosts need not be geographically together. If any packet is sent to this
multicast address, it will be distributed to all interfaces corresponding to that multicast
address.
3. Anycast Address –
Anycast Address is assigned to a group of interfaces. Any packet sent to an anycast address
will be delivered to only one member interface (mostly nearest host possible).
Note: Broadcast is not defined in IPv6.
0000 01 UA 1/64
0000 1 UA 1/32
0001 UA 1/16
010 UA 1/8
011 UA 1/8
100 UA 1/8
101 UA 1/8
110 UA 1/8
1110 UA 1/16
1111 0 UA 1/32
1111 10 UA 1/64
Note: In IPv6, all 0’s and all 1’s can be assigned to any host, there is not any restriction like
IPv4.
Advantages of IPv6:
Some advantages of IPv6 over IPv4 are mentioned below:
1. Address Space : IPv6 has a 128 bit long address, which is larger than IPv4.
2. Header format : IPv6 has a new header format, in which options are separated from the base
header and inserted between the base header and the upper layer data.
3. Extension : IPv6 is designed to allow the extension of the protocol, if required for new
applications.
4. Security : Encryption and authentication mechanism provides confidentiality and integrity to
the packets in IPv6.
Routing Protocols
Routing Protocols are the set of defined rules used by the routers to communicate
between source & destination. They do not move the information to the source to a
destination, but only update the routing table that contains the information.Network
Router protocols helps you to specify way routers communicate with each other. It
allows the network to select routes between any two nodes on a computer network.
Static
Dynamic
Routing Protocols
Advantages:
No overhead on router CPU.
No unused bandwidth between links.
Only the administrator is able to add routes
Disadvantages:
The administrator must know how each router is connected.
Not an ideal option for large networks as it is time intensive.
Whenever link fails all the network goes down which is not feasible in small
networks.
In the Distance Vector routing protocol, when a route becomes unavailable, all
routing tables need to be updated with new information.
Advantages:
Updates of the network are exchanged periodically, and it is always broadcast.
This protocol always trusts route on routing information received from
neighbor routers.
Disadvantages:
As the routing information are exchanged periodically, unnecessary traffic is
generated, which consumes available bandwidth.
1. RIPv1
2. RIPv2
Advantage:
Easier to configure even on larger networks.
It will be dynamically able to choose a different route in case if a link goes
down.
It helps you to do load balancing between multiple links
Disadvantage:
Updates are shared between routers, so it consumes bandwidth.
Routing protocols put an additional load on router CPU or RAM.
Features of RIP
Updates of the network are exchanged periodically.
Updates (routing information) are always broadcast.
Full routing tables are sent in updates
Routers always trust routing information received from neighbor routers. This
is also known as Routing on rumors.
RIP versions :
There are three versions of routing information protocol –
RIP Version1
RIP Version2
RIPng.
RIP v1 RIP v2 RIPng
Doesn’t support
authentication of updated Supports authentication of
messages RIPv2 update messages –
RIP v1 is known as Classful Routing Protocol because it doesn’t send information of subnet
mask in its routing update. RIP v2 is known as Classless Routing Protocol because it sends
information of subnet mask in its routing update.
Configuration :
Consider the above-given topology which has 3-routers R1, R2, R3. R1 has IP address
172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0. R2 has IP address 172.16.10.2/30
on s0/0/0, 192.168.10.1/24 on fa0/0. R3 has IP address 172.16.10.5/30 on s0/1,
172.16.10.1/30 on s0/0, 10.10.10.1/24 on fa0/0.
Configure RIP for R1 :
R1(config)# router rip
R1(config-router)# network 192.168.20.0
R1(config-router)# network 172.16.10.4
R1(config-router)# version 2
R1(config-router)# no auto-summary
RIP timers:
Update timer: The default timing for routing information being exchanged by the
routers operating RIP is 30 seconds. Using an Update timer, the routers exchange their
routing table periodically.
Invalid timer: If no update comes until 180 seconds, then the destination router
considers it invalid. In this scenario, the destination router mark hop counts as 16 for that
router.
Hold down timer: This is the time for which the router waits for a neighbor router to
respond. If the router isn’t able to respond within a given time then it is declared dead. It
is 180 seconds by default.
Flush time: It is the time after which the entry of the route will be flushed if it doesn’t
respond within the flush time. It is 60 seconds by default. This timer starts after the route
has been declared invalid and after 60 seconds i.e time will be 180 + 60 = 240 seconds.
Interior Gateway Routing Protocol (IGRP):
Interior Gateway Routing Protocol (IGRP) is a proprietary distance vector routing protocol used
to communicate routing information within a host network. It was invented by Cisco. IGRP
manages the flow of routing information within connected routers in the host network or
autonomous system. The protocol ensures that every router has routing tables updated with
the best available path. IGRP also avoids routing loops by updating itself with the changes
occurring over the network and by error management.
Distance Vector technique: Distance Vector Protocols advertise their routing table
to every directly connected neighbor at specific time intervals using lots of
bandwidths and slow converge.
Distance: Means actual distance, how far is a network. In IGRP distance is measured in hop
counts.
IGRP uses Bellman-ford Distance Vector Algorithm to determine the best path to a
destination.
IGRP is a Cisco Proprietary, thus it works only on Cisco Routers.
Its Updates are broadcasted using IP address 255.255.255.255.
IGRP Administrative distance is 100.
Its Max hop count is 255, default is 100
Its Load balancing up to 6 equal or unequal paths
IGRP is used for large organizations.
IGRP Send periodic updates, i.e. send information about its routes every 90 seconds
It is a Classful routing protocol, i.e. Subnet masks are not included in routing table updates.
IGRP uses the concept of Autonomous System number, which is like a boundary or domain.
Routers in same Autonomous system can communicate and send routing updates to each other.
IGRP Timers :
Advantages of IGRP :
Disadvantages of IGRP:
SWITCHING SERVICES:
Switching is process to forward packets coming in from one port to a port leading towards the
destination. When data comes on a port it is called ingress, and when data leaves a port or goes
out it is called egress. A communication system may include number of switches and nodes.
At broad level, switching can be divided into two major categories:
Circuit Switching: When two nodes communicate with each other over a dedicated
communication path, it is called circuit switching. In circuit switching, to transfer the
data, circuit must be established so that the data transfer can take place.
Circuits can be permanent or temporary. Applications which use circuit switching may have to
go through three phases:
Establish a circuit
Transfer the data
Disconnect the circuit
Circuit switching was designed for voice applications. Telephone is the best suitable example of
circuit switching.
Packet switching enhances line efficiency as packets from multiple applications can be
multiplexed over the carrier. The internet uses packet switching technique. Packet switching
enables the user to differentiate data streams based on priorities. Packets are stored and
forwarded according to their priority to provide quality of service.
Advantages of Switches:
They increase the available bandwidth of the network.
They help in reducing workload on individual host PCs..
They increase the performance of the network.
Switches can be connected directly to workstations.
Disadvantages of Switches:
They are more expensive compare to network bridges.
Broadcast traffic may be troublesome.
Proper design and configuration is needed in order to handle multicast packets.
Network connectivity issues are difficult to be traced through the network switch .
Spanning Tree Protocol (STP):
The Spanning Tree Protocol (STP) is a network protocol that builds a loop-free logical
topology for Ethernet networks. The basic function of STP is to prevent bridge loops and the
broadcast radiation that results from them.
Need for Spanning Tree : Consider the scenario below with 3 switches with one user
attached to each switch.
Arvind sends a broadcast frame to LAN and as nature of switch frame are send out from other
ports (Gi0/1 & Gi0/2) except receiving port (Fa0/3). Now, this frame goes to SW2, SW2 also
broadcast frame out of Gi0/2 and Fa0/2 ports. SW1 receives frame in its Gi0/1 ports. SW1
also broadcast frame then this frame goes to SW3 and frame broadcasting goes on.
Remember that this frame broadcast also occurs in other direction from SW3 out of Gi0/1
port. Above discussed frame looping was from SW3’s Gi0/2 ports. You can imagine the frame
flooding in that small LAN. This forever looping of frames around LAN is called Broadcast
storm.
4. Rapid Per VLAN Spanning Tree + (RPVST+) –This Spanning Tree standard is
developed by Cisco which provides faster convergence than PVST+ and finds separate instance
of 802.1w per VLAN. It requires much more CPU and memory than other STP standards.
5. 802.1s (Multiple Spanning Tree) :-This standard is developed by IEEE in which
grouping of VLANs is done and for each single group, RSTP is run. This is basically a Spanning
Tree Protocol running over another Spanning Tree Protocol.
Advantages:
High redundancy
load balancing can be achieved.
lower CPU and memory usage is required
Disadvantages:
More configuration is required and not easy to implement.
SNMP components –
There are 3 components of SNMP:
1. SNMP Manager –
It is a centralized system used to monitor network. It is also known as Network
Management Station (NMS)
2. SNMP agent –
It is a software management software module installed on a managed device.
Managed devices can be network devices like PC, routers, switches, servers.
3. Management Information Base –
MIB consists of information on resources that are to be managed. This information is
organized hierarchically. It consists of objects instances which are essentially
variables.
SNMP messages –
1. GetRequest –
SNMP manager sends this message to request data from the SNMP agent. It is simply used
to retrieve data from SNMP agents. In response to this, the SNMP agent responds with
the requested value through a response message.
2. GetNextRequest –
This message can be sent to discover what data is available on an SNMP agent. The SNMP
manager can request data continuously until no more data is left. In this way, the SNMP
manager can take knowledge of all the available data on SNMP agents.
3. GetBulkRequest –
This message is used to retrieve large data at once by the SNMP manager from the SNMP
agent. It is introduced in SNMPv2c.
4. SetRequest –
It is used by the SNMP manager to set the value of an object instance on the SNMP agent.
5. Response –
It is a message sent from the agent upon a request from the manager. When sent in
response to Get messages, it will contain the data requested. When sent in response to
the Set message, it will contain the newly set value as confirmation that the value has
been set.
6. Trap –
These are the message sent by the agent without being requested by the manager. It is
sent when a fault has occurred.
7. InformRequest –
It was introduced in SNMPv2c, used to identify if the trap message has been
received by the manager or not. The agents can be configured to set trap
continuously until it receives an Inform message.
SNMP security levels –
It defines the type of security algorithm performed on SNMP packets. These are used in
only SNMPv3. There are 3 security levels namely:
1. noAuthNoPriv – This (no authentication, no privacy) security level uses a
community string for authentication and no encryption for privacy.
2. authNopriv – This security level (authentication, no privacy) uses HMAC with Md5
for authentication and no encryption is used for privacy.
3. authPriv – This security level (authentication, privacy) uses HMAC with Md5 or SHA
for authentication and encryption uses the DES-56 algorithm.
SNMP versions –
There are 3 versions of SNMP:
1) SNMPv1 – It uses community strings for authentication and uses UDP only.
2) SNMPv2c – It uses community strings for authentication. It uses UDP but can be
configured to use TCP.
3) SNMPv3 – It uses Hash-based MAC with MD5 or SHA for authentication and DES-56 for
privacy. This version uses TCP. Therefore, the conclusion is the higher the version of SNMP,
the more secure it will be.
Advantages of SNMP:
Standardized device monitoring, eliminating the need for complex monitoring
configurations.
Vendorless monitoring (meaning devices from any manufacturer are recognized)
Automatic parameter monitoring.
Real-time status updates.