Networking Test Friday Online

My test is online today. All the powerpoint slides posted is basically an overview of what is going to be on the test. Basically the test will have mostly subnetting, the configuration modes and commands, and know the 7 layers in and out very well. I need an A on this test…..I will also accept a B if it comes to that. The information in the powerpoints I post, many Networking experts and people who have there CCNA’s will know this information easily. Please if there is someone who is an expert in networking can get me an A!!!

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

  

I am going to post alot of powepoints not everything is going to be on this exam. anyone who has an overall knowledge of all this areas should do well.

©

2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

ITE PC v4.0

Chapter 1 1

Chapter 1
Introduction to

Routing

and Packet Forwarding

Routing Protocols and Concepts –
Dr. C. BouSaba

ITE PC v4.0

Chapter 1 2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router Functions

 Connect networks together

 Direct packets to their proper
destination efficiently

 Find best routes

 Switch packets from one
network to another

 Provide

– Security (Permitting or denying
specified types of packet)

– Quality of service (Prioritizing
packets)

ITE PC v4.0

Chapter 1

3

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router as a computer

 CPU: control unit handles instructions,
ALU for calculations

 RAM: volatile working storage

 ROM: permanent storage for POST
and start-up instructions

 Operating System: software that runs
the computer

 System bus, Power supply
 Long term storage is Flash and

NVRAM, not hard disk

 Range of different interfaces all on
different

networks

 No input/output peripherals.
Connect via a console PC and use
PC’s keyboard and screen

Router VS computer

ITE PC v4.0

Chapter 1 4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hardware Components of a Router

ITE PC v4.0

Chapter 1 5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Integrated Services Routers

ITE PC v4.0

Chapter 1 6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

RAM
 Dynamic random access memory

 Temporary memory while router is on

 Loses content when the router loses
power or is restarted

 Holds running configuration

 Holds routing tables

 Holds ARP cache

 Holds fast-switching cache etc.

NVRAM
 Non-volatile RAM: keeps its contents

when the router is off

 Stores the startup configuration file

 When you have configured a router,
you must save your configuration to
NVRAM if you want to keep it

Flash
 Electronically erasable, programmable

ROM (EEPROM)

 Keeps its contents when the router is off

 Holds the operating system image (IOS)

 Allows the IOS to be updated

 Can store multiple versions of IOS
software if it has enough capacity

 Can be upgraded by adding SIMMs

ROM
 Permanent memory: cannot be upgraded

without replacing the chip

 Holds power-on self test (POST) inst.

 Stores bootstrap program

 Stores ROM monitor SW (for emergency
download of IOS, for password recovery)

 May store basic IOS for emergency use
(less common than it was)

ITE PC v4.0

Chapter 1 8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router storage

 ROM

 Permanent

 Holds POST, boot instructions,
basic IOS

 Flash

 Keeps contents

 Holds IOS image

 NVRAM

 Keeps contents

 Holds startup configuration
file

 RAM

 Volatile

 Holds running config,
tables, queues etc

ITE PC v4.0

Chapter 1 9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interfaces

 Can be attached directly to the motherboard (like our Fast
Ethernet or Ethernet interfaces)

 Can be on removable and interchangeable modules (like our
serial interfaces)

 Modules for different serial connections

ITE PC v4.0

Chapter 1 10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Operating system

 As specialized computers, routers and switches need
operating systems.

 Cisco devices use the Cisco Internetwork Operating
System (IOS)

 There are versions for different models of router and
switch, and different feature sets

 The IOS can be upgraded periodically

ITE PC v4.0

Chapter 1 11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Naming IOS image files

 Platform-features-format-version

 c2600-i-mz.122-8.T5

 c2600 is the platform: Cisco 2600 series router

 i is a code for the set of features in this IOS, another is
ipbase

 mz is a code to say that the IOS runs in RAM and the file is
zip compressed

 122-8.T5 is the upgrade version

ITE PC v4.0

Chapter 1 12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IOS storage

 The IOS is stored in the router’s flash memory, often in
compressed form

 Most routers copy the IOS to RAM when they start up

 You need enough space in flash and in RAM if you
upgrade the IOS

 Some of our routers have more features than others – it
depends on the IOS.

ITE PC v4.0

Chapter 1 13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IOS modes

 ROM monitor:

Used to recover from system failure or loss of password

Needs direct access from console port

 Boot ROM (optional, may not have this):

Used when upgrading IOS

 Cisco IOS

Normal operation, stored in Flash, runs in RAM

ITE PC v4.0

Chapter 1 14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router startup

ITE PC v4.0

Chapter 1 15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

‘Normal’ start up

1. Run POST and bootup instructions from ROM

2. Load IOS file from flash

3. Load configuration from NVRAM

4. Fully operational

ITE PC v4.0

Chapter 1 16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration register

 Has 4 hex digits – that’s 16 binary
digits

 Configuration register

is saved in
NVRAM

 show version to see its value

 Value of last hex digit tells how to
load IOS

 Usual is 0x2102 (2 means load
from flash)

 Third hex digit controls whether
configuration file is loaded. (0
means load, 4 means do not)

Check Configuration Register value (NVRAM)

0 = ROM Monitor mode

1 = ROM IOS

2 – 15 = Boot system from Flash

ITE PC v4.0

Chapter 1 17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

How a Cisco device locates and loads IOS

 Demo

config-register

The config-register can be Downloaded from:

http://www.lilligren.com/cisco/downloads.htm

ITE PC v4.0

Chapter 1 18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration register: 0, 1, and 2 and above

ITE PC v4.0

Chapter 1 19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration register: 2102 and 2142

ITE PC v4.0

Chapter 1 20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration register
Router(config)#config-register value

1 2

3

ITE PC v4.0

Chapter 1 21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Loading IOS
 You see ############# as IOS loads from flash memory.

 If you see a prompt instead:

 rommon1>

 Then the IOS was not loaded and you are in ROM monitor mode.

 Try reload or boot

 If this fails, the IOS file is probably missing…

ITE PC v4.0

Chapter 1 22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration

 If there is a startup configuration file in NVRAM then it
will normally load into RAM as the running
configuration.

 If not, the router may look for a configuration on a TFTP
server. Wait until it gives up.

 It then prompts you to enter Setup mode: Would you
like to enter the initial configuration dialog? [yes/no]: no
(If it asks if you want to exit Autoinstall: yes)

ITE PC v4.0

Chapter 1 23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show version

 IOS version

 Bootstrap version

 Router model and CPU

 Amount of RAM

 Number and type of interfaces

 Amount of NVRAM

 Amount of Flash

 Configuration register

ITE PC v4.0

Chapter 1 24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Basic Configuration (revision)

 Name

 Passwords

 Interfaces

 Routing

 Banner (Message of the day)

Save configuration

 Check configuration

ITE PC v4.0

Chapter 1 26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Global configuration

 Router>enable

 Router#configure terminal (config t)

 Router(config)#

 Start in user exec mode

 Go to privileged exec mode (no configuration so no
password)

 Go to global configuration mode

ITE PC v4.0

Chapter 1 27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hostname

 Give the router a name to show at its prompt

 Do this in global configuration mode

 Router(config)# hostname ITT

 ITT(config)#

ITE PC v4.0

Chapter 1 28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Enable secret

 Protect privileged exec mode with an encrypted
password.

 ITT(config)# enable secret class

 You could set an enable password but this is not
encrypted

 There is no need to set both, but if you do then the
enable secret will be used

ITE PC v4.0

Chapter 1 29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Passwords for login

 Set login password on console port for security

 ITT(config)# line con 0

 ITT(config-line) password cisco

 ITT(config-line) login

 ITT(config-line) exit

 You can also put a password on the AUX port in a
similar way

ITE PC v4.0

Chapter 1 30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Passwords for Telnet login

 Set login password on virtual lines to allow you to
Telnet to the router

 ITT(config)# line vty 0 4

 ITT(config-line) password cisco
 ITT(config-line) login
 ITT(config-line) exit

ITE PC v4.0

Chapter 1 31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interface configuration

 ITT(config)# interface serial 0

 ITT(config-if)# ip address 192.168.3.1 255.255.255.0

 ITT(config-if)# no shutdown

 ITT(config-if)# exit

 This is for a DTE serial interface

 Ethernet interfaces are configured the same way

ITE PC v4.0

Chapter 1 32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interface DCE configuration

 A DCE serial interface needs an extra line:

 ITT(config)# interface serial 0

 ITT(config-if)# ip address 192.168.3.1 255.255.255.0

 ITT(config-if)# clock rate 64000

 ITT(config-if)# no shutdown
 ITT(config-if)# exit

ITE PC v4.0

Chapter 1 33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interface description

 You can give an interface a description

 This does not affect the operation of the router but it is
useful documentation

 Do it in interface configuration mode for the required
interface

 ITT(config-if) description Serial line to Rocco 01993
876543

ITE PC v4.0

Chapter 1 34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Message of the day

 You can configure a message to be shown before the
user logs on

 Cisco recommend that you show a warning to
unauthorized users (NOT “welcome”)

 ITT(config)# banner motd # authorized users only #

 # is a delimiter. Any character can be used.

ITE PC v4.0

Chapter 1 35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing

 The router knows its directly attached networks
because you have put IP addresses on its interfaces

 It can put these networks in its routing table

 It needs to find routes to networks that are not directly
attached

 You can give it static routes

 You can enable a routing protocol

ITE PC v4.0

Chapter 1 36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing protocol:

RIP

 You choose the routing protocol

 Then you tell the router which directly attached
networks it should advertise

 ITT(config) router rip

 ITT(config-router) network 192.168.1.0

 ITT(config-router) network 192.168.3.0

 ITT(config-router) exit

ITE PC v4.0

Chapter 1 37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Save configuration

 Your configuration is held in RAM as the running
configuration

 If you want to keep this configuration then you must
save it to NVRAM into the startup configuration file

 ITT# copy running-config startup-config

ITE PC v4.0

Chapter 1 38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Shortened commands

 The Cisco IOS accepts shortened forms of commands

 You need to type enough to distinguish the command
from other commands

 copy run start can be used instead of copy running-
config startup-config

 int s 0 can be used instead of interface serial 0

ITE PC v4.0

Chapter 1 39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show commands

 Show running-config

 Show startup-config

Show ip route

 Show ip interfaces

 Show ip interface brief

ITE PC v4.0

Chapter 1 40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI layers 1, 2 and 3

Receive signals

from cable, convert

to binary.

Check layer 2

address,

decapsulate

Find destination network, check routing table for route,

direct packet to correct outgoing interface

Encapsulate with

frame for next link

Encode binary,

place signals on

cable

ITE PC v4.0

Chapter 1 41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

What the router does 1

 Ethernet frame received from PC1 through port Fa0/0

 Destination MAC address is router’s address

ITE PC v4.0

Chapter 1 42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

What the router does 2

 Strip off frame header and trailer (decapsulate)

 Read destination IP address 192.168.4.9

ITE PC v4.0

Chapter 1 43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

What the router does 3

 Logical AND with IP address 192.168.4.9 and subnet
mask 255.255.255.0 (/24) gives destination network
address 192.168.4.0

ITE PC v4.0

Chapter 1 44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

What the router does 4

 Look in routing table for network address 192.168.4.0

 Route found via 192.168.3.2 through S0/0

ITE PC v4.0

Chapter 1 45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

What the router does 5

 S0/0 connects to a WAN link using PPP

 Encapsulate packet in PPP frame

 Send frame out through S0/0

ITE PC v4.0

Chapter 1 46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

No route found

 If the destination network is not in the routing table:

 Use a default route if one exists

 Otherwise drop the packet and send an ICMP
destination unreachable message to the source host.

ITE PC v4.0

Chapter 1 47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing tables

 A router uses the routing table to select the best path to
a network

 Directly connected networks are taken from the
interface configuration

 Static routes can be added by administrator

 Routes can be learned dynamically from other routers
by using a routing protocol

ITE PC v4.0

Chapter 1 48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show ip route

List of codes

List of routes

ITE PC v4.0

Chapter 1 49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing table

C 192.168.1.0/24 is directly connected, FastEthernet0/0

C 192.168.2.0/24 is directly connected, Serial0/0

S 192.168.3.0/24 [1/0] via 192.168.2.2

R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

Directly connected
Network and mask

Exit port

ITE PC v4.0

Chapter 1 50 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing table
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0
S 192.168.3.0/24 [1/0] via 192.168.2.2
R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

Static route
Network and mask

Administrative

distance and metric
Address of next

hop router

ITE PC v4.0

Chapter 1 51 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing table
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0
S 192.168.3.0/24 [1/0] via 192.168.2.2
R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

Dynamic route, RIP
Network and mask

Administrative
distance and metric
Address of next

hop router
Time since

last update

Exit port

ITE PC v4.0

Chapter 1 52 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static routes Dynamic routes

 Entered by administrator

 Time consuming, different for
each router

 Must be updated if routes
change

 Little processing

 No bandwidth used

 Gives nothing away

 Learned from other routers

 Start the protocol then it runs
by itself

 Automatically updates when
routes change

 More processing

 Uses bandwidth

 Gives away information

ITE PC v4.0

Chapter 1 53 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing protocols

Interior, used within

an organization’s

networks

Exterior, used

between different

organizations’

networks

BGP OSPF

IS-IS

Distance vector Link state

RIP

(IGRP)

EIGRP

Routing Information Protocol
Interior Gateway Routing Protocol
Enhanced Interior Gateway RP

Opens Shortest Path First
Intermediate System to…

Border Gateway Protocol

ITE PC v4.0

Chapter 1 54 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table Principles

1. Every router makes its decision alone, based on the
information it has in its own routing table.

2. The fact that one router has certain information in its
routing table does not mean that other routers have the
same information.

3. Routing information about a path from one network to
another does not provide routing information about the
reverse, or return, path.

ITE PC v4.0

Chapter 1 55 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Metrics

 A routing protocol may learn of several possible routes
to a destination.

 It uses metrics to pick the best route.

 RIP uses hop count as its only metric.

 OSPF uses “cost” based on bandwidth.

 EIGRP uses bandwidth and delay and can use load
and reliability as well.

ITE PC v4.0

Chapter 1 56 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Metrics

RIP uses hop count. It

picks this route as the

best.

ITE PC v4.0

Chapter 1 57 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Metrics

OSPF uses cost based

on bandwidth. It picks

this route as the best.

ITE PC v4.0

Chapter 1 58 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Administrative distance

 There may be more than one routing protocol running.
There may also be static routes.

 Static routes have administrative distance 1 or 0 by
default.

 RIP routes have administrative distance 120

 OSPF routes have administrative distance 110

 The route with the lowest administrative distance goes
in the routing table

ITE PC v4.0

Chapter 1 59 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

©

2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

Communicating over the
Network

Network Fundamentals – Chapter 2

Dr. C. BouSaba

2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives

 Describe the structure of a network, including the
devices and media that are necessary for successful
communications.

 Explain the function of protocols in network
communications.

 Explain the advantages of using a layered model to
describe network functionality.

 Describe the role of each layer in two recognized
network models: The TCP/IP model and the OSI model.

 Describe the importance of addressing and naming
schemes in network communications.

3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Structure

 3 Common Elements of communication

1. message source

2. the channel

3. message destination

 Network definition
 data or information networks capable of carrying many different

types of communications (including traditional computer data,
interactive voice, video, and entertainment products).

4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Messages are communicated by dividing the data sent across a
network in small manageable “chunks” called segments

Network Structure

Segmentation increases reliability

5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Structure
 Segmenting messages has 2 primary benefits:

1. By sending smaller individual pieces from source to
destination, many different conversations can be interleaved
on the network (multiplexing).

2. Segmentation increases the reliability of network. Segments
of each message need not travel same pathway across the
network from source to destination.

 If a path becomes congested with data traffic or fails, segments can
still be directed to destination using alternate pathways.

 If part of the message fails to make it to the destination, only the
missing parts need to be retransmitted.

 Segmenting messages has 1 disadvantage: increases the
level of complexity to the process.

6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Components of a network

 Devices

 Media

 Services

Are the physical elements or hardware

Are the communication programs or software,
running on the networked devices

7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Structure
 End Devices and their Role in the Network

– Form interface w/ human network & communications network

– Role of end devices depends on software installed on them:
a client, a server, or both

 End device, referred to as host, is either the source or destination of a
message transmitted over the network, and is identified by an address.

8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Structure
 Intermediary devices and their role in the network

– Provide connectivity and ensures data flows across network

– Use destination host address ( + info. about network interconnections),
to determine the path that messages should take through the network.

Intermediary network devices functions:

– Regenerate and retransmit data signals

– Maintain info. about existing pathways through network/internetwork

– Notify other devices of errors and communication failures

– Direct data along alternate pathways when there is a link failure

– Classify and direct messages according to QoS priorities

– Permit or deny the flow of data, based on security settings

9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Network media is the channel over which a message travels

 Three media types:

1. Metallic wires within cables

2. Glass or plastic fibers (fiber optic cable)

3. Wireless transmission

Network Structure

 Different types of
network media have
different features and
benefits.

10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Structure
 The signal encoding that must occur for the message to be

transmitted is different for each media type.

1. On metallic wires, the data is encoded into electrical
impulses that match specific patterns.

2. Fiber optic transmissions rely on pulses of light, within
either infrared or visible light ranges.

3. In wireless transmission, patterns of electromagnetic
waves depict the various bit values.

 Criteria for choosing a network media are:

1. The distance the media can successfully carry a signal.

2. The environment in which the media is to be installed.

3. The amount of data and the transmission speed.

4. The cost of the media and installation

11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Types

 Local Area Networks (LANs)

– A network serving a home, building or campus is considered a (LAN)
Local Area Network and is usually administered by a single organization

12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Wide Area Networks (WANs)

– Connect LANs that are separated by geographic distance

– Use a telecommunications service provider (TSP) to interconnect the
LANs at the different locations.

Network Types

13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Internet is defined as a global mesh of interconnected
networks

Network Types

14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Representations

15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

How network devices and media connect to each
other?

 Network Interface Card – A NIC, or LAN adapter, provides the
physical connection to the network at the PC or other host
device. The media connecting the PC to the networking device
plugs directly into the NIC.

 Physical Port – A connector or outlet on a networking device
where the media is connected to a host or other networking
device.

 Interface – Specialized ports on an internetworking device that
connect to individual networks. Because routers are used to
interconnect networks, the ports on a router are referred to
network interfaces.

16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Function of Protocol in Network Communication

17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Function of Protocol in Network Communication

 A protocol is a set of predetermined rules

– facilitate communication over data networks

– is implemented in software and hardware that is loaded on each host
and network device.

 Successful communication between hosts on a network requires
the interaction of many different protocols.

 A protocol suite is a group of inter-related protocols that are
necessary to perform a communication function.

18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Network protocols

Network protocols are used

to allow devices to

Communicate successfully

Function of Protocol in Network Communication

19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Protocol suites and industry standards

A standard is

a process or protocol that has been endorsed by the
networking industry and ratified by a standards organization

Function of Protocol in Network Communication

20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Function of Protocol in Network Communication

21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Application Protocol:

–HTTP governs the interaction between a web server and a web client.

–HTTP defines the content and formatting of the requests and responses

 Transport Protocol:

–TCP manages the conversations between web servers and web clients.

–TCP divides HTTP messages into smaller pieces, segments, to be sent to client.

–TCP controls the size and rate of exchanged messages between client/server.

 Internetwork Protocol:

–IP is responsible for taking the formatted segments from TCP, encapsulating
them into packets, assigning the appropriate addresses, and selecting the best
path to the destination host.

 Network Access Protocols: describe 2 primary functions, data link
management and the physical transmission of data on the media.

–Data-link management protocols take the packets from IP and format them to be
transmitted over the media.

–Physical media protocols govern how the signals are sent and how they are
interpreted. Transceivers on the network interface cards implement the appropriate
standards for the media that is being used.

Function of Protocol in Network Communication

22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Technology independent Protocols

-Many diverse types of devices can communicate using the
same sets of protocols. This is because protocols specify
network functionality, not the underlying technology to support
this functionality.

Function of Protocol in Network Communication

23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Benefits of using a layered model
 Assists in protocol design

 Fosters competition

 Changes in one layer do not affect other layers

 Provides a common language

24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layers with TCP/IP and OSI Model

 A protocol model provides

a model that closely
matches the structure of a
particular protocol suite.

– TCP/IP

 A reference model
provides a common
reference for maintaining
consistency within all
types of network protocols
and services.

– OSI (Open System
Interconnection)

25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP/IP Model

26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP/IP Communication Process

27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP/IP Communication Process

1. Creation of data at the Application layer of the originating source end device

2. Segmentation and encapsulation of data as it passes down the protocol stack
in the source end device

3. Generation of data onto the media at the Network Access layer of the stack

4. Transportation of the data through the internetwork, which consists of media
and any intermediary devices

5. Reception of data at the Network Access layer of the destination end device

6. Decapsulation and reassembly of the data as it passes up the stack in the
destination device

7. Passing this data to the destination application at the Application layer of the
destination end device

28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Protocol data units (PDU) and encapsulation

29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Process of sending and receiving messages

30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The OSI Model

31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layers with TCP/IP and OSI Model

 Compare OSI and TCP/IP model

32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Transport layer – responsible for low-level network access and for message
transfer between clients, including partitioning messages into packets,
maintaining packet order, controlling flow, and generating physical addresses

 Session layer – implements sessions, or process-to-process
communications protocols

 Presentation layer – resolves the differences in formats among the various
sites in the network, including character conversions, and half duplex/full
duplex (echoing)

 Application layer – interacts directly with the users: deals with file transfer,
remote-login protocols & email, as well as schemas for distributed databases

Communication Protocol
 Physical layer – handles the mechanical and electrical details of the physical

transmission of a bit stream

 Data-link layer – handles the frames, or fixed-length parts of packets,
including any error detection and recovery that occurred in the physical layer

 Network layer –provides connections & routes packets in the communication
network, including handling the address of outgoing packets, decoding the
address of incoming packets, & maintaining routing information for proper
response to changing load levels

33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Communication Via ISO Network Model

34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The ISO
Protocol

Layer

35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The ISO Network Message

36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing and Naming Schemes

 Labels in encapsulation headers are used to manage
communication in data networks

37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing and Naming Schemes

 Examples of Ethernet MAC Addresses, IP Addresses,
and TCP/UDP Port numbers

38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing and Naming Schemes
 How labels in encapsulation headers are used to

manage communication in data networks

39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing and Naming Schemes
 Information in the encapsulation header is used to

identify the source and destination processes for data
communication

40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

©

2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 1

Static Routing

Routing Protocols and Concepts – Chapter 2

ITE PC v4.0

Chapter 1 2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Topics

 Role of the router in

networks

 Directly connected networks and interfaces

 CDP protocol

 Static routes with exit interfaces

 Summary and default routes

 Forwarding with static routes

 Managing and troubleshooting static routes

ITE PC v4.0

Chapter 1 3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WAN Serial connections

Smart serial

connector to router

V35 DTE connection to

ISP CSD/DSU device

Larger DB-60

for older routers

Four other standards possible –

choose the right cable.

http://www.csdata.com/csdonline/customer/product.php?productid=18217&cat=314&page=1

ITE PC v4.0

Chapter 1 4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A WAN Physical Layer connection has sides:

Data Circuit-terminating Equipment (DCE) – This is the service provider.
CSU/DSU is a DCE device.

 The CSU/DSU (DCE device) is used to convert the data from the router (DTE device)
into a form acceptable to the WAN service provider.

a DCE device such as a CSU/DSU will provide the clock.

Data Terminal Equipment (DTE) – Typically the router is the DTE device.

Up-to-date technology

Cisco 1-Port T1/Fractional T1 DSU/CSU

WAN Interface Card (WIC-1DSU-T1-V2=)

WAN Serial connections

ITE PC v4.0

Chapter 1 5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN Ethernet connections

 Connections of a Router for WAN

-A router has a DB-60 port that can
support 5 different cabling standards

–Newer routers support the smart serial
interface that allows for more data to be
forwarded across fewer cable pins.

 Connections of a Router for Ethernet

-2 types of connectors can be used:
Straight through and Cross-over

Straight through used to connect:

-Switch-to-Router, Switch-to-PC, Hub-
to-PC, Hub-to-Server

Cross-over used to connect (pin 1
connected to pin 3, and pin 2 connected to
pin 6):

-Switch-to-Switch, PC-to-PC, Switch-to-
Hub, Hub-to-Hub, Router-to-Router,
PC-Router

ITE PC v4.0

Chapter 1 6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Default Condition

 By default, interfaces have no IP addresses and are
administratively shut down.

 They need to be configured.

ITE PC v4.0

Chapter 1 7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configure interface

R1(config)#interface fastethernet 0/0

R1(config-if)#

ip address 172.16.3.1 255.255.255.0

R1(config-if)#no shutdown

*Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface
FastEthernet0/0, changed state to up

*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line
protocol on Interface FastEthernet0/0, changed state to up

ITE PC v4.0

Chapter 1 8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Check interfaces

R1#show interfaces fastethernet 0/0

FastEthernet0/0 is up, line protocol is up

Hardware is AmdFE, address is 000c.3010.9260

Internet address is 172.16.3.1/24 etc.

 Note MAC address of Ethernet interface

 Interface takes part in ARP with its network and keeps an
