OSI network layer
CCNA Exploration Semester 1 – Chapter 5
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 1
OSI network layer
Application HTTP, FTP,
Data TFTP, SMTP
Presentation stream etc Application
Session
Transport Segment TCP, UDP Transport
Network Packet IP Internet
Data link Frame Ethernet,
Network Access
WAN
Physical Bits
technologies
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 2
Network layer topics
IP version 4 – the most common layer 3 routed protocol
Dividing hosts into groups – why and how
Routing – sending packets the right way
Routing – how routers learn routes
IP addressing – in chapter 6
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Purpose of layer 3
Decide how to get the data from source to destination, then route
it.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 4
Layer 3 protocol
A layer 3 protocol such as IP version 4 must:
Provide an addressing scheme to identify networks and
individual hosts
Encapsulate a segment from layer 4 into a packet and
include addresses
Direct the packet across one or many networks to the
destination host
Decapsulate (remove the packet header) and give the
segment to layer 4.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 5
Network layer protocols
Internet Protocol version 4 (IPv4) – the most common
Internet Protocol version 6 (IPv6) – designed to replace
version 4 eventually
Novell Internetwork Packet Exchange (IPX)
AppleTalk
Connectionless Network Service (CLNS/DECNet)
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 6
IP characteristics
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 7
Network layer encapsulation
Segment from transport layer
Packet header added to make
IP packet
Sent to data link layer for
further encapsulation into
frame
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 8
IPv4 packet header fields
IP address of source IP address of destination
host, needed so reply host, needed so routers
can be sent. can find route.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 9
IPv4 packet header fields
Reduced by 1 at each TCP or UDP used in
router. Packet dropped if Transport layer.
it goes to 0.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 10
IPv4 packet header fields
Priority for QoS. E.g. For checking if header has
voice data has higher been corrupted.
priority than e-mail.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 11
IPv4 packet header fields
Shows if packet has If router has to split a
been fragmented or packet, this gives order for
must not be fragmented. putting pieces together.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 12
IPv4 packet header fields
Version 4. Header Length of whole packet.
length.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 13
IP header
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 14
Splitting up networks
Fully switched network, each device has its own
bandwidth. You could have hundreds of computers.
Why split it up?
Too large to manage efficiently
Too much broadcast traffic - congestion
Too many addresses for switches to remember
Lack of security
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 15
How to split the network
Geographically – different sites
Purpose – what software and shared resources do
people use? How much bandwidth do they use?
Ownership – different companies or departments in a
company, security requirements
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 16
Use a router
Limits broadcasts
Can provide security
Addressing scheme based on
networks - hierarchical
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 17
IPv4 hierarchical address
32 bits in four 8-bit octets, written in decimal
Network part then host part
Here network part (prefix) is 24 bits /24
Length of network part can vary.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 18
Message to same network
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 19
Message to different network
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Default gateway
Each PC is configured with an IP address and a default
gateway.
The default gateway is the IP address of a router port
on the same network as the PC.
It is the router’s job to handle messages to other
networks.
Each router port is on a different network and has a
different IP address.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Hops
A packet may pass through many routers on its
journey.
The trip from one router to the next is called a hop and
the next router is called the next hop router.
Each router looks at the IP address in the packet
header and decides what to do with the packet next.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 22
Routing table and forwarding
Each router has a routing table. This contains a list of
known networks and the best way to get there – outgoing
port and address of next-hop router.
The router looks at the IP address of a packet. It decides
which network this address is on.
If it knows the network it forwards the packet.
If it does not know the network it drops the packet.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 23
Directly connected
The networks of the router’s own interfaces go into the
routing table.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 24
Other networks
Routes to other networks can be configured by an
administrator (static routes)
Or they can be learned from another router using a
routing protocol (dynamic routes)
A router can have a default route. Packets for unknown
networks go on this route instead of being dropped.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 25
Routing table entries
Directly connected shown by C
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 26
Routing table entries
Static, configured by administrator,
shown by S
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 27
Routing table entries
Default, configured by administrator,
shown by S*
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 28
Routing table entries
Learned from another router using RIP
routing protocol, shown by R
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 29
Router has a route
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 30
Routing protocols
Routers learn routes from each other and put them in
their routing tables.
A routing protocol is the set of rules they use to swap
information.
These routes are dynamic routes
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 31
Static routes Dynamic routes
Entered by administrator Learned from other routers
Time consuming, different for Start the protocol then it runs
each router by itself
Must be updated if routes Automatically updates when
change routes change
Little processing More processing
No bandwidth used Uses bandwidth
Gives nothing away Gives away information
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 32
Summary
Hierarchical Design model addresses performance,
scalability, maintainability & manageability issues.
Traffic Analysis is used to monitor network
performance.
Hierarchical Design Model is composed of 3 layers:
Access
Distribution
Core
Switches selected for each layer must meet the needs
of each hierarchical layer as well as the needs of the
business.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 33
Labs & Activities
Type Detail
PT 1.2.4 Mandatory*
Lab 1.3.1 Mandatory
PT 1.3.2 Mandatory
Lab 1.3.3 Review carefully
* If no previous Packet Tracer experience, else strongly recommended
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 34
© 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 35