ccna exp1 - chapter05 - osi network layer

64
Chapter 5 - OSI Network Layer CCNA Exploration version 4.0

Upload: hoang-duc-cuong

Post on 27-Nov-2014

178 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CCNA Exp1 - Chapter05 - OSI Network Layer

Chapter 5 - OSI Network Layer

CCNA Exploration version 4.0CCNA Exploration version 4.0

Page 2: CCNA Exp1 - Chapter05 - OSI Network Layer

Overview

• 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

Học viện mạng Bách khoa - Website: www.bkacad.com 2

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

Page 3: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Protocols and Internet Protocol (IP)

Học viện mạng Bách khoa - Website: www.bkacad.com 3

• Define the basic role of the Network Layer in data networks• The protocols of the OSI model Network layer specify addressing and

processes that enable Transport layer data to be packaged and transported. The Network layer encapsulation allows its contents to be passed to the destination within a network or on another network with minimum overhead.

Page 4: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer – Communication from Host to Host

• Layer 3 uses four basic processes:1. Addressing2. Encapsulation3. Routing : 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. This process is known as routing.

4. Decapsulation

Học viện mạng Bách khoa - Website: www.bkacad.com 4

( Refer to 5.1.1 )

Page 5: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Protocols

• Protocols implemented at the Network layer that carry user data include:– Internet Protocol version 4 (IPv4) *– Internet Protocol version 6 (IPv6) *

Học viện mạng Bách khoa - Website: www.bkacad.com 5

– Novell Internetwork Packet Exchange (IPX).– AppleTalk.– Connectionless Network Service (CLNS/DECNet).

Page 6: CCNA Exp1 - Chapter05 - OSI Network Layer

The roles of IPv4 protocol

• IPv4 is currently the most widely-used version of IP• The Internet Protocol was designed as a protocol with low

overhead. It provides only the functions that are necessary to deliver a packet from a source to a destination over an interconnected system of networks.

• The protocol was not designed to track and manage the flow of packets. These functions are performed by other protocols in

Học viện mạng Bách khoa - Website: www.bkacad.com 6

packets. These functions are performed by other protocols in other layers.

• IPv4 basic characteristic– Connectionless.– Best-effort.– Media Independent.

Page 7: CCNA Exp1 - Chapter05 - OSI Network Layer

The IPv4 protocol – Connectionless

• Describe the implications for the use of the IP protocol as it is connectionless.

Học viện mạng Bách khoa - Website: www.bkacad.com 7

Page 8: CCNA Exp1 - Chapter05 - OSI Network Layer

The IPv4 protocol – Best Effort

• Describe the implications for the use of the IP protocol as it is considered an unreliable protocol

• Unreliable means simply that IP does not have the capability to manage, and

Học viện mạng Bách khoa - Website: www.bkacad.com 8

capability to manage, and recover from, undelivered or corrupt packets.

• Since protocols at other layers can manage reliability, IP is allowed to function very efficiently at the Network layer.

Page 9: CCNA Exp1 - Chapter05 - OSI Network Layer

The IPv4 protocol – Media independent

• Describe the implications for the use of the IP as it is media independent

• One major characteristic of the media that the Network layer considers: the maximum size of PDU that each medium can

Học viện mạng Bách khoa - Website: www.bkacad.com 9

PDU that each medium can transport. This characteristic is referred to as the Maximum Transmission Unit (MTU). Part of the control communication between the Data Link layer and the Network layer is the establishment of a maximum size for the packet.

Page 10: CCNA Exp1 - Chapter05 - OSI Network Layer

IPv4 packet – Packaging the Transport layer PD

• 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.

Học viện mạng Bách khoa - Website: www.bkacad.com 10

Page 11: CCNA Exp1 - Chapter05 - OSI Network Layer

IPv4 packet header

• Identify the major header fields in the IPv4 protocol and describe each field's role in transporting packets

Học viện mạng Bách khoa - Website: www.bkacad.com 11