ARP table

ITE PC v4.0

Chapter 1 9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Check interfaces

R1#show run

interface FastEthernet0/0

ip address 172.16.3.1 255.255.255.0

(Does not say no shutdown)

ITE PC v4.0

Chapter 1 10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interface not up?

 If the interface does not come up – check the cable,
check link lights, check the configuration at the other
end.

 If the protocol does not come up – for Ethernet check
that you have the right cable (straight-through or
crossover) – for serial check that the clock rate is on
the right end of the cable, check that the same Layer 2
protocol is used.

ITE PC v4.0

Chapter 1 11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Directly connected

 Configure IP address on interface

 It appears in routing table

 Note subnetting information

ITE PC v4.0

Chapter 1 12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Serial interface

 R2(config)#interface serial 0/0

 R2(config-if)#ip address 172.16.2.2 255.255.255.0

 R2(config-if)#no shutdown

 This is DTE end

 DCE end needs an additional command

 R3(config-if)#clock rate 64000

ITE PC v4.0

Chapter 1 13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Usual show commands

 Check that interface and protocol are up

show interfaces

show ip interface brief

show running-config

 Check that network is in routing table

show ip route

ITE PC v4.0

Chapter 1 14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show controllers

R1#show controllers serial 0/0

Interface Serial0/0

Hardware is PowerQUICC MPC860

DCE V.35, no clock etc.

 Shows if a cable is connected

 Shows the type of cable

 Shows if clock rate set

ITE PC v4.0

Chapter 1 15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

debug ip routing

 R2#debug ip routing

 If you give this command before configuring the
interfaces then you see a report of the networks being
added to the routing table.

 R2#no debug ip routing or
R2#no debug all

 Switch off debugging as soon as possible after use – it
takes up resources.

ITE PC v4.0

Chapter 1 16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Cisco Discovery Protocol

 Works at layer 2

 Directly connected devices only

 Cisco devices only

 Devices send CDP advertisements to neighbors at
regular intervals

 Use it to find out about networking devices

ITE PC v4.0

Chapter 1 17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show cdp neighbors

 Does not show IP address

 You need show cdp neighbors detail for that.

ITE PC v4.0

Chapter 1 18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Going further

 CDP only shows immediate neighbors, but it does tell
you their IP addresses.

 Telnet to the neighbor and then use CDP to find out
about its neighbors and so on.

ITE PC v4.0

Chapter 1 19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Disable CDP

 Disable CDP for the entire device:

 Router(config)#no cdp run

 Stop CDP advertisements on one interface:

 Router(config-if)#no cdp enable

 Do this for security.

ITE PC v4.0

Chapter 1 20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static routes

 Use for stub networks: only one entry.

Stub network

networks

Static route

Default route

ITE PC v4.0

Chapter 1 21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configure a static route

 R1(config)#ip route 172.16.1.0 255.255.255.0

172.16.2.2

 Give the next hop address

 R1(config)#ip route 172.16.1.0 255.255.255.0 Serial 0/0

 Or give the exit interface

ITE PC v4.0

Chapter 1 22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show ip route

 Routing table now includes:

 S 172.16.1.0 /24 [1/0] via 172.16.2.2

 Or
S 172.16.1.0 /24 is directly connected, serial 0/0

 Administrative distance 1

 Metric 0

ITE PC v4.0

Chapter 1 23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Return route

 If you use static routing, you need to configure
static routes in both directions.

 A route in one direction does not ensure that there
is a route in the other direction.

ITE PC v4.0

Chapter 1 24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Find a route to 172.16.1.0/24

Recursive lookup

There it is, via

172.16.2.2

How do you get to

172.16.2.2?

There it is via serial 0/0.

ITE PC v4.0

Chapter 1 25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static route giving interface

 R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0

ITE PC v4.0

Chapter 1 26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interface down

 If the interface used by a static route goes down, then
the static route is removed from the routing table.

 The static route remains in the configuration.

 If the interface comes up again then the static route
goes back in the routing table.

ITE PC v4.0

Chapter 1 27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Delete a static route

 R1(config)#no ip route 192.168.2.0 255.255.255.0
serial 0/0

 Give the same command again with no in front.

 Most commands can be reversed like this.

ITE PC v4.0

Chapter 1 28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Next hop or exit interface?

 For a point to point serial link, configure the static route
with the exit interface.

Only one look-up, less processing.

 For an Ethernet link, configure the static route with the
next hop address (or with both).

This identifies the device that should receive the packet next.
The MAC address can be found and used in the frame header.

ITE PC v4.0

Chapter 1 29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summarizing static routes

ITE PC v4.0

Chapter 1 30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Default route

 All packets from the stub network need to go on the
same route to the right hand router.

 Configure a static default route.

Stub network
networks
Static route
Default route

ITE PC v4.0

