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
Ideally, data throughput happens quickly and efficiently. And as you can imagine, it would be
slow if the transmitting machine had to wait for an acknowledgment after sending each segment.
But because there’s time available after the sender transmits the data segment and before
it finishes processing acknowledgments from the receiving machine, the sender uses the break
as an opportunity to transmit more data. The quantity of data segments (measured in bytes)
that the transmitting machine is allowed to send without receiving an acknowledgment for
them is called a window.
Windows are used to control the amount of outstanding, unacknowledged
data segments.
So the size of the window controls how much information is transferred from one end to
the other. While some protocols quantify information by observing the number of packets,
TCP/IP measures it by counting the number of bytes.
As you can see in Figure 1.11, there are two window sizes—one set to 1 and one set to 3.
Transmit
Transmit
Not ready—
STOP!
GO!
Segments
processed
Buffer full
Sender Receiver
20 Chapter 1 Internetworking
FIGURE 1 . 1 1 Windowing
When you’ve configured a window size of 1, the sending machine waits for an acknowledgment
for each data segment it transmits before transmitting another. If you’ve configured a window size
of 3, it’s allowed to transmit three data segments before an acknowledgment is received.
In our simplified example, both the sending and receiving machines are workstations.
In reality this is not done in simple numbers but in the amount of bytes that can be sent.
If a receiving host fails to receive all the segments that it should acknowledge,
the host can improve the communication session by decreasing the
window size.
Acknowledgments
Reliable data delivery ensures the integrity of a stream of data sent from one machine to the other
through a fully functional data link. It guarantees that the data won’t be duplicated or lost. This
is achieved through something called positive acknowledgment with retransmission—a technique
that requires a receiving machine to communicate with the transmitting source by sending
an acknowledgment message back to the sender when it receives data. The sender documents
each segment it sends and waits for this acknowledgment before sending the next segment.
When it sends a segment, the transmitting machine starts a timer and retransmits if it expires
before an acknowledgment is returned from the receiving end.
The OSI Reference Model 21
In Figure 1.12, the sending machine transmits segments 1, 2, and 3. The receiving node
acknowledges it has received them by requesting segment 4. When it receives the acknowledgment,
the sender then transmits segments 4, 5, and 6. If segment 5 doesn’t make it to the destination,
the receiving node acknowledges that event with a request for the segment to be
resent. The sending machine will then resend the lost segment and wait for an acknowledgment,
which it must receive in order to move on to the transmission of segment 7.
FIGURE 1 . 1 2 Transport layer reliable delivery
The Network Layer
The Network layer (also called layer 3) manages device addressing, tracks the location of
devices on the network, and determines the best way to move data, which means that the
Network layer must transport traffic between devices that aren’t locally attached. Routers
(layer 3 devices) are specified at the Network layer and provide the routing services within
an internetwork.
It happens like this: First, when a packet is received on a router interface, the destination
IP address is checked. If the packet isn’t destined for that particular router, it will look up the
destination network address in the routing table. Once the router chooses an exit interface,
the packet will be sent to that interface to be framed and sent out on the local network. If the
router can’t find an entry for the packet’s destination network in the routing table, the router
drops the packet.
Sender
Send 1
Receiver
1 2 3 4 5 6 1 2 3 4 5 6
Send 2
Send 3
Ack 4
Send 4
Send 5 Connection lost!
Send 6
Ack 5
Send 5
Ack 7
22 Chapter 1 Internetworking
Two types of packets are used at the Network layer: data and route updates.
Data packets Data packets are used to transport user data through the internetwork. Protocols
used to support data traffic are called routed protocols; examples of routed protocols are
IP and IPv6. You'll learn about IP addressing in Chapters 2 and 3. (IPv6 is beyond the scope
of this book. It is explained in CCNA: Cisco Certified Network Associate Study Guide.).
Route update packets Route update packets are used to update neighboring routers about
the networks connected to all routers within the internetwork. Protocols that send route
update packets are called routing protocols; examples of some common ones are Routing
Information Protocol (RIP), RIP version 2 (RIPv2), Enhanced Interior Gateway Routing Protocol
(EIGRP), and Open Shortest Path First (OSPF). Route update packets are used to help
build and maintain routing tables on each router.
In Figure 1.13, I’ve given you an example of a routing table. The routing table used in a
router includes the following information:
Network addresses Protocol-specific network addresses. A router must maintain a routing
table for individual routing protocols because each routing protocol keeps track of a network
with a different addressing scheme (IP, IPv6, and Internetwork Packet Exchange [IPX], for
example). Think of it as a street sign in each of the different languages spoken by the residents
that live on a particular street. So, if there were American, Spanish, and French folks on a street
named Cat, the sign would read Cat/Gato/Chat.
FIGURE 1 . 1 3 Routing table used in a router
Interface The exit interface a packet will take when destined for a specific network.
Metric The distance to the remote network. Different routing protocols use different ways
of computing this distance. I’m going to cover routing protocols in Chapter 6, but for now,
1.0
1.3 2.1
E0 S0
2.2 3.3
S0 E0
3.0
Routing Table
Metric
0
0
1
INT
E0
S0
S0
NET
1
2
3
Routing Table
Metric
1
0
0
INT
S0
S0
E0
NET
1
2
3
1.1
1.2
3.1
3.2
The OSI Reference Model 23
know that some routing protocols (namely RIP) use something called a hop count (the number
of routers a packet passes through en route to a remote network), while others use bandwidth,
delay of the line, or even tick count (1⁄18 of a second).
And as I mentioned earlier, routers break up broadcast domains, which means that by
default, broadcasts aren’t forwarded through a router. Do you remember why this is a good
thing? Routers also break up collision domains, but you can also do that using layer 2 (Data
Link layer) switches. Because each interface in a router represents a separate network, it must
be assigned unique network identification numbers, and each host on the network connected
to that router must use the same network number. Figure 1.14 shows how a router works in
an internetwork.
FIGURE 1 . 1 4 A router in an internetwork
Here are some points about routers that you should really commit to memory:
Routers, by default, will not forward any broadcast or multicast packets.
Routers use the logical address in a Network layer header to determine the next hop
router to forward the packet to.
Routers can use access lists, created by an administrator, to control security on the types
of packets that are allowed to enter or exit an interface.
Routers can provide layer 2 bridging functions, if needed, and can simultaneously route
through the same interface.
Layer 3 devices (routers in this case) provide connections between VLANs.
Routers can provide quality of service (QoS) for specific types of network traffic.
Switching is covered in Chapter 7, “LAN Switching.”
The Data Link Layer
The Data Link layer provides the physical transmission of the data and handles error notification,
network topology, and flow control. This means that the Data Link layer will ensure
FastEthernet0/1
Internet
FastEthernet0/0 Serial0
WAN Services
Each router interface is a broadcast domain.
Routers break up broadcast domains by
default and provide WAN services.
24 Chapter 1 Internetworking
that messages are delivered to the proper device on a LAN using hardware addresses and will
translate messages from the Network layer into bits for the Physical layer to transmit.
The Data Link layer formats the message into pieces, each called a data frame, and adds a
customized header containing the hardware destination and source address. This added information
forms a sort of capsule that surrounds the original message in much the same way that
engines, navigational devices, and other tools were attached to the lunar modules of the
Apollo project. These various pieces of equipment were useful only during certain stages of
space flight and were stripped off the module and discarded when their designated stage was
complete. Data traveling through networks is similar.
Figure 1.15 shows the Data Link layer with the Ethernet and Institute of Electrical and Electronics
Engineers (IEEE) specifications. When you check it out, notice that the IEEE 802.2
standard is used in conjunction with and adds functionality to the other IEEE standards.
FIGURE 1 . 1 5 Data Link layer
It’s important for you to understand that routers, which work at the Network layer, don’t
care at all about where a particular host is located. They’re only concerned about where networks
are located and the best way to reach them—including remote ones. Routers are totally
obsessive when it comes to networks. And for once, this is a good thing! It’s the Data Link
layer that’s responsible for the actual unique identification of each device that resides on a
local network.
To allow a host to send packets to individual hosts on a local network as well as transmit
packets between routers, the Data Link layer uses hardware addressing. Each time a packet is
sent between routers, it’s framed with control information at the Data Link layer, but that
information is stripped off at the receiving router and only the original packet is left completely
intact. This framing of the packet continues for each hop until the packet is finally
delivered to the correct receiving host. It’s really important to understand that the packet itself
is never altered along the route; it’s only encapsulated with the type of control information
required for it to be properly passed on to the different media types.
The IEEE Ethernet Data Link layer has two sublayers:
Media Access Control (MAC) 802.3 Defines how packets are placed on the media. Contention
media access is “first come/first served” access where everyone shares the same bandwidth—hence
the name. Physical addressing is defined here, as well as logical topologies. What’s a logical topology?
It’s the signal path through a physical topology. Line discipline, error notification (not correction),
ordered delivery of frames, and optional flow control can also be used at this sublayer.
The OSI Reference Model 25
Logical Link Control (LLC) 802.2 Responsible for identifying Network layer protocols and
then encapsulating them. An LLC header tells the Data Link layer what to do with a packet
once a frame is received. It works like this: A host will receive a frame and look in the LLC
header to find out where the packet is destined—say, the IP protocol at the Network layer. The
LLC can also provide flow control and sequencing of control bits.
The switches and bridges I talked about near the beginning of the chapter both work at the
Data Link layer and filter the network using hardware (MAC) addresses. We will look at these
in the following section.
Switches and Bridges at the Data Link Layer
Layer 2 switching is considered hardware-based bridging because it uses specialized hardware
called an application-specific integrated circuit (ASIC). ASICs can run up to gigabit speeds
with very low latency rates.
Latency is the time measured from when a frame enters a port to the time it
exits a port.
Bridges and switches read each frame as it passes through the network. The layer 2 device
then puts the source hardware address in a filter table and keeps track of which port the frame
was received on. This information (logged in the bridge’s or switch’s filter table) is what helps
the machine determine the location of the specific sending device. Figure 1.16 shows a switch
in an internetwork.
FIGURE 1 . 1 6 A switch in an internetwork
Each segment has its own collision domain.
All segments are in the same broadcast domain.
1 2 3 4
26 Chapter 1 Internetworking
The real estate business is all about location, location, location, and it’s the same way for both
layer 2 and layer 3 devices. Though both need to be able to negotiate the network, it’s crucial to
remember that they’re concerned with very different parts of it. Primarily, layer 3 machines (such
as routers) need to locate specific networks, whereas layer 2 machines (switches and bridges)
need to eventually locate specific devices. So, networks are to routers what individual devices are
to switches and bridges. And routing tables that “map” the internetwork are for routers what
filter tables that “map” individual devices are for switches and bridges.
After a filter table is built on the layer 2 device, it will forward frames only to the segment where
the destination hardware address is located. If the destination device is on the same segment as the
frame, the layer 2 device will block the frame from going to any other segments. If the destination
is on a different segment, the frame can be transmitted only to that segment. This is called transparent
bridging.
When a switch interface receives a frame with a destination hardware address that isn’t found
in the device’s filter table, it forwards the frame to all connected segments. If the unknown device
that was sent the “mystery frame” replies to this forwarding action, the switch updates its filter
table regarding that device’s location. But in the event the destination address of the transmitting
frame is a broadcast address, the switch will forward all broadcasts to every connected segment
by default.
All devices that the broadcast is forwarded to are considered to be in the same broadcast
domain. This can be a problem; layer 2 devices propagate layer 2 broadcast storms that choke
performance, and the only way to stop a broadcast storm from propagating through an internetwork
is with a layer 3 device—a router.
The biggest benefit of using switches instead of hubs in your internetwork is that each
switch port is actually its own collision domain. (Conversely, a hub creates one large collision
domain.) But even armed with a switch, you still can’t break up broadcast domains. Neither
switches nor bridges will do that. They’ll typically simply forward all broadcasts instead.
Another benefit of LAN switching over hub-centered implementations is that each device
on every segment plugged into a switch can transmit simultaneously—at least, they can as long
as there is only one host on each port and a hub isn’t plugged into a switch port. As you might
have guessed, hubs allow only one device per network segment to communicate at a time.
Binary to Decimal and Hexadecimal Conversion
Before we finish this chapter and move on to discussing the TCP/IP protocol stack and IP
addressing in Chapter 2, it’s really important for you to truly understand the differences between
binary, decimal, and hexadecimal numbers and how to convert one format into the other.
So we’ll start with binary numbering. It’s pretty simple, really. The digits used are limited to
either a 1 (one) or a 0 (zero), and each digit is called 1 bit (short for binary digit). Typically, you
count either 4 or 8 bits together, with these being referred to as a nibble and a byte, respectively.
What interests us in binary numbering is the value represented in a decimal format—the typical
decimal format being the base-10 number scheme that we’ve all used since kindergarten. The
binary numbers are placed in a value spot: starting at the right and moving left, with each spot
having double the value of the previous spot.
Table 1.1 shows the decimal values of each bit location in a nibble and a byte. Remember,
a nibble is 4 bits and a byte is 8 bits.
The OSI Reference Model 27
What all this means is that if a one digit (1) is placed in a value spot, then the nibble or byte
takes on that decimal value and adds it to any other value spots that have a 1. And if a zero
(0) is placed in a bit spot, you don’t count that value.
Let me clarify things. If we have a 1 placed in each spot of our nibble, we would then add
up 8 + 4 + 2 + 1, to give us a maximum value of 15. Another example for our nibble values
would be 1010; that means that the 8 bit and the 2 bit are turned on, which equals a decimal
value of 10. If we have a nibble binary value of 0110, then our decimal value would be 6,
because the 4 and 2 bits are turned on.
But the byte values can add up to a value that’s significantly higher than 15. This is how:
If we counted every bit as a one (1), then the byte binary value would look like this (remember,
8 bits equal a byte):
11111111
We would then count up every bit spot because each is turned on. It would look like this,
which demonstrates the maximum value of a byte:
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
There are plenty of other decimal values that a binary number can equal. Let’s work
through a few examples:
10010110
Which bits are on? The 128, 16, 4, and 2 bits are on, so we’ll just add them up: 128 + 16 + 4
+ 2 = 150.
01101100
Which bits are on? The 64, 32, 8, and 4 bits are on, so we just need to add them up: 64 + 32
+ 8 + 4 = 108.
11101000
Which bits are on? The 128, 64, 32, and 8 bits are on, so just add the values up: 128 + 64 +
32 + 8 = 232.
Table 1.2 is a table you should memorize before braving the IP sections in Chapters 2 and 3.
TABLE 1 . 1 Binary Values
Nibble Values Byte Values
8 4 2 1 128 64 32 16 8 4 2 1
TABLE 1 . 2 Binary to Decimal Memorization Chart
Binary Value Decimal Value
10000000 128
11000000 192
28 Chapter 1 Internetworking
Hexadecimal addressing is completely different from binary or decimal—it’s converted by
reading nibbles, not bytes. By using a nibble, we can convert these bits to hex pretty simply. First,
understand that the hexadecimal addressing scheme uses only the numbers 0 through 9. And
since the numbers 10, 11, 12, and so on can’t be used (because they are two-digit numbers), the
letters A, B, C, D, E, and F are used to represent 10, 11, 12, 13, 14, and 15, respectively.
Hex is short for hexadecimal, which is a numbering system that uses the first
6 letters of the alphabet (A through F) to extend beyond the available 10 digits
in the decimal system. Hexadecimal has a total of 16 digits.
Table 1.3 shows both the binary value and the decimal value for each hexadecimal digit.
11100000 224
11110000 240
11111000 248
11111100 252
11111110 254
11111111 255
TABLE 1 . 3 Hex to Binary to Decimal Chart
Hexadecimal Value Binary Value Decimal Value
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
TABLE 1 . 2 Binary to Decimal Memorization Chart (continued)
Binary Value Decimal Value
The OSI Reference Model 29
Did you notice that the first 10 hexadecimal digits (0–9) are the same value as the decimal
values? If not, look again. This handy fact makes those values super easy to convert.
So suppose you have something like this: 0x6A. (Sometimes Cisco likes to put 0x in front
of characters so you know that they are a hex value. It doesn’t have any other special meaning.)
What are the binary and decimal values? All you have to remember is that each hex character
is one nibble and two hex characters together make a byte. To figure out the binary
value, we need to put the hex characters into two nibbles and then put them together into a
byte. 6 = 0110 and A (which is 10 in hex) = 1010, so the complete byte would be 01101010.
To convert from binary to hex, just take the byte and break it into nibbles. Here’s what I mean.
Say you have the binary number 01010101. First, break it into nibbles—0101 and 0101—with
the value of each nibble being 5 since the 1 and 4 bits are on. This makes the hex answer 0x55. And
in decimal format, the binary number is 01010101, which converts to 64 + 16 + 4 + 1 = 85.
Here’s another binary number:
11001100
Your answer would be 1100 = 12 and 1100 = 12 (therefore, it’s converted to CC in hex). The
decimal conversion answer would be 128 + 64 + 8 + 4 = 204.
One more example, then we need to get working on the Physical layer. Suppose you had the
following binary number:
10110101
The hex answer would be 0xB5, since 1011 converts to B and 0101 converts to 5 in hex value. The
decimal equivalent is 128 + 32 + 16 + 4 + 1 = 181.
6 0110 6
7 0111 7
8 1000 8
9 1001 9
A 1010 10
B 1011 11
C 1100 12
D 1101 13
E 1110 14
F 1111 15
TABLE 1 . 3 Hex to Binary to Decimal Chart (continued)
Hexadecimal Value Binary Value Decimal Value
30 Chapter 1 Internetworking
See Written Lab 1.4 for more practice with binary/hex/decimal conversion.
The Physical Layer
Finally arriving at the bottom, we find that the Physical layer does two things: It sends bits and
receives bits. Bits come only in values of 1 or 0—a Morse code with numerical values. The
Physical layer communicates directly with the various types of actual communication media.
Different kinds of media represent these bit values in different ways. Some use audio tones,
while others employ state transitions—changes in voltage from high to low and low to high.
Specific protocols are needed for each type of media to describe the proper bit patterns to be
used, how data is encoded into media signals, and the various qualities of the physical media’s
attachment interface.
The Physical layer specifies the electrical, mechanical, procedural, and functional requirements
for activating, maintaining, and deactivating a physical link between end systems. This
layer is also where you identify the interface between the data terminal equipment (DTE) and
the data communication equipment (DCE). (Some old phone-company employees still call
DCE data circuit-terminating equipment.) The DCE is usually located at the service provider,
while the DTE is the attached device. The services available to the DTE are most often accessed
via a modem or channel service unit/data service unit (CSU/DSU).
The Physical layer’s connectors and different physical topologies are defined by the OSI as
standards, allowing disparate systems to communicate. The CCENT objectives are only interested
in the IEEE Ethernet standards.
Hubs at the Physical Layer
A hub is really a multiple-port repeater. A repeater receives a digital signal and reamplifies or
regenerates that signal and then forwards it out all active ports without looking at any data.
An active hub does the same thing. Any digital signal received from a segment on a hub port
is regenerated or reamplified and transmitted out all ports on the hub. This means all devices
plugged into a hub are in the same collision domain as well as in the same broadcast domain.
Figure 1.17 shows a hub in a network.
Hubs, like repeaters, don’t examine any of the traffic as it enters and is then transmitted out
to the other parts of the physical media. Every device connected to the hub, or hubs, must listen
if a device transmits. A physical star network—where the hub is a central device and cables
extend in all directions out from it—is the type of topology a hub creates. Visually, the design
really does resemble a star, whereas Ethernet networks run a logical bus topology, meaning
that the signal has to run through the network from end to end.
Hubs and repeaters can be used to enlarge the area covered by a single LAN
segment, although I do not recommend this. LAN switches are affordable for
almost every situation.
No comments:
Post a Comment