The OSI Reference Model 21
Examples of data-link layer technologies are the following:
• Frame Relay
• Asynchronous Transport Mode (ATM)
• Synchronous Data Link Control (SDLC)
• High-level data-link control (HDLC)
• IEEE 802.3z and IEEE 802.3ab (Gigabit Ethernet)
• IEEE 802.3u (Fast Ethernet)
• Ethernet version 2
• Integrated Services Digital Network (ISDN)
• Point-to-Point Protocol (PPP)
• Token Ring
• Spanning-Tree Protocol (STP)
Network Layer (OSI Layer 3)
The network layer is concerned with the routing of information and methods to determine paths
to a destination. Information at this layer is called packets. Specifications include routing
protocols, logical network addressing, and packet fragmentation. Routers operate in this layer.
The CCIE lives and dies in this layer.
Examples of network layer specifications are the following:
• Internet Protocol (IP)
• Routing Information Protocol (RIP)
• Open Shortest Path First (OSPF)
• Enhanced Interior Gateway Routing Protocol (EIGRP)
• Internetwork Packet Exchange (IPX)
• Connectionless Network Protocol (CLNP)
Transport Layer (OSI Layer 4)
The transport layer provides reliable, transparent transport of data segments from upper layers.
It provides end-to-end error checking and recovery, multiplexing, virtual circuit management,
and flow control. Messages are assigned a sequence number at the transmission end. At the
receiving end the packets are reassembled, checked for errors, and acknowledged. Flow control
CCIE.book Page 21 Friday, June 14, 2002 3:57 PM
22 Chapter 2: Networking Concepts Review
manages the data transmission to ensure that the transmitting device does not send more data
than the receiving device can process.
Examples of transport layer specifications are the following:
• Transmission Control Protocol (TCP)
• Real-Time Transport Protocol (RTP)
• Sequenced Packet Exchange (SPX)
• AppleTalk’s Transaction Protocol (ATP)
• User Datagram Protocol (UDP) (provides unreliable transport at this layer with less
overhead than TCP)
Session Layer (OSI Layer 5)
The session layer provides a control structure for communication between applications. It
establishes, manages, and terminates communication connections called sessions. Communi-
cation sessions consist of service requests and responses that occur between applications on dif-
ferent devices. The management of sessions involves the synchronization of dialog control by
using checkpoints in the data stream.
Examples of specifications that operate at the session layer are the following:
• NetBIOS
• Real-Time Control Protocol (RTCP)
• Session Control Protocol (SCP)
• AppleTalk’s Zone Information Protocol (ZIP)
• DECnet’s Session Control Protocol (SCP)
• H.323, H.245, H.225
• Real-Time Control Protocol (RTCP)
Presentation Layer (OSI Layer 6)
The presentation layer provides data representation with a variety of coding and conversion
functions. These functions ensure that data sent from a sending application on one system is
readable by the application layer on another system. This layer provides the conversion of
character representation formats, data compression schemes, and encryption schemes. Voice
coding schemes are specified at this layer.
CCIE.book Page 22 Friday, June 14, 2002 3:57 PM
The OSI Reference Model 23
Examples of specifications that operate at the presentation layer are the following:
• Abstract Syntax Notation 1 (ASN.1)
• ASCII
• EBCDIC
• Motion Picture Experts Group (MPEG)
• Graphics Interchange Format (GIF)
• Joint Photographic Experts Group (JPEG)
• Tagged Image File Format (TIFF)
• G.711, G.729a, G.726, G.728
Application Layer (OSI Layer 7)
The application layer provides the user or operating system access to the network services. It
interacts with software applications by identifying communication resources, determining
network availability, and distributing information services. It also provides synchronization
between the peer applications that reside on separate systems.
Examples of application layer specifications are the following:
• Telnet
• File Transfer Protocol (FTP)
• Simple Mail Transfer Protocol (SMTP)
• Simple Network Management Protocol (SNMP)
• Network File System (NFS)
• Association Control Service Element (ACSE)
• Remote Operations Service Element (ROSE)
Example of Layered Communication
If you use a Telnet application, Telnet maps into the top three layers of the OSI model. Figure
2-3 shows that a user on Host 1 enables the Telnet application to access a remote host (Host 2).
The Telnet application provides a user interface (application layer) to network services. As
defined in Request For Comments (RFC) 854, ASCII is the default code format used (presen-
tation layer). There is no session layer defined for Telnet; it is not an OSI protocol. Per the RFC,
Telnet uses TCP for connectivity (transport layer). The TCP segment gets placed into an IP
packet (network layer) with a destination IP address of Host 2. The IP packet gets placed into
an Ethernet frame (data-link layer), which is converted into bits, and sent onto the wire (phys-
ical layer).
CCIE.book Page 23 Friday, June 14, 2002 3:57 PM
24 Chapter 2: Networking Concepts Review
Figure 2-3 Telnet Example
When the frame arrives to Router 1, it converts the bits into a frame, removes the frame headers
(data link), checks the destination IP address (network), places a serial link header to the packet,
which makes it a serial frame, and forwards the frame to the serial link (data link), which sends
it as bits.
Router 2 receives the bits, converts to a frame, removes the serial encapsulation headers, checks
the destination IP address (network), adds an Ethernet header to the packet, which makes it a
frame, and places a frame on Ethernet 2 (data link). Host 2 receives bits (physical) from the
Ethernet cable and converts the bits into a frame (data link). Then, the IP protocol is examined
and the packet data is forwarded to TCP, which checks the segment number for errors and
forwards the segment to TCP port 23 (Telnet), which is the application.
Numeric Conversion
This section focuses on the techniques used to convert between decimal, binary, and hexadecimal
numbers. Although there might not be a specific question on the exam that asks you to convert
a binary number to decimal, you need to know how to convert these numbers to complete
problems on the test. A diagram might show a Token Ring with a decimal number but the RIF
might be shown as hexadecimal. An IP address might be shown as binary or in dotted decimal
format. Some show commands have output information in hexadecimal or binary formats. As
a CCIE candidate, you must be prepared.
Router 1
Serial Link
Host 2
Host 1
Router 2
Ethernet 1 Ethernet 2
DataTCP
DataTCPIP
Packet
Segment
DataTCPIP802.3
DataTCPIP
DataTCPIPHDLC
DataTCPIP
DataTCPIP802.3
DataTCP
DataTCPIP
Packet
Segment
Destination IP?
Destination IP?
CCIE.book Page 24 Friday, June 14, 2002 3:57 PM
Numeric Conversion 25
Hexadecimal Numbers
The decimal numeric system that is commonly used has 10 numeric digits, 0 through 9. After
9, you use 2 digits starting at 10 and then cycle the right-most digits from 0 through 9 again.
The hexadecimal numeric system follows this same concept, but instead of 10 digits, there are
16 digits. Table 2-1 shows the hexadecimal digits and their decimal equivalent.
Hexadecimal Representation
It is common to represent a hexadecimal number with 0x before the number so that it is not
confused with a decimal number. The hexadecimal number of decimal 16 is written as 0x10,
not 10. Another method is to use an h subscript to the right of the number, such as 10
h
. It is also
common to use the term hex when speaking of hexadecimal. You will use hex in much of the
text that follows.
Table 2-1 Hexadecimal Digits
Hexadecimal Digits Decimal Value
00
11
22
33
44
55
66
77
88
99
A10
B11
C12
D13
E14
F15
10 16
CCIE.book Page 25 Friday, June 14, 2002 3:57 PM
26 Chapter 2: Networking Concepts Review
Converting Decimal to Hexadecimal
First things first, memorize Table 2-1. For larger numbers, there are two methods. The first
method is to convert decimal to binary and then from binary to hex. The second method is to
divide the decimal number by 16; the residual is the right-most bit. Then keep dividing until the
number is not divisible. For the first method, use the schemes described in later sections. For
the second method, follow the examples described here.
First, divide the decimal number by 16. The residual is the first digit. If the result is not divisible
by 16, you are done; the result and the residual are the hex number. If the division result is still
divisible by 16, follow the procedure again. This becomes clearer with the following examples.
Conversion Example 1: Convert 26 to Its Hex Equivalent
Conversion Example 2: Convert 96 to Its Hex Equivalent
Divide by 16:
Answer: 1A
h
1
16 26
-16
10 = A
h
Not divisible by 256; divide by 16:
Answer: 60
h
6
16 96
-96
0 = 0
h
CCIE.book Page 26 Friday, June 14, 2002 3:57 PM
Numeric Conversion 27
Conversion Example 3: Convert 375 to Its Hex Equivalent
Conversion Example 4: Convert 218 to Its Hex Equivalent
Converting Hexadecimal to Decimal
To convert a hex number to decimal, take the right-most digit and convert it to decimal (i.e.,
0xC=12). Then add this number to the second right-most digit × 16 and the third rightmost digit
× 256. Don’t expect to convert numbers larger than 255 on the CCIE written exam because the
upper limit of IP addresses in dotted decimal format is 255, although Token Ring numbers do
reach 4096. Some examples follow.
Conversion Example 5: Convert 177
h
to Decimal
Divide by 16 first:
23
16 375
-32
55
-48
7
Now divide 23 by 16:
1
16 23
-16
7
Now take the residual from the first division (7) and concatentate it
with the residual from the second division (7), plus the result of the
second division (1), and the answer is 177
h
.
Divide by 16:
13 = D
h
16 218
-16
58
-48
10 = A
h
Answer: DA
h
1 x 256 = 256
7 x 16 = 112
7 x 1 = 7
375
d
CCIE.book Page 27 Friday, June 14, 2002 3:57 PM
28 Chapter 2: Networking Concepts Review
Conversion Example 6: Convert 60
h
to Decimal
Conversion Example 7: Convert 100
h
to Decimal
Conversion Example 8: Convert 1DA
h
to Decimal
An Alternate Method to Convert from Hex to Decimal
Another way to convert is to go from hex to binary and then binary to decimal.
Binary Numbers
The binary number system uses two digits: 1 and 0. Binary numbers are primarily used by
computer systems. IP addresses and MAC addresses are represented by binary numbers. The
number of binary 1s or 0s is the number of bits. For example, 01101010 is a binary number
with 8 bits. An IP address has 32 bits and a MAC address has 48 bits. Table 2-2 shows that IP
addresses are usually represented in dotted decimal format; therefore, it is helpful to know how
to covert between binary and decimal numbers. MAC addresses are usually represented in
hexadecimal numbers; therefore, it is helpful to know how to covert between binary and
hexadecimal numbers.
Table 2-2 Binary Representation of IP and MAC Addresses
Binary Dotted Decimal Hexadecimal
IP Address 00101000 10001010 01010101 10101010 40.138.85.170
Mac Address 00001100 10100001 10010111 01010001
00000001 10010001
0C:A1:97:51:01:91
6 x 16 = 96
0 x 1 = 0
96
d
1 x 256 = 256
0 x 16 = 0
0 x 1 = 0
256
d
1 x 256 = 256
13 x 16 = 208
10 x 1 = 10
474
d
CCIE.book Page 28 Friday, June 14, 2002 3:57 PM
Numeric Conversion 29
The CCIE candidate needs to memorize Table 2-3, which shows numbers from 0 to 16 in
decimal, binary, and hexadecimal formats.
Converting Binary to Hexadecimal
To convert binary numbers to hex, group the bits into groups of four, starting with the right-
justified bits. Groups of four bits are usually called nibbles. Each nibble has a hex equivalent.
The following are some examples.
Conversion Example 9: Convert 0010011101 to Hex
Table 2-3 Decimal, Binary, and Hexadecimal Numbers
Decimal Value Hexadecimal Binary
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
16 10 10000
Group the bits:
00 1001 1101
Answer: 09D
h
CCIE.book Page 29 Friday, June 14, 2002 3:57 PM
30 Chapter 2: Networking Concepts Review
Conversion Example 10: Convert 0010101001011001000010110001 to Hex
Converting Hexadecimal to Binary
This procedure is also easy—Just change the hex digits into their four-bit equivalent. The
following are some examples.
Conversion Example 11: Convert 0DEAD0 into Binary
Conversion Example 12: Convert AA0101 into Binary
Converting Binary to Decimal
To convert a binary number to decimal, multiply each instance of 1 by the power of 2. Table 2-4
shows that each bit in the binary number 11111111 has a decimal equivalent from 1 to 128,
which is based on the location of the bit in the binary. This is similar to decimal numbers where
the numbers are based on 1s, 10s, 100s, and so on. In decimal format, the number 111 is 100+10+1.
In binary format, the number 11111111 is the sum of 128+64+32+16+8+4+2+1 = 255. For
10101010, this results in 128+0+32+0+8+0+2+0 = 170. This is similar to decimal numbers
where the numbers are based on 1s, 10s, 100s, and so on. The following are some examples.
Table 2-4 Decimal Values of Bits in a Binary Number
Power of 2 2
7
= 128 2
6
= 64 2
5
= 32 2
4
= 16 2
3
= 8 2
2
= 4 2
1
= 2 2
0
= 1
Binary 1 1111111
Group the bits:
0010 1010 0101 1001 0000 1011 0001
Answer: 2A590B1
h
Hex: 0 D E A D 0
Binary: 0000 1101 1110 1010 1101 0000
Answer: 000011011110101011010000
Hex: A A 0 1 0 1
Binary: 1010 1010 0000 0001 0000 0001
Answer: 101010100000000100000001
CCIE.book Page 30 Friday, June 14, 2002 3:57 PM
. logical network addressing, and packet fragmentation. Routers operate in this layer.
The CCIE lives and dies in this layer.
Examples of network layer specifications. with the routing of information and methods to determine paths
to a destination. Information at this layer is called packets. Specifications include routing