Chapter 1 31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configure a default route

 Router(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0
Using exit interface.

 Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2
Using next hop address

 0.0.0.0 network address and subnet mask is called
quad zero. It matches anything.

ITE PC v4.0

Chapter 1 32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing table

 S* 0.0.0.0/0 is directly connected, Serial0/0

 The default route is shown with a *

ITE PC v4.0

Chapter 1 33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Troubleshooting tools

 ping

 traceroute

 show ip route

 show ip interface brief

 show cdp neighbors

 show running-config

ITE PC v4.0

Chapter 1 34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

General Role of the Router

ITE PC v4.0

Chapter 1 36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

General Role of the Router

 Connections of a Router for WAN

-A router has a DB-60 port that can support 5 different cabling standards

 Connections of a Router for Ethernet

-2 types of connectors can be used: Straight through and Cross-over

Straight through used to connect:

-Switch-to-Router, Switch-to-PC, Router-to-Server, Hub-to-PC, Hub-to-
Server

Cross-over used to connect:

-Switch-to-Switch, PC-to-PC, Switch-to-Hub, Hub-to-Hub, Router-to-
Router

 Functions of a Router

Best Path Selections

Forwarding packets to destination

ITE PC v4.0

Chapter 1 37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interfaces

 Examining Router

Interfaces

-Show IP router command – used to view routing table

-Show Interfaces command – used to show status of an interface

-Show IP Interface brief command – used to show a portion of the
interface information

-Show running-config command – used to show configuration file in RAM

 Configuring an Ethernet interface

-By default all serial and Ethernet interfaces are down

-To enable an interface use the No Shutdown command

 Verifying Ethernet interface

-Show interfaces for fastEthernet 0/0 – command used to show status of
fast Ethernet port

-Show ip interface brief

-Show running-config

 Ethernet interfaces participate in ARP

ITE PC v4.0

Chapter 1 38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Configuring a Serial interface

-Enter interface configuration mode

-Enter in the ip address and subnet mask

-Enter in the no shutdown command

 Example:

-R1(config)#interface serial 0/0

-R1(config-if)#ip address 172.16.2.1 255.255.255.0

-R1(config-if)#no shutdown

Interfaces

ITE PC v4.0

Chapter 1 40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Examining Router Interfaces

-Physically connecting a WAN Interface.

-A WAN Physical Layer connection has sides:

Data Circuit-terminating Equipment (DCE) – This is the service
provider. CSU/DSU is a DCE device.

Data Terminal Equipment (DTE) – Typically the router is DTE device.

Interfaces

 Configuring serial links in a lab environment

One side of a serial connection must be considered a DCE

This requires placing a clocking signal – use the clock rate command.

Example:

-R1(config)#interface serial 0/0

-R1(config-if)#clockrate 64000

Serial Interfaces require a clock signal to control the timing of the
communications.

ITE PC v4.0

Chapter 1 41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table and CDP Protocol

 Purpose of the debug ip routing command

Allows viewing changes that the router performs when adding or
removing routes

Example:

-R2#debug ip routing

-IP routing debugging is on

 To configure an Ethernet interface

Example:

-R2(config)#interface fastethernet 0/0

-R2(config-if)#ip address 172.16.1.1 255.255.255.0

-R2(config-if)#no shutdown

ITE PC v4.0

Chapter 1 42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table and CDP Protocol

 When a router only has its interfaces configured & no other
routing protocols are configured then:

-The routing table contains only the directly connected networks

-Only devices on the directly connected networks are reachable

ITE PC v4.0

Chapter 1 43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0

Chapter 1 45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Checking each route
in turn

The ping command is
used to check end to
end connectivity

ITE PC v4.0

Chapter 1 46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table and CDP Protocol

 Purpose of CDP

A layer 2 cisco proprietary tool used to gather information about other
directly connected Cisco devices.

 Concept of neighbors

-2 types of neighbors

Layer 3 neighbors

Layer 2 neighbors

ITE PC v4.0

Chapter 1 47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Table and CDP Protocol

 CDP show commands

Show cdp neighbors command

-Displays the following information:

Neighbor device ID

Local interface

Holdtime value, in seconds

Neighbor device capability code

Neighbor hardware platform

Neighbor remote port ID

Show cdp neighbors detail command

-Useful in determining if an IP address configuration error

 Disabling CDP

To disable CDP globally use the following command

Router(config)#no cdp run

ITE PC v4.0

Chapter 1 48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes with Exit Interfaces

 Purpose of a static route

A manually configured route used when routing from a net to a stub net

 IP route command

To configure a static route use the following command: ip route

ITE PC v4.0

Chapter 1 49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes with Exit Interfaces

ITE PC v4.0

Chapter 1 50 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Dissecting static route syntax

ip route – Static route command

172.16.1.0 – Destination network address

255.255.255.0 – Subnet mask of destination network

172.16.2.2 – Serial 0/0/0 interface IP address on R2, which is the “next-
hop” to this network

Static Routes with Exit Interfaces

 Configuring routes to 2 or more remote networks

Use the following commands for R1

-R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2

-R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

ITE PC v4.0

Chapter 1 51 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes with Exit Interfaces

ITE PC v4.0

Chapter 1 52 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes with Exit Interfaces

Zinin’s 3 routing principles

Principle 1: “Every router makes its decision alone,
based on the information it has in its own routing
table.“

Principle 2: “The fact that one router has certain
information in its routing table does not mean that
other routers have the same information.“

Principle 3: “Routing information about a path from
one network to another does not provide routing
information about the reverse, or return path.”

ITE PC v4.0

Chapter 1 53 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes with Exit Interfaces

 Using Zinin’s 3 routing principles, how would you answer the
following?

-Would packets from PC1 reach their destination?

Yes, packets destined for 172.16.1.0/24 and 192.168.1.0/24 networks
would reach their destination.

-Does this mean that any packets from these networks destined for
172.16.3.0/24 network will reach their destination?

No, because neither R2 nor R3 router has a route to the 172.16.3.0/24
network.

ITE PC v4.0

Chapter 1 54 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes with Exit Interfaces

 Resolving to an Exit Interface

-Recursive route lookup – Occurs when the router has to perform
multiple lookups in the routing table before forwarding a packet. A static
route that forwards all packets to the next-hop IP address goes through the
following process (reclusive route lookup)

The router first must match static route’s destination IP address with
the Next hop address

The next hop address is then matched to an exit interface

ITE PC v4.0

Chapter 1 55 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Configuring a Static route with an Exit Interface

-Static routes configured with an exit interface are more efficient because
the routing

–The routing table can resolve the exit interface in a single search instead
of 2 searches

-Example of syntax require to configure a static route with an exit interface

Static Routes with Exit Interfaces

ITE PC v4.0

Chapter 1 56 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Modifying Static routes

Existing static routes cannot be modified. The old static route must be
deleted by placing no in front of the ip route

Example:

-no ip route 192.168.2.0 255.255.255.0 172.16.2.2

A new static route must be rewritten in the configuration

Static Routes with Exit Interfaces

ITE PC v4.0

Chapter 1 57 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Verifying the Static Route Configuration

-Use the following commands

Step 1 show running-config

Step 2 verify static route has been entered correctly

Step 3 show ip route

Step 4 verify route was configured in routing table

Step 5 issue ping command to verify packets can reach destination
and that Return path is working

Static Routes with Exit Interfaces

ITE PC v4.0

Chapter 1 58 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Ethernet interfaces and ARP.

– If a static route is configured on an Ethernet link

-If the packet is sent to the next-hop router then…

the destination MAC address will be the
address of the next hop’s Ethernet interface

This is found by the router consulting the
ARP table.

If an entry isn’t found then an ARP
request will be sent out

Static Routes with Exit Interfaces

ITE PC v4.0

Chapter 1 59 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary and Default Route

 Summarizing routes reduces the size of the routing table.

 Route summarization is the process of combining a number of
static routes into a single static route.

 Configuring a summary route

Step 1: Delete the current static route

Step 2: Configure the summary static route

Step 3: Verify the new static route

ITE PC v4.0

Chapter 1 60 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary and Default Route

ITE PC v4.0

Chapter 1 61 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary and Default Route
 Default Static Route

This is a route that will match all packets. Stub routers that have a
number of static routes all exiting the same interface are good candidates
for a default route.

-Like route summarization this will help reduce the size of routing table

 Configuring a default static route

Similar to configuring a static route. Except that destination IP address
and subnet mask are all zeros

Example:

-Router(config)#ip route 0.0.0.0 0.0.0.0 [exit-interface | ip-address ]

 Static routes and subnet masks

The routing table lookup process will use the most specific match when
comparing destination IP address and subnet mask

 Default static routes and subnet masks

Since the subnet mask used on a default static route is 0.0.0.0 all packets
will match.

ITE PC v4.0

Chapter 1 62 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes and Packet Forwarding

 Packet forwarding
with static routes.
(recall Zinin’s 3
routing principles)

 Router 1

Packet arrives on R1’s
Fastethernet 0/0
interface

R1 does not have a
route to the
destination
network,
192.168.2.0/24

R1 uses the default

static route.

ITE PC v4.0

Chapter 1 63 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Packet forwarding with static routes. (Zinin’s 3 routing principles)

 Router 2

The packet arrives on the Serial 0/0/0 interface on R2.

R2 has a static route to 192.168.2.0/24 out Serial0/0/1.

Static Routes and Packet Forwarding

ITE PC v4.0

Chapter 1 64 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Packet forwarding with static routes. (Zinin’s 3 routing principles)

 Router 3

The packet arrives on the Serial0/0/1 interface on R3.

R3 has a connected route to 192.168.2.0/24 out Fastethernet 0/1.

Static Routes and Packet Forwarding

ITE PC v4.0

Chapter 1 65 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Troubleshooting a Missing Route

 Tools that can be used to isolate routing problems include:

-Ping– tests end to end connectivity

-Traceroute– used to discover all of the hops (routers) along the path
between 2 points

-Show IP route– used to display routing table & ascertain forwarding
process

-Show ip interface brief- used to show status of router interfaces

-Show cdp neighbors detail– used to gather configuration information
about directly connected neighbors

Static Routes and Packet Forwarding

ITE PC v4.0

Chapter 1 66 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Solving a Missing Route

 Finding a missing or mis-configured route requires methodically
using the correct tools

-Start with PING. If ping fails then use traceroute to determine where
packets are failing to arrive

 Issue: show ip route to examine routing table.

-If there is a problem with a mis-configured static route remove the static
route then reconfigure the new static route

Static Routes and Packet Forwarding

ITE PC v4.0

Chapter 1 67 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Solving a Missing Route
Static Routes and Packet Forwarding

ITE PC v4.0

Chapter 1 68 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routes and Packet Forwarding
 Solving a Missing Route

ITE PC v4.0

Chapter 1 69 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary
 Routers

-Operate at layer 3

-Functions include best path selection & forwarding packets

 Connecting Networks

WANs

Serial cables are connected to router serial ports.

In the lab environment clock rates must be configured for DCE

LANs

Straight through cables or cross over cables are used to connect to
fastethernet port. (The type of cable used depends on what devices
are being connected)

 Cisco Discovery Protocol

A layer 2 proprietary protocol

Used to discover information about directly connected Cisco devices

ITE PC v4.0

Chapter 1 70 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary
 Static Routes

-This is a manually configured path that specifies how the router will get to
a certain point using a certain path.

 Summary static routes

-This is several static routes that have been condensed into a single static
route.

 Default route

-It is the route packets use if there is no other possible match for their
destination in the routing table.

 Forwarding of packets when static route is used

-Zinin’s 3 routing principles describe how packets are forwarded

 Troubleshooting static routes may require some of the following
commands

-Ping

-Traceroute

-Show IP route

-Show ip interface brief

-Show cdp neighbors detail

ITE PC v4.0

Chapter 1 71 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

©2007 Cisco Systems, Inc. Al

l

rights reserved. Cisco Public 1

Application Layer
Functionality and
Protocols

Network Fundamentals – Chapter 3

Dr. C. BouSaba

2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI Reference Model

 The OSI reference model is a layered,
abstract representation created as a
guideline for network protocol design.

– Divides the networking process into
7 logical layers.

– Each layer has unique functionality &
is assigned specific services & protocols.

3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

info is passed starting at Application
L down the hierarchy to Physical L

O
p

e
n

S
y
s
te

m
s
In

te
rc

o
n

n
e

c
tio

n

OSI: The Application Layer

4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

info is passed over the network to destination host, where the
info proceeds back up the hierarchy, ending at Application L.

OSI: The Application Layer

5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI & TCP/IP: The Application Layers

The TCP/IP application layer protocols fit roughly into the framework of the
top 3 layers of the OSI model: Application, Presentation & Session layers.

6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Application layer,

–Layer seven, is the top layer of both the OSI and TCP/IP models.

–Provides the interface between applications we use to communicate
and the underlying network over which our messages are transmitted.

–Application layer protocols are used to exchange data between
programs running on the source and destination hosts.

OSI: The Application Layer – 7

7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Presentation Layer has three primary functions:

1. Coding and conversion of Application layer data to ensure that
data from the source device can be interpreted by the appropriate
application on the destination device.

2. Compression of the data in a manner that can be decompressed by
the destination device.

3. Encryption of the data for transmission and the decryption of data
upon receipt by the destination.

 Examples include:

QuickTime: an Apple specification for video & audio,

Motion Picture Experts Group (MPEG):
a standard for video compression and coding.

Graphics Interchange Format (GIF),

Joint Photographic Experts Group (JPEG),

Tagged Image File Format (TIFF)
GIF & JPEG are compression & coding standards for graphic images.

TIFF is a standard coding format for graphic images.

OSI: The Presentation Layer – 6

8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Session Layer create and maintain dialogs between
source and destination applications.

The Session layer handles the exchange of info to initiate dialogs, keep
them active, and to restart sessions that are disrupted or idle for a long
period of time.

 Most applications, like web browsers or e-mail clients,
incorporate functionality of the OSI layers 5, 6 and 7.

OSI: The Session Layer – 5

9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The widely-known Application layer protocols provide exchange of info

 Among these TCP/IP protocols are:

Domain Name Service Protocol (DNS) is used to resolve Internet names to IP
addresses.

Hypertext Transfer Protocol (HTTP) is used to transfer files that make up the Web
pages of the World Wide Web.

Simple Mail Transfer Protocol (SMTP) is used for the transfer of mail messages
and attachments.

Telnet, a terminal emulation protocol, is used to provide remote access to servers
and networking devices.

File Transfer Protocol (FTP) is used for interactive file transfer between systems.

 The protocols in the TCP/IP suite are generally defined by Requests

for Comments (RFCs).

The Internet Engineering Task Force maintains the RFCs as the standards for the
TCP/IP suite.

TCP/IP: The Application Layer

10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Software

 The functions associated with the Application layer protocols
enable humans to interface with the underlying data network.

 There are two forms of software programs or processes that
provide access to the network: applications and services.

1. Network-Aware Applications

Applications are the software programs used by people to communicate over
the network.

E-mail clients and web browsers are examples of these types of applications.

2. Application layer Services

Other programs may need the assistance of Application layer services to use
network resources, like file transfer or network print spooling.

Though transparent to the user, these services are the programs that interface
with the network and prepare the data for transfer.

12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Software

13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

User Applications, Services and Application Layer Protocols

 In the OSI model, applications that interact directly with people are
considered to be at the top of the stack, as are the people themselves.

 The Application layer uses protocols that are implemented within
applications and services.

–Applications provide people with a way to create messages

–Application layer services establish an interface to the network

–Protocols provide the rules and formats that govern how data is treated.

 All three components may be used by a single executable program and
may even use the same name.

For example, when discussing “Telnet” we could be referring to the application,
the service, or the protocol.

14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

User Applications, Services and Application Layer Protocols

15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Protocol Functions

 Application layer protocols are
used by both source &
destination devices during a
communication session.

If the communications to be
successful, the application
layer protocols implemented
on the source and destination
host must match.

16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Application layer protocols functions:

•Protocols establish consistent rules for exchanging data between
applications and services loaded on the participating devices.

•Protocols specify how data inside the messages is structured and the
types of messages that are sent between source and destination.

•These messages can be requests for services, acknowledgments, data,
status, or error messages.

•Protocols also define message dialogues, ensuring that a message
being sent is met by the expected response when data transfer occurs.

•Applications and services may also use multiple protocols in the course
of a single conversation.

•One protocol may specify how to establish the network connection and
another describe the process for the data transfer when the message is
passed to the next lower layer.

Application Layer Protocol Functions

17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Client-Server Model

18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Client-Server Model

19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Client and server processes are considered to be in the Application layer.

the device requesting the information is called a client

the device responding to the request is called a server.

Application layer protocols describe the format of the requests and responses
between clients and servers.

 One example of a client/server network is a corporate environment where
employees use a company e-mail server to send, receive and store e-mail.

The e-mail client on an employee computer issues a request to the e-mail server
for any unread mail.

The server responds by sending the requested e-mail to the client.

 Data is typically flowing from the server to the client, some data always
flows from the client to the server.

A client may transfer a file to the server for storage purposes (upload).

Data from a server to a client as a download.

The Client-Server Model

20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Servers

 Any device that responds to requests from client applications is functioning as
a server.

A server is usually a computer that contains information to be shared with many
client systems.

For example, web pages, documents, databases, pictures, video, and audio files
can all be stored on a server and delivered to requesting clients.

In other cases, such as a network printer, the print server delivers the client print
requests to the specified printer.

Some servers may require authentication of user account information to verify if
the user has permission to access the requested data or to use a particular
operation.

21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 In a client/server network, the server
runs a service, or process, is called
a server daemon.

–Daemons typically run in the
background and are not under an
end user’s direct control.

–Daemons are “listening” for a
request from a client, because they
are programmed to respond
whenever the server receives a
request for the service provided by
the daemon.

–When a daemon “hears” a request
from a client, it exchanges
appropriate messages with the client
and proceeds to send the requested
data to the client in the proper format.

Servers

22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Services and Protocols

 A single application may employ many different supporting
Application layer services;

thus what appears to the user as one request for a web page may, in
fact, amount to dozens of individual requests.

And for each request, multiple processes may be executed.

For example, a client may require several individual processes to
formulate just one request to a server.

 Additionally, servers typically have multiple clients requesting
information at the same time.

For example, a Telnet server may have many clients requesting
connections to it simultaneously

The Application layer processes and services rely on support from lower
layer functions to successfully manage the multiple conversations.

23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 A single application may employ many different supporting
Application layer services;

Demo:

http://www.cnn.com

Application Layer Services and Protocols

24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Peer-to-Peer Model

 Peer-to-peer networking involves two distinct forms: peer-to-peer network
design and peer-to-peer applications (P2P).

 Peer-to-Peer Networks
In a peer-to-peer network, two or more computers are connected via a network
and can share resources (such as printers) without having a dedicated server.

Every connected end device (known as a peer) can function as either a server or
a client.

One computer might assume the role of server for one transaction while
simultaneously serving as a client for another.

 A simple home network with two computers sharing a printer is an example
of a peer-to-peer network.

Each person can set his or her computer to share files, enable networked
games, or share an Internet connection.

 Because peer-to-peer networks usually do not use centralized user
accounts, permissions, or monitors

it is difficult to enforce security

25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Peer-to-Peer Networking

26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Peer-to-Peer Model

 Peer-to-Peer (P2P) Applications
Allow a device to act as both a client and a server within the same
communication.

Require that each end device provide a user interface and run a background
service.

When a specific P2P application is launched, it invokes the required user
interface and background services.

 Some P2P applications use a hybrid system where resource sharing is
decentralized but the indexes that point to resource locations are stored in
a centralized directory.

In a hybrid system, each peer accesses an index server to get the location of a
resource stored on another peer.

The index server can also help connect two peers, but once connected, the
communication takes place between the two peers without additional
communication to the index server.

 Peer-to-peer applications can be used on peer-to-peer networks,
client/server networks, and across the Internet.

27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Peer-to-Peer Applications

28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Services and Protocol: Port Number

 Port numbers identify applications and Application layer services that are
the source and destination of data.

Server programs generally use predefined port numbers known by clients.

 Some of these services are:

File Transfer Protocol (FTP) – TCP Ports 20 and 21

Telnet – TCP Port 23

Simple Mail Transfer Protocol (SMTP) – TCP Port 25 (Is a long established
Internet protocol that is used for the delivery and receipt of e-mail).

Domain Name System (DNS) – TCP/UDP Port 53 (TCP is used for “zone
transfers” of full name record databases, while UDP is used for individual
lookups.)

Dynamic Host Configuration Protocol – UDP Port 67

Hypertext Transfer Protocol (HTTP) – TCP Port 80

Post Office Protocol (POP) – UDP Port 110 (Is only to collect e-mail)

29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Services and Protocol: Port Number

30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Services and Protocol: Port Number
 Dynamic Host Configuration Protocol – UDP Port 67 and 68

 When a system starts up on a network it must first request an IP address (assume it is not
using a static IP address), and it does this by broadcasting a request to the DHCP server:

 UDP 0.0.0.0:68 -> 255.255.255.255:67

since the requesting system doesn’t have an IP address (why it is asking) it uses 0.0.0.0 and since
its new to the network it doesn’t know where the DHCP server is, so it broadcasts the request to the
entire network (255.255.255.255).

 The DHCP server then responds with something like:

 UDP 192.168.1.1:67 -> 255.255.255.255:68

This is typically a DHCP offer. NOTE it has to be broadcasted (255.255.255.255) as the requesting
system doesn’t yet have an IP address (its contained in the offer). The data in this transmission
contains the IP and other network configuration information that the requesting system needs to
connect to the network (lease time, Subnet Mask, etc).

 Sometimes you will see something like:

 UDP 192.168.1.101:67 -> 192.168.1.1:68

as a request, followed by a reply

 UDP 192.168.1.1:68 -> 192.168.1.101:67

These are typically IP renewal requests, where a system has an IP address and is asking to renew it
(ie get the lease extended). Since the requesting system knows where the DHCP server is and it
already has a current IP address the requests don’t need to use 0.0.0.0 and 255.255.255.255.

31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Devices are labeled with numeric IP addresses, so that they can participate in
sending and receiving messages over the network.

People have a hard time remembering this numeric address.

Domain names were created to convert the numeric address into a simple, recognizable
name.

 On the Internet these domain names, such as www.cisco.com, are much easier for
people to remember than 198.133.219.25, the actual address for this server.

Also, if Cisco decides to change the numeric address, it is transparent to the user, since
the domain name will remain www.cisco.com.

The new address will simply be linked to the existing domain name and connectivity is
maintained.

 The

DNS

was created for domain name to address resolution for these networks.

DNS uses a distributed set of servers to resolve the names associated with these
numbered addresses.

DNS

32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS

33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS Services and Protocol

 DNS is a client/server service;

The DNS client, or DNS resolver, supports name resolution for other network applications and
services that need it.

 nslookup is an OS utility that allows the user to manually query the name servers to
resolve a given host name.

This utility can also be used to troubleshoot name resolution issues and to verify the current
status of the name servers.

34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS Services and Protocol

35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS Services and Protocol

 A DNS server provides the name resolution
using the name daemon, which is often
called named, (pronounced name-dee).

 The DNS server stores different types of
resource records used to resolve names.
These records contain the name, address,
and type of record.

 Some of these record types are:

A – an end device address

NS – an authoritative name server

CNAME – canonical name (or Fully Qualified
Domain Name) for an alias; used when
multiple services have single network address
but each service has its own entry in DNS

MX – mail exchange record; maps a domain
name to a list of mail exchange servers for
that domain

36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 When a client makes a query, the server’s “named” process
first looks at its own records to see if it can resolve the name.

If it is unable to resolve the name it contacts other servers to resolve the
name.

The request take extra time and consume bandwidth.

Once a match is found and returned to the original requesting server,
the server temporarily stores the numbered address that matches the
name in cache.

If that same name is requested again, the first server can return the
address by using the value stored in its name cache.

Caching reduces both the DNS query data network traffic and the workloads
of servers higher up the hierarchy.

DNS Services and Protocol

37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

D
N

S
S

e
rv

ic
e
s

a
n

d
P

ro
to

c
o

l

38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Domain Name System uses a hierarchical system to create a name
database to provide name resolution.

The hierarchy looks like an inverted tree with the root at the top and branches
below.

The root servers maintain records about how to reach the top-level domain
servers, which in turn have records that point to the secondary level domain
servers and so on.

 Examples of top-level domains are:

.au – Australia

.com – a business or industry

.org – a non-profit organization

DNS Services and Protocol

39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service and HTTP

40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service and HTTP

 When a web address (or URL) is typed into a web browser, the web browser
establishes a connection to the web service running on the server using the
HTTP protocol.

The http://www.cisco.com/index.html example

http (the protocol or scheme)

www.cisco.com (the server name)

A web page named index.html on a server.

The browser then checks with a name server to convert www.cisco.com into a
numeric address, which it uses to connect to the server.

Using the HTTP protocol, the browser sends a GET request to the server asks for
file index.html.

The server in turn sends the HTML code for this web page to the browser.

Finally, the browser deciphers the HTML code and formats the page for the
browser window.

Other types of data, may require another service or program, typically referred to as plug-
ins

41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service and HTTP

 The Hypertext Transfer Protocol (HTTP), one of the most used
application protocols.

 HTTP specifies a request/response protocol. The three
common message types are GET, POST, and PUT.

GET is a client request for data. A web browser sends the GET message
to request pages from a web server.

Once the server receives the GET request, it responds with a status line,
such as HTTP/1.1 200 OK, and a message of its own, the body of which may
be the requested file.

POST and PUT are used to send messages that upload data to the web
server.

For example, when the user enters data into a form embedded in a web
page, POST includes the data in the message sent to the server.

PUT uploads resources or content to the web server.

42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service
and HTTP

43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 HTTP is not a secure protocol.

The POST messages upload information to the server in plain text that
can be intercepted and read.

Similarly, the server responses, typically HTML pages, are also
unencrypted.

 For secure communication across the Internet, the HTTP
Secure (HTTPS) protocol is used for accessing or posting web
server information.

HTTPS can use authentication and encryption to secure data as it
travels between the client and server.

HTTPS specifies additional rules for passing data between the
Application layer and the Transport Layer.

WWW Service and HTTP

44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Service and SMTP/POP Protocols
 E-mail, the most popular network service, has revolutionized how people

communicate through its simplicity and speed.

 To run on a computer or other end device, e-mail requires several
applications and services.

Post Office Protocol (POP): the e-mail client can use POP.

Simple Mail Transfer Protocol (SMTP):
define the formats and commands
used to send e-mail from either
a client or a server.

 When people compose e-mail
messages, they typically use an
application called a Mail User
Agent (MUA), or e-mail client.

The MUA allows messages to be
sent and places received
messages into the client’s mailbox.

45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA

 E-mail Server Processes – MTA and MDA

 The e-mail server operates two separate processes:

Mail Transfer Agent (MTA)

The MTA process is used to
forward e-mail.

The MTA receives messages
from the MUA or from another
MTA on another e-mail server.
Based on the message header,
it forwarded to reach its
destination.

Mail Delivery Agent (MDA)

If the mail is addressed to
a user whose mailbox is on
the local server, the mail is
passed to the MDA.

46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA
 MDA accepts an e-mail from a MTA and performs the actual delivery.

The MDA can also resolve final delivery issues, such as virus scanning,
spam filtering, and return-receipt handling.

 There are other alternatives for e-mail delivery.

A client may be connected to a corporate e-mail system, such as IBM’s Lotus
Notes, Novell’s Groupwise, or Microsoft’s Exchange.

Computers that do not have an MUA can still connect to a mail service on a web
browser in order to retrieve and send messages in this manner.

 E-mail can use the POP and SMTP

POP3 are inbound mail delivery protocols. They deliver e-mail from the e-mail
server to the client (MUA).

The MDA listens for when a client connects to a server. Once a connection is
established, the server can deliver the e-mail to the client.

The SMTP, transfer of outbound e-mail from the sending client to the e-mail
server (MDA), as well as the transport of e-mail between e-mail servers (MTA).

SMTP enables e-mail to be transported across data networks between different types
of server and client software and makes e-mail exchange over the Internet possible.

47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server
Processes –
MTA and MDA

48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA

http://mail.google.com/support/bin/answer.py?answer=76147

49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA

 The SMTP protocol message format uses a rigid set of commands and
replies.

These commands support the procedures used in SMTP, such as session
initiation, mail transaction, forwarding mail, verifying mailbox names, expanding
mailing lists, and the opening and closing exchanges.

 Some of the commands specified in the SMTP protocol are:

HELO – identifies the SMTP client process to the SMTP server process

EHLO – Is a newer version of HELO, which includes services extensions

MAIL FROM – Identifies the sender

RCPT TO – Identifies the recipient

DATA – Identifies the body of the message

50 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Transfer Protocol (FTP)

 The FTP is a Application layer protocol.

FTP allows for file transfers between a client and a server.

An FTP client is an application that runs on a computer that is used to
push and pull files from a FTP server.

The client can download (pull) file from server

or, the client can upload (push) file to server.

 FTP requires two connections between client and server:

The client establishes the 1st connection to the server on TCP port 21.

It consists of client commands and server replies.

The client establishes the 2nd connection to the server over TCP port 20.

This connection is for the actual file transfer and is created every time there is a
file transferred.

51 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Host Configuration Protocol (DHCP)

 The DHCP service enables devices on a network to obtain IP
addresses and other information from a DHCP server.

This service automates the assignment of IP addresses, subnet masks,
gateway and other IP networking parameters.

 When the DHCP server is contacted and an address requested.

The DHCP server chooses an address from a configured range of
addresses called a pool and assigns (“leases”) it to the host for a set
period.

If the host is powered down or taken off the network, the address is
returned to the pool for reuse.

This is especially helpful with mobile users that come and go on a network.

52 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Various types of devices can be DHCP servers when running DHCP
service software.

The DHCP server in most medium to large networks is usually a local dedicated
PC-based server.

With home networks, DHCP server is located at the ISP and a host on the home
network receives its IP configuration directly from the ISP.

 DHCP can pose a security risk because any device connected to the
network can receive an address.

This risk makes physical security an important factor when determining whether
to use dynamic or manual addressing.

 Dynamic and static addressing both have their places in network designs.

Many networks use both DHCP and static addressing.

DHCP is used for general purpose hosts such as end user devices,

Fixed addresses are used for network devices such as gateways, switches,
servers and printers.

Dynamic Host Configuration Protocol (DHCP)

53 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Host Configuration Protocol (DHCP)

54 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DHCP
 When a DHCP-configured device boots up,

The client broadcasts a DHCP DISCOVER packet to identify any available
DHCP servers on the network.

A DHCP server replies with a DHCP OFFER, which is a lease offer message
with an IP address, subnet mask, DNS server, and default gateway.

The client may receive multiple DHCP OFFER packets if there is more than one
DHCP server on the local network, so it must choose between them, and
broadcast a DHCP REQUEST packet that identifies the explicit server.

Assuming that the IP address requested by the client, or offered by the server, is
still valid, the server would return a DHCP ACK message that acknowledges to
the client the lease is finalized.

55 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DHCP
 When a DHCP-configured device boots up,

If the offer is no longer valid – perhaps due to a time-out or another client
allocating the lease – then the selected server will respond with a DHCP
NAK message (Negative Acknowledgement).

If a DHCP NAK message is returned, then the selection process must begin
again with a new DHCP DISCOVER message being transmitted.

 Once the client has the lease, it must be renewed prior to the lease expiration
through another DHCP REQUEST message

 The fourth CCNA Exploration course will cover the operation of DHCP in greater
detail.

56 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Sharing Services and SMB Protocol

 The Server Message Block (SMB) is a client/server file sharing protocol.

IBM developed SMB in the late 1980s to shared network resources, such as
directories, files, printers.

Is a request-response protocol: clients establish long term connection to servers

Once the connection is established, the user of the client can access the resources
on the server as if the resource is local to the client host.

 SMB file-sharing and print services have become the mainstay of Microsoft
networking.

Beginning with Windows 2000, all subsequent Microsoft products use DNS
naming. This allows TCP/IP protocols to directly support SMB resource sharing, as
shown in the figure.

 The LINUX and UNIX operating systems also provide a method of sharing
resources with Microsoft networks using a version of SMB called SAMBA.

 The Apple Macintosh operating systems also support resource sharing using
the SMB protocol.

57 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Sharing Services and SMB Protocol

58 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The SMB protocol describes file system access and how clients can make
requests for files.

 It also describes the SMB protocol inter-process communication.

 All SMB messages share a common format. This format uses a fixed-sized
header followed by a variable-sized parameter and data component.

 SMB messages can:

Start, authenticate, and terminate sessions

Control file and printer access

Allow an application to send or receive messages to or from another device

File Sharing Services and SMB Protocol

59 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Sharing Services and SMB Protocol

60 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

P2P Service and Gnutella Protocol
 With P2P applications based on the Gnutella protocol, people can make files on

their hard disks available to others for downloading.

pronounced /nʊˈtɛlə/ with a silent g,

Gnutella-compatible client software allows users to connect to Gnutella services over the
Internet and to locate and access resources shared by other Gnutella peers.

Many client applications are
available for accessing the
Gnutella network, including:
BearShare, Gnucleus,
LimeWire (screen capture
below), Morpheus, WinMX
and XoloX

http://en.wikipedia.org/wiki/Help:Pronunciation

61 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

P2P Service and Gnutella Protocol
 Many P2P applications do not use a central database to record all the files available

on the peers.

Instead, the devices on the network each tell the other what files are available when
queried and use the Gnutella protocol and services to support locating resources.

 When a user is connected to a Gnutella service, the client applications will search
for other Gnutella nodes to connect to.

These nodes handle queries for resource locations and replies to those requests.

They govern control messages,
which help service discover nodes

The actual file transfers usually
rely on HTTP services.

 The Gnutella protocol defines
five different packet types:

ping – for device discovery

pong – as a reply to a ping

query – for file location

query hit – as a reply to a query

push – as a download request

62 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Telnet Service and Protocol

 Telnet provides a standard method of emulating text-based terminal
devices over the data network.

Both the protocol itself and the client software that implements the protocol are
commonly referred to as Telnet.

 A connection using Telnet is called a Virtual Terminal (VTY) session, or
connection.

To support Telnet client connections, the server runs a service (Telnet daemon)

A virtual terminal connection is established from an end device using a Telnet
client application.

Most operating systems include an Application layer Telnet client.

On a Microsoft Windows PC, Telnet can be run from the command prompt.

Other common terminal applications that run as Telnet clients are
HyperTerminal, Minicom, and TeraTerm.

63 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Telnet is a client/server protocol and it specifies how a VTY session is
established and terminated.

Each Telnet command consists of at least two bytes.

The first byte is a special character called the Interpret as Command (IAC) character.

The next byte as a command.

Some sample Telnet protocol commands include:

Are You There (AYT) – Lets the user request that something appear on the terminal
screen to indicate that the VTY session is active.

Erase Line (EL) – Deletes all text from the current line.

 The Telnet protocol supports user authentication, it does not support the
transport of encrypted data.

All data exchanged during a Telnet sessions is transported as plain text across
the network.

If security is a concern, the Secure Shell (SSH) protocol offers an alternate and
secure method for server access.

SSH provides stronger authentication than Telnet and supports the transport of
session data using encryption.

Telnet Service and Protocol

64 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Telnet Service
and Protocol

65 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

66 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

67 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

68 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

©2007 Cisco Systems, Inc. Al

l

rights reserved. Cisco Public 1

Application Layer
Functionality and
Protocols

Network Fundamentals – Chapter 3

Dr. C. BouSaba

2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI Reference Model

 The OSI reference model is a layered,
abstract representation created as a
guideline for network protocol design.

– Divides the networking process into
7 logical layers.

– Each layer has unique functionality &
is assigned specific services & protocols.

3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

info is passed starting at Application
L down the hierarchy to Physical L

O
p

e
n

S
y
s
te

m
s
In

te
rc

o
n

n
e

c
tio

n

OSI: The Application Layer

4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

info is passed over the network to destination host, where the
info proceeds back up the hierarchy, ending at Application L.

OSI: The Application Layer

5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI & TCP/IP: The Application Layers

The TCP/IP application layer protocols fit roughly into the framework of the
top 3 layers of the OSI model: Application, Presentation & Session layers.

6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Application layer,

–Layer seven, is the top layer of both the OSI and TCP/IP models.

–Provides the interface between applications we use to communicate
and the underlying network over which our messages are transmitted.

–Application layer protocols are used to exchange data between
programs running on the source and destination hosts.

OSI: The Application Layer – 7

7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Presentation Layer has three primary functions:

1. Coding and conversion of Application layer data to ensure that
data from the source device can be interpreted by the appropriate
application on the destination device.

2. Compression of the data in a manner that can be decompressed by
the destination device.

3. Encryption of the data for transmission and the decryption of data
upon receipt by the destination.

 Examples include:

QuickTime: an Apple specification for video & audio,

Motion Picture Experts Group (MPEG):
a standard for video compression and coding.

Graphics Interchange Format (GIF),

Joint Photographic Experts Group (JPEG),

Tagged Image File Format (TIFF)
GIF & JPEG are compression & coding standards for graphic images.

TIFF is a standard coding format for graphic images.

OSI: The Presentation Layer – 6

8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Session Layer create and maintain dialogs between
source and destination applications.

The Session layer handles the exchange of info to initiate dialogs, keep
them active, and to restart sessions that are disrupted or idle for a long
period of time.

 Most applications, like web browsers or e-mail clients,
incorporate functionality of the OSI layers 5, 6 and 7.

OSI: The Session Layer – 5

9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The widely-known Application layer protocols provide exchange of info

 Among these TCP/IP protocols are:

Domain Name Service Protocol (DNS) is used to resolve Internet names to IP
addresses.

Hypertext Transfer Protocol (HTTP) is used to transfer files that make up the Web
pages of the World Wide Web.

Simple Mail Transfer Protocol (SMTP) is used for the transfer of mail messages
and attachments.

Telnet, a terminal emulation protocol, is used to provide remote access to servers
and networking devices.

File Transfer Protocol (FTP) is used for interactive file transfer between systems.

 The protocols in the TCP/IP suite are generally defined by Requests

for Comments (RFCs).

The Internet Engineering Task Force maintains the RFCs as the standards for the
TCP/IP suite.

TCP/IP: The Application Layer

10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Software

 The functions associated with the Application layer protocols
enable humans to interface with the underlying data network.

 There are two forms of software programs or processes that
provide access to the network: applications and services.

1. Network-Aware Applications

Applications are the software programs used by people to communicate over
the network.

E-mail clients and web browsers are examples of these types of applications.

2. Application layer Services

Other programs may need the assistance of Application layer services to use
network resources, like file transfer or network print spooling.

Though transparent to the user, these services are the programs that interface
with the network and prepare the data for transfer.

12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Software

13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

User Applications, Services and Application Layer Protocols

 In the OSI model, applications that interact directly with people are
considered to be at the top of the stack, as are the people themselves.

 The Application layer uses protocols that are implemented within
applications and services.

–Applications provide people with a way to create messages

–Application layer services establish an interface to the network

–Protocols provide the rules and formats that govern how data is treated.

 All three components may be used by a single executable program and
may even use the same name.

For example, when discussing “Telnet” we could be referring to the application,
the service, or the protocol.

14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

User Applications, Services and Application Layer Protocols

15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Protocol Functions

 Application layer protocols are
used by both source &
destination devices during a
communication session.

If the communications to be
successful, the application
layer protocols implemented
on the source and destination
host must match.

16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Application layer protocols functions:

•Protocols establish consistent rules for exchanging data between
applications and services loaded on the participating devices.

•Protocols specify how data inside the messages is structured and the
types of messages that are sent between source and destination.

•These messages can be requests for services, acknowledgments, data,
status, or error messages.

•Protocols also define message dialogues, ensuring that a message
being sent is met by the expected response when data transfer occurs.

•Applications and services may also use multiple protocols in the course
of a single conversation.

•One protocol may specify how to establish the network connection and
another describe the process for the data transfer when the message is
passed to the next lower layer.

Application Layer Protocol Functions

17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Client-Server Model

18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Client-Server Model

19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Client and server processes are considered to be in the Application layer.

the device requesting the information is called a client

the device responding to the request is called a server.

Application layer protocols describe the format of the requests and responses
between clients and servers.

 One example of a client/server network is a corporate environment where
employees use a company e-mail server to send, receive and store e-mail.

The e-mail client on an employee computer issues a request to the e-mail server
for any unread mail.

The server responds by sending the requested e-mail to the client.

 Data is typically flowing from the server to the client, some data always
flows from the client to the server.

A client may transfer a file to the server for storage purposes (upload).

Data from a server to a client as a download.

The Client-Server Model

20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Servers

 Any device that responds to requests from client applications is functioning as
a server.

A server is usually a computer that contains information to be shared with many
client systems.

For example, web pages, documents, databases, pictures, video, and audio files
can all be stored on a server and delivered to requesting clients.

In other cases, such as a network printer, the print server delivers the client print
requests to the specified printer.

Some servers may require authentication of user account information to verify if
the user has permission to access the requested data or to use a particular
operation.

21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 In a client/server network, the server
runs a service, or process, is called
a server daemon.

–Daemons typically run in the
background and are not under an
end user’s direct control.

–Daemons are “listening” for a
request from a client, because they
are programmed to respond
whenever the server receives a
request for the service provided by
the daemon.

–When a daemon “hears” a request
from a client, it exchanges
appropriate messages with the client
and proceeds to send the requested
data to the client in the proper format.

Servers

22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Layer Services and Protocols

 A single application may employ many different supporting
Application layer services;

thus what appears to the user as one request for a web page may, in
fact, amount to dozens of individual requests.

And for each request, multiple processes may be executed.

For example, a client may require several individual processes to
formulate just one request to a server.

 Additionally, servers typically have multiple clients requesting
information at the same time.

For example, a Telnet server may have many clients requesting
connections to it simultaneously

The Application layer processes and services rely on support from lower
layer functions to successfully manage the multiple conversations.

23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 A single application may employ many different supporting
Application layer services;

Demo:

http://www.cnn.com

Application Layer Services and Protocols

24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Peer-to-Peer Model

 Peer-to-peer networking involves two distinct forms: peer-to-peer network
design and peer-to-peer applications (P2P).

 Peer-to-Peer Networks
In a peer-to-peer network, two or more computers are connected via a network
and can share resources (such as printers) without having a dedicated server.

Every connected end device (known as a peer) can function as either a server or
a client.

One computer might assume the role of server for one transaction while
simultaneously serving as a client for another.

 A simple home network with two computers sharing a printer is an example
of a peer-to-peer network.

Each person can set his or her computer to share files, enable networked
games, or share an Internet connection.

 Because peer-to-peer networks usually do not use centralized user
accounts, permissions, or monitors

it is difficult to enforce security

25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Peer-to-Peer Networking

26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Peer-to-Peer Model

 Peer-to-Peer (P2P) Applications
Allow a device to act as both a client and a server within the same
communication.

Require that each end device provide a user interface and run a background
service.

When a specific P2P application is launched, it invokes the required user
interface and background services.

 Some P2P applications use a hybrid system where resource sharing is
decentralized but the indexes that point to resource locations are stored in
a centralized directory.

In a hybrid system, each peer accesses an index server to get the location of a
resource stored on another peer.

The index server can also help connect two peers, but once connected, the
communication takes place between the two peers without additional
communication to the index server.

 Peer-to-peer applications can be used on peer-to-peer networks,
client/server networks, and across the Internet.

27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Peer-to-Peer Applications

28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Services and Protocol: Port Number

 Port numbers identify applications and Application layer services that are
the source and destination of data.

Server programs generally use predefined port numbers known by clients.

 Some of these services are:

File Transfer Protocol (FTP) – TCP Ports 20 and 21

Telnet – TCP Port 23

Simple Mail Transfer Protocol (SMTP) – TCP Port 25 (Is a long established
Internet protocol that is used for the delivery and receipt of e-mail).

Domain Name System (DNS) – TCP/UDP Port 53 (TCP is used for “zone
transfers” of full name record databases, while UDP is used for individual
lookups.)

Dynamic Host Configuration Protocol – UDP Port 67

Hypertext Transfer Protocol (HTTP) – TCP Port 80

Post Office Protocol (POP) – UDP Port 110 (Is only to collect e-mail)

29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Services and Protocol: Port Number

30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Services and Protocol: Port Number
 Dynamic Host Configuration Protocol – UDP Port 67 and 68

 When a system starts up on a network it must first request an IP address (assume it is not
using a static IP address), and it does this by broadcasting a request to the DHCP server:

 UDP 0.0.0.0:68 -> 255.255.255.255:67

since the requesting system doesn’t have an IP address (why it is asking) it uses 0.0.0.0 and since
its new to the network it doesn’t know where the DHCP server is, so it broadcasts the request to the
entire network (255.255.255.255).

 The DHCP server then responds with something like:

 UDP 192.168.1.1:67 -> 255.255.255.255:68

This is typically a DHCP offer. NOTE it has to be broadcasted (255.255.255.255) as the requesting
system doesn’t yet have an IP address (its contained in the offer). The data in this transmission
contains the IP and other network configuration information that the requesting system needs to
connect to the network (lease time, Subnet Mask, etc).

 Sometimes you will see something like:

 UDP 192.168.1.101:67 -> 192.168.1.1:68

as a request, followed by a reply

 UDP 192.168.1.1:68 -> 192.168.1.101:67

These are typically IP renewal requests, where a system has an IP address and is asking to renew it
(ie get the lease extended). Since the requesting system knows where the DHCP server is and it
already has a current IP address the requests don’t need to use 0.0.0.0 and 255.255.255.255.

31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Devices are labeled with numeric IP addresses, so that they can participate in
sending and receiving messages over the network.

People have a hard time remembering this numeric address.

Domain names were created to convert the numeric address into a simple, recognizable
name.

 On the Internet these domain names, such as www.cisco.com, are much easier for
people to remember than 198.133.219.25, the actual address for this server.

Also, if Cisco decides to change the numeric address, it is transparent to the user, since
the domain name will remain www.cisco.com.

The new address will simply be linked to the existing domain name and connectivity is
maintained.

 The

DNS

was created for domain name to address resolution for these networks.

DNS uses a distributed set of servers to resolve the names associated with these
numbered addresses.

DNS

32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS

33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS Services and Protocol

 DNS is a client/server service;

The DNS client, or DNS resolver, supports name resolution for other network applications and
services that need it.

 nslookup is an OS utility that allows the user to manually query the name servers to
resolve a given host name.

This utility can also be used to troubleshoot name resolution issues and to verify the current
status of the name servers.

34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS Services and Protocol

35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DNS Services and Protocol

 A DNS server provides the name resolution
using the name daemon, which is often
called named, (pronounced name-dee).

 The DNS server stores different types of
resource records used to resolve names.
These records contain the name, address,
and type of record.

 Some of these record types are:

A – an end device address

NS – an authoritative name server

CNAME – canonical name (or Fully Qualified
Domain Name) for an alias; used when
multiple services have single network address
but each service has its own entry in DNS

MX – mail exchange record; maps a domain
name to a list of mail exchange servers for
that domain

36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 When a client makes a query, the server’s “named” process
first looks at its own records to see if it can resolve the name.

If it is unable to resolve the name it contacts other servers to resolve the
name.

The request take extra time and consume bandwidth.

Once a match is found and returned to the original requesting server,
the server temporarily stores the numbered address that matches the
name in cache.

If that same name is requested again, the first server can return the
address by using the value stored in its name cache.

Caching reduces both the DNS query data network traffic and the workloads
of servers higher up the hierarchy.

DNS Services and Protocol

37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

D
N

S
S

e
rv

ic
e
s

a
n

d
P

ro
to

c
o

l

38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The Domain Name System uses a hierarchical system to create a name
database to provide name resolution.

The hierarchy looks like an inverted tree with the root at the top and branches
below.

The root servers maintain records about how to reach the top-level domain
servers, which in turn have records that point to the secondary level domain
servers and so on.

 Examples of top-level domains are:

.au – Australia

.com – a business or industry

.org – a non-profit organization

DNS Services and Protocol

39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service and HTTP

40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service and HTTP

 When a web address (or URL) is typed into a web browser, the web browser
establishes a connection to the web service running on the server using the
HTTP protocol.

The http://www.cisco.com/index.html example

http (the protocol or scheme)

www.cisco.com (the server name)

A web page named index.html on a server.

The browser then checks with a name server to convert www.cisco.com into a
numeric address, which it uses to connect to the server.

Using the HTTP protocol, the browser sends a GET request to the server asks for
file index.html.

The server in turn sends the HTML code for this web page to the browser.

Finally, the browser deciphers the HTML code and formats the page for the
browser window.

Other types of data, may require another service or program, typically referred to as plug-
ins

41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service and HTTP

 The Hypertext Transfer Protocol (HTTP), one of the most used
application protocols.

 HTTP specifies a request/response protocol. The three
common message types are GET, POST, and PUT.

GET is a client request for data. A web browser sends the GET message
to request pages from a web server.

Once the server receives the GET request, it responds with a status line,
such as HTTP/1.1 200 OK, and a message of its own, the body of which may
be the requested file.

POST and PUT are used to send messages that upload data to the web
server.

For example, when the user enters data into a form embedded in a web
page, POST includes the data in the message sent to the server.

PUT uploads resources or content to the web server.

42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

WWW Service
and HTTP

43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 HTTP is not a secure protocol.

The POST messages upload information to the server in plain text that
can be intercepted and read.

Similarly, the server responses, typically HTML pages, are also
unencrypted.

 For secure communication across the Internet, the HTTP
Secure (HTTPS) protocol is used for accessing or posting web
server information.

HTTPS can use authentication and encryption to secure data as it
travels between the client and server.

HTTPS specifies additional rules for passing data between the
Application layer and the Transport Layer.

WWW Service and HTTP

44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Service and SMTP/POP Protocols
 E-mail, the most popular network service, has revolutionized how people

communicate through its simplicity and speed.

 To run on a computer or other end device, e-mail requires several
applications and services.

Post Office Protocol (POP): the e-mail client can use POP.

Simple Mail Transfer Protocol (SMTP):
define the formats and commands
used to send e-mail from either
a client or a server.

 When people compose e-mail
messages, they typically use an
application called a Mail User
Agent (MUA), or e-mail client.

The MUA allows messages to be
sent and places received
messages into the client’s mailbox.

45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA

 E-mail Server Processes – MTA and MDA

 The e-mail server operates two separate processes:

Mail Transfer Agent (MTA)

The MTA process is used to
forward e-mail.

The MTA receives messages
from the MUA or from another
MTA on another e-mail server.
Based on the message header,
it forwarded to reach its
destination.

Mail Delivery Agent (MDA)

If the mail is addressed to
a user whose mailbox is on
the local server, the mail is
passed to the MDA.

46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA
 MDA accepts an e-mail from a MTA and performs the actual delivery.

The MDA can also resolve final delivery issues, such as virus scanning,
spam filtering, and return-receipt handling.

 There are other alternatives for e-mail delivery.

A client may be connected to a corporate e-mail system, such as IBM’s Lotus
Notes, Novell’s Groupwise, or Microsoft’s Exchange.

Computers that do not have an MUA can still connect to a mail service on a web
browser in order to retrieve and send messages in this manner.

 E-mail can use the POP and SMTP

POP3 are inbound mail delivery protocols. They deliver e-mail from the e-mail
server to the client (MUA).

The MDA listens for when a client connects to a server. Once a connection is
established, the server can deliver the e-mail to the client.

The SMTP, transfer of outbound e-mail from the sending client to the e-mail
server (MDA), as well as the transport of e-mail between e-mail servers (MTA).

SMTP enables e-mail to be transported across data networks between different types
of server and client software and makes e-mail exchange over the Internet possible.

47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server
Processes –
MTA and MDA

48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA

http://mail.google.com/support/bin/answer.py?answer=76147

49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

E-mail Server Processes – MTA and MDA

 The SMTP protocol message format uses a rigid set of commands and
replies.

These commands support the procedures used in SMTP, such as session
initiation, mail transaction, forwarding mail, verifying mailbox names, expanding
mailing lists, and the opening and closing exchanges.

 Some of the commands specified in the SMTP protocol are:

HELO – identifies the SMTP client process to the SMTP server process

EHLO – Is a newer version of HELO, which includes services extensions

MAIL FROM – Identifies the sender

RCPT TO – Identifies the recipient

DATA – Identifies the body of the message

50 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Transfer Protocol (FTP)

 The FTP is a Application layer protocol.

FTP allows for file transfers between a client and a server.

An FTP client is an application that runs on a computer that is used to
push and pull files from a FTP server.

The client can download (pull) file from server

or, the client can upload (push) file to server.

 FTP requires two connections between client and server:

The client establishes the 1st connection to the server on TCP port 21.

It consists of client commands and server replies.

The client establishes the 2nd connection to the server over TCP port 20.

This connection is for the actual file transfer and is created every time there is a
file transferred.

51 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Host Configuration Protocol (DHCP)

 The DHCP service enables devices on a network to obtain IP
addresses and other information from a DHCP server.

This service automates the assignment of IP addresses, subnet masks,
gateway and other IP networking parameters.

 When the DHCP server is contacted and an address requested.

The DHCP server chooses an address from a configured range of
addresses called a pool and assigns (“leases”) it to the host for a set
period.

If the host is powered down or taken off the network, the address is
returned to the pool for reuse.

This is especially helpful with mobile users that come and go on a network.

52 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Various types of devices can be DHCP servers when running DHCP
service software.

The DHCP server in most medium to large networks is usually a local dedicated
PC-based server.

With home networks, DHCP server is located at the ISP and a host on the home
network receives its IP configuration directly from the ISP.

 DHCP can pose a security risk because any device connected to the
network can receive an address.

This risk makes physical security an important factor when determining whether
to use dynamic or manual addressing.

 Dynamic and static addressing both have their places in network designs.

Many networks use both DHCP and static addressing.

DHCP is used for general purpose hosts such as end user devices,

Fixed addresses are used for network devices such as gateways, switches,
servers and printers.

Dynamic Host Configuration Protocol (DHCP)

53 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Host Configuration Protocol (DHCP)

54 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DHCP
 When a DHCP-configured device boots up,

The client broadcasts a DHCP DISCOVER packet to identify any available
DHCP servers on the network.

A DHCP server replies with a DHCP OFFER, which is a lease offer message
with an IP address, subnet mask, DNS server, and default gateway.

The client may receive multiple DHCP OFFER packets if there is more than one
DHCP server on the local network, so it must choose between them, and
broadcast a DHCP REQUEST packet that identifies the explicit server.

Assuming that the IP address requested by the client, or offered by the server, is
still valid, the server would return a DHCP ACK message that acknowledges to
the client the lease is finalized.

55 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DHCP
 When a DHCP-configured device boots up,

If the offer is no longer valid – perhaps due to a time-out or another client
allocating the lease – then the selected server will respond with a DHCP
NAK message (Negative Acknowledgement).

If a DHCP NAK message is returned, then the selection process must begin
again with a new DHCP DISCOVER message being transmitted.

 Once the client has the lease, it must be renewed prior to the lease expiration
through another DHCP REQUEST message

 The fourth CCNA Exploration course will cover the operation of DHCP in greater
detail.

56 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Sharing Services and SMB Protocol

 The Server Message Block (SMB) is a client/server file sharing protocol.

IBM developed SMB in the late 1980s to shared network resources, such as
directories, files, printers.

Is a request-response protocol: clients establish long term connection to servers

Once the connection is established, the user of the client can access the resources
on the server as if the resource is local to the client host.

 SMB file-sharing and print services have become the mainstay of Microsoft
networking.

Beginning with Windows 2000, all subsequent Microsoft products use DNS
naming. This allows TCP/IP protocols to directly support SMB resource sharing, as
shown in the figure.

 The LINUX and UNIX operating systems also provide a method of sharing
resources with Microsoft networks using a version of SMB called SAMBA.

 The Apple Macintosh operating systems also support resource sharing using
the SMB protocol.

57 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Sharing Services and SMB Protocol

58 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 The SMB protocol describes file system access and how clients can make
requests for files.

 It also describes the SMB protocol inter-process communication.

 All SMB messages share a common format. This format uses a fixed-sized
header followed by a variable-sized parameter and data component.

 SMB messages can:

Start, authenticate, and terminate sessions

Control file and printer access

Allow an application to send or receive messages to or from another device

File Sharing Services and SMB Protocol

59 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

File Sharing Services and SMB Protocol

60 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

P2P Service and Gnutella Protocol
 With P2P applications based on the Gnutella protocol, people can make files on

their hard disks available to others for downloading.

pronounced /nʊˈtɛlə/ with a silent g,

Gnutella-compatible client software allows users to connect to Gnutella services over the
Internet and to locate and access resources shared by other Gnutella peers.

Many client applications are
available for accessing the
Gnutella network, including:
BearShare, Gnucleus,
LimeWire (screen capture
below), Morpheus, WinMX
and XoloX

http://en.wikipedia.org/wiki/Help:Pronunciation

61 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

P2P Service and Gnutella Protocol
 Many P2P applications do not use a central database to record all the files available

on the peers.

Instead, the devices on the network each tell the other what files are available when
queried and use the Gnutella protocol and services to support locating resources.

 When a user is connected to a Gnutella service, the client applications will search
for other Gnutella nodes to connect to.

These nodes handle queries for resource locations and replies to those requests.

They govern control messages,
which help service discover nodes

The actual file transfers usually
rely on HTTP services.

 The Gnutella protocol defines
five different packet types:

ping – for device discovery

pong – as a reply to a ping

query – for file location

query hit – as a reply to a query

push – as a download request

62 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Telnet Service and Protocol

 Telnet provides a standard method of emulating text-based terminal
devices over the data network.

Both the protocol itself and the client software that implements the protocol are
commonly referred to as Telnet.

 A connection using Telnet is called a Virtual Terminal (VTY) session, or
connection.

To support Telnet client connections, the server runs a service (Telnet daemon)

A virtual terminal connection is established from an end device using a Telnet
client application.

Most operating systems include an Application layer Telnet client.

On a Microsoft Windows PC, Telnet can be run from the command prompt.

Other common terminal applications that run as Telnet clients are
HyperTerminal, Minicom, and TeraTerm.

63 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Telnet is a client/server protocol and it specifies how a VTY session is
established and terminated.

Each Telnet command consists of at least two bytes.

The first byte is a special character called the Interpret as Command (IAC) character.

The next byte as a command.

Some sample Telnet protocol commands include:

Are You There (AYT) – Lets the user request that something appear on the terminal
screen to indicate that the VTY session is active.

Erase Line (EL) – Deletes all text from the current line.

 The Telnet protocol supports user authentication, it does not support the
transport of encrypted data.

All data exchanged during a Telnet sessions is transported as plain text across
the network.

If security is a concern, the Secure Shell (SSH) protocol offers an alternate and
secure method for server access.

SSH provides stronger authentication than Telnet and supports the transport of
session data using encryption.

Telnet Service and Protocol

64 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Telnet Service
and Protocol

65 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

66 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

67 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

68 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

©2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Transport Layer

Network Fundamentals – Chapter 4

Dr. C. BouSaba

2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI transport layer

 OSI model layer 4

Application

Presentation

Session

Transport

Network

Data link

Physical

Application
Transport

Internet

Network Access

TCP, UDP

IP

Ethernet,

WAN

technologies

HTTP, FTP,

TFTP, SMTP

etc

Segment

Packet

Frame

Bits

Data

stream

 TCP/IP model
Transport layer

3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Purpose of transport layer

 Responsible for the overall end-to-end transfer of application data.

 Enables multiple applications on the same device to send data over the
network at the same time

 Provides “reliability” and error handling if required. (Checks if data has
arrived and re-sends if it has not.)

4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer TCP and UDP

 Preparing application data for transport over the network and processing
network data for use by applications.

 Tracking the individual communication between (one or more) applications on
the source and destination hosts

 Segmenting data and managing each piece

 Reassembling the segments into application data

 Identifying the different applications using an identifier (port number)

5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport
Layer:

Controlling the
Conversations

6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Supporting Reliable Communication

7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer TCP and UDP

8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why two transport protocols?

 Some applications need their data to be complete with
no errors or gaps and they can accept a slight delay to
ensure this.
They use TCP.

 Some applications can accept occasional errors or
gaps in the data but they cannot accept any delay.
They use UDP.

Reliable

Fast

9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP and UDP headers

10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP UDP

 Sets up a connection with the
receiving host before sending data.

 Checks if segments have arrived
and resends if they were lost.
(Reliability)

 Sorts segments in right order before
reassembling the data.

 Sends at a speed to suit the
receiving host. (Flow control)

 But – this takes time and resources
(High overhead).

 Robust

 Connectionless. Does not contact
receiving host before sending data.

 Does not check if data arrived and
does not re-send. (Unreliable)

 Does not sort into the right order.

 “Best effort”.

 Low overhead.

 Used for VoIP, streaming video,
DNS, TFTP (data sensitive to
delays)

12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Numbers and Sockets

 Used by TCP and UDP as a form of addressing.

 Identifies the application and the conversation.

 Common application protocols have default port numbers e.g.
80 for HTTP, 110 for POP3 mail, 20/21 for FTP, 23 for Telnet

Client PC uses port 80.

Identifies HTTP as application.

Requesting a web page.

Client PC uses port 49152.

Chosen at random.

Remembers this to identify

application and conversation.

Port + IP address = socket. E.g. 192.168.2.12:80

13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services

14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing: Identifying the Conversations

15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port numbers

 The Internet Assigned Numbers Authority (IANA) assigns
port numbers.

 Well Known Ports (0 to 1023) – Reserved for common
services and applications such as HTTP, FTP, Telnet,
POP3, SMTP.

 Registered Ports (1024 to 49151) – Assigned to user
processes or applications. Can be dynamically selected by a
client as its source port.

 Dynamic or Private or Ephemeral Ports (49152 to 65535) –
Can be assigned dynamically to client applications when
initiating a connection.

16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The IANA assigns port numbers

17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The IANA assigns port numbers

18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The IANA assigns port numbers

19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing: netstat command
 Sometimes it is necessary to know which active TCP connections are open

and running on a networked host.

Unexpected connections may mean there is a security problem.

 Netstat is an important network utility that can be used to verify those
connections. Netstat lists:

protocol in use, local address and port number, foreign address and port number,
state of the connection.

20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Segment and sequence

 Both TCP and UDP split application data into suitably
sized pieces for transport and re-assemble them on
arrival.

 TCP has sequence numbers in the segment headers. It
re-assembles segments in the right order.

 UDP has no sequence numbers. It assembles datagrams
in the order they arrive.

21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Connection oriented

 TCP sets up a connection between end hosts before
sending data

 The two hosts go through a synchronization process to
ensure that both hosts are ready and know the initial
sequence numbers.

 This process is the Three-way handshake

 When data transfer is finished, the hosts send signals to
end the session.

22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Three way handshake

Send SYN

seq = x

Receive SYN

seq = x
Receive SYN

ack = y

seq = x+1

Receive ACK

ack = y+1

Send ACK

ack = y+1
Send SYN
ack = y
seq = x+1

23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Terminating connection

24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP-Making Conversations Reliable
 The key distinction between TCP and UDP is reliability.

 The reliability of TCP communication is performed using connection-oriented
sessions. (3 way handshake)

Before a host using TCP sends data to another host, the Transport layer initiates a
process to create a connection with the destination.

This process ensures that each host is aware of and prepared for communication.

 After a session has been established (3 way handshake), the destination
sends acknowledgements to the source for the segments that it receives.

As the source receives an acknowledgement, it knows that the data has been
successfully delivered and can quit tracking that data.

 If the source does not receive an acknowledgement within a predetermined
amount of time, it retransmits that data to the destination.

There is also additional overhead on the individual hosts created by the necessity
to keep track of which segments are awaiting acknowledgement and by the
retransmission process.

25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Expectational acknowledgement

 TCP checks that data has been received.

 The receiving host sends an acknowledgement giving
the sequence number of the byte that it expects next.

26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Window size

 Controls how many bytes are sent before an acknowledgement is
expected.

27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Lost segments

 Send bytes 1 to 2999

 Receive 1 to 2999, send ACK 3000

 Send bytes 3000 to 4999

 Receive 3000 to 3999, send ACK 4000
(bytes 4000 to 4999 were lost)

 Send bytes 4000 to 5999

 Lost segments are re-sent.

 If no ACK – send them all again

28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Flow control

 The initial window size is agreed during the three-way
handshake.

 If this is too much for the receiver and it loses data (e.g.
buffer overflow) then it can decrease the window size.

 If all is well then the receiver will increase the window
size.

29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application and Operation of TCP Mechanisms

30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application and Operation of TCP Mechanisms

31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection Establishment and Termination

32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection Establishment and Termination

33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection Establishment and Termination

34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection Establishment: Three-way Handshake

 The three steps in TCP connection establishment are:

1. The initiating client sends a segment containing an initial sequence
value, which serves as a request to the server to begin a communications
session.

2. The server responds with a segment containing an acknowledgement
value equal to the received sequence value plus 1, plus its own
synchronizing sequence value.

The value is one greater than the sequence number because the ACK is
always the next expected Byte or Octet.

This acknowledgement value enables the client to tie the response back to the
original segment that it sent to the server.

3. Initiating client responds with an acknowledgement value equal to the
sequence value it received plus one. This completes the process of
establishing the connection.

35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Termination
 Look at the various values that the two hosts exchange.

 Within the TCP segment header, there are six 1-bit fields that contain control
information used to manage the TCP processes. Those fields are:

URG – Urgent pointer field significant

ACK – Acknowledgement field significant

PSH – Push function

RST – Reset the connection

SYN – Synchronize sequence numbers

FIN – No more data from sender

 These fields are referred to as flags, because the value of one of these fields
is only 1 bit and, therefore, has only two values: 1 or 0. When a bit value is
set to 1, it indicates what control information is contained in the segment.

 Using a four-step process, flags are exchanged to terminate a TCP
connection.

36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Segment Reassembly

37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Acknowledgement with Windowing

38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP:
Low Overhead vs. Reliability

39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP – Low Overhead vs. Reliability
 UDP is a simple protocol that provides the basic Transport layer functions.

It is not connection-oriented

It does not provide retransmission, sequencing, and flow control.

 This does not mean that applications that use UDP are always unreliable.

It simply means that these functions are not provided by the Transport layer
protocol and must be implemented elsewhere if required.

 key Application layer protocols that use UDP include:

Domain Name System (DNS)

Simple Network Management Protocol (SNMP)

Dynamic Host Configuration Protocol (DHCP)

Routing Information Protocol (RIP)

Trivial File Transfer Protocol (TFTP)

Online games

 If these applications used TCP, they may experience large delays while TCP
detects data loss and retransmits data.

These delays would be more detrimental to the application than small data losses.

40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Protocol

41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Datagram Reassembly

42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Client Processes

43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Client Processes

44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Comparison of TCP and UDP

 Both TCP and UDP use port numbers

 Both split up application data if necessary

 TCP sets up a connection

 TCP uses acknowledgements and re-sends

 TCP uses flow control

 TCP can re-assemble segments in the right order if
they arrive out of sequence

 UDP has less overhead so is faster

45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Comparison of TCP and UDP

46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP and UDP
 The 2 most common Transport layer protocols:

User Datagram Protocol (UDP)

UDP is a connectionless protocol, described in RFC 768.

It provides low overhead data delivery.

The pieces of communication in UDP are called datagrams.

each UDP segment only has 8 bytes of overhead.

These datagrams are sent as “best effort”.

Applications that use UDP include: Domain Name System (DNS), Video Streaming,
Voice over IP (VoIP)

Transmission Control Protocol (TCP)

TCP is a connection-oriented protocol, described in RFC 793.

TCP incurs additional overhead to gain functions.

Additional functions specified by TCP are: the same order delivery, reliable
delivery, and flow control.

Each TCP segment has 20 bytes of overhead in the header encapsulating the
Application layer data,

Applications that use TCP are: Web Browsers, E-mail, File Transfers

47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Network Layer

Network Fundamentals – Chapter 5

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives
� Identify the role of the Network Layer, as it describes

communication from one end device to another end device

� Examine the most common Network Layer protocol, Internet
Protocol (IP), and its features for providing connectionless and
best-effort service

� Understand the principles used to guide the division or grouping
of devices into networks

� Understand the hierarchical addressing of devices and how this
allows communication between networks

� Understand the fundamentals of routes, next hop addresses and
packet forwarding to a destination network

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP)

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer – Communication from Host to Host

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer – Communication from Host to Host

