ccna exploration1 chapter 5: osi network layer...2002/05/22  · decapsulated by the network layer ;...

75
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA Exploration1 Chapter 5: OSI Network Layer LOCAL CISCO ACADEMY ELSYS TU INSTRUCTOR: STELA STEFANOVA PDF created with pdfFactory Pro trial version www.pdffactory.com

Upload: others

Post on 25-Apr-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

1© 2004, Cisco Systems, Inc. All rights reserved.

CCNA Exploration1 Chapter 5:OSI Network Layer

LOCAL CISCO ACADEMY ELSYS TUINSTRUCTOR: STELA STEFANOVA

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 2: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

222© 2004, Cisco Systems, Inc. All rights reserved.

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 hopaddresses and packet forwarding to a destination network.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 3: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

333© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Protocols and Internet Protocol (IP)

Routing – communication between networks

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 4: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

444© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Processes

Layer 3 basic processes:

• Addressing

• Encapsulation

• Routing

• Decapsulation

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 5: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

555© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Processes

1

2

3

4

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 6: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

666© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Processes

Addressing• network layer must provide a

mechanism for addressing the end devices;

• end devices must have a unique address;

• Host - in an IPv4 network is an end device with network layer address.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 7: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

777© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Processes

Encapsulation• network layer must provide encapsulation;• packet (Layer 3 PDU) - during the encapsulation

process, Layer 3 receives the Layer 4 PDU and adds a Layer 3 header to create the Layer 3 PDU;

• destination address - the address of the host to which the packet is being sent (in Layer 3 header);

• source address - the address of the originating host (in Layer 3 header).

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 8: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

888© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Processes

Decapsulation• the packet arrives at the destination host

and is processed at Layer 3;• the host examines the destination address

to verify that the packet was addressed to this device;

• if the address is correct, the packet is decapsulated by the Network layer ;

• the Layer 4 PDU contained in the packet is passed up to the appropriate service at Transport layer.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 9: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

999© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer Processes

Routing• network layer must provide services to

direct the packets to their destination host;• the packets might have to travel through

many different networks;• router - intermediary device that connects

the networks;• routing - to select paths for and direct

packets toward their destination;• hop - each route that a packet takes to

reach the next device.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 10: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

101010© 2004, Cisco Systems, Inc. All rights reserved.

Network Layer ProtocolsNetwork layer protocols• specify the packet structure;• used to carry the data from one host to another host.

• Internet Protocol version 4(IPv4)

• Internet Protocol version 6(IPv6)

• Novell Internetwork Packet Exchange (IPX)

• AppleTalk• Connectionless Network

Service (CLNS/DECNet)

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 11: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

111111© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)Basic characteristics of the IPv4 protocol

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 12: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

121212© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IP protocol – connectionless protocol• requires no initial exchange of control information to establish an end-to-end connection before packets are forwarded;• does not require additional fields in thePDU header to maintain this connection;• reduces the overhead of IP.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 13: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

131313© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IP protocol - unreliable protocol• does not have the capability to manage, and recover from, undelivered or corrupt packets

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 14: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

141414© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

IP protocol - unreliable protocol• smaller IP header;• less overhead;• less delay in delivery;• does not have the capability to manage, and recover from, undelivered or corrupt packets.

IP packet header• does not include fields required for reliable data delivery;• there are no acknowledgments of packet delivery;• there is no error control for data;• there is no possibility for packet retransmissions.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 15: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

151515© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IP protocol - media independent• IPv4, IPv6 operate independently of themedia that carry the data at lower layers of the protocol stack.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 16: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

161616© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IP protocol - media independent• the transport of IP packets is not limited to any particular medium.Maximum Transmission Unit (MTU)• is a major characteristic of the media that the Network layer considers;• is the maximum size of PDU that each medium can transport;• is a part of the control communication between the Data Link layer and the Network layer is the establishment of a maximum size for the packet;Packet fragmentation• an intermediary device (usually a router) - need to split up a packet when forwarding it from one media to a media with a smaller MTU.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 17: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

171717© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

Generate IP PacketIPv4 encapsulates, the Transport layer segment or datagram

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 18: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

181818© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

IPv4 protocol major header fields

• IP Source Address• IP Destination Address• Time-to-Live (TTL)• Type-of-Service (ToS)• Protocol• Fragment Offset

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 19: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

191919© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

IPv4 Packet Header FieldsIP Destination Address• 32-bit binary value - the packet destination Network layer host address.IP Source Address• 32-bit binary value – the packet source Network layer host address.Time-to-Live (TTL)• 8-bit binary value - 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 (that is, each hop);• when the value becomes zero, the router discards or drops the packet and it is removed from the network data flow;• is a mechanism to prevent packets that cannot reach their destination from being forwarded indefinitely between routers in a routing loop;

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 20: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

