Sie sind auf Seite 1von 48

CCNA 1: An Introduction to

Networking
Week 05, Unit 06:
The Network Layer
The Network Layer
Learning Objectives

• Explain the purpose and functionality of the Network layer


• Explain and contrast IP to TCP
• Articulate the concept of hierarchical IP addressing and its use in
addressing packets and routing
• Explain the concept of a subnet and its relationship to a larger
network
• Differentiate between IPv4 and IPv6 at the Network layer
• Differentiate between a PC, router, and a switch
• Articulate a Cisco router’s boot process
• Configure a Cisco router with a basic configuration
• Use basic Cisco router commands to verify a configuration

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 2


Why the Network Layer

• According to Wikipedia (in part):


“The network layer provides the functional and procedural means of
transferring variable length data sequences from a source to a
destination host via one or more networks, while maintaining the
quality of service functions.”
• In plain English:
‘Services running at the Network layer that receive and forward
packets from a source host to a destination host based on IP
addressing and a ‘best effort,’ using whatever information is
available at the time the packet is received.’
• Network layer often referred to as Layer 3

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 3


Why the Network Layer (cont’d)

• Protocol independent – does not care which


protocol is being routed
• Main concern is getting packet to its destination
using the best available path
• Uses IP addressing to implement routing logic
• Routers store routes learned in a routing table
• Routing based on packet’s destination IP address

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 4


A Preview & Reminder!
OSI OSI Layer Encapsulation Devices or
TCP/IP Protocols Keywords/Description
Layer # Name Units Components

Network services for application


Application processes, such as file, print,
FTP, HTTP, POP3, IMAP, telnet, messaging, database services
7 data PC
SMTP, DNS, TFTP
(Away)

Standard interface to data for the


Presentation application layer. MIME encoding,
6 data data encryption, conversion,
formatting, compression
(Pizza)

Interhost communication.
Session data Establishes, manages and
5 terminates connection between
applications
(Sausage) (Drippy)

End-to-end connections and


Transport segments reliability.
4 TCP, UDP Segmentation/desegmentation of
data in proper sequence. Flow
(Throw) (Sweet) control

Logical addressing and path


Network packets determination. Routing. Reporting
3 router IP delivery errors

(not) (Pancakes)

Physical addressing and access


Data Link frames to media. Two sublayers: Logical
2 bridge, switch, NIC Link Control (LLC) and Media
Access Control (MAC)
(Do) (For)

Binary transmission signals and


Physical bits encoding. Layout of pins,
1 repeater, hub, tranceiver voltages, cable specifications,
modulation
(Please) (Breakfast)

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 5


What is a Packet?

• Network layer services


add header (no trailer
though) to segment to
create a packet
• Segment now called
“data”
• Packet header
contains source &
destination IP address

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 6


Routed vs. Routing Protocols

• Routed protocol is Transport Layer protocol


• Usually TCP or UDP
• Inside of packet
• Routing protocol used by routers to
communicate with each other about routes to
destinations
• Data Link layer (Layer 2) protocols
• Usually EIGRP, OSPF, BGP
• Also inside of packet

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 7


Network Layer Protocols

• IP version 4 (IPv4)
• Available in all current OS
• IP version 6 (IPv6)
• Available in all current OS
• AppleTalk (not used much)
• Available in MAC OS only
• IP replaced most other L3 protocols
• Internet Communication Message Protocol
• Few other protocols
• Will discuss in context when needed (later units)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 8
IP Overview

• IPv4
• Remains popular in private networks
– Main L3 protocol for CCNA students
• Connectionless communication
• Best effort delivery of packets only
• Media independent
• Fast forwarding of packets
• IPv6
• Currently being implemented globally by ISPs
• Will learn more about IPv6 later
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 9
IPv4 Details

• Connectionless means packets sent with no


advance notification
• Unlike TCP, which is connection-oriented
• Packets arrive in haphazard order
• Best effort
• No ACKs, sequencing, windowing, etc.
• No error recovery mechanisms
• Media independent
• Copper wire, RF, or fiber optic

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 10


IPv4 Details (cont’d)

• Fast forwarding of packets