� The Network layer, or OSI Layer 3, provides services
to exchange the individual pieces of data over the
network between identified end devices.

–Network layer protocols specify the packet structure and processing
used to carry the data from one host to another host.

–Network layer carries packets for multiple types of communications
between multiple hosts.

� To accomplish this end-to-end transport, Layer 3
uses 4 basic processes:

1. Addressing

2. Encapsulation

3. Routing

4. Decapsulation

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer – Communication from Host to Host
1. Addressing

Each end device must have a unique address.

When an address is added to a device, the device is referred to as a host.

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer – Communication from Host to Host
2. Encapsulation

The destination address is the address of the host to which it is being sent.

The source address is the address of the originating host.

Network layer PDU is a packet that contains source and destinations addresses

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer – Communication from Host to Host
3. Routing

During the routing through an internetwork, the packet may traverse many
intermediary devices.

A hop is each router that a packet takes to reach the next device.

As the packet is forwarded, its contents (Transport layer PDU), remain intact until the
dest. host is reached.

If the source and destination hosts are not connected to the same network.

The Network layer must provide services to direct these packets to their destination host.

Intermediary devices that connect the networks are called routers.

The role of the router is to select paths for and direct packets toward their destination.

4. Decapsulation

Finally, the packet arrives at the destination host and is processed at Layer 3.

The packet is decapsulated by the Network layer and passed up to the appropriate
service at Transport layer.

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols

� Protocols implemented at the Network layer that
carry user data include:

Internet Protocol version 4 (IPv4)

Internet Protocol version 6 (IPv6)

Novell Internetwork Packet Exchange (IPX)

AppleTalk

Connectionless Network Service (CLNS/DECNet)

� The Internet Protocol (IPv4 and IPv6) is the most
widely-used Layer 3 data carrying protocol.

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4

Protocol

� The Network layer services implemented by the TCP/IP protocol suite are the

Internet Protocol (IP).

Version 4 of IP (IPv4) is currently the most widely-used version of IP.

It is the only Layer 3 protocol that is used to carry user data over the Internet.

IP version 6 (IPv6) is developed and being implemented.

IPv6 will operate alongside IPv4 and may replace it in the future.

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Protocol

� IPv4 basic characteristics:

Connectionless – No connection is established before sending data packets.

Best Effort (unreliable) – No overhead is used to guarantee packet delivery.

Media Independent – Operates independently of the medium carrying the data.

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Protocol – Connectionless Service

� Connectionless communication is similar to sending a letter to someone
without notifying the recipient in advance.

IP is connectionless, it requires no initial exchange of control information to
establish an end-to-end connection, nor does it require additional fields in the PDU
header to maintain this connection. IP packets are sent without notifying the end
host that they are coming.

Connection-oriented protocols, such as TCP,

Require exchanging control data to establish connection and additional fields in
PDU header

� Connectionless packet delivery may result in packets arriving at the
destination out of sequence.

If out-of-order or missing packets create problems for the application using the
data, then upper layer services will have to resolve these issues.

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Protocol – Best Effort Service (unreliable)

� Protocols at other layers manage reliability so that IP functions very efficiently
at the Network layer.

As with all layer isolation provided by network models, leaving the reliability
decision to the Transport layer makes IP more adaptable and accommodating for
different types of communication.

� IP is often referred to as an unreliable protocol.

The header of IP packet does not include fields required for reliable data delivery

There are no acknowledgments of packet delivery.

There is no error control for data.

Nor is there any form of packet tracking.

Unreliable in this context does not mean that IP works properly sometimes and
does not function well at other times.

Unreliable means simply that IP does not have the capability to manage, and
recover from, undelivered or corrupt packets.

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Protocol – Best Effort Service (unreliable)

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Protocol – Media Independent

� The Network layer is also not burdened with the media on which packets will

be transported.

IPv4 and IPv6 operate independently of the media that carry the data at lower
layers of the protocol stack.

Any individual IP packet can be communicated electrically over cable, optical
signals over fiber, or wirelessly as radio signals.

It is the responsibility of the OSI Data Link layer to take an IP packet and prepare it
for transmission over the communications medium.

� There is, however, one major characteristic of the media that the Network
layer considers:

It is referred to as Maximum Transmission Unit (MTU).

The maximum size of PDU that each medium can transport.

The Data Link layer passes the MTU to the Network layer.

The Network layer then determines how large to create the packets.

� In some cases, an intermediary device – usually a router – will need to split up
a packet when forwarding it from one media to a media with a smaller MTU.

This process is called fragmenting the packet or fragmentation.

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Protocol – Media Independent

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Packet

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Packet
� IPv4 encapsulates, the Transport layer segment or datagram so that the

network can deliver it to the destination host.

The process of encapsulating data by layer enables the services at the different
layers to develop and scale without affecting other layers.

This means that transport layer segments can be readily packaged by existing
Network layer protocols, such as IPv4 and IPv6 or by any new protocol that
might be developed in the future.

In all cases, the data portion of the packet – that is, the encapsulated Transport
layer PDU – remains unchanged during the Network layer processes.

� Routers can implement these different Network layer protocols to operate
concurrently over a network to and from the same or different hosts.

The routing performed by these intermediary devices only considers the
contents of the packet header that encapsulates the segment.

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Packet Header

� An IPv4 protocol defines many different fields in the packet header.

� This course will consider these 6 key fields:

IP Source Address (32 bits): source Network layer host address.

IP Destination Address (32 bits): destination Network layer host address

Time-to-Live (TTL)

Type-of-Service (ToS)

Protocol

Fragment Offset.

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Time-to-Live (8 bits)

–The Time-to-Live (TTL) indicates
the remaining “life” of the packet.

–The TTL value is decreased by at
least one each time the packet is
processed by a router (hop).

–When TTL becomes zero, the
router discards or drops the packet
and it is removed from the network
data flow.

–This mechanism prevents packets
that cannot reach their destination
from being forwarded indefinitely
between routers in a routing loop.

–Decrementing the TTL value at
each hop ensures that it eventually
becomes zero and that the packet
with the expired TTL field will be
dropped.

IP V4 Packet Header

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Packet Header
� Protocol (8 bits)

Indicates the data payload type that the packet is carrying. The Protocol field
enables the Network layer to pass the data to the appropriate upper-layer protocol.
Example values are: 01 ICMP; 06 TCP; 17 UDP

� Type-of-Service (8 bits)

Is used to determine the priority of each packet.

This value enables a Quality-of-Service (QoS) mechanism to be applied to high
priority packets, such as those carrying telephony voice data.

� Fragment Offset (13 bits)

Identifies the order in which to place the packet fragment in the reconstruction.

� More Fragments flag (1 bit)

Flag bit is set (MF = 1) means that it is not the last fragment of a packet.

When a host receives a frame with MF = 0 and a non-zero value in the Fragment
offset, it places that fragment as the last part of the reconstructed packet.

An unfragmented pkt has all zero fragmentation info. (MF = 0, fragment offset =0).

� Don’t Fragment flag (1 bit)

If the Don’t Fragment flag bit is set (DF = 1), then fragmentation of this packet is
NOT permitted.

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Time-to-Live: Demo

cmd

Ping /?

Ping www.ncat.edu

Ping www.ncat.edu –i 10

tracert /?

tracert www.ncat.edu –h 10

ping www.ncat.edu –l 3000

ping www.yahoo.com –l 3000 –f

ping www.yahoo.com –l 1000 –f

IP V4 Packet Header

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Packet Header: Other IPv4 Header Fields

� Version (4 bits)

Contains the IP version number (4).

� Header Length (IHL) (4 bits)

Specifies the size of the packet header.

� Packet Length (16 bits)

This field gives the entire packet size, including header and data, in bytes.

� Identification (16 bits)

This field is primarily used for uniquely identifying fragments of an original IP packet.

� Header Checksum (16 bits)

The checksum field is used for error checking the packet header.

� Options (variable length)

There is provision for additional fields in the IPv4 header to provide other services but
these are rarely used.

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP V4 Packet Header: Typical IP Packet
� Ver = 4;

IP version.

� IHL = 5;

size of header in 32 bit words (4 bytes).

This header is 5*4 = 20 bytes, the min valid size.

� Total Length = 472;

size of packet (header and data) is 472 bytes.

� Identification = 111;

original packet identifier
(required if it is later fragmented).

� Flag = 0;

denotes packet can be fragmented if required.

� Fragment Offset = 0;

denotes that this packet is not currently fragmented.

� Time to Live = 123;

denotes the Layer 3 processing time in seconds before the packet is dropped (decremented by at least 1
every time a device processes the packet header).

� Protocol = 6;

denotes that the data carried by this packet is a TCP segment .

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

� As the number of hosts on the network grows, more planning is required to
manage and address the network.

It is more practical and manageable to group hosts into smaller networks.

These smaller networks are often called subnetworks or subnets.

� Networks can be grouped based on factors that include:

Geographic location

Purpose

Ownership

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

� Grouping Hosts Geographically

Grouping hosts at the same location – such as each building on a campus or each
floor of a multi-level building – into separate networks can improve network
management and operation.

� Grouping Hosts for Specific Purposes

Users who have similar tasks typically use common software, common tools, and
have common traffic patterns.

We can often reduce the traffic by placing the resources to support them in the
network with the users.

For example, graphic designers who use the network to share very large multimedia files.

� Grouping Hosts for Ownership

Using an organizational (company, department) basis for creating networks assists
in controlling access to the devices and data as well as the administration of the
networks.

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Networks – Separating Hosts into Common Groups

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks?

� Common issues with large networks are:

Performance degradation

Security issues

Address Management

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Performance

� Large numbers of hosts connected to a single network can produce
volumes of data traffic that may stretch network resources such as
bandwidth and routing capability.

Dividing large networks so that hosts who need to communicate are grouped
together reduces the traffic across the internetworks.

� In addition to the actual data communications between hosts, network
management and control traffic (overhead) also increases with the number
of hosts. A significant contributor to this overhead is network broadcasts.

A broadcast is a message sent from one host to all other hosts on the network.

Every other host has to process the broadcast packet it receives, the other
productive functions that a host is performing are also interrupted or degraded.

However, large numbers of hosts generate large numbers of broadcasts that
consume network bandwidth.

Broadcasts are a necessary and useful tool used by protocols to enable data
communication on networks.

Broadcasts are contained within a network.

In this context, a network is also known as a broadcast domain.

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Performance

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Performance

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Security

� The IP-based network that has become the Internet.

As individuals, businesses, and organizations have developed their own IP
networks that link to the Internet.

Dividing networks based on ownership means that access to and from
resources outside each network can be prohibited, allowed, or monitored.

� For example, a college network can be divided into administrative,
research, and student subnetworks.

Dividing a network based on user access is a way to secure communications
and data from unauthorized access by users both within the organization and
outside it.

Security between networks is implemented in an intermediary device (a router
or firewall appliance) at the perimeter of the network.

The firewall function performed by this device permits only known, trusted
data to access the network.

39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Security

40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Security

41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Address Management

� The Internet consists of millions of hosts, each of which is identified by its
unique Network layer address.

To expect each host to know the address of every other host would impose a
processing burden on these network devices that would severely degrade their
performance.

� Dividing large networks to group hosts who need to communicate reduces the
unnecessary overhead of all hosts needing to know all addresses.

For all other destinations, hosts only need to know the address of an intermediary
device, to which they send packets for all other destinations addresses.

This intermediary device is called a gateway.

The gateway is a router on a network that serves as an exit from that network.

42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Address Management

43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Hierarchical Addressing

� To support data communications between networks over internetworks,
Network layer addressing schemes are hierarchical.

� Using hierarchical addressing means that the layer 3 address are divided
into a network level and then the host level.

Layer 3 addresses supply the network portion of the address. Routers
forward packets between networks by referring only to the part of the
Network layer address that is required to direct the packet toward the
destination network.

By the time the packet arrives at the destination host network, the whole
destination address of the host will have been used to deliver the
packet.

If a large network needs to be divided into smaller networks, additional
layers of addressing can be created.

44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Separate Hosts into Networks? – Hierarchical Addressing

45© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dividing the Networks – Networks from Networks

� The logical 32-bit IPv4 address

Are divided in 4 groups of 8 bits (octets).

Each octet is converted to its decimal value

4 decimal values separated by a dot (period)

2 parts: Network part (assigned by global authority) and Host part (assigned by
local administrator).

For example – 192.168.18.57

� The IPv4 address is hierarchical and is made up of two parts.

The first part identifies the network and

the second part identifies a host on that network.

In this example, the first three octets, (192.168.18), can identify the network portion
of the address, and the last octet, (57) identifies the host.

� This is hierarchical addressing because the network portion indicates the
network on which each unique host address is located.

Routers only need to know how to reach each network, rather than needing to
know the location of each individual host.

46© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dividing the Networks – Networks from Networks

47© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� To further divide a network, the network portion of the address is extended to
use bits from the host portion of the address.

These borrowed host bits are then used as network bits to represent the different
subnetworks within the range of the original network.

Given that an IPv4 address is 32 bits, when host bits are used to divide a network
the more subnetworks created results in fewer hosts for each subnetwork.

� The number of bits of an address used as the network portion is called the
prefix length (subnet mask ).

For example if a network uses 24 bits to express the network portion of an address
the prefix is said to be /24.

In the devices in an IPv4 network, a separate 32-bit number called a subnet mask
indicates the prefix.

Extending the prefix length or subnet mask enables the creation of these
subnetworks.

Dividing the Networks – Networks from Networks

48© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dividing the Networks – Networks from Networks

49© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dividing the Networks – Networks from Networks

50© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Support communication Outside our Network

� When a host needs to communicate with another network, an intermediary

device, or router, acts as a gateway to the other network.

Within a network or a subnetwork, hosts communicate with each other without the
need for any Network layer intermediary device.

� It is not feasible for a particular host to know the address of every device on
the Internet with which it may have to communicate.

To communicate with a device on another network, a host uses the address of this
gateway, or default gateway, to forward a packet outside the local network.

This gateway address is the address of a router interface that is connected to the
same network as the host.

� The router also needs a route that defines where to forward the packet next.
This is called the next-hop address.

If a route is available to the router, the router will forward the packet to the next-
hop router that offers a path to the destination network.

51© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Support communication Outside our Network

52© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP Packets – Carrying Data End to End

� The role of the Network layer is to transfer data from the host that originates
the data to the host that uses it.

If the destination host is in the same network,

the packet is delivered between the two hosts on the local media without the
need for a router.

If communication is between hosts in different networks,

The local network delivers the packet from the source to its gateway router.

The router examines the network portion of the packet destination address and
forwards the packet to the appropriate interface.

If destination network is (NOW) directly connected to this router, the packet is
forwarded directly to that host.

If destination network is not directly connected, the packet is forwarded to a 2nd router.

The packet forwarding then becomes the responsibility of this 2nd router.

Many routers or hops may process the packet before reaching the destination.

� At each hop, the forwarding decisions are based on the information in the IP
packet header.

The packet with its Network Layer encapsulation also is basically intact throughout
the complete process, from the source host to the destination host.

53© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP Packets – Carrying Data End to End

54© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Gateway – The way out of Our Network

� The gateway, also known as default gateway, is needed to send a packet out

of the local network.

If the network portion of the destination address of the packet is different from the
network of the originating host, the packet has to be routed outside the original
network.

To do this, the packet is sent to the gateway.

� This gateway is a router interface connected to the local network.

The gateway interface has a Network layer address that matches the network
address of the hosts.

The hosts are configured to recognize that address as the gateway.

� Default Gateway

The default gateway is configured on a host.

On a Windows computer, the Internet Protocol (TCP/IP) Properties tools are used
to enter the default gateway IPv4 address.

Both the host IPv4 address and the gateway address must have the same network
(and subnet, if used) portion of their respective addresses.

55© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Gateway – The way out of Our Network

56© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Confirming the Gateway and Route

The IP address of the default gateway of a host can be viewed by issuing the
ipconfig or route print commands at the command line of a Windows computer.

The route command is also used in a Linux or UNIX host.

A Gateway – The way out of Our Network

57© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Whether the packet is originating in a host or being forwarded by an
intermediary device, the device must have a route to identify where to
forward the packet. A router makes a forwarding decision for each packet
that arrives at the gateway interface.

This forwarding process is referred to as routing.

To forward a packet to a dest. net., the router requires a route to that network.

If a route to a destination network does not exist, the packet cannot be
forwarded.

� The destination network may be a number of routers or hops away from the
gateway.

The route to that network would only indicate the next-hop router to which the
packet is to be forwarded, not the final router.

The routing process uses a route to map the destination network address to the
next hop and then forwards the packet to this next-hop address.

A Gateway – The way out of Our Network

58© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Gateway – The way out of Our Network

59© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Route – The Path to a Network

� The routing table stores information about connected and remote networks.

Connected networks are directly attached to one of the router interfaces.

These interfaces are the gateways for the hosts on different local networks.

When a router interface is configured with an IP address and subnet mask, the interface
becomes part of that network.

Remote networks are networks that are not directly connected to the router.

Routes to these networks can be manually configured on the router by the network
administrator or learned automatically using dynamic routing protocols.

60© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Route – The Path to a Network

61© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Route – The Path to a Network

62© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Routes in a routing table have three main features:

Destination network

Next-hop

Metric

The router matches the destination address in the packet header with the destination
network of a route in the routing table and forwards the packet to the next-hop router
specified by that route.

If there are two or more possible routes to the same destination, the metric is used to
decide which route appears on the routing table.

� The router may also use a default route to forward the packet.

The default route is used when the destination network is not represented by any
other route in the routing table.

A Route – The Path to a Network

63© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Hosts also require a local routing table to ensure that Network layer packets
are directed to the correct destination network. A host creates the routes used
to forward the packets it originates.

These routes are derived from the connected network and the configuration of the
default gateway.

Unlike the routing table in a router, which contains both local and remote routes,
the local table of the host typically contains its direct connection or connections to
the network and its own default route to the gateway.

� The routing table of a computer host can be examined at the command line
by issuing the netstat -r, or route PRINT commands.

� The following options could be used for the route command to modify the
routing table contents:

route ADD

route DELETE

route CHANGE

A Route – Host Routing Table

64© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Route – Host Routing Table

65© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Route – Host Routing Table
netstat -r, or route PRINT will produce the same output

66© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Destination Network: Routing Table Entries
� The destination network, called a route, represents a range of host addresses and

sometimes a range of network and host addresses.

The hierarchical nature of Layer 3 addressing means that one route entry could refer to a
large general network and another entry could refer to a subnet of that same network.

When forwarding a packet, the router will select the most specific route.

� If a packet arrives at a router with the destination address of 10.1.1.55, the router
forwards the packet to a next-hop router associated with a route to network 10.1.1.0.

If a route to 10.1.1.0 is not listed on the routing, but a route to 10.1.0.0 is available, the
packet is forwarded to the next-hop router for that network.

Therefore, the precedence of route selection for the packet going to 10.1.1.55 would be:

1. 10.1.1.0

2. 10.1.0.0

3. 10.0.0.0

4. 0.0.0.0
(Default route
if configured)

5. Dropped

67© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Destination Network: Default Route
� A router can be configured to have a default route.

A default route is a route that will match all destination networks.

In IPv4 networks, the address 0.0.0.0 is used for this purpose.

The default route is used to forward packets for which there is no entry in the routing table
for the destination network.

Packets with a destination network address that does not match a more specific route in
the routing table are forwarded to the next-hop router associated with the default route.

68© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Next Hop – Where the Packet Goes Next

� As each packet arrives at a router, the destination network address is

examined and compared to the routes in the routing table.
When a matching route is determined, the next hop address for that route is
used to forward of the packet toward its destination.

� A next-hop is the address of the device that will process the packet next.

For a host on a network, the address of the default gateway (router interface) is
the next-hop for all packets destined for another network.

In the routing table of a router, each route lists a next hop for each destination
address that is encompassed by the route.

Networks directly connected to a router have no next-hop address because there is no
intermediate Layer 3 device between the router and that network.

The router can forward packets directly out the interface onto that network to the
destination host.

� Some routes can have multiple next-hops.

This indicates that there are multiple paths to the same destination network.

These are parallel routes that the router can use to forward packets.

69© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Next Hop – Where the Packet Goes Next

70© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Packet Forwarding – Moving toward its Destination

� Routing is done packet-by-packet and hop-by-hop.

Each packet is treated independently in each router along the path.

At each hop, the router examines the destination IP address for each packet and then checks
the routing table for forwarding information.

� The router will do one of three things with the packet:

Forward it to the next-hop router

Forward it to the destination host

Drop it

� Packet Examination

Packets that arrive at a router’s interfaces are encapsulated as a Data Link layer (Layer 2)
PDU.

The router first discards the Layer 2 encapsulation so that the packet can be examined.

� Next Hop Selection

In the router, the destination address in a packet is examined.

If a matching route in the routing table, the packet is forwarded

To be placed onto the connected network, the packet has to be first re-encapsulated by the
Layer 2 protocol and then forwarded out the interface.

71© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Packet Forwarding – Moving toward its Destination

72© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Packet Forwarding – Using the Default Route

� If the routing table does not contain a more specific route entry for an arriving
packet, the packet is forwarded to the interface indicated by a default route, if
one exists.

The default route is also known as the Gateway of Last Resort.

This process may occur a number of times until the packet reaches its destination
network.

� Default routes are important because the gateway router is not likely to have
a route to every possible network on the Internet.

If the packet is forwarded using a default route, it should eventually arrive at a
router that has a specific route to the destination network.

73© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Packet Forwarding – Using the Default Route

74© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Packet Forwarding – Moving toward its Destination
� As a packet passes through the hops in the internetwork, all routers require a

route to forward a packet.

If, at any router, no route for the destination network is found in the routing table
and there is no default route, that packet is dropped.

IP has no provision to return a packet to the previous router if a particular router
has nowhere to send the packet.

Other protocols are used to report such errors.

75© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Packet Forwarding – Moving toward its Destination

76© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols – Sharing the Routes
� Routing tables contain info. that router uses in its packet forwarding decisions

Routing info. can be manually configured on router or learned dynamically
from other routers in the same internetwork.

For the routing decisions, the routing table needs to represent the most accurate state of
network pathways that the router can access.

Out-of-date routing information means that packets may not be forwarded to the most
appropriate next-hop, causing delays or packet loss.

77© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols – Static Routing
� Routes to remote networks with the associated next hops can be manually

configured on the router.

This is known as static routing.

A default route can also be statically configured.

� If the router is connected to a number of other routers, knowledge of the
internetworking structure is required.

Because packets are forwarded at every hop, every router must be configured with
static routes to next hops that reflect its location in the internetwork.

Further, if the internetwork structure changes or if new networks become available,
these changes have to be manually updated on every router.

� If updating is not done in a timely fashion, the routing information may be
incomplete or inaccurate, resulting in packet delays and possible packet loss.

78© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

79© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Routing Protocols – Dynamic Routing

� Although it is essential for all routers in an internetwork to have up-to-date

extensive route knowledge, maintaining the routing table by manual static
configuration is not always feasible.

� Therefore, dynamic routing protocols are used.

Routing protocols are the set of rules by which routers dynamically share their
routing information.

As routers become aware of changes to the networks for which they act as the
gateway, or changes to links between routers, this information is passed on to
other routers.

When a router receives information about new or changed routes, it updates its
own routing table and, in turn, passes the information to other routers.

� Common routing protocols are:

Routing Information Protocol (RIP)

Enhanced Interior Gateway Routing Protocol (EIGRP)

Open Shortest Path First (OSPF)

80© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Although routing protocols provide routers with up-to-date routing tables,
there are costs.

First, the exchange of route information adds overhead that consumes network
bandwidth.

This overhead can be an issue, particularly for low bandwidth links between routers.

Second, the route information that a router receives is processed extensively by
protocols such as EIGRP and OSPF to make routing table entries.

This means that routers must have sufficient processing capacity to implement the
protocol’s algorithms and to perform timely packet routing and forwarding.

� Static routing does not produce any network overhead and places entries
directly into the routing table.

The cost for static routing is administrative – the manual configuration and
maintenance of the routing table to ensure efficient and effective routing.

� In many internetworks, a combination of static, dynamic, and default routes
are used to provide the necessary routes.

The configuration of routing protocols on routers is an integral component of the
CCNA and will be covered extensively by a later course.

Routing Protocols – Dynamic Routing

81© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

82© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static routes Dynamic routes

� Entered by administrator

� Time consuming, different for
each router

� Must be updated if routes
change

� Little processing

� No bandwidth used

� Gives nothing away

� Learned from other routers

� Start the protocol then it runs
by itself

� Automatically updates when
routes change

� More processing

� Uses bandwidth

� Gives away information

83© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

84© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

© 2007

C

isco Systems, Inc. All rights reserved. Cisco Public 1

Addressing the Network
– IPv4

Network Fundamentals – Chapter 6

Dr. C. BouSaba

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP addressing – works at

� OSI model layer 3

� TCP/IP model Internet layer

Application

Presentation

Session

Transport

Network

Data link

Physical

Application
Transport

Internet

Network Access

TCP, UDP

IP

Ethernet,
WAN
technologies

HTTP, FTP,

TFTP, SMTP
etc

Segment

Packet

Frame

Bits

Data

stream

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing topics

� Types of IP addresses

� Assigning addresses

� Network part and subnet masks

Calculating addresses

� Ping and Traceroute Utilities

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IPv4 address

00010001000101011010100011000000

1721.168.192.

octetoctet octet octet

network part host part

00000000111111111111111111111111

0255.255.255.

Prefix /24 Subnet mask:

• 24 bits for the network part

• 24 ones in the mask

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Find the network address

To find the network addressnetwork address, turn all host bits to 0s.

The router needs to do this for every packet.

00010001000101011010100011000000
1721.168.192.

00000000000101011010100011000000

021.168.192.

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical AND

00010001000101011010100011000000
1721.168.192.
00000000111111111111111111111111
0255.255.255.

Do a logical AND at each position

00000000000101011010100011000000

021.168.192.

AND: Λ

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Find the broadcast address

To find the broadcast addressbroadcast address, turn all host bits to 1s

The broadcast address is the last address in the

network.

00010001000101011010100011000000
1721.168.192.

11111111000101011010100011000000

25521.168.192.

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

3 Types of addresses

� Every network has:

� Network address – the first one

� Broadcast address – the last one

� Host addresses – everything in between

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classful addressing

6053.17.10.

network part host part

A

20138.16.172.

network part host part

B

1721.168.192.
network part host part
C

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classful addressing

� Easy to work out but very wasteful.

� Routers and hosts still assume class subnet masks by
default

� Class A /8 255.0.0.0

� Class B /16 255.255.0.0

� Class C /24 255.255.255.0

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing

� Any suitable prefix can be used

� We (and devices) need to know what the prefix is.

� More flexible, less wasteful.

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing /16

� 172.16.0.0/16 mask 255.255.0.0

� Broadcast address 172.16.255.255

� Hosts 172.16.0.1 to 172.16.255.254

� 65534 host addresses

00000000000000000001000010101100

00.16.172.

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing /24

� 172.16.0.0/24 mask 255.255.255.0

� Broadcast address 172.16.0.255

� Hosts 172.16.0.1 to 172.16.0.254

� 254 host addresses

00000000000000000001000010101100
00.16.172.

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing /22

� 172.16.0.0/22 mask 255.255.252.0

� Broadcast address 172.16.3.255