202020© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

IPv4 Packet Header Fields

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 21: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

212121© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

Protocol• 8-bit binary value;• indicates the data payload type that the packet is carrying;• enables the Network layer to pass the data to the appropriate

upper-layer protocol;• Example values: - 01 ICMP

- 06 TCP- 17 UDP.

Type-of-Service• 8-bit binary value;• is used to determine the priority of each packet;• enables a Quality-of-Service (QoS) mechanism to be applied

to high priority packets (carrying telephony voice data)• the router can be configured to decide which packet it is to

forward first based on the Type-of-Service value.

IPv4 Packet Header Fields

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 22: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

222222© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IPv4 Packet Header Fields

Fragment Offset• a router may have to fragment a packet when forwarding it

from one medium to another medium that has a smaller MTU;• the IPv4 packet uses the Fragment Offset field and the MF flag

in the IP header to reconstruct the packet when it arrives at the destination host, when fragmentation occurs;

• identifies the order in which to place the packet fragment in the reconstruction.

More Fragments (MF) flag• is a single bit in the Flag field used with the Fragment Offset

for the fragmentation and reconstruction of packets;• is set MF = 1 - the fragment is not the last fragment of a

packet. The receiving host examines the Fragment Offset to see where the fragment is to be placed in the reconstructed packet.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 23: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

232323© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

IPv4 Packet Header FieldsMore Fragments (MF) flag• frame with the MF = 0 and a non-zero value in the Fragment

offset. The receiving host places that fragment as the last part of the reconstructed packet.

• MF = 0, fragment offset =0 - an unfragmented packet has all zero fragmentation information.

Don't Fragment (DF) flag• is a single bit in the Flag field;• indicates that fragmentation of the packet is not allowed;• if is set, then fragmentation of this packet is NOT permitted;• if a router needs to fragment a packet to allow it to be

passed downward to the Data Link layer but the DF bit is set to 1, then the router will discard this packet.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 24: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

242424© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IPv4 Packet Header Fields

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 25: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

252525© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)

IPv4 Packet Header FieldsVersion• IP version number (4);Header Length (IHL)• size of the packet header; Packet Length• entire packet size, including header and data, in bytes; Identification• used for uniquely identifying fragments of an original IP packet;Header Checksum• used for error checking the packet header;Options• additional fields in the IPv4 header to provide other services but

these are rarely used.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 26: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

262626© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IPv4 Packet Header Fields

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 27: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

272727© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)IPv4 Packet Header Fields

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 28: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

282828© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)Typical IP Packet

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 29: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

292929© 2004, Cisco Systems, Inc. All rights reserved.

Internet Protocol (IPv4)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 minimum 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.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 30: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

303030© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Subnetworks or subnets• smaller networks that were interconnected.

Networks can be grouped based on factors:• Geographic location• Purpose• Ownership

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 31: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

313131© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Dividing Networks - Geographic location

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 32: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

323232© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Dividing Networks - Purpose

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 33: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

333333© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Dividing Networks - Ownership

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 34: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

343434© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into NetworksGrouping Hosts - Geographic location

Grouping hosts at the same location (each building on a campus or each floor of a multi-level building) into separate networks can improve network management and operation.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 35: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

353535© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into NetworksGrouping Hosts - Purpose

Dividing networks based on usage facilitates the effective allocation of network resources as well as authorized access to those resources.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 36: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

363636© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into NetworksGrouping Hosts - Ownership

Using an organizational basis (company, department) for creating networks assists in controlling access to thedevices and data as well as the administration of thenetworks.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 37: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

373737© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Common issues with large networks:

• Performance degradation• Security issues• Address Management

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 38: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

383838© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Performance degradation• Large numbers of hosts connected to a single network can produce volumes of data trafficthat may stretch, if not overwhelm, network resources such as bandwidth and routing capability.Overhead• network management and control traffic;• in addition to the actual data communications between hosts, overhead also increases with the number of hosts;• a significant contributor to this overhead can be network broadcasts.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 39: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

393939© 2004, Cisco Systems, Inc. All rights reserved.

Broadcast and Broadcast Domain

Broadcast• is a message sent from one host to all other

hosts on the network;• initiated by the host when information about

another unknown host is required;• is a necessary and useful tool used by protocols

to enable data communication on networks;• large numbers of hosts generate large numbers

of broadcasts that consume network bandwidth;Broadcast domain = network• Broadcasts are contained within a network;

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 40: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