• Fragments (resizes) packets when needed
– Data Link services set max. frame size
– Network layer services size packets to fit

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 11


IPv4 Packet Header

• Packet header contains 13 mandatory & 1


optional field:
• Source & destination IP address
– Notice no associated mask or prefix in L3 header
• Flags – permit fragmentation or not
• Protocol – lists L4 protocol

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 12


IPv4 Packet Header (cont’d)

• Protocol (8 bits)
• Data payload type that the packet is carrying. Enables
the L3 services to pass the data to the appropriate
upper-layer protocol
• Type-of-Service (8 bits)
• Used to determine the type (class) of each packet
• Value enables a Quality-of-Service (QoS) mechanism
for high priority packets, such as VoIP

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 13


IPv4 Packet Header (cont’d)

• Fragment Offset (13 bits)


• Field identifies the order in which to place the packet
fragment in the reconstruction
• More Fragments flag (1 bit)
• When set (MF = 1), means that it is not the last
fragment of a packet
• When receiving host receives a frame with the MF =
0, means is the last fragment of a packet
• Unfragmented packet has all zero fragmentation
information (MF = 0, Fragment Offset =0)

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 14


IPv4 Packet Header (cont’d)

• Don't Fragment flag (1 bit)


• If set (DF = 1), then packet must not be fragmented
• Ping & set some flags on your PC

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 15


IPv4 Packet Header (cont’d)

• Version (4 bits)
• Contains the IP version number
• Header Length (IHL) (4 bits)
• Size of the packet header
• Packet Length (16 bits)
• Entire packet size, including header and data, in
bytes

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 16


IPv4 Packet Header (cont’d)

• Identification (16 bits)


• Mostly used for uniquely identifying fragments of an
original IP packet
• Header Checksum (16 bits)
• Used for error checking the packet header itself
• Options (variable length)
• Rarely used & no need to discuss

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 17


Networks to Subnets

• Network groups hosts logically


• By location, equipment use, department, etc.
• Large networks broken into smaller networks
• Called subnets since IP address used to create
smaller network
• Subnet Advantages
• Better performance
• Easier to maintain security
• Easier to maintain in general

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 18


Hierarchical IP Addressing

• L2 MAC address not hierarchical


• MAC address made up of vendor & random hex
number
• L3 IP address is hierarchical
• IP address made up of network & host portions
• Subnet mask segments networks
• Similar to how city zip code segments a city
• Switches enforce hierarchical addressing
• Hosts in different subnets cannot communicate with
each other without L3 device (router) help
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 19
Hierarchical IP Addressing
Example
• You learned IP addressing, subnetting, & VLSM
in earlier unit
• 192.168.10.0 /28 subnet using entire
192.168.10.0 /24 range means:
• Subnet 1 = 192.168.10.0 – 10.15
• Subnet 2 = 192.168.10.16 – 10.31 [etc…]
• Hosts in Subnet 1 cannot communicate with hosts in
Subnet 2 – or any other subnet
• Each subnet represents virtual LAN or VLAN
• Switch prohibits inter-VLAN communication
– Switch & router must be configured to permit
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 20
A Gateway to the World

• Routers act as gateway out


of LAN to other LANs and to
the Internet
• Hosts must be configured
with default gateway to exit
LAN
• Router’s LAN interface must
be configured with address in
host’s subnet

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 21


Default Gateway Connects
Networks
• Routers receive packets destined for other
networks
• Switch forwards traffic to gateway router
• Router examines the network portion of the packet
destination address & forwards the packet to its exit
interface
• If the destination network is directly connected to the
router, the packet is forwarded directly to that host’s
subnet switch

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 22


Default Gateway Connects
Networks (cont’d)
• Cont’d:
• If destination network is not directly connected to
router, the packet is forwarded to another router
– Router must be configured to forward packets or all packets
will be dropped
• Next router assumes responsibility for packet delivery
• If destination is not directly connect to next router, the
packet is forwarded to another router
– As before, router must be configured to forward packets or
all packets will be dropped
• Each router looks up destination IP address in its
routing table
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 23
Routing Example

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 24


Routing Basics

• Directly-connected network attached to a


