Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192
When a host transmits data across a network to another device, the data goes through encapsulation:
It is wrapped with protocol information at each layer of the OSI model. Each layer
communicates only with its peer layer on the receiving device.
To communicate and exchange information, each layer uses Protocol Data Units (PDUs).
These hold the control information attached to the data at each layer of the model. They are usually
attached to the header in front of the data field but can also be in the trailer, or end, of it.
Each PDU attaches to the data by encapsulating it at each layer of the OSI model, and each
has a specific name depending on the information provided in each header. This PDU information
is read only by the peer layer on the receiving device. After it’s read, it’s stripped off
and the data is then handed to the next layer up.
Figure 1.28 shows the PDUs and how they attach control information to each layer. This
figure demonstrates how the upper-layer user data is converted for transmission on the network.
The data stream is then handed down to the Transport layer, which sets up a virtual
circuit to the receiving device by sending over a synch packet. Next, the data stream is broken
up into smaller pieces, and a Transport layer header (a PDU) is created and attached to the
header of the data field; now the piece of data is called a segment. Each segment is sequenced
so the data stream can be put back together on the receiving side exactly as it was transmitted.
FIGURE 1 . 2 8 Data encapsulation
Each segment is then handed to the Network layer for network addressing and routing
through the internetwork. Logical addressing (for example, IP) is used to get each segment to
the correct network. The Network layer protocol adds a control header to the segment handed
down from the Transport layer, and what we have now is called a packet or datagram. Remember
that the Transport and Network layers work together to rebuild a data stream on a receiving
host, but it’s not part of their work to place their PDUs on a local network segment—which is
the only way to get the information to a router or host.
Application
Presentation
Session
Transport
Network
Data Link
Physical
Segment
PDU
Packet
Frame
Bits
TCP header Upper layer data
IP header Data
LLC header Data
MAC header Data
0101110101001000010
Upper layer data
FCS
FCS
44 Chapter 1 Internetworking
It’s the Data Link layer that’s responsible for taking packets from the Network layer and
placing them on the network medium (cable or wireless). The Data Link layer encapsulates
each packet in a frame, and the frame’s header carries the hardware address of the source and
destination hosts. If the destination device is on a remote network, then the frame is sent to a
router to be routed through an internetwork. Once it gets to the destination network, a new
frame is used to get the packet to the destination host.
To put this frame on the network, it must first be put into a digital signal. Since a frame is
really a logical group of 1s and 0s, the Physical layer is responsible for encoding these digits into
a digital signal, which is read by devices on the same local network. The receiving devices will
synchronize on the digital signal and extract (decode) the 1s and 0s from the digital signal. At this
point, the devices build the frames, run a CRC, and then check their answer against the answer
in the frame’s FCS field. If it matches, the packet is pulled from the frame and what’s left of the
frame is discarded. This process is called de-encapsulation. The packet is handed to the Network
layer, where the address is checked. If the address matches, the segment is pulled from the packet
and what’s left of the packet is discarded. The segment is processed at the Transport layer, which
rebuilds the data stream and acknowledges to the transmitting station that it received each piece.
It then happily hands the data stream to the upper-layer application.
At a transmitting device, the data encapsulation method works like this:
1. User information is converted to data for transmission on the network.
2. Data is converted to segments and a reliable connection is set up between the transmitting
and receiving hosts.
3. Segments are converted to packets or datagrams, and a logical address is placed in the
header so each packet can be routed through an internetwork.
4. Packets or datagrams are converted to frames for transmission on the local network. Hardware
(Ethernet) addresses are used to uniquely identify hosts on a local network segment.
5. Frames are converted to bits, and a digital encoding and clocking scheme is used.
To explain this in more detail using the layer addressing, I’ll use Figure 1.29.
FIGURE 1 . 2 9 PDU and layer addressing
Source IP
Destination
MAC
Source Port Destination
Port . . . Data
Destination
IP Protocol . . . Segment
Source MAC Ether-Field Packet FCS
Segment
Packet
Frame
Bit 1011011100011110000
Data Encapsulation 45
Remember that a data stream is handed down from the upper layer to the Transport layer.
As technicians, we really don’t care who the data stream comes from because that’s really a
programmer’s problem. Our job is to rebuild the data stream reliably and hand it to the upper
layers on the receiving device.
When the receiving host receives the data, a de-encapsulation will occur—
meaning we’ll start from the Physical layer and go up to the Application layer,
removing headers as we go. For example, if a router receives a frame on an
interface, the router will take the packet from the frame and then search the
routing table to determine where to forward the packet, i.e., the exit interface.
Before we go further in our discussion of Figure 1.29, let’s discuss port numbers and make sure
we understand them. The Transport layer uses port numbers to define both the virtual circuit and
the upper-layer process, as you can see from Figure 1.30.
FIGURE 1 . 3 0 Port numbers at the Transport layer
The Transport layer takes the data stream, makes segments out of it, and establishes a reliable
session by creating a virtual circuit. It then sequences (numbers) each segment and uses
acknowledgments and flow control. If you’re using TCP, the virtual circuit is defined by the
source port number. Remember, the host just makes this up starting at port number 1024
(0 through 1023 are reserved for use as well-known port numbers). The destination port number
defines the upper-layer process (application) that the data stream is handed to when the
data stream is reliably rebuilt on the receiving host.
Now that you understand port numbers and how they are used at the Transport layer,
let’s go back to Figure 1.29. Once the Transport layer header information is added to the
piece of data, it becomes a segment and is handed down to the Network layer along with
Source Port Destination
Port . . .
1028 23
Host A Host Z
Defines upper layer
process or application
. . .
SP DP
Defines Virtual Circuit
46 Chapter 1 Internetworking
the destination IP address. (The destination IP address was handed down from the upper
layers to the Transport layer with the data stream, and it was discovered through a name
resolution method at the upper layers—probably DNS.)
The Network layer adds a header, and adds the logical addressing (IP addresses), to the
front of each segment. Once the header is added to the segment, the PDU is called a packet.
The packet has a protocol field that describes where the segment came from (either UDP or
TCP) so it can hand the segment to the correct protocol at the Transport layer when it reaches
the receiving host.
The Network layer is responsible for finding the destination hardware address that dictates
where the packet should be sent on the local network. It does this by using the Address Resolution
Protocol (ARP)—something I’ll talk about more in Chapter 2. IP at the Network layer
looks at the destination IP address and compares that address to its own source IP address and
subnet mask. If it turns out to be a local network request, the hardware address of the local
host is requested via an ARP request. If the packet is destined for a remote host, IP will look
for the IP address of the default gateway (router) instead.
The packet, along with the destination hardware address of either the local host or default
gateway, is then handed down to the Data Link layer. The Data Link layer will add a header
to the front of the packet and the piece of data then becomes a frame. (We call it a frame
because both a header and a trailer are added to the packet, which makes the data resemble
bookends or a frame, if you will.) This is shown in Figure 1.29. The frame uses an Ether-Type
field to describe which protocol the packet came from at the Network layer. Now a CRC is
run on the frame, and the answer to the CRC is placed in the Frame Check Sequence field
found in the trailer of the frame.
The frame is now ready to be handed down, one bit at a time, to the Physical layer, which will
use bit timing rules to encode the data in a digital signal. Every device on the network segment
will synchronize with the clock and extract the 1s and 0s from the digital signal and build a
frame. After the frame is rebuilt, a CRC is run to make sure the frame is okay. If everything turns
out to be all good, the hosts will check the destination address to see if the frame is for them.
If all this is making your eyes cross and your brain freeze, don’t freak. I’ll be going over
exactly how data is encapsulated and routed through an internetwork in Chapter 6.
The Cisco Three-Layer Hierarchical Model
Most of us were exposed to hierarchy early in life. Anyone with older siblings learned what it
was like to be at the bottom of the hierarchy. Regardless of where you first discovered hierarchy,
today most of us experience it in many aspects of our lives. It is hierarchy that helps us
understand where things belong, how things fit together, and what functions go where. It
brings order and understandability to otherwise complex models. If you want a pay raise, for
instance, hierarchy dictates that you ask your boss, not your subordinate. That is the person
whose role it is to grant (or deny) your request. So basically, understanding hierarchy helps us
discern where we should go to get what we need.
The Cisco Three-Layer Hierarchical Model 47
Hierarchy has many of the same benefits in network design that it does in other areas of life.
When used properly, it makes networks more predictable. It helps us define which areas should
perform certain functions. Likewise, you can use tools such as access lists at certain levels in hierarchical
networks and avoid them at others.
Let’s face it: Large networks can be extremely complicated, with multiple protocols, detailed
configurations, and diverse technologies. Hierarchy helps us summarize a complex collection
of details into an understandable model. Then, as specific configurations are needed, the model
dictates the appropriate manner in which to apply them.
The Cisco hierarchical model can help you design, implement, and maintain a scalable,
reliable, cost-effective hierarchical internetwork. Cisco defines three layers of hierarchy, as
shown in Figure 1.31, each with specific functions.
FIGURE 1 . 3 1 The Cisco hierarchical model
The following are the three layers and their typical functions:
The core layer: backbone
The distribution layer: routing
The access layer: switching
Each layer has specific responsibilities. Remember, however, that the three layers are logical
and are not necessarily physical devices. Consider the OSI model, another logical hierarchy. The
seven layers describe functions but not necessarily protocols, right? Sometimes a protocol maps
to more than one layer of the OSI model, and sometimes multiple protocols communicate within
a single layer. In the same way, when we build physical implementations of hierarchical networks,
we may have many devices in a single layer, or we might have a single device performing
functions at two layers. The definition of the layers is logical, not physical.
Now, let’s take a closer look at each of the layers.
Core
layer
Distribution
layer
Access
layer
48 Chapter 1 Internetworking
The Core Layer
The core layer is literally the core of the network. At the top of the hierarchy, the core layer
is responsible for transporting large amounts of traffic both reliably and quickly. The only
purpose of the network’s core layer is to switch traffic as fast as possible. The traffic transported
across the core is common to a majority of users. However, remember that user data
is processed at the distribution layer, which forwards the requests to the core if needed.
If there is a failure in the core, every single user can be affected. Therefore, fault tolerance
at this layer is an issue. The core is likely to see large volumes of traffic, so speed and latency
are driving concerns here. Given the function of the core, we can now consider some design
specifics. Let’s start with some things we don’t want to do:
Don’t do anything to slow down traffic. This includes using access lists, routing between
virtual local area networks (VLANs), and implementing packet filtering.
Don’t support workgroup access here.
Avoid expanding the core (i.e., adding routers) when the internetwork grows. If performance
becomes an issue in the core, give preference to upgrades over expansion.
Now, there are a few things that we want to do as we design the core:
Design the core for high reliability. Consider data-link technologies that facilitate both
speed and redundancy, such as FDDI, Fast Ethernet (with redundant links), or even Asynchronous
Transfer Mode (ATM).
Design with speed in mind. The core should have very little latency.
Select routing protocols with lower convergence times. Fast and redundant data-link connectivity
is no help if your routing tables are shot!
The Distribution Layer
The distribution layer is sometimes referred to as the workgroup layer and is the communication
point between the access layer and the core. The primary functions of the distribution
layer are to provide routing, filtering, and WAN access and to determine how packets can
access the core, if needed. The distribution layer must determine the fastest way that network
service requests are handled—for example, how a file request is forwarded to a server. After
the distribution layer determines the best path, it forwards the request to the core layer if necessary.
The core layer then quickly transports the request to the correct service.
The distribution layer is the place to implement policies for the network. Here you can exercise
considerable flexibility in defining network operation. There are several actions that generally
should be done at the distribution layer:
Routing
Implementing tools (such as access lists), packet filtering, and queuing
Implementing security and network policies, including address translation and firewalls
Redistributing between routing protocols, including static routing
Summary 49
Routing between VLANs and other workgroup support functions
Defining broadcast and multicast domains
Things to avoid at the distribution layer are limited to those functions that exclusively
belong to one of the other layers.
The Access Layer
The access layer controls user and workgroup access to internetwork resources. The access
layer is sometimes referred to as the desktop layer. The network resources most users need will
be available locally. The distribution layer handles any traffic for remote services. The following
are some of the functions to be included at the access layer:
Continued (from distribution layer) use of access control and policies
Creation of separate collision domains (segmentation)
Workgroup connectivity into the distribution layer
Technologies such as DDR and Ethernet switching are frequently seen in the access layer.
Static routing (instead of dynamic routing protocols) is seen here as well.
As already noted, three separate levels does not imply three separate routers. There could
be fewer, or there could be more. Remember, this is a layered approach.
No comments:
Post a Comment