� Hosts 172.16.0.1 to 172.16.3.254

� 1022 host addresses

00000000000000000001000010101100
00.16.172.

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing /26

� 172.16.0.0/22 mask 255.255.255.192

� Broadcast address 172.16.0.63

� Hosts 172.16.0.1 to 172.16.0.62

� 62 host addresses

00000000000000000001000010101100
00.16.172.

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Classless addressing /28

� 172.16.0.0/28 mask 255.255.255.240

� Broadcast address 172.16.0.15

� Hosts 172.16.0.1 to 172.16.0.14

� 14 host addresses

00000000000000000001000010101100
00.16.172.

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating addresses

� A host has IP address

192.168.1.70/24

� What is the subnet mask?

� What is the network address?

� What is the broadcast address?

� What is the range of host addresses in the network?

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/24 – fill in the table

Last host

First host

Broadcast

Network

Subnet mask

Host

FullLast octet
decimal

Last octet binary

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/24

192.168.1.25425411111110Last host

192.168.1.1100000001First host

192.168.1.25525511111111Broadcast

192.168.1.0000000000Network

255.255.255.0000000000Subnet mask

192.168.1.707001000110Host

FullLast octet
decimal

Last octet binary

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating addresses

� A host has IP address

192.168.1.70/26

� What is the subnet mask?
� What is the network address?
� What is the broadcast address?
� What is the range of host addresses in the network?

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/26 fill in the table

Last host
First host
Broadcast
Network
Subnet mask
Host
FullLast octet
decimal

Last octet
binary

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/26

192.168.1.12612601111110Last host

192.168.1.656501000001First host

192.168.1.12712701111111Broadcast

192.168.1.646401000000Network

255.255.255.19219211000000Subnet mask

192.168.1.707001000110Host
FullLast octet
decimal
Last octet
binary

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating addresses

� A host has IP address

192.168.1.70/28

� What is the subnet mask?
� What is the network address?
� What is the broadcast address?
� What is the range of host addresses in the network?

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/28 fill in the table

Last host
First host
Broadcast
Network
Subnet mask
Host
FullLast octet
decimal
Last octet
binary

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

192.168.1.70/28

192.168.1.787801001110Last host

192.168.1.656501000001First host

192.168.1.797901001111Broadcast

192.168.1.646401000000Network

255.255.255.24024011110000Subnet mask

192.168.1.707001000110Host
FullLast octet
decimal
Last octet
binary

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Unicast, Multicast, Broadcast

� Unicast – a message addressed to one host

� Broadcast – a message addressed to all hosts on a
network. Uses network’s broadcast address or
255.255.255.255 locally

� Multicast – a message addressed to a group of hosts.
Uses an address starting 224 – 239

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Private IP addresses

� Unrestricted use on private networks. Not routed across
the Internet.

� 10.0.0.0 – 10.255.255.255 (10.0.0.0/8)

� 172.16.0.0 – 172.31.255.255 (172.16.0.0/20)

� 192.168.0.0 – 192.168.255.255 (192.168.0.0/24)

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Public IP addresses

� Routed over the Internet

� Master holder is IANA

� Assigned to regional registries and then to ISPs

� ISPs allocate them to organisations and individual
users

� Use is strictly controlled as duplicate addresses are not
allowed

29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Special addresses

� 0.0.0.0 “all addresses” in default route. Hosts cannot be
given addresses starting 0.

� 127.0.0.1 is loopback. Hosts cannot be given
addresses starting 127.

� 240.0.0.0 and higher – reserved for experimental
purposes.

� 169.254.0.0 – 169.254.255.255 local only

� 192.0.2.0 to 192.0.2.255 for teaching

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network address translation

� A large number of hosts on a network use private
addresses to communicate with each other.

� The ISP allocates one or a few public addresses.

� NAT allows the hosts to share the public addresses
when they want to use the Internet

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing hosts

� Static addressing – address is configured by an
administrator

� Servers, printers, routers, switches need static
addresses

� Dynamic addressing – address is allocated
automatically by DHCP by leasing addresses from a
pool

� Dynamic addressing is best for workstations

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Blocks of addresses

192.168.1.255Broadcast

192.168.1.254Router

192.168.1.224/27192.168.1.224 – 253Network devices

192.168.1.192/27192.168.1.192 – 223Peripherals

192.168.1.128/26192.168.1.128 – 191Servers

192.168.1.1-127User hosts

192.168.1.0/25192.168.1.0Network address

SummaryAddress rangeUse

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

00000000255.255.255.0Subnet mask

00000000192.168.1.0Address

Last octet binary

Borrow 1 bit from host part, give it to network part, /25

10000000255.255.255.128Subnet mask

00000000
10000000

192.168.1.0
192.168.1.128

Addresses

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

Borrow 2 bits from host part, give to network part, /26

11000000255.255.255.192Subnet mask

00000000
01000000
10000000
11000000

192.168.1.0
192.168.1.64
192.168.1.128
192.168.1.192

Addresses

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

Borrow 3 bits from host part, give to network part, /27

11100000255.255.255.224Subnet mask

00000000
00100000
01000000
01100000
10000000
10100000
11000000
11100000

192.168.1.0
192.168.1.32
192.168.1.64
192.168.1.96
192.168.1.128
192.168.1.160
192.168.1.192
192.168.1.224

Addresses

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

Borrow 4 bits from host part, give to network part, /28
192.168.1.128
192.168.1.144
192.168.1.160
192.168.1.176
192.168.1.192
192.168.1.208
192.168.1.224
192.168.1.240

Subnet mask 255.255.255.240 11110000

10000000
10010000
10100000
10110000
11000000
11010000
11100000
11110000

00000000
00010000
00100000
00110000
01000000
01010000
01100000
01110000

192.168.1.0
192.168.1.16
192.168.1.32
192.168.1.48
192.168.1.64
192.168.1.80
192.168.1.96
192.168.1.112

And so on…

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

� Every time you borrow another bit you:

Double the number of subnets

Halve the size of the subnets

� Each subnet has a network address, a broadcast
address, and everything in between is a host address.

� Here are some ways of visualising the process.

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting 192.168.1.0/24

252248240224192128Subnet mask

26143062126No of hosts

48163264128Bit value/ network
size

/30/29/28/27/26/25Prefix

643216842No of networks

654321Bits borrowed

39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Address space

� Make a spreadsheet or table with numbers 0 to 255

40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnet chart

41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting

� There are many subnet calculators, but you will not be
able to use them in exams.

� Start with the biggest subnet and work down to the
smallest.

� Make sure the subnets are valid sizes with valid subnet
masks.

� Make sure that there are no overlaps.

42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ping and traceroute

� Ping sends an ICMP message. If all is well, the
destination replies. If not, a router may reply to say the
destination is unreachable, or the ping may time out.

� Traceroute sends a series of messages so that each
router along the path replies. You get a list of
addresses of all the routers.

� ICMP: Internet Control Message Protocol

43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IPv6

� Development started in 1990s because of concerns
about IPv4 addresses running out

� A whole new protocol suite – not just layer 3

� Uses 128-bit hierarchical addressing, written using
hexadecimal

� Simpler header

� Integrated security – authentication, privacy

� Quality of service mechanisms

44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

Subnetting

Network Fundamentals – Chapter 6

Dr. C. BouSaba

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix /24

Three octets in network
part, last octet in host part.

All possible numbers 0 –
255 in last octet belong in
the same network.

Network address yellow
Broadcast address blue

Subnet mask
255.255.255.0

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix

/25

First bit of fourth octet
taken into network part.

For every bit taken, double
number of networks, halve
their size.

Network address yellow
Broadcast address blue

Subnet mask
255.255.255.128

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix

/26

2 bits of fourth octet taken
into network part.

For every bit taken, double
number of networks, halve
their size.
Network address yellow
Broadcast address blue

Subnet mask
255.255.255.192

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix

/27

3 bits of fourth octet taken
into network part.

For every bit taken, double
number of networks, halve
their size.
Network address yellow
Broadcast address blue

Subnet mask
255.255.255.224

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix /28

4 bits of fourth octet taken
into network part.

For every bit taken, double
number of networks, halve
their size.
Network address yellow
Broadcast address blue

Subnet mask
255.255.255.240

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix /29

5 bits of fourth octet taken
into network part.

For every bit taken, double
number of networks, halve
their size.
Network address yellow
Broadcast address blue

Subnet mask
255.255.255.248

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Prefix /30

6 bits of fourth octet taken
into network part.

For every bit taken, double
number of networks, halve
their size.
Network address yellow
Broadcast address blue

Subnet mask
255.255.255.252

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Variable length

Networks do not need to
be all the same size.

/27
/26
/25

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Data Link Layer

Network Fundamentals – Chapter 7

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives
� Explain the role of Data Link layer protocols in data transmission.

� Describe how the Data Link layer prepares data for transmission
on network media.

� Describe the di

ff

erent types of media access control methods.

� Identify several common logical network topologies and describe
how the logical topology determines the media access control
method for that network.

� Explain the purpose of encapsulating packets into frames to
facilitate media access.

� Describe the Layer 2 frame structure and identify generic fields.

� Explain the role of key frame header and trailer fields including
addressing, QoS, type of protocol and Frame Check Sequence.

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI Data Link Layer – DLL

� OSI model layer 2

Application

Presentation

Session

Transport

Network

Data link

Physical

Application
Transport

Internet

Network Access

TCP, UDP

IP

Ethernet,

WAN

technologies

HTTP, FTP,
TFTP, SMTP

etc

Segment

Packet

Frame

Bits

Data

stream

� TCP/IP model part of
Network Access layer

� Controls access to the transmission medium.

� Encapsulates packets by adding a frame header
and trailer including appropriate addressing.D

L
L
F

u
n
c
ti
o
n
s

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Data Link Layer – Accessing the Media

� Provides a means for exchanging data
over a common local media.

� Provides services to support
communication for each medium over
which data is to be transmitted.

� Exchanges frames between nodes
over the media of a physical network.

� Performs two basic services:

– Framing technique to allow upper
layers to access the media

– Media access control & error
detection techniques to control how
data is placed/received onto/from the
media

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Data Link Layer – Accessing the Media

� DLL protocols require control info to
enable the protocols to function

� DLL prepares packet for transport across
the local media by encapsulating it with a
header and a trailer to create a frame.

Header – Contains control info, such as
addressing, & is located at the beginning of
the PDU

Data – The packet from the Network layer

Trailer – Contains control info added to the
end of the PDU

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Data Link Layer – Accessing the Media

� DLL protocols are required to control media access

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hops

� There may be a different layer 2 protocol in use on
each hop of a journey.

� Different media, different types of link, different
bandwidths, LAN/WAN affect the choice of protocol.

� Different protocols have different frames.

� The router removes the old frame and adds a new
header and trailer for the next hop.

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Data Link Layer – Accessing the Media

� DLL frames the packets for transmission on a given media

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Data Link Layer – Accessing the Media

� DLL links the software and hardware layers

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Data Link Layer – Accessing the Media

� DLL uses several sources for its protocols and standards

International Organization
for Standardization

Institute of Electrical and
Electronics Engineers

American National
Standards Institute

International
Telecommunication Union

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

DLL Sublayers

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Point to point link

� Only two devices on the network

� Full duplex: both can send at the same time, no problem
with media access

� Half duplex: data can only travel one way at a time so one
device can send at a time. Simple media access control.

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Shared medium

� Needs media access control.

� If there is no control there will be many collisions and the
frames will be destroyed.

Physical bus Star with hub

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Controlled media access

� Predictable, deterministic.

� Each device is given a time when it may send, and it
most not send at any other time.

� High overhead.

� No collisions.

� Token passing – each host in turn gets the token and is
allowed to send.

� E.g. token ring, FDDI
Fiber Distributed Data Interface

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media Access Control Techniques

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Contention based media access

� Non-deterministic, first come first served.

� Each device “listens” and sends when the medium
seems to be clear.

� Low overhead.

� Collisions occur.

� Need a way of re-sending lost frames.

� Becomes inefficient on large networks.

� E.g. traditional Ethernet.

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media Access Control Techniques

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Variation on contention based

� Carrier Sense Multiple Access

� Traditional Ethernet uses CSMA/CD (collision detection):
collisions are allowed and detected, frames sent again.

� Wi-fi uses CSMA/CA (collision avoidance): when the
medium is clear, host sends signal to say it is about to use
the medium. It then sends.

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Different environments

� Fragile environment e.g. satellite link – frames are likely
to be lost – need large overhead of control mechanisms
to make sure data arrives.

� Protected environment e.g. modern LAN – frames not
often lost – do not need such elaborate control
mechanisms

� Therefore need different layer 2 protocols

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Addressing needs

� Point to point link – only one possible destination.
Minimal addressing.

� Multi-access network – need full addressing system.

� Therefore need different
layer 2 protocols.

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layer 2 frame format

� All protocols have the same
general form but there are
variations

� Start and stop indicator
fields – The beginning and
end limits of the frame

� Naming or addressing
fields

� Type field – type of PDU
contained in the frame

� Quality control fields

� A data field -The frame
payload (Network layer
packet)

� Fields at the end of the
frame form the trailer.
These fields are used for
error detection and mark
the end of the frame.

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

PPP frame

� Point to point links. Minimal addressing. Control mechanisms.

Start Minimal
address

Packet
Check
and
stop

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ethernet frame

� Multi-access links. Full addressing.
No control field.

� Same for all Ethernet types/bandwidths.

Timing
and
start

Addresses
48 bits
each

Layer 3
protocol

Packet
Check
and
stop

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

802.11 Wi-Fi

� LAN wireless protocol

� Fragile environment – lots of interference, risk of lost
frames, contention.

� Every transmission needs to be acknowledged.

� No acknowledgement – re-send frame.

� Lots of control mechanisms in frame.

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

End to end

� PC sends packet to server

� Packet header has PC IP address and source and server IP
address as destination.

� Frame header has PC MAC address as source and router
MAC address as destination.

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media Access Control Techniques

T
ra

d
e
o

ff

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media Access Control Techniques
� Full Duplex and Half Duplex

Half-duplex communication

Devices can both transmit and receive on the media but cannot do so simultaneously.

In full-duplex communication,

Both devices can transmit and receive on the media at the same time.

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical Topology
� The topology of a network is the

arrangement or relationship of the
network devices and the
interconnections between them.

Logical topology is how a network
transfers frames between nodes.

Consists of virtual connections
between the nodes independent of
their physical layout.

These logical signal paths are defined
by Data Link layer protocols.

Influences the type of network framing
and media access control used.

� Logical and physical topologies
typically used in networks are:

Point-to-Point

Multi-Access

Ring

29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical Topology

� The topology of a network is the arrangement or relationship of the network
devices and the interconnections between them.

Physical topology is an arrangement of the nodes and their physical connections.

The representation of how the media is used to interconnect the devices is the physical
topology.

Physical topologies

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical Point-to-Point Topology
� A point-to-point topology connects two nodes directly together.

All frames on the media can only travel to or from the two nodes.

The frames are placed on the media by the node at one end and taken off the
media by the node at the other end of the point-to-point circuit.

� In point-to-point networks

Half-duplex link: data can
only flow in one direction
at a time

Full-duplex link: data can
successfully flow across
the link from each node
simultaneously

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical Point-to-Point Networks
� The end nodes communicating in a point-to-point network can be physically

connected via a number of intermediate devices.

The use of physical devices in the network does not affect the logical topology.

The source & dest. may be indirectly connected over some geographical distance.

The logical connection between nodes forms a virtual circuit (VC).

The two nodes on either end of the virtual circuit exchange the frames with each other.

This occurs even if the frames are directed through intermediary devices.

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical Multi-Access Topology

� A logical multi-access topology enables a number of nodes to communicate by using
the same shared media.

Data from only one node can be placed on the medium at any one time.

Every node sees all the frames that are on the medium, but only the addressed node
processes the frame.

� Having many nodes share access to the medium requires a Data Link media access
control method to regulate the transmission of data and thereby reduce collisions.

The media access control methods used by logical multi-access topologies are typically
CSMA/CD or CSMA/CA.

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Logical Ring Topology
� Each node in turn receives a frame. If the frame is not addressed to the node,

the node passes the frame to the next node.

A ring uses a controlled
media access control

technique called token
passing.

Nodes in a logical ring
topology remove the frame
from the ring, examine the

address, and send it on if it
is not addressed for that node.

All nodes between the source
and dest. node examine the
frame.

A node can only place a data
frame on the media when it has
the token.

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media Access Control Addressing and Framing Data
� Encapsulating packets into frames facilitates the entry & exit of data on media

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media access control addressing and framing data

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media access control addressing and framing data

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Physical Layer

Network Fundamentals – Chapter 8

Dr. C. BouSaba

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

OSI Physical layer
� OSI model layer 1

Application

Presentation

Session

Transport

Network

Data link

Physical

Application
Transport

Internet

Network Access

TCP, UDP

IP

Ethernet,

WAN

technologies

HTTP, FTP,
TFTP, SMTP

etc

Segment

Packet

Frame

Bits

Data

stream

� TCP/IP model part of
Network Access layer

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical layer topics

� Physical layer protocols
and services.

� Physical layer signaling
and encoding.

� How signals are used to
represent bits.
Characteristics of copper,
fiber, and wireless media.

� Describe uses of copper,
fiber, and wireless
network media.

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical layer tasks

� Takes frame from data link layer

� Sees the frame as bits – no structure

� Encodes the bits as signals to go on the medium

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical layer tasks

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical Layer Protocols & Services

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ways to Represent a Signal on the Medium

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical Layer Protocols & Services

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical layer standards define:

� Physical and electrical properties of the media

� Mechanical properties (materials, dimensions, pinouts)
of the connectors and NICs

� Bit representation by the signals (encoding)

� Definition of control information signals

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical Layer Protocols & Services

Set by engineering institutions

� The International Organization for Standardization (ISO)

� The Institute of Electrical and Electronics Engineers (IEEE)

� The American National Standards Institute (ANSI)

� The International Telecommunication Union (ITU)

� The Electronics Industry Alliance/ Telecommunications Industry Association (EIA/TIA)

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Encoding
and

signalling

� This can be relatively simple at very low speeds with bits
being converted directly to signals.

� At higher speeds there is a coding step, then a signalling
step where electrical pulses are put on a copper cable or
light pulses are put on a fibre optic cable.

R
e
c
o
g

n
iz

in
g
F

ra
m

e
S

ig
n
a

ls

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

NRZ – non return to zero

� A very simple signalling system

� 1 is high voltage, 0 is low voltage

� Voltage does not have to return to zero during each bit
period

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

NRZ problems

� A long string of 1s or 0s can let sender and receiver get
out of step with their timing

� Inefficient, subject to interference

� Straightforward NRZ is not used on any kind of
Ethernet, though it could be used if combined with a
coding step

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Manchester encoding

� Voltage change in the middle of each bit period

� Falling voltage means 0, Rising voltage means 1

� Change between bit periods is ignored.

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Manchester encoding

� The transition (up or down) matters, not the voltage level

� The voltage change in the middle of each bit period
allows the hosts to check their timing

� 10 Mbps Ethernet uses Manchester encoding (on UTP or
old coaxial cables)

� Not efficient enough for higher speeds

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Two steps

� Ethernet varieties of 100Mbps and faster use a coding
step followed by converting to signals.

� Bits are grouped then coded.

� E.g. bits 0011 could be grouped and coded as 10101
(4-bit to 5-bit, 4B/5B). Each possible 4-bit pattern has
its own code.

� This adds overhead but gives advantages

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Advantages of group and code

� Control codes such as “start”, “stop” can have codes
that are not confused with data

� Codes are designed to have enough transitions to
control timing

� Codes balance number of 1s and 0s – minimise
amount of energy put into system

� Better error detection – invalid codes are recognised

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

100 Mbps Ethernet on UTP

� 100 Mbps Ethernet uses 4B/5B encoding first

� It then uses MLT-3 to put the bits on the cable as
voltage levels

� 1 means change, 0 means no change

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

100 Mbps Ethernet on fiber

� 100BaseFX Ethernet uses 4B/5B encoding first

� It then uses NRZI (inverted) encoding to put flashes of LED infra
red light on a multimode fiber optic cable

� 1 means change, 0 means no change

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Gigabit Ethernet on UTP

� Uses a complicated coding step followed by a
complicated scheme of putting signals on the wires,
using 4 wire pairs.

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Digital Bandwidth

� The amount of data that could flow across a network
segment in a given length of time.

� Determined by the properties of the medium and the
technology used to transmit and detect signals.

� Basic unit is bits per second (bps)

� 1 Kbps = 1,000 bps, 1Mbps = 1,000,000 bps
1 Gbps = 1,000,000,000 bps

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Throughput and Goodput

� Throughput is the actual rate of transfer of bits at a
given time

� Varies with amount and type of traffic, devices on the
route etc.

� Always lower than bandwidth

� Goodput measures usable data transferred, leaving out
overhead. (headers etc.)

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Bandwidth, Throughput, and Goodput

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Media

� Copper cable (twisted pair and coaxial)

Fiber optic cable

� Wireless

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical Media: Characteristics

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Coaxial cable

� Central conductor

� Insulation

� Copper braid acting as return path for current and also as
shield against interference (noise)

� Outer jacket

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Connectors for coaxial cable

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Coaxial cable

� Good for high frequency radio/video signals

� Used for antennas/aerials

� Used for cable TV and Internet connections, often now
combined with fibre optic.

� Formerly used in Ethernet LANs – died out as UTP was
cheaper and gave higher speeds

29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Unshielded twisted pair (UTP) cable

� 8 wires twisted together into 4 pairs and with an outer jacket.

� Wires have color-coded plastic jackets

� Commonly used for Ethernet LANs

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Basic Characteristics of UTP cable

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

RJ45 connectors

Plugs on patch

cables (crimped)

Sockets to terminate
installed cabling
(punch down)

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Straight through cable

� Both ends the same

� Connect PC to switch or hub

� Connect router to switch or hub

� Installed cabling is straight
through

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Crossover cable

� Wire 1 swaps with 3

� Wire 2 swaps with 6

� Connect similar devices to each
other

� Connect PC direct to router

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Rollover cable

� Cisco proprietary

� Wire order completely reversed

� Console connection from PC serial
port to router – to configure router

� Special cable or RJ45 to D9 adaptor.

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UTP cable

� EIA/TIA sets standards for cables

� Category 5 or higher can be used for 100Mbps
Ethernet. Cat 5e can be used for Gigabit Ethernet if
well installed.

� We have Cat 5e. A new installation now would have
Cat 6.

� The number of twists per metre is carefully controlled.

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Shielded twisted pair (STP)

� Wires are shielded against noise

� Much more expensive than UTP

� Might be used for 10 Gbps Ethernet

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Noise

� Electrical signals on copper cable are subject to
interference (noise)

� Electromagnetic (EMI) from device such as fluorescent
lights, electric motors

� Radio Frequency (RFI) from radio transmissions

� Crosstalk from other wires in the same cable or nearly
cables

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Avoiding noise problems

� Metal shielding round cables

� Twisting of wire pairs gives cancelling effect

� Avoiding routing copper cable through areas liable to
produce noise

� Careful termination – putting connectors on cables
correctly

39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fiber optic cable

� Transmits flashes of light

� No RFI/EMI noise problem

� Several fibers in cable

� Paired for full
duplex

40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Single mode fiber optic

� Glass core 8 – 10 micrometres diameter

� Laser light source produces single ray of light

� Distances up to 100km

� Photodiodes to convert light back to electrical signals

41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Multimode fiber optic

� Glass core 50 – 60 micrometres diameter

� LED light source produces many rays of light at
different angles, travel at different speeds

� Distances up to 2km, limited by dispersion

� Photodiode receptors

� Cheaper than
single mode

42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Characteristics of Fiber Optic Cable

43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fiber optic connectors

Straight tip (ST) connector
single mode

Subscriber connector (SC)
multimode

Single mode lucent connector Multimode lucent connector

Duplex multimode lucent connector (LC)

44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Which cable for the LAN?

100km or 2km

No noise problems

Within/between buildings

More expensive

Harder to install

Max 100 m length

Noise problems

Within building only

Cheaper

Easier to install

Fiber opticUTP copper

45© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Testing cables

Fluke NetTool for
twisted pair cables

Optical Time Domain
Reflectometer (OTDR) for fiber

optic cables

46© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Wireless

� Electromagnetic signals at radio and microwave
frequencies

� No cost of installing cables

� Hosts free to move around

Wireless access point Wireless adaptor

47© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Wireless problems

� Interference from other wireless communications,
cordless phones, fluorescent lights, microwave ovens…

� Building materials can block signals.

� Security is a major issue.

48© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Wireless networks

� IEEE 802.11 – Wi-Fi for wireless LANs. Uses CSMA/CA
contention based media access

� IEEE 802.15 – Bluetooth connects paired devices over
1 -100m.

� IEEE 802.16 – WiMAX for wireless broadband access.

� Global System for Mobile Communications (GSM) – for
mobile cellular phone networks.

49© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

©

2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

Ethernet

Network Fundamentals – Chapter 9

2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives
 Identify the basic characteristics of network media used

in Ethernet.

 Describe the physical and data link features of Ethernet.

 Describe the function and characteristics of the media
access control method used by Ethernet protocol.

 Explain the importance of Layer 2 addressing used for