router’s interface
• Other networks reachable via chain of
interconnected routers

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 25


Routing Table Basics

• Routing table made up of directly-connected,


static, & learned route data
• Directly-connected networks automatically entered in
routing table
• Static routes manually added to routing table by
human administrators
• Learned routes dynamically entered in routing table
– Routers programmed to implement routing protocols
– Facilitates inter-router communication to share directly-
connected routes with other routers
– Routing protocols covered in subsequent course

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 26


Routing Table Basics (cont’d)

• Route entry consists of:


• How learned
• Destination IP network address & prefix
• Administrative distance & cost
• Next hop IP address
• Age of route
• Router exit interface to reach destination IP address

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 27


Routing Table Route Fields

• How learned
• C = directly-connected route
• S = static route configured by human
• S* = static default route configured by human
• O = dynamically learned via OSPF
• D = dynamically learned via EIGRP
• Destination IP network address & prefix
• Network address & prefix of destination address

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 28


Routing Table Route Fields (cont’d)

• Administrative distance & cost


• Applies specifically to dynamic routing protocols
• Covered in subsequent course
• Next hop IP address
• IP address of the next router in path to destination
network
• Actual IP address – not network address

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 29


Routing Table Route Fields (cont’d)

• Age of route
• How long route in routing table since last update
• Router exit interface to reach destination IP
address
• The router’s own interface through which the packet
must be sent to reach the next router in the path to
the destination

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 30


Routing Table Example

• A router’s routing table:


• Notice route highlighted in red rectangle at bottom…

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 31


Don’t Drop It!
• Routers only route to routes in routing table
• No route in routing table means router drops
packet by default
• Means packet is not sent to another router for routing
• Usually not an optimal solution
• Can configure router with static default route
• Used as a last resort to avoid dropping packet
• Directs router to send packet to specific router
– This router called ‘gateway of last resort’
– In example, traffic directed to ‘loopback’ interface
– Loopback is a virtual interface used in classroom
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 32
Static vs. Static Default

• Static route means:


• If router receives packet to this destination network,
do not use other routes that may be in routing table –
use the static route, even if it is longer & slower
• Static default route means:
• If router receives packet to this destination network,
use routes in routing table, including static route.
• But – if no route in routing table – do not drop packet!
Send it to the specified router & hope that router can
actually route the packet to its destination

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 33


Please Excuse My Dear Aunt Sally…

• Routes in routing table used in specific order


• Some routes more trustworthy than others
– Router least trusts manually entered routes
– May be subject to human error
• Some dynamic routing protocols trusted over others
– Cisco routers trust EIGRP more than OSPF
– EIGRP is Cisco-proprietary
• Route order selection:
• Static routes: may be > 1
• Dynamically-learned routes, ordered by trust value
• Static default route: only 1 per router
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 34
Dynamic vs. Static Routing

• Static routing okay for small networks & when


security needed
• Otherwise lots of work to keep routes current when
network changes
• Dynamic routing best for medium to large
networks
• Configure routers one time
• Routers dynamically update each other when network
changes

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 35


One Destination – Many Routes

• Downloading a file may create millions of


packets for that file
• Router often learns > 1 route to a destination
• Router can use > 1 path to route the packets
• Router uses programmed logic to ‘deal’ packets to all
of the available paths to speed up routing of the
million packets
• Each & every received packet stands on its own
• Each looked up in routing table & routed

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 36


The Cisco IOS

• Internetwork Operating System (IOS)


• Operating system software for Cisco devices
– Routers, switches, wireless APs, etc.
• Functionality depends on device and its
functionality
• Stored in flash memory in device
• Loaded into RAM as device boots

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 37


Configuration Files

• IOS provides base operating system


• Modifications to IOS stored in configuration file
• Startup-configuration file stored in NVRAM
• Running-configuration file stored in RAM

Flash NVRAM • Startup- RAM Running-


memory IOS configuration
configuration
Memory • Other files Memory

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 38


Cisco Device Memory

• Flash memory similar to hard disk storage


• Does not lose its contents when the device is turned
off or rebooted
• NVRAM memory similar to persistent RAM
• Non-Volatile RAM does not lose its contents when the
device is turned off or rebooted
• RAM similar to common computer RAM
• RAM loses its contents when the device is turned off
or rebooted

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 39