Page 12: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 12

• 4 bits• Indicates version of IP used• IPv4: 0100; IPv6: 0110

Page 13: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 13

• 4 bits

• Indicates datagram header length in 32 bit words

Page 14: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 14

• 8 bits

• Specifies the level of importance that has been assigned by upper-layer protocol

Page 15: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 15

• 16 bits

• Specifies the length of the entire packet in bytes, including data and header

Page 16: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 16

• 16 bits• Identifies the current datagram

Page 17: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 17

• 3 bits(R, DF. MF)

– R(reserved): set to 0.

– DF(Don’t fragment):

• 0: Fragment if necessary.

• 1: Do not fragment.

– MF(More fragment):

• 0: This is the last fragment.

• 1: More fragment follow this fragment.

Page 18: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 18

• 13 bits

• Used to help piece together datagram fragments

Page 19: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 19

• 8 bits

• Specifies the number of hops a packet may travel. T his number is decreased by one as the packet travels th rough a router

Page 20: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 20

• 8 bits

• Indicates which upper-layer protocol, such as TCP(6 ) or UDP(17), receives incoming packets after IP process ing has been completed

Page 21: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 21

• 16 bits• Helps ensure IP header integrity• Not caculated for the encapsulation data

Page 22: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 22

• 32 bits• Specifies the sending node IP address

Page 23: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 23

• 32 bits• Specifies the receiving node IP address

Page 24: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 24

• Variable length

• Allows IP to support various options, such as secur ity

Page 25: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 25

• Variable length• Extra zeros are added to this field to ensure that t he

IP header is always a multiple of 32 bits.

Page 26: CCNA Exp1 - Chapter05 - OSI Network Layer

Network Layer Fields

Học viện mạng Bách khoa - Website: www.bkacad.com 26

• Variable length up to 64 Kb • Contains upper-layer information

Page 27: CCNA Exp1 - Chapter05 - OSI Network Layer

Grouping Devices into Networks

• Reasons for grouping devices into sub-networks and define several terms used to identify the sub-networks– Geographic

Học viện mạng Bách khoa - Website: www.bkacad.com 27

Page 28: CCNA Exp1 - Chapter05 - OSI Network Layer

• Reasons for grouping devices into sub-networks and define several terms used to identify the sub-networks– Purpose

Grouping Devices into Networks

Học viện mạng Bách khoa - Website: www.bkacad.com 28

Page 29: CCNA Exp1 - Chapter05 - OSI Network Layer

• List several different reasons for grouping devices into sub-networks and define several terms used to identify the sub-networks– Ownership

Grouping Devices into Networks

Học viện mạng Bách khoa - Website: www.bkacad.com 29

Page 30: CCNA Exp1 - Chapter05 - OSI Network Layer

• Reasons for grouping devices into sub-networks and define several terms used to identify the sub-networks– Ownership

Grouping Devices into Networks

Học viện mạng Bách khoa - Website: www.bkacad.com 30

Page 31: CCNA Exp1 - Chapter05 - OSI Network Layer

Broadcast domain ? - Performance

• A broadcast is a message sent from one host to all other hosts on the network.

• Managing the size of broadcast domains by dividing a network into subnets or replace switch by router.

Học viện mạng Bách khoa - Website: www.bkacad.com 31

Page 32: CCNA Exp1 - Chapter05 - OSI Network Layer

Why separate hosts into networks ? - Security

• List several ways in which dividing a large network can increase network security

Học viện mạng Bách khoa - Website: www.bkacad.com 32

Page 33: CCNA Exp1 - Chapter05 - OSI Network Layer

Grouping Devices into Networks

• Explain the communication problems that emerge when very large numbers of devices are included in one large network.

Học viện mạng Bách khoa - Website: www.bkacad.com 33

Page 34: CCNA Exp1 - Chapter05 - OSI Network Layer

Hierarchical Addressing

• Hierarchical addressing solves the problem of devices communicating across networks of networks.