data transmission and determine how the different
types of addressing impacts network operation and
performance.

 Compare and contrast the application and benefits of
using Ethernet switches in a LAN as apposed to using
hubs.

 Explain the ARP process.

3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ethernet

 OSI model layers 1 (physical) and 2 (data link)

 TCP/IP model Network Access layer

Application

Presentation

Session

Transport

Network

Data link

Physical

Application
Transport

Internet

Network Access Ethernet

5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ethernet

 The most common LAN technology

 Different media (copper cable, optical fibre)

 Different bandwidths (10, 100Mbps, Gbps, +)

 Same addressing scheme

 Same basic frame format

6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ethernet history

 First LAN was Ethernet, designed at Xerox

 1980 Ethernet standard published by DIX (Digital, Intel, Xerox)

 1985 IEEE modified Ethernet standard and published as 802.3

Ethernet 802.3

802.2

MAC
LLC

7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Sublayers

 Logical Link control sublayer links to
upper layers, is independent of
equipment.

 Media Access Control sublayer provides
addressing, frame format, error detection,
CSMA/CD.

 Physical layer handles bits, puts signals
on the medium, detects signals.

MAC
LLC

8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Advantages of Ethernet

 Simplicity and ease of maintenance

 Ability to incorporate new technologies (e.g. fiber optic,
higher bandwidths)

 Reliability

 Low cost of installation and upgrade

9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Shared medium

 Physical bus topology
10Base5 (thick coaxial cable up to
500m)
10Base2 (thin coaxial cable up to
185m)

 Physical star topology
10BaseT (UTP cable up to 100m)

 Collisions happen – managed with
CSMA/CD

10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hubs and switches

 “Legacy Ethernet”, 10Base5, 10Base2 or 10BaseT with
hubs is designed to work with collisions, when devices
transmit at the same time. Collisions are managed by
CSMA/CD.

 Performance is poor if there is a lot of traffic and
therefore a lot of collisions.

 Collisions can be avoided by using switches and full
duplex operation.

11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hubs and switches

Switch

forwards

frames only to the

destination once the

address is known.

Hub forwards frames

through all ports

except incoming port.

12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Half duplex

 One-way traffic. Necessary on
a shared medium.

 If PC1 is transmitting but also
detects incoming signals then
there is a collision.

13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Full duplex

 Two way traffic

 PC can transmit and receive at
the same time

 Not on shared medium – must
have dedicated link from
switch

 No collisions

14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fast Ethernet,

Gigabit Ethernet

 Along with the move to switches came higher
bandwidth: 100 Mbps or Fast Ethernet.

 Later came 1000 Mbps, Gigabit Ethernet.

 Gigabit Ethernet requires fully switched and full duplex
operation. Collisions are no longer defined and cannot
be managed.

15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN, MAN, WAN

 Ethernet was developed for local area networks
confined to a single building or group of buildings on
one site.

 Using fiber optics and Gigabit speeds, Ethernet can be
used for Metropolitan Area Networks – throughout a
town or city.

 Ethernet can even be used over larger areas so the
distinction between LAN and WAN is no longer clear.

16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ethernet

Frame

Packet

Packet Trailer Frame header

Packet from

Network layer is

encapsulated

Preamble

Destination

address

Start of

frame

delimiter

Source

address

Length

/type

7 1 6 6 2

Packet

Data

Frame

Check

Seq.

46-1500 4

Field size in bytes. Preamble and SFD are not counted in

frame size. Frame is 64-1518 (later 1522) bytes.

17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Frame fields

 Preamble and start of frame delimiter: act as a wake-up
call, help synchronisation, show where frame starts.

 Destination Address: MAC address of destination, 6
bytes hold 12 hex digits.

 Source Address: MAC address of sender, 6 bytes hold
12 hex digits.

18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Frame fields

 Length/type field: DIX used this for type, the original
IEEE 802.3 standard used it for length. The later IEEE
standard allows it to be used for either.

 A value less than 0x0600 hex (1536 decimal) is length.
A greater value is the type, a code showing which
higher layer protocol is in use.

19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Frame fields

 Data field: This contains the layer 3 protocol data unit,
usually an IP packet.

 If the packet is less than 46 bytes then the field length
is made up to 46 bytes with a “pad”.

 The frame trailer contains the Frame Check Sequence
field, used for the cyclic redundancy check to detect
corrupt frames.

20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ethernet MAC address

 A unique identification for a device (or NIC).

 Burned into the ROM but copied to RAM.

 First 3 bytes identify the manufacturer (Organizationally
Unique Identifier)

 A device reads the destination MAC address to see if it
should process the frame.

 A switch reads the destination MAC address to see
where it should forward the frame.

21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Writing a MAC address

 The 12 hex digits are written in different ways

 00-05-9A-3C-78-00

 00:05:9A:3C:78:00

 0005.9A3C.7800

 This is the same address

 00-05-9A is the manufacturer’s ID
assigned by IEEE

 3C-78-00 is assigned by the manufacturer

22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Different addresses

 MAC addresses are used to identify devices within a
network. They are layer 2 addresses in the frame
header.

 IP addresses are used to pass data between networks.
They are layer 3 addresses in the packet header. They
identify the network as well as the device.

23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

On a long journey…

 The packet header with IP addresses is created by the
source host and stays the same throughout the journey.

 The frame header is stripped off and replaced by each
router, so the MAC addresses are different for every
step of the journey. If parts of the journey are not over
Ethernet then there will be a different addressing
system – not MAC.

24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Unicast, multicast, broadcast

 Unicast: a message sent to one particular host. It must
contain the destination host’s IP address and MAC
address.

 Broadcast: message for all hosts on a network. “Host”
part of IP address is all binary 1s. E.g. 192.168.1.255
MAC address is all binary 1s, FF:FF:FF:FF:FF:FF in
hex.

 Multicast: message for a group of devices.
IP address 224.0.0.0 to 239.255.255.255

25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Collisions

 Ethernet originally used shared coaxial

cable.

 If hosts transmit at the same time, there is a collision.

 Later networks used hubs and UTP cable but the medium
is still shared and collisions occur.

26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hubs and Collision Domains

 Collision domain – area where collisions occur.

 Add more hubs and PCs – collision domain gets bigger,
more traffic, more collisions.

 Hosts connected by hubs share bandwidth.

 Only one PC
can send

27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

CSMA/CD

 Carrier Sense: ‘Listen’ to see if there are signals on the
cable

 Multiple Access: Hosts share the same cable and all
have access to it

 Collision Detection: Detect and manage any collisions
of signals when they occur

 This is the ‘first come, first served’ method of letting
hosts put signals on the medium

28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Listen for signals

Are there signals on

the cable?

Yes.

29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Wait if there are signals

Wait until there are

no more signals

30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Listen for signals
Are there signals on

the cable now?

No.

31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Put signals on cable

Put my signals on the

cable.

32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Listen for collisions: no

No collision.

All is well.

My message was

sent.

33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Listen for collisions: yes

There is a collision.

Stop sending signals.

Send jamming signal.

My message is lost.

34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Listen again

No signals now.

Wait for a random

length of time.

Send message again.

35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

CSMA/CD

 Collisions happen if a host transmits when there is a
signal on the cable but the host does not yet know
about it.

 Latency is the time a signal takes to travel to the far
end of a cable. The longer the cable and the more
intermediate devices, the more latency.

All clear

36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

CSMA/CD

 If a host detects a collision while it is sending the first 64
bits of a frame then CSMA/CD works and the frame will
get resent later.

 If the host has sent 64 bits and then detects a collision, it
is too late. It will not resend.

 Latency must be small enough so that all collisions are
detected in time.

 This limits cable length and the number of intermediate
devices.

37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Definitions

 Latency or propagation delay: the time it takes for a
signal to pass from source to destination.

 Bit time: the time it takes for a device to put one bit on
the cable. (Or for the receiving device to read it.)

 Slot time: the time for a signal to travel to the far end of
the largest allowed network and return.

38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interframe spacing

 The time between the end of one frame and the start of
the next frame.

 Gives the medium a chance to stabilise.

 Gives devices time to process the frame.

 Devices wait a minimum of 96 bit times after a frame
has arrived before they can send.

 9.6 microseconds for 10 Mbps Ethernet

 0.96 microseconds for 100 Mbps Ethernet

39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Different bandwidths

 Change from 10 Mbps to 100 Mbps

 The sender puts the bits on the cable 10 times as fast, but
they still travel at the same speed along the cable.

 Collision detected at the same time as before.

Frame gone – too late

Still sending frame

40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

So… for CSMA/CD to work

 The greater the bandwidth, the closer a collision must
be in order to detect it in time.

 The greater the bandwidth, the shorter the possible
cable length from one end of the collision domain to the
other.

 10 Mbps can have reasonable lengths.

 100 Mbps can just manage 100 metres.

 1 Gbps needs special arrangements

 10 Gbps – not a chance. Can’t do collisions.

41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Get rid of collisions

 Replace all hubs with switches.

 Each device has a private cable and gets the full
bandwidth.

 Use full duplex on each link.

 No collisions.

 Can use higher bandwidths.

42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Legacy Ethernet

 10 Base-T – 10 Mbps, uses UTP cables
Transmits on wires 1/2, Receives on 3/6
Uses Manchester encoding.

 10 Base-2 and 10 Base-5 used coaxial cable. They are
obsolete and are no longer recognised by the
standards.

43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fast Ethernet

 100 Base-TX – 100 Mbps, uses UTP cables
Transmits on wires 1/2, Receives on 3/6
Uses 4B/5B encoding

 100 Base-FX – 100 Mbps, uses multimode fibre optic
cables.

44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Gigabit Ethernet

 1000 base-T – 1Gbps uses UTP cables. Uses all 4 wire
pairs, transmitting and receiving at the same time on
the same wire.
Complex encoding and detection system.

 1000 Base-SX – uses multimode fibre, shorter
wavelength.

 1000 Base-LX – uses single or multimode fibre, longer
wavelength.

45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

10 Gbps Ethernet

 Still evolving

 Potential for operating over longer distances – MANs
and WANs

 Still uses same basic frame format as other Ethernet
versions.

 Higher bandwidths are planned.

46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hub and Switch

 Shared medium

 Shared bandwidth

 Collisions

 Point to point links

 Dedicated bandwidth

 Use full duplex – no collisions

Hub

Switch

47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switching table

 Switch builds a switching table
matching its port numbers to the MAC
addresses of devices connected to
them.

 When a frame arrives, it reads the
destination MAC address, looks it up in
the table, finds the right port and
forwards the frame.

48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Flooding

 If the switch does not find the destination address in its
table then it floods the frame through all ports except
the incoming port.

 Broadcast messages are flooded.

49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Learning addresses

 The switch learns addresses by looking at the source
MAC address of an incoming frame.

 It then matches the address to the port where the frame
came in and puts the information in its table.

 Entries are time stamped and removed from the table
when the time runs out.

 They can be refreshed when another frame comes in
from the same host.

50 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ARP table

 A host wants to send a message.

 It knows the destination IP address and puts it in the
packet header.

 It looks in its ARP table and finds the corresponding
MAC address.

 It puts the MAC address in the frame header.

51 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Address resolution protocol

 A host wants to send a message.

 It knows the destination IP address.

 The destination MAC address is not in its ARP table.

 Host broadcasts “Calling 192.168.1.7, what is your MAC
address?”

 192.168.1.7 replies “My MAC address is…”

 Host sends message and updates ARP table.

52 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Remote addresses

 Host can see that destination IP address is on another
network

 It finds the IP address of the default gateway

 It sends an ARP request for the matching MAC address
of the default gateway

 Default gateway router replies and gives its own MAC
address

 Host sends message via router and updates ARP table.

53 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Proxy ARP

 If a host cannot tell that the destination IP address is on
another network, it will send an ARP request asking for
the matching MAC address

 The router will reply, giving its own MAC address

 The host will send the message via the router

54 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

55 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Characteristics of Network Media used in
Ethernet
 Identify several characteristics of Ethernet in its early

years.

56 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Characteristics of Network Media used in
Ethernet
 Describe the emergence of the LAN switch as a key

innovation for managing collisions on Ethernet-based
networks

57 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Characteristics of Network Media used in
Ethernet
 Identify the characteristics of state-of-the-art Ethernet

and describe its utilization of cabling and point-to-point
topography

58 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical and Data Link Features of Ethernet
 Standards and Implementation

59 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical and Data Link Features of Ethernet
 Describe how the Ethernet operates across two layers

of the OSI model

60 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical and Data Link Features of Ethernet
 Logic Link Control – Connecting the Upper Layers

61 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical and Data Link Features of Ethernet
 Media Access Control (MAC)

62 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Physical and Data Link Features of Ethernet
 Physical Implementations of the Ethernet

63 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Function and Characteristics of the Media
Access Control Method

 MAC in Ethernet

64 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Function and Characteristics of the Media
Access Control Method
 Carrier Sense Multiple Access with Collision Detection

65 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Function and Characteristics of the Media
Access Control Method

 Ethernet Timing

66 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layer 2 addressing and its Impact on Network
Operation and Performance
 The Frame – Encapsulating the Packet

67 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layer 2 addressing and its Impact on Network
Operation and Performance
 The Ethernet MAC Address

68 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layer 2 addressing and its Impact on Network
Operation and Performance
 Hexadecimal Numbering and Addressing

69 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layer 2 addressing and its Impact on Network
Operation and Performance
 Another Layer of Addressing

70 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Layer 2 addressing and its Impact on Network
Operation and Performance
 Ethernet Unicast, Multicast and Broadcast

71 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Compare and Contrast the Use of Ethernet
Switches versus Hubs in a LAN.
 Legacy Ethernet – Using Hubs

72 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Compare and Contrast the Use of Ethernet
Switches versus Hubs in a LAN.
 Ethernet – Using Switches

73 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Compare and Contrast the Use of Ethernet
Switches versus Hubs in a LAN.
 Describe how a switch can eliminate collisions,

backoffs and re- transmissions, the leading factors in
reduced throughput on a hub-based Ethernet network

74 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Explain the Address Resolution Protocol
(ARP) process.

 Mapping IP to MAC Addresses

75 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Explain the Address Resolution Protocol
(ARP) process.
 ARP – Destinations Outside the Local Network

76 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Explain the Address Resolution Protocol
(ARP) process.
 ARP – Removing Address Mappings

77 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Explain the Address Resolution Protocol
(ARP) process.
 ARP Broadcasts – Issues

78 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

79 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

Planning and Cabling
Networks

Network Fundamentals – Chapter 10

2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives

 Identify the basic network media required
to make a LAN connection.

 Identify the types of connections for
intermediate and end device connections
in a LAN.

– Identify the pin out configurations for
straight-through and crossover cables.

– Identify the different cabling types,
standards and ports used for WAN
connections.

– Define the role of device management
connections when using Cisco
equipment.

 Design an addressing scheme for an
inter-network and assign ranges for
hosts, network devices and the router
interface.

 Compare and contrast the importance of
network designs

3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN Device: Router

 Routers are the primary devices used to
interconnect networks.

Each port on a router connects to a different network
and routes packets between the networks.

Routers have the ability to break up broadcast
domains and collision domains.

Routers are also used to interconnect networks that
use different technologies.

They can have both LAN and WAN interfaces.

 The router’s LAN interfaces allow routers to connect
to the LAN media. This is usually UTP cabling, but
modules can be added for using fiber-optics.

Depending on the model of router, there can be
multiple interface types for connection of LAN and
WAN cabling.

Each LAN will have a router as its gateway connecting
the LAN to other networks. Inside the LAN will be one
or more hubs or switches to connect the end devices
to the LAN.

For this course, the choice of which router to deploy is
determined by the Ethernet interfaces that match the
technology of the switches at the center of the LAN.

4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Intranetwork Devices LAN Device: Hub and switch

 Hub

A hub receives a signal, regenerates it, and sends the signal over all ports.

The use of hubs creates a logical bus.

This means that the LAN uses multiaccess media.

The ports use a shared bandwidth approach and often have reduced
performance in the LAN due to collisions and recovery.

Multiple hubs can be interconnected, they remain a single collision domain.

A hub is typically chosen as an intermediary device within a small LAN, in a
LAN that has low throughput requirements, or when finances are limited.

 Switch

A switch receives a frame and regenerates each bit of the frame on to the
appropriate destination port.

Switch is used to segment a network into multiple collision domains.

Switch reduces the collisions on a LAN. Each port on the switch creates a
separate collision domain. This creates a point-to-point logical topology to the
device on each port.

Switch provides dedicated bandwidth on each port.

Switch can also be used to interconnect segments of different speeds.

There is a range of switches available with a variety of features that enable the
interconnection of multiple computers in a typical enterprise LAN setting.

5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Selection Factors

 To meet user requirements, a LAN needs to be
planned and designed.

Planning ensures that all requirements, cost factors
and deployment options are given due
consideration.

 These factors include, but are not limited to:

Cost

Speed and Types of Ports/Interfaces

Expandability

Manageability

Additional Features and Services

 The two topics will be explored further:

cost

interface characteristics.

6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Selection Factors: Cost

 The cost of a switch is determined by its capacity & features.

The switch capacity includes the number and types of ports available and the
switching speed.

Other factors that impact the cost are its network management capabilities,
embedded security technologies, and optional advanced switching technologies.

 Using a simple “cost per port” calculation, it may appear initially that the best
option is to deploy one large switch at a central location.

However, this apparent cost savings may be offset by the expense from the longer
cable lengths required to connect every device on the LAN to one switch.

This option should be compared with the cost of deploying a number of smaller
switches connected by a few long cables to a central switch.

 Another cost consideration is how much to invest in redundancy.

We can provide a secondary central switch to operate concurrently with the
primary central switch.

We can also provide additional cabling to provide multiple interconnections
between the switches.

The goal of redundant systems is to allow the physical network to continue its
operation even if one device fails.

7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Selection Factors: Cost

8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Selection: Speed and Types of Ports/Interfaces

 Newer computers with built-in 10/100/1000 Mbps NICs are
available. Choosing Layer 2 devices that can accommodate
increased speeds allows the network to evolve without
replacing the central devices.

 When selecting a switch, choosing the number and type of
ports is a critical decision. Ask yourself these questions:
Would you purchase a switch with:

Just enough ports for today’s needs?

A mixture of UTP speeds?

Both UTP and fiber ports?

Consider carefully how many UTP ports will be needed and how many
fiber ports will be needed.

Consider how many ports will need 1 Gbps capability and how many
ports only require 10/100 Mbps bandwidths.

Consider how soon more ports will be needed.

9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Selection: Speed and Types of Ports/Interfaces

10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router Selection Factors

 When selecting a router, we need to match:
Cost

Routers can be expensive based on interfaces & features.

Interface types

Additional module, such as fiber-optics, can increase the costs.

Expandability

Routers come in both fixed and modular configurations.

Fixed configurations have a specific number and type of ports.

Modular devices have expansion slots that provide the flexibility to add new modules
as requirements evolve. Most modular devices come with a basic number of fixed
ports as well as expansion slots.

Media

The media used to connect to the router should be
supported w/o need to purchase additional modules.

Operating System Features

Depending on the version of OS, the router
can support certain features and services such as:

Security

Quality of Service (QoS)

Voice over IP (VoIP)

Routing multiple Layer 3 protocols

Services such as NAT and DHCP

11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN cabling

12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN cabling

 When planning the LAN cabling, there are 4 areas:

Work area

It is the locations for the end devices and individual users.

It uses patch cables to connect individual devices to wall jacks.

It has a maximum length of 5 meters.

Straight-through cable is the most common patch cable used.

When a hub or switch is placed in the work area, a crossover cable is typically used to
connect the device to the wall jack.

Distribution cabling, also known as horizontal cabling

Horizontal cabling refers to the cables connecting the telecommunication rooms with the
work areas.

The maximum length for a cable from a termination point in the telecommunication room
to the termination at the work area outlet must not exceed 90 meters.

This 90 meter maximum cabling distance is the permanent link because it is installed in
the building structure.

13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 When planning the LAN cabling, there are 4 areas:

Telecommunications room (distribution facility)

The rooms contain – hubs, switches, routers, and data service units (DSUs) – that tie the
network together.

These devices provide the transitions between the backbone cabling and the horizontal
cabling.

The patch cord, with a length of up to 5 meters, is used to connect equipment and patch
panels in the telecommunications room.

These rooms often serve dual purposes. In many organizations, the telecommunications
room also contains the servers.

Backbone cabling (vertical cabling)

Backbone cabling refers to the cabling used to connect telecommunication rooms to the
equipment rooms, where the servers are often located.

Backbone cabling also interconnects multiple telecommunications rooms throughout the
facility.

These cables are sometimes routed outside the building to the WAN connection or ISP.

Backbones cabling are used for aggregated traffic, such as traffic to and from the Internet
and access to corporate resources.

Therefore, backbones typically require high bandwidth media such as fiber-optic cabling.

LAN cabling

14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Total Cable Length: 100 meters

 For UTP installations, the ANSI/TIA/EIA-
568-B standard specifies that the total
combined length of cable spanning the 3
areas listed above is limited to a
maximum distance of 100 meters per
channel.

This standard specifies there can be up to 5
meters of patch cable for interconnecting patch
panels.

There can be up to 5 meters of cable from the
cable termination point on the wall to the
telephone or computer.

90 meters for the horizontal cable.

15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN and WAN – Types of Media

 Choosing the cables necessary to make a
successful LAN or WAN connection requires
consideration of the different media types.

UTP (Category 5, 5e, 6, and 7)

Fiber-optics

Wireless

 Each media type has its advantages and
disadvantages:

Cable length – Does the cable need to span across a
room or from building to building?

Cost – Does the budget allow for using a more
expensive media type?

Bandwidth – Does the technology used with the media
provide adequate bandwidth?

Ease of installation – Does the implementation team
have the ability to install the cable or is a vendor
required?

Susceptible to EMI/RFI – Is the local environment
going to interfere with the signal?

16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Cable Length

The total length of cable required to connect a device includes
all cables from the end devices to the intermediary device in
the telecommunication room (usually a switch).

For example, when using UTP cabling for Ethernet, it has the
recommended maximum distance of 90 (100) meters.

Fiber-optic cables may provide a greater cabling distance-up to 500
meters to a few kilometers depending on the technology.

Attenuation is reduction of the strength of a signal as it moves
down a media.

The longer the media, the more attenuation will affect the signal.

Cabling distance is a significant factor in data signal performance.

 Cost

Although fiber provides greater bandwidth than UTP, the
material and installation costs are significantly higher.

Network designers must match the performance needs of the users
with the cost of the equipment and cabling to achieve the best
cost/performance ratio.

 Bandwidth

A fiber cable may be a logical choice for a server connection.

For example, a server generally has a need for more bandwidth
than a computer dedicated to a single user.

Wireless is also supporting huge increases in bandwidth, but it
has limitations in distance and power consumption.

LAN and WAN – Types of Media

17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

LAN and WAN – Getting Connected

 Ease of Installation

UTP cable is relatively lightweight and flexible and has a small
diameter, which allows it to fit into small spaces.

The connectors, RJ-45 plugs, are easy to install and are a standard.

A raceway is an enclosure or tube that encloses and protects the cable.

Many fiber-optic cables contain a thin glass fiber. This creates
issues for the bend radius of the cable.

Crimps or sharp bends can break the fiber. The termination of the cable
connectors (ST, SC, MT-RJ) are significantly more difficult to install.

Wireless networks require cabling, at some point, to connect
devices, such as access points, to the wired LAN.

However, a wireless LAN requires more careful planning and testing.

There are many external factors, such as other radio frequency devices
and building construction, that can effect its operation.

 Electromagnetic Interference/Radio Frequency Interference

Interference can be produced by electrical machines, lightning, and
other communications devices, including radio equipment.

Interconnected devices in two separate buildings.

Fiber cable is the best choice.

Wireless is the medium most susceptible to RFI.

Before using wireless technology, potential sources of interference must
be identified and, if possible, minimized.

18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: RJ-45 connector

 UTP cabling connections are
specified by the Electronics
Industry Alliance /
Telecommunications Industry
Association (EIA/TIA).

 The RJ-45 connector is the male
component crimped on the end of
the cable.

When viewed from the front, the
pins are numbered from 8 to 1.

When viewed from above with the
opening gate facing you, the pins
are numbered 1 through 8, from
left to right.

19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: Straight-through UTP Cables

 A straight-through cable has connectors on each end that are terminated the same
in accordance with either the T568A or T568B standards.

Identifying the cable standard used allows you to determine if you have the right cable for
the job.

More importantly, it is a common
practice to use the same color
codes throughout the LAN for
consistency in documentation.

 Use straight-through cables
for the following connections:

Switch to a router Ethernet port

Computer to switch

Computer to hub

20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: Crossover UTP Cables

 For two devices to communicate through a cable that is directly connected between
the two, the transmit terminal of one device needs to be connected to the receive
terminal of the other device.

The cable must be terminated so the transmit pin, Tx, taking the signal from device A at one
end, is wired to the receive pin, Rx, on device B.

Similarly, device B’s Tx pin must be connected to device A’s Rx pin.

 To achieve this type of connection with a UTP cable, one end must be terminated as
EIA/TIA T568A pinout, and the other end terminated with T568B pinout.

 Crossover cables directly connect the following devices on a LAN:

Switch to switch

Switch to hub

Hub to hub

Router to router Ethernet port connection

Computer to computer

Computer to a router Ethernet port

21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: Crossover UTP Cables

568A 568B

1  3
2  6

22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: Console (rollover) Cables

 To initially configure the Cisco device, a management connection must be
directly connected to the device. (For Cisco equipment this management
attachment is called a console port).

 The cable used between a terminal and a console port is a rollover cable,
with RJ-45 connectors. The rollover cable, also known as a console cable.
It has a different pinout than the straight-through or crossover RJ-45 cables.
The pinout for a rollover is as follows:

1 to 8
2 to 7
3 to 6
4 to 5
5 to 4
6 to 3
7 to 2
8 to 1

23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: Console (rollover) Cables

1  8

2  7

3  6

4  5

5  4

6  3

7  2

8  1

24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections

 On the figure, identify the
cable type used based on the
devices being connected.

 Use straight-through cables
for connecting:

Switch to router

Computer to switch

Computer to hub

 Use crossover cables for
connecting:

Switch to switch
Switch to hub

Hub to hub

Router to router

Computer to computer

Computer to router

25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making LAN Connections: MDI or MDIX

 Typically, when connecting different types of
devices, use a straight-through cable.

 And when connecting the same type of
device, use a crossover cable.

 In an Ethernet LAN, devices use one of two
types of UTP interfaces – MDI or MDIX.

The MDI (media-dependent interface) uses the
normal Ethernet pinout.

Pins 1 and 2 are used for transmitting and

Pins 3 and 6 are used for receiving.

Devices such as computers, servers, or routers
will have MDI connections.

The MDIX (media-dependent interface,
crossover) swap the transmit pairs internally.

This swapping allows the end devices to be
connected to the hub or switch using a straight-
through cable.

www.answers.com/topic/mdi-port

http://www.answers.com/topic/mdi-port

http://www.answers.com/topic/mdi-port

http://www.answers.com/topic/mdi-port

26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Many devices allow the UTP Ethernet port
to be set to MDI or MDIX. This can be
done in one of three ways, depending on
the features of the device:

1. On some devices, ports may have a
mechanism that electrically swaps the
transmit and receive pairs.

The port can be changed from MDI to MDIX
by engaging the mechanism.

2. As part of the configuration, some
devices allow for selecting whether a port
functions as MDI or as MDIX.

3. Many newer devices have an automatic
crossover feature.

On some devices, this auto-detection is
performed by default. Other devices require
an interface configuration command for
enabling MDIX auto-detection.

Making LAN Connections: MDI or MDIX

27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making WAN Connections

 By definition, WAN links can span extremely long distances.

These distances can range across the globe as they provide the communication links.

 Wide area connections between networks take a number of forms, including:

Telephone line RJ11 connectors for dialup or Digital Subscriber Line (DSL) connections

60 pin Serial connections

 In the labs, use Cisco routers with one of two types of physical serial cables.

The first cable type has a male DB-60 connector on the Cisco end.

The second type is a more compact version and has a Smart Serial connector on the Cisco
device end.

Both cables use a large Winchester 15 Pin connector on the network end.

This end of the cable is used as a V.35 connection to a Physical layer device such as a CSU/DSU.

28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making WAN Connections

29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making WAN Connections: DCE and DTE

 The following terms describe the types of devices that maintain the link:

Data Communications Equipment (DCE) –

It supplies the clocking services to another device.

It is at the WAN access provider end of the link.

In most cases, the telco or ISP provides the clocking service that synchronizes the
transmitted signal.

For example, if a device running at 1.544 Mbps, each receiving device must use a clock,
sending out a sample signal every 1/1,544,000th of a second.

Data Terminal Equipment (DTE) –

It receives clocking services from another device and adjusts accordingly.

It is at the WAN customer or user end of the link.

If a serial connection is made directly to a service provider or to a device that provides
signal clocking such as a channel service unit/data service unit (CSU/DSU), the router is
DTE and will use a DTE serial cable.

 Be aware that there will be occasions, when the local router is required to
provide the clock rate and will therefore use a DCE cable.

30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making WAN Connections

 When making WAN connections between two routers in a lab environment, connect
two routers with a serial cable to simulate a point-to-point WAN link.

In this case, decide which router is going to be the one in control of clocking.

Routers are DTE devices by default, but they can be configured to act as DCE devices.

 The V35 compliant cables are available in DTE and DCE versions. To create a point-
to-point serial connection between two routers, join together a DTE and DCE cable.

Each cable comes with a connector that mates with its complementary type.

These connectors are configured so that you cannot join two DCE or two DTE cables
together by mistake.

31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making WAN Connections

32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

How Many Hosts in the Network?

 To develop an addressing scheme for a network, start with
determining the total number of hosts. (current and future )

The end devices requiring an IP address include:

User computers

Administrator computers

Servers

Other end devices such as printers, IP phones, and IP
cameras

Network devices requiring an IP address include:

Router LAN interfaces

Router WAN (serial) interfaces

Network devices requiring an IP address for management
include:

Switches

Wireless Access Points

 Next, determine if all hosts will be part of the same
network, or whether the network as a whole will be divided
into separate subnets.

Recall that the number of hosts on one network or subnet is
calculated using the formula 2 to the nth power minus 2 (2^n –
2), where n is the number of bits available as host bits.

Recall also that we subtract two addresses – the network
address and the network broadcast address – cannot be
assigned to hosts.

33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

How Many Network?

 Counting the Subnets

Each subnet, as a physical network segment,
requires a router interface as the gateway for
that subnet.

Each connection between routers is a separate
subnet.

The number of subnets on one network is also
calculated using the formula 2^n, where n is
the number of bits “borrowed” from the given IP
network address.

 Subnet Masks

The next step is to apply one subnet mask:

A unique subnet and subnet mask for each
physical segment

A range of usable host addresses for each subnet

 There are many reasons to divide a network into subnets:

Manage Broadcast Traffic – Broadcasts can be controlled because it is divided into a number
of smaller domains.

Different Network Requirements – If different groups of users require specific network, it is
easier to manage these requirements if those users are all together on one subnet.

Security – Different levels of network security can be implemented based on network
addresses.

34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Determining the Address Standard for our Internetwork

 For example, when allocating an IP address to a router interface that is the gateway for a
LAN, it is common practice to use the first (lowest) or last (highest) address within the
subnet range. This consistent approach aids in configuration and troubleshooting.

 Similarly, when assigning addresses to devices that manage other devices, using a
consistent pattern within a subnet makes these addresses easily recognizable. For
example, in the figure, addresses with 64 – 127 in the octets always represent the general
users.

 In addition, remember to document your IP addressing scheme on paper.

 Some of the different categories
for hosts are:

–General users

–Special users

–Network resources

–Router LAN interfaces

–Router WAN links

–Management access

35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating Addresses: Case 1

 The network topology for this example:

 Student LAN

Student Computers: 460

Router (LAN Gateway): 1

Switches (management): 20

Total for student subnetwork: 481

 Instructor LAN

Instructor Computers: 64

Router (LAN Gateway): 1

Switches (management): 4

Total for instructor subnetwork: 69

 Administrator LAN

Administrator Computers: 20

Server: 1

Router (LAN Gateway): 1

Switch (management): 1

Total for administration subnetwork: 23

 WAN

Router – Router WAN: 2

Total for WAN: 2

 There are two methods available for allocating
addresses to an internetwork.

–We can use Variable Length Subnet Masking
(VLSM), where we assign the prefix and host bits to
each network based on the number of hosts in that
network.

–Or, we can use a non-VLSM approach, where all
subnets use the same prefix length and the same
number of host bits.

36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating Addresses: Case 1: Addresses-without VLSM

 When using the non-VLSM method of assigning addresses, all subnets have
the same number of addresses.

We base the number of addresses for all networks on the addressing requirements
for the largest network.

 In Case 1, the Student LAN is the largest network, requiring 481 addresses.

 We use 9 as the value for n because 9 is the first power of 2 that is over 481.

Borrowing 9 bits for the host portion yields this calculation:

2^9 = 512

512 – 2 = 510 usable host addresses

This meets the current requirement for at least 481 addresses, with a small
allowance for growth. This also leaves 23 network bits (32 total bits – 9 host bits).

 Because there are four networks in our internetwork, we will need four blocks
of 512 addresses each, for a total of 2048 addresses.

We will use the address block 172.16.0.0 /23. This provides addresses in the
range from 172.16.0.0 to 172.16.7.255.

37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating Addresses: Case 1: Addresses-without VLSM

38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 For the Student network block, the values would be:

The student network required 481 address

The address block is 172.16.0.1 to 172.16.1.254.

Only 29 address will go unused

 Instructor LAN

The instructor network requires a total of 69 addresses.

The address block is 172.16.2.1 to 172.16.3.254.

The 441 addresses will go unused.

 Administrator LAN

The administrator network requires a total of 23 addresses.

The address block is 172.16.4.1 to 172.16.5.254.

The 487 addresses will go unused.

 WAN

The WAN network requires a total of 2 addresses.

The address block is 172.16.6.1 to 172.16.7.254.

The 508 addresses will go unused.

 We can use VLSM in this internetwork to save addressing, but using
VLSM requires more planning.

Calculating Addresses: Case 1: Addresses-without VLSM

39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating Addresses: Case 1: Addresses-with VLSM

 For the VLSM assignment, we can allocate a much smaller block of addresses to each
network, as appropriate.

 The address block 172.16.0.0/22 (subnet mask 255.255.252.0) has been assigned to
this internetwork.

Ten bits will be used to define host and sub networks.

It has a total of 1024 addresses from 172.16.0.0 to 172.16.3.0.

 Student LAN

The largest subnet is the Student LAN requires 481 addresses.

Using the formula usable hosts = 2^n – 2, borrowing 9 bits for the host portion gives 512 – 2 =
510 usable host addresses.

Using the lowest available address gives us of 172.16.0.0 /23.

The IP host range would be 172.16.0.1 through 172.16.1.254.

 Instructor LAN

The next largest network is the Instructor LAN. It requires at least 69 addresses.

Using 6 in the power of 2 formula, 2^6 – 2, only provides 62 usable addresses.

We must use an address block using 7 host bits. The calculation 2^7 -2 will yield a block of
126 addresses.

The next available block is the 172.16.2.0 /25 network.

This provides an IP host range of 172.16.2.1 to 172.16.2.126.

40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating Addresses: Case 1: Addresses-with VLSM

41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Administrator LAN

For the Administrator LAN, we need to accommodate 23 hosts.

This will require the use of 6 host bits: 2^6 – 2.

The next available block of addresses that can accommodate these hosts is the
172.16.2.128 /26 block.

This provides IP host range of 172.16.2.129 to 172.16.2.190.

 WAN

The last segment is the WAN, requiring 2 host addresses.

Only 2 host bits will accommodate the WAN links. 2^2 – 2 = 2.

The next available address block is 172.16.2.192 /30.

This gives an IP host range of 172.16.2.193 to 172.16.2.194.

 This completes the allocation of addresses using VLSM for Case 1. If an
adjustment is necessary to accommodate future growth, addresses in the range
of 172.16.2.196 to 172.16.3.255 are still available.

Calculating Addresses: Case 1: Addresses-with VLSM

42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Calculating Addresses: Case 2

 In Case 2, the challenge is to subnet this internetwork while limiting the
number of wasted hosts and subnets.

 The figure shows 5 different subnets, each with different host requirements.
The given IP address is 192.168.1.0/24.

 The host requirements are:

NetworkA – 14 hosts

NetworkB – 28 hosts

NetworkC – 2 hosts

NetworkD – 7 hosts

NetworkE – 28 hosts

43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 As we did with Case 1, we begin the process by subnetting
for the largest host requirement first.

 In this case, the largest requirements are for NetworkB and
NetworkE, each with 28 hosts.

For networks B and E, 5 bits are borrowed from the host portion
and the calculation is 2^5 = 32 – 2.

This allows 8 subnets with 30 hosts each.

Network B will use Subnet 0: 192.168.1.0/27

host address range 1 to 30

Network E will use Subnet 1: 192.168.1.32/27

host address range 33 to 62

 The next largest host is NetworkA, followed by NetworkD.

Network A will use Subnet 0: 192.168.1.64/28

host address range 65 to 78

Network D will use Subnet 1: 192.168.1.80/28

host address range 81 to 94

 NetworkC has only two hosts.

Network C will use Subnet 1: 192.168.1.96/30

host address range 97 to 98

 The host requirements are:

–NetworkA – 14 hosts

–NetworkB – 28 hosts

–NetworkC – 2 hosts

–NetworkD – 7 hosts

–NetworkE – 28 hosts

Calculating Addresses: Case 2

44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Device Interfaces

 Cisco devices, routers, and switches have several types of interfaces.

 LAN Interfaces – Ethernet

The Ethernet interface is used for connecting cables that terminate with LAN devices such as
computers and switches.

Several conventions for naming Ethernet interfaces, including AUI (older Cisco devices),
Ethernet, FastEthernet and Fa 0/0.

The name used depends on the type and model of the device.

 WAN Interfaces – Serial

Serial interfaces are used for connecting WAN devices to the CSU/DSU.

For lab, we will make a back-to-back connection between two routers, and set a clock rate on
one of the interfaces.

To establish communication with a router via a console on a remote WAN, a WAN interface is
assigned a IPv4 address.

 Console Interface

The console interface is the interface for initial configuration.

Physical security of network devices is extremely important.

 Auxiliary (AUX) Interface

This interface is used for remote management of the router.

Typically, a modem is connected to the AUX interface for dial-in access.

45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Device Interfaces

46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 Typically, networking devices do not have their own displays, keyboards,
or input devices such as trackballs and mice. Accessing a network
device for configuration, verification, or troubleshooting is made via a
connection between the device and a computer.

 To enable this connection, the computer runs a program called a
terminal emulator.

A terminal emulator is a software program that allows one computer to
access the functions on another device. It allows a person to use the display
and keyboard on one computer to operate another device, as if the keyboard
and display were directly connected to the other device.

The cable connection between the computer running the terminal emulation
program and the device is often made via the serial interface.

Making the Device Management Connection

47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Making the Device Management Connection

 To connect to a router or switch for device management using terminal emulation, follow these
steps:

 Step 1:

Connect a computer to the console port using console cable.

The console cable, has a DB-9 connector on one end and an RJ-45 connector on the other end.

Many newer computers do not have a serial interface. Use a USB-to-serial cable to access console port.

 Step 2:

For the purpose of this course, we will usually use HyperTerminal. This program can be found under All
Programs > Accessories > Communications. Select HyperTerminal.

Open HyperTerminal, configure the port with these settings:

Bits per second: 9600 bps

Data bits: 8

Parity: None

Stop bits: 1

Flow control: None

 Step 3:

Log in to the router using the
terminal emulator software.

You can access the router
by pressing the Enter key.

48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1

Configuring and Testing
Your Network

Network Fundamentals – Chapter 11

Dr. C. BouSaba

2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Topics

� The Internetwork Operating System (IOS).

� Devices that have the IOS embedded.

� IOS commands available to a device.

� IOS modes of operation.

� Basic IOS commands.

� Basic show commands.

� Configuration files

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Internetwork Operating System

� Most Cisco devices use the Cisco IOS.

� Details vary with the device and feature set.

� Normal access through a command line.

� Stored in flash memory and can be upgraded.

� Usually copied into RAM when the device is powered
on, and run from RAM.

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Role of Internetwork Operating System (IOS)

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Access to the interface

� Console port via serial connection

Initial configuration

Disaster recovery

When network access has failed

Password recovery

As well as general management

� Console access does not require a password.
Configure a password. Lock the door.

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Telnet, SSH, Aux

� Later management can be via Telnet

� There must be an IP address on the port

� A password must be configured

� Secure shell gives better security

� AUX port can be used locally or via modem but by
default does not show error messages

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration files

� Hold the commands that have been configured on the
router to customise it.

� Running configuration in RAM holds commands that
are in current use

� Startup configuration in NVRAM holds saved
commands. These are kept when the power is off and
usually copied back into RAM when the router is re-
started.

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router storage areas

� ROM

� Permanent

� Holds POST, boot instructions,
basic IOS

� Flash

� Keeps contents

� Holds IOS image

� NVRAM

� Keeps contents

� Holds startup configuration file

� RAM

� Volatile

� Holds runnning config, tables,
queues etc

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router IOS modes

User EXEC mode

Privileged EXEC mode

enable disable
+ password

Global Configuration mode

Configure terminal Exit or Ctrl+z

Specific

Configuration modes

Exit EndVarious commands

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router prompts

User EXEC mode
Privileged EXEC mode
Global Configuration mode
Specific Configuration modes

Router>

Router#

Router(config)#

Router(config-if)#
and others

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IOS Mode Hierarchical Structure
� Cisco IOS is modal and each mode has implications

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IOS Primary Modes

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

EXEC modes

� You log in to User EXEC mode
Router>

� You can give basic monitoring commands but cannot
change the configuration

� Enter enable to go to Privileged EXEC mode
Router#

� Password may be used for security

� You can give more commands and can go to
configuration modes

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configuration modes

� Start in privileged EXEC mode and enter the configure
terminal (config t) command
Router# config t
Router(config)#

� The prompt changes

� This is global configuration mode

� Additional commands take you to interface
configuration, router configuration etc.

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Leaving configuration modes

� From interface configuration mode there are several
ways of getting to privileged EXEC

� Router(config-if)# exit
Router(config)# exit
Router#

� Router(config-if)# end
Router#

� Router(config-if)# Ctrl+z
Router#

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IOS Configuration Modes

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Basic IOS Command Structure

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Command Structure

Followed by

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

? To get help

� ? Gives a list of commands available from the current
prompt.

� Command followed by space then ? Gives a list of
keywords or arguments that can be used.

� Start of command followed by ? with no space shows
how the word can be continued.

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

? To get help

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Shortened commands

� Router#show running-config

� Router#show run

� Router#sh ru

� It needs enough letters of each word to be
unambiguous. (Tab key shows whole word)

� Router#s ru

� % Ambiguous command: ‘s’

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Other error messages

� Switch#clock set

� % Incomplete command

� Switch#clock set 19:50:00 25 6

� % Invalid input detected at ‘

^

’ marker

� Router#show runming-config

� % Invalid input detected at ‘^’ marker

^

^

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Keyboard shortcuts

� Tab completes a partial command

� Backspace erases to left of cursor

� Ctrl+D erases at cursor (Delete does not)

� Ctrl+Z returns from any config mode to privileged
exec mode

� Ctrl+C leave Setup mode

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

At the —More— prompt

� Enter shows the next line

� Spacebar shows the next screenful

� Needed with commands such as
show running-config that produce more than one
screen of text.

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show Command and its Variations

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show commands

� Show ? To get a list

� Many different show commands to give information
about every aspect of the router and its operation

� We use some of the most common.

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

General show commands

� Show running-config shows the configuration file from
RAM

� Show startup-config shows the saved configuration
file from NVRAM

� Show version gives information about the IOS and the
router itself. It shows the configuration register, which
controls how the router starts up.

29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Show interfaces

� Gives statistics for all interfaces

� In particular, says if the interface is up and if the
protocol is up – important in troubleshooting.

� Show interfaces serial 0/0 to show one selected
interface

� You can shorten to show int s 0/0

� Show ip interfaces gives IP statistics

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Save configuration

� Router#copy running-config startup-config

� Router#copy run start (shortened)

� Router#wr (Old fashioned, short for write, but it works and
is safe.)

� Beware! A typing error in the copy command can delete the
operating system. If you get an odd message about Flash –
hands off – call for help.

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Hostname

� Router>enable

� Router#config t

� Router(config)#hostname Paris

� Paris(config)#

� Configure a suitable hostname so that you know which
router you are managing and so that you can identify it
in network documentation.

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Console password

� Paris(config)#line con 0

� Paris(config-line)#password cisco

� Paris(config-line)#login

� Paris(config-line)#exit

� Restricts access via the console

� Use cisco as the password in labs.

� Use a proper strong password on production networks

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Vty password for Telnet

� Paris(config)#line vty 0 4

� Paris(config-line)#password cisco
� Paris(config-line)#login
� Paris(config-line)#exit

� Allows and restricts access via 5 vty lines

� Use cisco as the password in labs.

� Use a proper strong, different password on production
networks

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Enable and enable secret

� Paris(config)#enable secret class

� The password class is needed when you type enable
to enter privileged exec mode

� This password is encrypted

� Paris(config)#enable password cisco

� Not encrypted, used on older routers

� If you configure both, then only the enable secret is
used.

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Message of the day

� Paris(config)#banner motd # No unauthorized
access #

� # is a delimiter to show where the message starts and
ends.

� Any character can be used as long as it does not
appear in the message.

� The message should make it clear that unauthorized
access is forbidden.

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Reload

� Shuts down the router and then starts it again.

� If the configuration has changed then you are prompted
to save it.

� The running configuration in RAM is lost.

� The startup configuration from NVRAM is (usually)
loaded into RAM on startup.

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Back up to TFTP server

� Start TFTP server software on host

� Paris#copy running-config tftp

� Remote host []? 172.16.1.1

� Name of configuration file to write [Paris-config]?
Paris27Oct09

� Write file Paris12Oct07 to 172.16.1.1? [confirm] y

� Writing Paris12Oct07 ! ! ! ! ! ! [OK]

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Back up as text file

� Start text capture

� Name file

� show run

� Stop text capture

� Open saved file and “tidy up”.

� Remove unwanted symbols at –More—

� No shutdown command on interfaces

� Passwords in plain text (ouch!)

39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TeraTerm text file

� TeraTerm is an open source Telnet client.

� It can also act as a SSH client

� It can capture text and save it as a file.

40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Erase startup configuration

� Paris#erase NVRAM:startup-config

� Paris#erase startup-config

� Paris#erase start

� If you reload, then the router starts up with the default
configuration. No passwords, no IP addresses etc.

� Caution if you get this command wrong then you could
erase something else, e.g. IOS

41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Restore file from TFTP server

� Router#copy tftp running-config

� You will be prompted for IP address and file name.

� Configuration is copied into RAM and takes effect at
once.

� Save to NVRAM.

42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Restore text file

� Go to global configuration
mode

� Hyperterminal Transfer
menu

� Send text file…

Or

� Copy text from text file

� “Paste to host” into Hyperterminal session

43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configure a router interface

� Paris(config)#interface FastEthernet 0/0

� Paris(config-if)#ip address 172.16.1.1 255.255.0.0

� Paris(config-if)#no shutdown

� Paris(config-if)#exit

� Interface names vary, depending on whether the router
is modular and on the bandwidth.

� E.g. interface Ethernet 0 on an older router

44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Configure a router interface

� Paris(config)#interface serial 0/0

� Paris(config-if)#ip address 192.168.4.1 255.255.255.0

� (Paris(config-if)#clock rate 64000)

� Paris(config-if)#no shutdown

� Paris(config-if)#exit DCE only

45© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Description

� Paris(config)#interface fa0/0

� Paris(config-if)#description Connects to Paris central
switch

� Can include circuit and contact information

� Not needed for the operation of the router

� Valuable for documentation as it is included in the
configuration listing

46© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch interfaces

� Switch physical interfaces do not have IP addresses

� They are active by default and do not need the no
shutdown command.

� It can be useful to give them a description.

47© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch IP address

� The switch IP address goes on a virtual interface, not a
real one, normally VLAN1.

� SwA(config)#interface VLAN1

� SwA(config-if)#ip address 172.16.255.1 255.255.0.0

� SwA(config-if)#no shutdown

� SwA(config-if)#exit

48© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Switch default gateway

� SwA(config)#ip default gateway 172.16.255.254

� Just like a workstation, a switch needs a default
gateway if it exchanges messages with devices on a
different network.

� The default gateway is the address of the local router.

49© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Interface – show commands

� show interfaces states whether up or down, gives
some protocol information and statistics about interface
use.

� show ip interface gives IP addresses and much more.

� show ip interface brief gives summary of IP
addresses and whether up/down. Very useful
command.

50© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Up or down

� Interface status: Layer 1

Up

Down

Administratively down (no shutdown to bring up)

� Protocol: Layer 2

Up

Down (no keepalive signal received)

51© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Ping – step by step

� Ping 127.0.0.1 (loopback, is TCP/IP OK?)

� Ping own IP address (are NIC hardware and software
all right? Is IP address bound?)

� Ping local hosts (checks own configuration and that of
others)

� Ping gateway

� Ping other intermediate routers

� Ping hosts on remote networks

52© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network baseline

� Measure and record performance

At different times

Under different conditions

Repeatedly over a period of time

� Build up a record of network performance

� Useful in troubleshooting and optimising the network

� Helps predict future problems

� Helps planning for change

53© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Find out about nodes

� Ping – used from workstation, router or switch – shows
if destination can be reached

� Traceroute – shows hops along the path

� Arp -a on workstation – shows list of MAC and IP
addresses

� show mac-address-table on switch – shows list of MAC
addresses and switch ports

54© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

55© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Accessing Various IOS Configuration Modes

56© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Example

57© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

58© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

59© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

60© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

61© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

62© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

63© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

� Use a text file to backup and restore config settings

64© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

65© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

66© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

67© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Still stressed with your coursework?
Get quality coursework help from an expert!