Booting Cisco Devices

• IOS loaded into RAM


• Startup-configuration settings loaded into RAM &
modify basic IOS settings
• Basic IOS + Startup-configuration = Running-
configuration
• Changes made to running-configuration must be
saved to startup-configuration file to persist
reboot

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 40


Initial Boot

• Must initially connect via device’s console port


using console cable
• Use terminal emulator software to communicate
with Cisco device
- Putty, Tera Term, & other freeware software
• Basic IOS provides no security
• After initial configuration complete can connect
via network, telnet, or SSH

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 41


Cisco IOS Modes

• Modal OS provides various modes of operation


- User executive mode provides limited functionality
- Privileged executive mode provides some advanced
functionality & configuration ability
- Global configuration mode provides advanced
functionality & more configuration ability
- Sub configuration modes provide ability to configure one
specific function

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 42


Basic Configuration Example

User Exec:
Router>

Privileged Exec:
Router#

Global Config:
Router#(config)

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 43


Basic Security

• Enable secret password protects access to


privileged mode
• Telnet (vty) password prohibits connection
without password
• Better to connect via Secure Shell (SSH) than telnet
• Telnet sends all communications plaintext
• SSH encrypts all of its communications
– You will learn about SSH and telnet later in the course

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 44


Suggested Lab Activity

• View YouTube video to connect laptop to router


• YouTube Video: Connect router to laptop
• Use physical router & laptop
• Use console cable & terminal emulator
• Perform commands on slide 42
• Possible physical equipment list:
 3 - Cisco 2901 routers drivers for laptop
 3 – Cisco 2960 switches  1 – laptop running Windows XP or
 3 – Cisco console cables newer
 3 – USB to DB9 serial adapters &  1 – Network simulation software
package for CCNA
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 45
Verify Router Configuration

• Use shortcut commands


• Type part of command – not entire command
• Commands not case sensitive – use lower-case
• In User Exec mode run these commands:
• show run
• show start
• show ip route
• show int

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 46


The Network Layer
Summary – Unit 6
• Explain the purpose and functionality of the Network layer
• Explain and contrast IP to TCP
• Articulate the concept of hierarchical IP addressing and its
use in addressing packets and routing
• Explain the concept of a subnet and its relationship to a
larger network
• Differentiate between IPv4 and IPv6 at the Network layer
• Differentiate between a PC, router, and a switch
• Articulate a Cisco router’s boot sequence
• Configure a Cisco router with a basic configuration
• Use basic Cisco router commands to verify a configuration
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 47
The Network Layer
References – Unit 6
References
• Odem, W. Cisco CCENT/CCNA ICND1 Academic Edition. 1st ed. Indianapolis: Cisco Press; 2013.
• Odem, W. Cisco CCENT/CCNA ICND1 100-101. 1st ed. Indianapolis: Cisco Press; 2013.
• Odem, W. Cisco CCNA ICND2 200-101. 1st ed. Indianapolis: Cisco Press; 2013.
• Dean, T. Network+ Guide to Networks. 6th ed. Boston. Course Technology; 2012.
• Network layer. Wikipedia [free encyclopedia on the Internet]. 2013 June 19; [cited 02 July 13]; Available from:
http://en.wikipedia.org/wiki/Network_layer.
• Internet Protocol. Wikipedia [free encyclopedia on the Internet]. 2013 June 30; [cited 02 July 13]; Available from:
http://en.wikipedia.org/wiki/Internet_protocol.
• Internet Control Message Protocol. Wikipedia [free encyclopedia on the Internet]. 2013 June 25; [cited 02 July 13];
Available from: http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol.
• IPv4. Wikipedia [free encyclopedia on the Internet]. 2013 July 01; [cited 02 July 13]; Available from:
http://en.wikipedia.org/wiki/IPv4.
• List of IP protocol numbers. Wikipedia [free encyclopedia on the Internet]. 2013 May 28; [cited 02 July 13];
Available from: http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers.

Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 48

Das könnte Ihnen auch gefallen