404040© 2004, Cisco Systems, Inc. All rights reserved.

Broadcast and Broadcast DomainEvery host has to process the broadcast packet it receives, the other productive functions that a host is performing are also interrupted or degraded.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 41: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

414141© 2004, Cisco Systems, Inc. All rights reserved.

Broadcast and Broadcast DomainIncreasing network performanceManaging the size of broadcast domains by dividing a network into subnets ensures that network and host performances are not degraded to unacceptable levels

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 42: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

424242© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks

Dividing a large network can increase network security

Dividing a network based on user access is a means to secure communications and data from unauthorized access by users both within the organization and outside it.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 43: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

434343© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks and Hierarchical Addressing

Gateway

• is a router on a network that serves as an exit from that network; • the hosts only need to know theaddress of an intermediary device(gateway), to which they send packets for all other destinations addresses.

• Communication problems that emerge when very large numbers of devices are included in one large network

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 44: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

444444© 2004, Cisco Systems, Inc. All rights reserved.

Grouping Devices into Networks and Hierarchical Addressing

Gateway

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 45: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

454545© 2004, Cisco Systems, Inc. All rights reserved.

Hierarchical Addressing

Hierarchical addressing - solves the problem of devices communicating across networks of networks

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 46: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

464646© 2004, Cisco Systems, Inc. All rights reserved.

Hierarchical Addressing

Hierarchical address:• uniquely identifies each host;• has levels that assist in forwarding packets

across internetworks, which enables a network to be divided based on those levels.

• Layer 3 addresses supply the network portionof 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;

• the whole destination address of the host will have been used to deliver the packet.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 47: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

474747© 2004, Cisco Systems, Inc. All rights reserved.

Hierarchical Addressing

Logical IPv4 address

• is 32-bit;• is hierarchical;• is made up of two parts:

- first part - identifies the network;- second part - identifies a host on that

network;• is divided in four groups of eight bits (octets);• each octet is converted to its decimal value and the complete address written as the four decimal values separated by a dot (period).For example:192.168.18.57

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 48: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

484848© 2004, Cisco Systems, Inc. All rights reserved.

Hierarchical AddressingPrefix length• number of bits of an address used as the network portion;Subnet mask• separate 32-bit number indicates the prefix.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 49: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

494949© 2004, Cisco Systems, Inc. All rights reserved.

Gateway and Next-hop Address

Intermediary gateway device• allows devices to communicate across sub-divided networks.

Gateway address (default gateway)• is the address of a router interface that is connected to the same network as the host;• is used by the hosts to forward a packet outside the local network;

Next-hop address• an address of the next-hop router that offers a path to the destination network.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 50: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

505050© 2004, Cisco Systems, Inc. All rights reserved.

Default GatewayDefault Gateway

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 51: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

515151© 2004, Cisco Systems, Inc. All rights reserved.

Packet ForwardingSteps of an IP packet as it traverses unchanged via routers from sub network to sub-network

1

2

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 52: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

525252© 2004, Cisco Systems, Inc. All rights reserved.

Packet ForwardingSteps of an IP packet as it traverses unchanged via routers from sub network to sub-network

3

4

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 53: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

535353© 2004, Cisco Systems, Inc. All rights reserved.

Default GatewayBoth the host IPv4 address and the gateway address must have the same network

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 54: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

545454© 2004, Cisco Systems, Inc. All rights reserved.

Default GatewayIPconfig commands• used to view IP address of the default gateway of

a host by issuing the at the command line of a Windows computer;

Route commands - is used in a Linux or UNIX host.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 55: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

555555© 2004, Cisco Systems, Inc. All rights reserved.

Routing Process

Routing

• router makes a forwarding decision for each packet that arrives at the gateway interface;• to forward a packet to a destination network, the router requires a route to that network;• if a route to a destination network does notexist, 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 indicatethe next-hop router to which the packet is tobe forwarded, not the final router.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 56: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

565656© 2004, Cisco Systems, Inc. All rights reserved.

Routing ProcessRouting process uses a route to map the destination network address to the next hop and then forwards the packet to this next-hop address.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 57: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

575757© 2004, Cisco Systems, Inc. All rights reserved.

Routing TableRouting table• stores information about connected and remote

networks;Connected networks• are directly attached to one of the router interfaces;Remote networks• networks that are not directly connected to the

router;• routes to these networks can be:

- manually configured on the router by the network administrator;

- learned automatically using dynamic routing protocols.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 58: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

585858© 2004, Cisco Systems, Inc. All rights reserved.

Routing Table

Main features of theroutes in a routing table:

• Destination network• Next-hop• Metric

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 59: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

595959© 2004, Cisco Systems, Inc. All rights reserved.

Default Route

Default Route• if a route representing the destination

network is not on the routing table, the packet will be dropped (that is, not forwarded);

• the matching route could be either a connected route or a route to a remotenetwork;

• used by the router to forward the packet;• is used when the destination network is

not represented by any other route in the routing table.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 60: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

606060© 2004, Cisco Systems, Inc. All rights reserved.

Host Routing TableHosts:• create the routes used to forward the packets it

originates;• these routes are derived from the connected network

and the configuration of the default gateway. • automatically add all connected networks to the routes; • require a local routing table to ensure that Network

layer packets are directed to the correct destination network;

Host Routing Table• contains its direct connection or connections to the

network and its own default route to the gateway;• configuring the default gateway address on the host

creates the local default route.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 61: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

616161© 2004, Cisco Systems, Inc. All rights reserved.

Host Routing TableHost routing table can be examined at the command line by issuing the netstat -r, route, or route PRINT commands

Route command• used to modify the routing table contents:Options:- route ADD- route DELETE- route CHANGE

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 62: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

626262© 2004, Cisco Systems, Inc. All rights reserved.

Routing Table EntriesRoute• the destination network shown in a routing

table entry;• represents a range of host addresses and

sometimes a range of network and host addresses.

Hierarchical nature of Layer 3 addressing means:• that one route entry could refer to a large

general network;• another entry could refer to a subnet of that

same network;• when forwarding a packet, the router will select

the most specific route.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 63: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

636363© 2004, Cisco Systems, Inc. All rights reserved.

Routing Table Entries

Route selectionfor the packetgoing to 10.1.1.55:

• 10.1.1.0• 10.1.0.0• 10.0.0.0• 0.0.0.0 (Default route if

configured)• Dropped

destination address 10.1.1.55

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 64: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

646464© 2004, Cisco Systems, Inc. All rights reserved.

Default RouteDefault Route• is a route that will match all destination networks;• a router can be configured to have a default route;• uses the address 0.0.0.0 (in IPv4 networks);• 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.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 65: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

656565© 2004, Cisco Systems, Inc. All rights reserved.

Next HopNext-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;

• some routes can have multiple next-hops. This indicates that there are multiple paths to the same destination network.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 66: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

666666© 2004, Cisco Systems, Inc. All rights reserved.

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding

Forward the packet to the next-hop router

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 67: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

676767© 2004, Cisco Systems, Inc. All rights reserved.

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding

Forward the packet using the default route

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 68: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

686868© 2004, Cisco Systems, Inc. All rights reserved.

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding

Do not forward the packet – IP packet is dropped

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 69: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

696969© 2004, Cisco Systems, Inc. All rights reserved.

Routing ProcessRouting Table - contains the information that a router uses in the packet forwarding decisions

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 70: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

707070© 2004, Cisco Systems, Inc. All rights reserved.

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding

Static Routing - depends on manuallyentered routes in routing table

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 71: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

717171© 2004, Cisco Systems, Inc. All rights reserved.

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding

Routing protocols – the set of rules by whichrouters dynamically share their routing information

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 72: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

727272© 2004, Cisco Systems, Inc. All rights reserved.

Dynamic Routing – Routing Protocols

Common routing protocols:• Routing Information Protocol (RIP)

• Enhanced Interior Gateway Protocol(EIGRP)

• Open Shortest Path First (OSPF)

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 73: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

737373© 2004, Cisco Systems, Inc. All rights reserved.

Static and Dynamic Routing Routing protocols• provide all routers have accurate up-to-date routing

tables that are updated dynamically and can learn aboutroutes to remote networks that are many hops way;

• the exchange of route information adds overhead that consumes network bandwidth;

• the routers employing routing protocols must havesufficient processing capacity to:

- implement the protocol's algorithms;- perform timely packet routing and forwarding.

Static routing• does not produce any network overhead;• places entries directly into the routing table;• no processing is required by the router;• the cost for static routing is administrative - the manual

configuration and maintenance of the routing table to ensure efficient and effective routing.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 74: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

747474© 2004, Cisco Systems, Inc. All rights reserved.

Summary

PDF created with pdfFactory Pro trial version www.pdffactory.com

Page 75: CCNA Exploration1 Chapter 5: OSI Network Layer...2002/05/22  · decapsulated by the Network layer ; • the Layer 4 PDU contained in the packet is passed up to the appropriate service

© 2004, Cisco Systems, Inc. All rights reserved.

PDF created with pdfFactory Pro trial version www.pdffactory.com