Học viện mạng Bách khoa - Website: www.bkacad.com 34

Page 35: CCNA Exp1 - Chapter05 - OSI Network Layer

Hierarchical Addressing

• Router only need to know network portion(network address) to indicate the best path to reach the network.

Học viện mạng Bách khoa - Website: www.bkacad.com 35

Page 36: CCNA Exp1 - Chapter05 - OSI Network Layer

Routing Protocols

• Routing is an OSI Layer 3

function. It is a hierarchical

scheme and allows individual

addresses to be group

together.

Học viện mạng Bách khoa - Website: www.bkacad.com 36

together.

• Routing is the process of

finding the most efficient path

from one device to another.

Page 37: CCNA Exp1 - Chapter05 - OSI Network Layer

Routing Metrics

Học viện mạng Bách khoa - Website: www.bkacad.com 37

• Two key functions of a router:– Maintain routing tables and make sure other routers know of changes in

the network topology. – Use the routing table to determine where to send them

• Routing metrics are values used in determining the advantage of one route over another. They use various combinations of metrics for determining the best path for data.

Page 38: CCNA Exp1 - Chapter05 - OSI Network Layer

Routing vs Switching

• Switching occurs at

Layer 2, routing

occurs at Layer 3.

• Routing and switching

Học viện mạng Bách khoa - Website: www.bkacad.com 38

• Routing and switching

use different

information in the

process of moving

data from source to

destination.

Page 39: CCNA Exp1 - Chapter05 - OSI Network Layer

Routing and Layer 2 Switching

Học viện mạng Bách khoa - Website: www.bkacad.com 39

Page 40: CCNA Exp1 - Chapter05 - OSI Network Layer

Router and Switch

Học viện mạng Bách khoa - Website: www.bkacad.com 40

• Each computer and router interface maintains an ARP table for Layer 2 communication. The ARP table is only effective for the broadcast domain (or LAN) that it is connected to

• MAC addresses are not logically organized, but IP addresses are organized in a hierarchical manner.

Page 41: CCNA Exp1 - Chapter05 - OSI Network Layer

Routed versus Routing

Học viện mạng Bách khoa - Website: www.bkacad.com 41

• Routed protocol : used at the network layer that transfer data from one hostto another across a router.

• Routing protocols : allow routers to choose the best path for data from source to destination

Examples: Internet Protocol (IP); Novell's Internetwork Packet Exchange (IPX); DECnet, AppleTalk, Banyan VINES, and Xerox Network Systems (XNS).

Page 42: CCNA Exp1 - Chapter05 - OSI Network Layer

Routing protocol

Học viện mạng Bách khoa - Website: www.bkacad.com 42

• Provides processes for sharing route information. • Allows routers to communicate with other routers to update and maintain

the routing tables • Examples: Routing Information Protocol (RIP), Interior Gateway Routing

Protocol (IGRP), Open Shortest Path First (OSPF), Border Gateway Protocol (BGP) and Enhanced IGRP (EIGRP).

Page 43: CCNA Exp1 - Chapter05 - OSI Network Layer

Default Gateway Address

• Default Gateway address is used by hosts in local network to communicate with another ones in remote network.

• Netstat –r and route print command.

Học viện mạng Bách khoa - Website: www.bkacad.com 43

Page 44: CCNA Exp1 - Chapter05 - OSI Network Layer

IP packet – Carrying Data End to End

• Trace the steps of an IP packet as it traverses unchanged via routers from sub network to sub-network.

• Refer to 5.3.2.1

Học viện mạng Bách khoa - Website: www.bkacad.com 44

Page 45: CCNA Exp1 - Chapter05 - OSI Network Layer

IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 45

Page 46: CCNA Exp1 - Chapter05 - OSI Network Layer

IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 46

Page 47: CCNA Exp1 - Chapter05 - OSI Network Layer

IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 47

Page 48: CCNA Exp1 - Chapter05 - OSI Network Layer

IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 48

Page 49: CCNA Exp1 - Chapter05 - OSI Network Layer

IP packet – Carrying Data End to End

Học viện mạng Bách khoa - Website: www.bkacad.com 49

Page 50: CCNA Exp1 - Chapter05 - OSI Network Layer

Manually configure default gateway on PC

Học viện mạng Bách khoa - Website: www.bkacad.com 50

Page 51: CCNA Exp1 - Chapter05 - OSI Network Layer

A gateway – the way out of our network

Học viện mạng Bách khoa - Website: www.bkacad.com 51

Page 52: CCNA Exp1 - Chapter05 - OSI Network Layer

Routes, Next Hop Addresses and Packet Forwarding ?

• Describe the role of a gateway and the use of a simple route table in directing packets toward their ultimate destinations

Học viện mạng Bách khoa - Website: www.bkacad.com 52

Page 53: CCNA Exp1 - Chapter05 - OSI Network Layer

• Define a route and its three key parts

Routes, Next Hop Addresses and Packet Forwarding ?

Học viện mạng Bách khoa - Website: www.bkacad.com 53

Page 54: CCNA Exp1 - Chapter05 - OSI Network Layer

• Routes in routing table include 3 main features(Destination Network, Next-Hop and Metric)

• Use “show ip route” to display routing table in Cisco CLI.

Routes, Next Hop Addresses and Packet Forwarding ?

Học viện mạng Bách khoa - Website: www.bkacad.com 54

Page 55: CCNA Exp1 - Chapter05 - OSI Network Layer

• Describe the purpose and use of the next hop in a route.

Routes, Next Hop Addresses and Packet Forwarding ?

Học viện mạng Bách khoa - Website: www.bkacad.com 55

Page 56: CCNA Exp1 - Chapter05 - OSI Network Layer

Default route

Refer to 5.3.5.2

Học viện mạng Bách khoa - Website: www.bkacad.com 56

• 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.

Page 57: CCNA Exp1 - Chapter05 - OSI Network Layer

Host Routing Table

• 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.

• Hosts automatically add all

Route print

Học viện mạng Bách khoa - Website: www.bkacad.com 57

• Hosts automatically add allconnected networks to the host’s routing table. These routes for the local networks allow packets to be delivered to hosts that are connected to these networks.

Page 58: CCNA Exp1 - Chapter05 - OSI Network Layer

• Tracert example

Routes, Next Hop Addresses and Packet Forwarding ?

Học viện mạng Bách khoa - Website: www.bkacad.com 58

Page 59: CCNA Exp1 - Chapter05 - OSI Network Layer

Static route

• Two types of route:– Static route.– Dynamic route.

Học viện mạng Bách khoa - Website: www.bkacad.com 59

Page 60: CCNA Exp1 - Chapter05 - OSI Network Layer

Dynamic routing

Học viện mạng Bách khoa - Website: www.bkacad.com 60

Page 61: CCNA Exp1 - Chapter05 - OSI Network Layer

IGP and EGP

Học viện mạng Bách khoa - Website: www.bkacad.com 61

• Autonomous system is a network or set of networks under common administrative control. An autonomous system consists of routers that present a consistent view of routing to the external world.

• Interior Gateway Protocols (IGP): route data within an autonomous system. Eg: RIP and RIPv2; IGRP; EIGRP; OSPF; IS-IS;

• Exterior Gateway Protocols (EGP): route data between autonomous systems. Eg: BGP

Page 62: CCNA Exp1 - Chapter05 - OSI Network Layer

Labs

62Học viện mạng Bách khoa - Website: www.bkacad.com

Page 63: CCNA Exp1 - Chapter05 - OSI Network Layer

Học viện mạng Bách khoa - Website: www.bkacad.com 63

Page 64: CCNA Exp1 - Chapter05 - OSI Network Layer

Học viện mạng Bách khoa - Website: www.bkacad.com 64