Lab No.
1
________________________________________________________________________
AIM: Learning the concepts of networking devices and networking model.
OBJECTIVE: To get familiar with different networking devices and learn about
networking models including OSI and TCP/IP models.
THEORY:
Networking models
OSI model: The OSI model is a layered framework for the design of network systems
that allows communication between all types of computer systems. It consists of seven
separate but related layers, each of which defines a part of the process of moving
information across a network.
• The physical layer is responsible for movements of individual bits from one hop
(node) to the next.
• The data link layer is responsible for moving frames from one hop (node) to the
next.
• The network layer is responsible for the delivery of individual packets from the
source host to the destination host.
• The transport layer is responsible for the delivery of a message from one process
to another.
• The session layer is responsible for dialog control and synchronization.
• The presentation layer is responsible for translation, compression, and encryption.
• The application layer is responsible for providing services to the user.
The OSI model is composed of seven ordered layers: physical (layer 1), data link (layer
2), network (layer 3), transport (layer 4), session (layer 5), presentation (layer 6), and
application (layer 7). Figure 1 shows the layers involved when a message is sent from
device A to device B. As the message travels from A to B, it may pass through many
intermediate nodes. These intermediate nodes usually involve only the first three layers
of the OSI model.
In developing the model, the designers distilled the process of transmitting data to its
most fundamental elements. They identified which networking functions had related
uses and collected those functions into discrete groups that became the layers. Each
layer defines a family of functions distinct from those of the other layers. The OSI
model allows complete interoperability between otherwise incompatible systems.
TCP/IP PROTOCOL
The TCP/IP protocol suite was developed prior to the OSI model. Therefore, the layers in the
TCP/IP protocol suite do not exactly match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers: host-to-network, internet, transport, and
application. However, when TCP/IP is compared to OSI, we can say that the host-to-network
layer is equivalent to the combination of the physical and data link layers. The internet layer is
equivalent to the network layer, and the application layer is roughly doing the job of the session,
presentation, and application layers with the transport layer in TCP/IP taking care of part of the
duties of the session layer.
We assume that the TCP/IP protocol suite is made of five layers: physical, data link, network,
transport, and application. The first four layers provide physical standards, network interfaces,
internetworking, and transport functions that correspond to the first four layers of the OSI
model. The three topmost layers in the OSI model, however, are represented in TCP/IP by a
single layer called the application layer (see Figure 3).
Fig 3: TCP/IP Model
Network Devices
Functions of network devices:
• Separating (connecting) networks or expanding network
• e.g. repeaters, hubs, bridges, routers, b-routers, switches, gateways
• Remote access
• e.g. 56K Modems and ADSL modems
• Expanding Network
• Networks cannot be made larger by simply adding new computers and more cables
• Less efficient!!
• Can install components to
• segment (divide) large LAN to form smaller LANs
• connect LANs
• Required components
• Repeaters, bridges, routers, b-routers, switches or gateways
Gateways: Gateways work on all seven OSI layers. The main job of a gateway is to convert
protocols (A protocol defines the format and the order of messages exchanged between two or
more communicating entities, as well as the actions taken on the transmission and/or receipt of
a message) among communications networks. A router by itself transfers, accepts and relays
packets only across networks using similar protocols. A gateway on the other hand can accept
a packet formatted for one protocol (e.g. AppleTalk) and convert it to a packet formatted for
another protocol (e.g. TCP/IP) before forwarding it. A gateway can be implemented in
hardware, software or both, but they are usually implemented by software installed within a
router. A gateway must understand the protocols used by each network linked into the router.
Gateways are slower than bridges, switches and (non-gateway) routers.
A gateway is a network point that acts as an entrance to another network. On the Internet, a
node or stopping point can be either a gateway node or a host (end-point) node. Both the
computers of Internet users and the computers that serve pages to users are host nodes, while
the nodes that connect the networks in between are gateways. For example, the computers that
control traffic between company networks or the computers used by internet service providers
(ISPs) to connect users to the internet are gateway nodes.
A gateway is often associated with both a router, which knows where to direct a given packet
of data that arrives at the gateway, and a switch, which furnishes the actual path in and out of
the gateway for a given packet. While forwarding an IP packet to another network, the gateway
might or might not perform Network Address Translation. A gateway is an essential feature of
most routers, although other devices (such as any PC or server) can function as a gateway.
Router: A router, is an electronic device used to connect two or more computers or other
electronic devices to each other, and usually to the Internet, by wire or radio signals. This
allows several computers to communicate with each other and to the Internet at the same time.
If wires are used, each computer is connected by its own wire to the router. Modern wired-only
routers designed for the home or small business typically have one "input" port (to the Internet)
and four "output" ports, one or more of which can be connected to other computers. A typical
modern home wireless router, in addition to having four wired ports, also allows several
devices to connect with it wirelessly.
To connect with a wireless router, a device must have an adapter. This is sometimes, but not
always, included with the computer at manufacture. Some electronic games, including
handheld electronic games, have an adapter built-in, or one can be added later.
More technically, a router is a networking device whose software and hardware are usually
tailored to the tasks of routing and forwarding information. Routers connect two or more logical
subnets, which do not necessarily map one-to-one to the physical interfaces of the router. The
term "layer 3 switching" is often used interchangeably with routing, but switch is a general
term without a rigorous technical definition. In marketing usage, a switch is generally
optimized for Ethernet LAN interfaces and may not have other physical interface types. In
comparison, the network hub (predecessor of the "switch" or "switching hub") does not do any
routing, instead every packet it receives on one network line gets forwarded to all the other
network lines.
Static Routers Dynamic Routers
Manual configuration Manual configuration of the first
of routes route. Automatic discovery of new
routes
Fig 1(a): CISCO 1800 Router
Always use the same Can select the best route
route
More secure Need manual configuration to
improve security
Bridging (networking): Bridging is a forwarding technique used in packet-switched
computer networks. Unlike routing, bridging makes no assumptions about where in a network
a particular address is located. Instead, it depends on flooding and examination of source
addresses in received packet headers to locate unknown devices. Once a device has been
located, its location is recorded in a table where the MAC address is stored so as to preclude
the need for further broadcasting. The utility of bridging is limited by its dependence on
flooding, and is thus only used in local area networks.
Bridging generally refers to Transparent bridging which predominates in Ethernet. Another
form of bridging, Source route bridging, was developed for token ring networks. A Network
bridge connects multiple network segments at the data link layer (Layer 2) of the OSI model.
In Ethernet networks, the term Bridge formally means a device that behaves according to the
IEEE 802.1D standard. A bridge and switch are very much alike; a switch being a bridge with
numerous ports. Switch or Layer 2 switch is often used interchangeably with Bridge.
Bridges are similar to repeaters or network hubs, devices that connect network segments at the
physical layer; however, with bridging, traffic from one network is managed rather than simply
rebroadcast to adjacent network segments. Bridges are more complex than hubs or repeaters.
Bridges can analyze incoming data packets to determine if the bridge is able to send the given
packet to another segment of the network.
•
Advantages of network bridges:
• Self-configuring
• Simple bridges are inexpensive
• Isolate collision domain
• Reduce the size of collision domain by micro segmentation in non-switched networks
• Transparent to protocols above the MAC layer
• Allows the introduction of management/performance information and access control
• LANs interconnected are separate, and physical constraints such as number of stations,
repeaters and segment length don't apply
• Helps minimize bandwidth usage
Disadvantages of network bridges:
• Does not limit the scope of broadcasts
• Does not scale to extremely large networks
• Buffering and processing introduces delays
• Bridges are more expensive than repeaters or hubs
• A complex network topology can pose a problem for transparent bridges. For example,
multiple paths between transparent bridges and LANs can result in bridge loops. The
spanning tree protocol helps to reduce problems with complex topologies.
Bridging versus routing: Bridging and routing are both ways of performing data control, but
work through different methods. Bridging takes place at OSI Model Layer 2 (data-link layer)
while routing takes place at the OSI Model Layer 3 (network layer). This difference means that
a bridge directs frames according to hardware assigned MAC addresses while a router makes
its decisions according to arbitrarily assigned IP Addresses. As a result of this, bridges are not
concerned with and are unable to distinguish networks while routers can.
When designing a network, one can choose to put multiple segments into one bridged network
or to divide it into different networks interconnected by routers. If a host is physically moved
from one network area to another in a routed network, it has to get a new IP address; if this
system is moved within a bridged network, it doesn't have to reconfigure anything. These days
bridges are replaced with switches.
Fig 1(c): Typical SOHO (Small office/home office) network switch.
Network switch is a computer networking device that connects network segments. The
term commonly refers to a network bridge that processes and routes data at the data link layer
(layer 2) of the OSI model. Switches that additionally process data at the network layer (layer
3 and above) are often referred to as Layer 3 switches or multilayer switches.
Role of switches in networks:
Switches may operate at one or more OSI layers, including physical, data link, network, or
transport (i.e., end-to-end). A device that operates simultaneously at more than one of these
layers is known as a multilayer switch.
In switches intended for commercial use, built-in or modular interfaces make it possible to
connect different types of networks, including Ethernet, Fibre Channel, ATM, ITU-T [Link] and
802.11. This connectivity can be at any of the layers mentioned. While Layer 2 functionality
is adequate for speed-shifting within one technology, interconnecting technologies such as
Ethernet and token ring are easier at Layer 3.
Interconnection of different Layer 3 networks is done by routers. If there are any features that
characterize "Layer-3 switches" as opposed to general-purpose routers, it tends to be that they
are optimized, in larger switches, for high-density Ethernet connectivity.
In some service provider and other environments where there is a need for a great deal of
analysis of network performance and security, switches may be connected between WAN
routers as places for analytic modules. Some vendors provide firewall, network intrusion
detection and performance analysis modules that can plug into switch ports. Some of these
functions may be on combined modules.
In other cases, the switch is used to create a mirror image of data that can go to an external
device. Since most switch port mirroring provides only one mirrored stream, network hubs can
be useful for fanning out data to several read-only analyzers, such as intrusion detection
systems and packet sniffers.
A modular network switch with three network modules (a total of 24 Ethernet and 14 Fast
Ethernet ports) and one power supply.
While switches may learn about topologies at many layers, and forward at one or more layers,
they do tend to have common features. Other than for high-performance applications, modern
commercial switches use primarily Ethernet interfaces, which can have different input and
output speeds of 10, 100, 1000 or 10,000 megabits per second. Switch ports almost always
default to Full duplex operation, unless there is a requirement for interoperability with devices
that are strictly Half duplex. Half duplex means that the device can only send or receive at any
given time, whereas Full duplex can send and receive at the same time.
At any layer, a modern switch may implement power over Ethernet (PoE), which avoids the
need for attached devices, such as an IP telephone or wireless access point, to have a separate
power supply. Since switches can have redundant power circuits connected to uninterruptible
power supplies, the connected device can continue operating even when regular office power
fails.
Advantages of Switches: Switches divide a network into several isolated channels (or collision
domains).
• Reduce the possibility of collision
• Collision only occurs when two devices try to get access to one channel
• Can be solved by buffering one of them for later access
• Each channel has its own network capacity
• Suitable for real-time applications, e.g. video conferencing
• Since isolated, hence secure
• Data will only go to the destination, but not others
Layer-1 hubs versus higher-layer switches:
A network hub, or repeater, is a fairly unsophisticated network device. Hubs do not manage
any of the traffic that comes through them. Any packet entering a port is broadcast out or
"repeated" on every other port, except for the port of entry. Since every packet is repeated on
every other port, packet collisions result, which slows down the network.
There are specialized applications where a hub can be useful, such as copying traffic to multiple
network sensors. High end switches have a feature which does the same thing called port
mirroring. There is no longer any significant price difference between a hub and a low-end
switch.
Layer 2 :
A network bridge, operating at the Media Access Control (MAC) sublayer of the data link
layer, may interconnect a small number of devices in a home or office. This is a trivial case
of bridging, in which the bridge learns the MAC address of each connected device. Single
bridges also can provide extremely high performance in specialized applications such as
storage area networks.
While "layer 2 switch" remains more of a marketing term than a technical term, the products
that were introduced as "switches" tended to use micro-segmentation and Full duplex to
prevent collisions among devices connected to Ethernets. By using an internal forwarding
plane much faster than any interface, they give the impression of simultaneous paths among
multiple devices.
Once a bridge learns the topology through a spanning tree protocol, it forwards data link
layer frames using a layer 2 forwarding method. There are four forwarding methods a bridge
can use, of which the second through fourth method were performance-increasing methods
when used on "switch" products with the same input and output port speeds:
1. Store and forward: The switch buffers and, typically, performs a checksum on each
frame before forwarding it on.
2. Cut through: The switch reads only up to the frame's hardware address before
starting to forward it. There is no error checking with this method.
3. Fragment free: A method that attempts to retain the benefits of both "store and
forward" and "cut through". Fragment free checks the first 64 bytes of the frame,
where addressing information is stored. According to Ethernet specifications,
collisions should be detected during the first 64 bytes of the frame, so frames that
are in error because of a collision will not be forwarded. This way the frame will
always reach its intended destination. Error checking of the actual data in the packet
is left for the end device in Layer 3 or Layer 4 (OSI), typically a router.
4. Adaptive switching: A method of automatically switching between the other three
modes.
Layer 3: Within the confines of the Ethernet physical layer, a layer 3 switch can perform some
or all of the functions normally performed by a router. A true router is able to forward traffic
from one type of network connection (e.g., T1, DSL) to another (e.g., Ethernet, WiFi).
The most common layer-3 capability is awareness of IP multicast. With this awareness, a layer-
3 switch can increase efficiency by delivering the traffic of a multicast group only to ports
where the attached device has signaled that it wants to listen to that group. If a switch is not
aware of multicasting and broadcasting, frames are also forwarded on all ports of each
broadcast domain, but in the case of IP multicast this causes inefficient use of bandwidth. To
work around this problem some switches implement IGMP snooping.
Layer 4: While the exact meaning of the term Layer-4 switch is vendor-dependent, it almost
always starts with a capability for network address translation, but then adds some type of load
distribution based on TCP sessions. The device may include a stateful firewall, a VPN
concentrator, or be an IPSec security gateway.
Layer 7: Layer 7 switches may distribute loads based on URL or by some installation-specific
technique to recognize application-level transactions. A Layer-7 switch may include a web
cache and participate in a content delivery network.
Fig 1(e): Linksys 48-port switch
Hub: The simplest way to interconnect LANs is to use a hub. A hub is a simple device that
takes an input (i.e., a frame's bits) and retransmits the input on the hub's outgoing ports. Hubs
are essentially repeaters, operating on bits. They are thus physical-layer devices. When a bit
comes into a hub interface, the hub simply broadcasts the bit on all the other interfaces.
Figure 1(f) shows how three academic departments in a university might interconnect their
LANs. In this figure, each of the three departments has a 10BaseT Ethernet that provides
network access to the faculty, staff and students of the departments. Each host in a department
has a point-to-point connection to the departmental hub. A fourth hub, called a backbone hub,
has point-to-point connections to the departmental hubs, interconnecting the LANs of the three
departments. The design shown in Figure 1(f) is a multi-tier hub design because the hubs are
arranged in a hierarchy. It is also possible to create multi-tier designs with more than two tiers
-- for example, one tier for the departments, one tier for the schools within the university (e.g.,
engineering school, business school, etc.) and one tier at the highest university level. Multiple
tiers can also be created out of 10Base2 (bus topology Ethernets) with repeaters.
Fig 1(f): Three departmental Ethernets interconnected with a hub.
A network hub or repeater hub is a device for connecting multiple twisted pair or fiber optic
Ethernet devices together and thus making them act as a single network segment. Hubs work
at the physical layer (layer 1) of the OSI model. The device is thus a form of multiport repeater.
Repeater hubs also participate in collision detection, forwarding a jam signal to all ports if it
detects a collision.
Types of hubs: Technically speaking, three different types of hubs exist:
1. Passive (A hub which does not need an external power source, because it does not regenerate
the signal and therefore falls as part of the cable, with respect to maximum cable-lengths)
2. Active (A hub which regenerates the signal and therefore needs an external power supply)
3. Intelligent (A hub which provides error detection (e.g. excessive collisions) and also does
what an active hub does)
Passive hubs: Passive hubs do not amplify the electrical signal of incoming packets before
broadcasting them out to the network.
Active hubs: Active hubs, on the other hand, do perform this amplification, as does a different
type of dedicated network device called a repeater. Another, not so common, name for the term
concentrator is referring to a passive hub and the term multiport repeater is referred to an active
hub.
Intelligent hubs: Intelligent hubs add extra features to an active hub that are of particular
importance to businesses. An intelligent hub typically is stackable (built in such a way that
multiple units can be placed one on top of the other to conserve space). It also typically includes
remote management capabilities via Simple Network Management Protocol (SNMP) and
virtual LAN (VLAN) support.
Uses: Historically, the main reason for purchasing hubs rather than switches was their price.
This has largely been eliminated by reductions in the price of switches, but hubs can still be
useful in special circumstances:
• For inserting a protocol analyzer into a network connection, a hub is an alternative to a
network tap or port mirroring.
• Some computer clusters require each member computer to receive all of the traffic
going to the cluster. A hub will do this naturally; using a switch requires special
configuration.
• When a switch is accessible for end users to make connections, for example, in a
conference room, an inexperienced or careless user (or saboteur) can bring down the
network by connecting two ports together, causing a loop. This can be prevented by
using a hub, where a loop will break other users on the hub, but not the rest of the
network. (It can also be prevented by buying switches that can detect and deal with
loops, for example by implementing the Spanning Tree Protocol.)
• A hub with a 10BASE2 port can be used to connect devices that only support 10BASE2
to a modern network. The same goes for linking in an old thicknet network segment
using an AUI port on a hub (individual devices that were intended for thicknet can be
linked to modern Ethernet by using an AUI-10BASE-T transceiver).
Repeater: A repeater is an electronic device that receives a signal and retransmits it at a higher
level and/or higher power, or onto the other side of an obstruction, so that the signal can cover
longer distances.
Description: The term "repeater" originated with telegraphy and referred to an
electromechanical device used to regenerate telegraph signals. Use of the term has continued
in telephony and data communications. In telecommunication, the term repeater has the
following standardized meanings:
1. An analog device that amplifies an input signal regardless of its nature (analog or
digital).
2. A digital device that amplifies, reshapes, retimes, or performs a combination of any of
these functions on a digital input signal for retransmission.
Because repeaters work with the actual physical signal, and do not attempt to interpret the data
being transmitted, they operate on the Physical layer, the first layer of the OSI model.
Digipeater: A "digipeater" is a blend meaning "digital repeater", particularly used in amateur
radio. Store and forward digipeaters generally receive a packet radio transmission and then
retransmit it on the same frequency, unlike repeaters that receive on one and transmit on another
frequency.
Usage: Repeaters are often used in trans-continental and submarine communications cables,
because the attenuation (signal loss) over such distances would be unacceptable without them.
Repeaters are used in both copper-wire cables carrying electrical signals, and in fiber optics
carrying light.
Repeaters are used in radio communication services. Radio repeaters often transmit and receive
on different frequencies. A special subgroup of those repeaters is those used in amateur radio.
Repeaters are also used extensively in broadcasting, where they are known as translators,
boosters or TV relay transmitters.
When providing a point-to-point telecom link using radio beyond line of sight, one uses
repeaters in a microwave radio relay. A reflector, often on a mountaintop, that relays such
signals around an obstacle, is called a passive repeater or Passive Radio Link Deflection. A
microwave repeater in a communications satellite is called a transponder.
SUMMARY:
• Repeaters are the least expensive way to expand a network, but they are limited to
connecting two segments
• Bridges function similar to repeaters, but can understand the node addresses
• Switches can be considered as multiport bridges, can divide a network into some logical
channels
• Routers interconnect networks and provide filtering functions. They can determine the best
route.
• The seven-layer OSI model provides guidelines for the development of universally
compatible networking protocols.
The TCP/IP application layer is equivalent to the combined session, presentation, and
application layers of the OSI model.