R&S Module-2
R&S Module-2
Module-2
How to Establish a Single Switched Network
eNSP is a graphical network simulation platform. Wireshark works alongside eNSP, you can
run the data packets in the network and analyze in Wireshark
The introduction of switching devices as a part of the network demonstrates how networks
are able to expand beyond point-to-point connections and shared networks in which
connections may occur. Switched networks can overcome the performance obstacles of a
shared network.
The establishment of a switch brings the capacity for increased port density to enable the
connection of greater end devices per network.
We will do a basic configuration of a switch in a network.
1. Open eNSP on your computer.
2. Click to open new topology
Once done, you need to make a few changes to the configuration of the switch.
8. This is how the switch CLI will open.
9. Now type the commands. Write “Open Sys-view”. Then, “interface Gigabitethernet
1/1/0”. Then, “duplex full” and “speed 100”. This setting will enable the switch to work with
the speed 100 and a full-duplex connection will be established.
10. Now type “display interface” to see if the system is Up and running.
Spanning tree protocol
The spanning tree protocol is a layer 2 protocol that tends to solve the problems when the
computers use the shared telecommunications paths on a local area network. When they
share the common path, if all the computers send the data simultaneously, it affects the
overall network performance and brings all the network traffic near a halt.
The spanning tree protocol (STP) overcomes this situation by using the concept of bridge
looping. Bridge looping is used when there are multiple connections between the two
endpoints, and messages are sent continuously, which leads to the flooding of the network.
To remove the looping, STP divides the LAN network into two or more segments with the
help of a device known as bridges. The bridge is used to connect the two segments so when
the message is sent, the message is passed through the bridge to reach the intended
destination. The bridge determines whether the message is for the same segment or a
different segment, and it works accordingly. This network segmentation greatly reduces the
chances of a network coming to a halt.
How spanning tree protocol works?
o This protocol selects one switch as a root bridge where the root bridge is a central
point as when the message is sent; then it always passes through the bridge.
o It selects the shortest path from a switch to the root bridge.
o It blocks the links that cause the looping on a network, and all the blocked links are
maintained as backups. It can also activate the blocked links whenever the active link
fails. Therefore, we can say that it also provides fault tolerance on a network.
Ports in STP
o Root port: The root port is a port that has the lowest cost path to the root bridge.
o Designated port: The designated port is a port that forwards the traffic away from
the root bridge.
o Blocking port: The blocking port is a port that receives the frames, but it neither
forwards nor sends the frames. It simply drops the received frames.
o Backup port: The backup port is a port that provides the backup path in a spanning
tree if a designated port fails. This port gets active immediately when the designated port
fails.
o Alternate port: The alternate port is a port that provides the alternate path to the
root bridge if the root bridge fails.
Let's understand through an example.
Suppose there are four switches A, B, C, and D on a local area network. There are redundant
links that exist among these interconnected devices. In the above figure, there are two
paths that exist, i.e., DBA and DCA. Link redundancy is good for network availability, but it
creates layer 2 loops. The question arises "how network blocks the unwanted links to avoid
the loops without destroying the link redundancy?". The answer to this question is STP.
First, STP chooses one switch as a root bridge. In the above case, A switch is chosen as a
root bridge. Next, other switches select the path to the root bridge, having the least path
cost. Now we look at the switch B. For switch B, there are two paths that exist to reach
switch A (root bridge), i.e., BDCA and BA.
The path BDCA costs 7 while the path BA costs 2. Therefore, path BA is chosen to
reach the root bridge. The port at switch B is selected as a root port, and the other end is a
designated port. Now we look at the switch C. From switch C, there are two paths that exist,
i.e., CDBA and CA. The least-cost path is CA, as it costs 1. Thus, it is selected as a root port,
and the other end is selected as a designated port. Now we look at the switch D. For switch
D, there are two paths that exist to reach switch A, i.e., DBA and DCA. The path DBA costs 4
while the DCA costs 5. Therefore, path DBA is chosen as it has the least cost path. The port
on D is selected as a root port, and on the other end, switch B is selected as a designated
port. In this example, we have observed that the root bridge can contain many designated
ports, but it does not contain a root port.
Static routing
It is a form of routing that occurs when a router uses a manually-configured routing entry,
rather than information from dynamic routing traffic. In many cases, static routes are
manually configured by a network administrator by adding in entries into a routing table,
though this may not always be the case.[2] Unlike dynamic routing, static routes are fixed and
do not change if the network is changed or reconfigured. Static routing and dynamic
routing are not mutually exclusive. Both dynamic routing and static routing are usually used
on a router to maximise routing efficiency and to provide backups in case dynamic routing
information fails to be exchanged. Static routing can also be used in stub networks, or to
provide a gateway of last resort.
Static routes are one way we can communicate to remote networks. In production networks,
static routes are mainly configured when routing from a particular network to a stub network.
stub networks are networks that can only be accessed through one point or one interface.
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.
>> Use debug command to get the details :
# debug ip rip
>> Use this command to show all routes configured in router, say for router R1 :
R1# show ip route
>> Use this command to show all protocols configured in router, say for router R1 :
R1# show ip protocols
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
Note: no auto-summary command disables the auto-summarisation. If we don’t select any
auto-summary, then the subnet mask will be considered as classful in Version 1.
Configuring RIP for R2:
R2(config)# router rip
R2(config-router)# network 192.168.10.0
R2(config-router)# network 172.16.10.0
R2(config-router)# version 2
R2(config-router)# no auto-summary
Similarly, Configure RIP for R3 :
R3(config)# router rip
R3(config-router)# network 10.10.10.0
R3(config-router)# network 172.16.10.4
R3(config-router)# network 172.16.10.0
R3(config-router)# version 2
R3(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.
Note that all these times are adjustable. Use this command to change the timers :
R1(config-router)# timers basic
R1(config-router)# timers basic 20 80 80 90
Open Shortest Path First (OSPF)
It is a link-state routing protocol that is used to find the best path between the source and the
destination router using its own Shortest Path First). OSPF is developed by Internet
Engineering Task Force (IETF) as one of the Interior Gateway Protocol (IGP), i.e, the protocol
which aims at moving the packet within a large autonomous system or routing domain. It is a
network layer protocol which works on protocol number 89 and uses AD value 110. OSPF uses
multicast address 224.0.0.5 for normal communication and 224.0.0.6 for update to
designated router(DR)/Backup Designated Router (BDR).
OSPF terms –
1. Router I’d – It is the highest active IP address present on the router. First, the highest
loopback address is considered. If no loopback is configured then the highest active IP
address on the interface of the router is considered.
2. Router priority – It is an 8-bit value assigned to a router operating OSPF, used to elect
DR and BDR in a broadcast network.
3. Designated Router (DR) – It is elected to minimize the number of adjacencies formed.
DR distributes the LSAs to all the other routers. DR is elected in a broadcast network
to which all the other routers share their DBD. In a broadcast network, the router
requests for an update to DR, and DR will respond to that request with an update.
4. Backup Designated Router (BDR) – BDR is a backup to DR in a broadcast network.
When DR goes down, BDR becomes DR and performs its functions.
DR and BDR election – DR and BDR election takes place in the broadcast network or multi-
access network. Here are the criteria for the election:
1. Router having the highest router priority will be declared as DR.
2. If there is a tie in router priority then the highest router I’d be considered. First, the
highest loopback address is considered. If no loopback is configured then the highest
active IP address on the interface of the router is considered.
OSPF states – The device operating OSPF goes through certain states. These states are:
1. Down – In this state, no hello packets have been received on the interface.
Note – The Downstate doesn’t mean that the interface is physically down. Here, it
means that the OSPF adjacency process has not started yet.
2. INIT – In this state, the hello packets have been received from the other router.
3. 2WAY – In the 2WAY state, both the routers have received the hello packets from
other routers. Bidirectional connectivity has been established.
Note – In between the 2WAY state and Exstart state, the DR and BDR election takes
place.
4. Exstart – In this state, NULL DBD are exchanged. In this state, the master and slave
elections take place. The router having the higher router I’d become the master while
the other becomes the slave. This election decides Which router will send its DBD first
(routers who have formed neighbourship will take part in this election).
5. Exchange – In this state, the actual DBDs are exchanged.
6. Loading – In this state, LSR, LSU, and LSA (Link State Acknowledgement) are
exchanged.
Important – When a router receives DBD from other router, it compares its own DBD
with the other router DBD. If the received DBD is more updated than its own DBD then
the router will send LSR to the other router stating what links are needed. The other
router replies with the LSU containing the updates that are needed. In return to this,
the router replies with the Link State Acknowledgement.
7. Full – In this state, synchronization of all the information takes place. OSPF routing can
begin only after the Full state.
The above figure shows the basic model of the FTP. The FTP client has three components: the
user interface, control process, and data transfer process. The server has two components:
the server control process and the server data transfer process.
There are two types of connections in FTP:
o Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command or
line of response at a time. The control connection is made between the control
processes. The control connection remains connected during the entire interactive
FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may
vary. The data connection is made between data transfer processes. The data
connection opens when a command comes for transferring the files and closes when
the file is transferred.
FTP Clients
o FTP client is a program that implements a file transfer protocol which allows you to
transfer files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files
between you and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser. This GUI
based FTP client makes the file transfer very easy and also does not require to
remember the FTP commands.
Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest
way to transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to get
the entire file.
o Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth. Suppose
you are a manager of the company, you send some information to all the employees,
and they all send information back on the same server.
Disadvantages of FTP:
o The standard requirement of the industry is that all the FTP transmissions should be
encrypted. However, not all the FTP providers are equal and not all the providers offer
encryption. So, we will have to look out for the FTP providers that provides encryption.
o FTP serves two operations, i.e., to send and receive large files on a network. However,
the size limit of the file is 2GB that can be sent. It also doesn't allow you to run
simultaneous transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted
eavesdropping. So, it is quite possible that attackers can carry out the brute force
attack by trying to guess the FTP password.
o It is not compatible with every system.
Telnet
o The main task of the internet is to provide services to users. For example, users want
to run different application programs at the remote site and transfers a result to the
local site. This requires a client-server program such as FTP, SMTP. But this would not
allow us to create a specific program for each demand.
o The better solution is to provide a general client-server program that lets the user
access any application program on a remote computer. Therefore, a program that
allows a user to log on to a remote computer. A popular client-server program Telnet
is used to meet such demands. Telnet is an abbreviation for Terminal Network.
o Telnet provides a connection to the remote computer in such a way that a local
terminal appears to be at the remote side.
There are two types of login:
Local Login
o When a user logs into a local computer, then it is known as local login.
o When the workstation running terminal emulator, the keystrokes entered by
the user are accepted by the terminal driver. The terminal driver then passes
these characters to the operating system which in turn, invokes the desired
application program.
o However, the operating system has special meaning to special characters. For
example, in UNIX some combination of characters have special meanings such
as control character with "z" means suspend. Such situations do not create any
problem as the terminal driver knows the meaning of such characters. But, it
can cause the problems in remote login.
Remote login
o The network virtual terminal is an interface that defines how data and
commands are sent across the network.
o In today's world, systems are heterogeneous. For example, the operating
system accepts a special combination of characters such as end-of-file token
running a DOS operating system ctrl+z while the token running a UNIX
operating system is ctrl+d.
o TELNET solves this issue by defining a universal interface known as network
virtual interface.
o The TELNET client translates the characters that come from the local terminal
into NVT form and then delivers them to the network. The Telnet server then
translates the data from NVT form into a form which can be understandable
by a remote computer.
SNMP
o SNMP stands for Simple Network Management Protocol.
o SNMP is a framework used for managing devices on the internet.
o It provides a set of operations for monitoring and managing the internet.
SNMP
SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,
GetResponse, and Trap.
GetRequest: The GetRequest message is sent from a manager (client) to the agent (server) to
retrieve the value of a variable.
GetNextRequest: The GetNextRequest message is sent from the manager to agent to retrieve
the value of a variable. This type of message is used to retrieve the values of the entries in a
table. If the manager does not know the indexes of the entries, then it will not be able to
retrieve the values. In such situations, GetNextRequest message is used to define an object.
GetResponse: The GetResponse message is sent from an agent to the manager in response
to the GetRequest and GetNextRequest message. This message contains the value of a
variable requested by the manager.
SetRequest: The SetRequest message is sent from a manager to the agent to set a value in a
variable.
Trap: The Trap message is sent from an agent to the manager to report an event. For example,
if the agent is rebooted, then it informs the manager as well as sends the time of rebooting.
Internet Protocol version 6 (IPv6)
IP v6 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. There are 8 groups and each
group represents 2 Bytes.