a network is a collection
of interconnected devices (such as computers, printers, etc.). To understand
the importance of networks, let us look at how things worked before networks
were created. For this, consider a large multinational company that sells food
products in a time when networks did not exist
Now that you know how
beneficial networks are, its time to look at how networks work. Figure 1-1
shows the most basic form of a network. This figure shows two hosts (end-user
devices such as computers are commonly called hosts in networking terms) directly
connected to each other using a networking cable. Today every host has aNetwork
Interface Card (NIC) that is used to connect it to a network.
In Figure 1-1, the hosts
are “networked” and can share information. This network is effective, but not
scalable. If you have more than 2 hosts to this “network”, it will not work
without a separate NIC card for each connection and that is not scalable or
realistic. For more than 2 hosts to be networked, you require a network device
such as a hub. Figure 1-2 shows three hosts connected to a hub.
Figure 1-2 Network
with a Hub
A hub is a network device
that repeats information received from a host to all other connects hosts. In
Figure 1-2 the hub will relay any information received from HostA to HostB and
HostC. This means that all the three hosts can communicate with each other.
Communication between hosts can be classified into three types:
Unicast –
Communication from one host to another host only.
Broadcast –
Communication from one host to all the hosts in the network.
Multicast –
Communication from one host to few hosts only.
The problems associated
with hubs can cause severe degradation of a network. To overcome these, switches are
used instead of hubs. Like hubs, switches are used to connect hosts in a
network but switches break up collision domain by providing a single collision
domain for every port. This means that every host (one host connects to one
port on the switch) gets its own collision domain thereby eliminating the
collisions in the network. With switches, each host can transmit data anytime.
Switches simply “switch” the data from one port to another in the switched
network. Also, unlike hubs, switches do not flood every packet out all ports.
They switch a unicast packet to the port where the destination host resides.
They only flood out a broadcast packet. Figure 1-3 shows a switched network.
Figure 1-3 A switched
network
Remember that each host in
Figure 1-3 is in its own collision domain and if HostA sends a packet to HostC,
HostB will not receive it.
Figure 1-4 and 1-5 show two
networks. See if you can figure out how many collision domains exist in them.
Figure 1-4 Collision
Domains – 1
Figure 1-5 Collision Domains – 2
If you answered 5 for
Figure 1-4, then you are absolutely correct since each port of the Switches
represent a single collision domain. If you answered more than 5 then you need
to remember that a hub does not break collision domains. Similarly, Figure 1-5 has
7 collision domains.
Now that you know how a
switch works and improves a network, consider the one problem associated with a
switched network. Earlier, you learned that hubs flood out all packets, even
the unicast ones. A switch does not flood out unicast packets but it does flood
out a broadcast packet. All hosts connected to a switched network are said to
be in the same broadcast domain. All hosts connected to it will receive
any broadcast sent out in this domain. While broadcasts are useful and essential
for network operations, in a large switched network too many broadcasts will
slow down the network. To remedy this situation, networks are broken into
smaller sizes and these separate networks are interconnected using routers.
Routers do not allow broadcasts to be transmitted across different networks it
interconnects and hence effectively breaks up a broadcast domain. Figure 1-6
shows three switched networks interconnected by a router.
Figure 1-6 Router in
an Internetwork
In the network shown in
Figure 1-6, broadcasts from hosts connected to Switch1 will not reach hosts
connected to Switch2 or Switch3. This is because the router will drop the
broadcast on its receiving interface.
In addition to breaking up
broadcast domains, routers also perform the following four essential functions
in your network:
Packet Switching – At
the barest minimum, routers are like switches because they essentially switch
packets between networks.
Communication between
Networks – As shown in Figure 1-6, routers allow communication between networks
connected to it.
Path Selection –
Routers can talk to each other to learn about all the networks connected to
various routers and then select the best path to reach a network. This is
function is discussed in detail later in the book.
Packet Filtering –
Routers can drop or forward packets based on certain criteria like their source
and destination.