Ccna1 M10 Routing Fundamentals Subnets

  • Uploaded by: PankajSharma
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ccna1 M10 Routing Fundamentals Subnets as PDF for free.

More details

  • Words: 2,027
  • Pages: 29
CCNA – Semester1

Module 10 Routing Fundamentals and Subnets

Objectives

• Routed protocol • IP routing protocols • The mechanics of subnetting

Internet Protocol - Routed

Routed protocols • A routed protocol allows the router to forward data between different networks • In order for a protocol to be routable, it must provide the ability to assign a network number and a host number to each individual device. • The network address is obtained by ANDing the address with the network mask.

Routed protocols

Connection oriented network services

• •

A connection is established between the sender and the recipient before any data is transferred. All packets travel sequentially across the same circuit, or more commonly, across the same virtual circuit.

Connectionless network services

• •

Each packet is treated separately When the packets pass from source to destination, they can: – Switch to different paths. – Arrive out of order.

IP as a Routed Protocol • IP is a connectionless, unreliable, best-effort delivery protocol. • IP does not verify that the data reached its destination. This function is handled by the upper layer protocols.

Packet Propagation

Process in Router

IP header format

20 bytes

IP header format: Version

•• ••

44 bits. bits. Indicates Indicates the the version version of of IP IP currently currently used. used. –– ––

IPv4 IPv4::0100 0100 IPv6 IPv6::0110 0110

IP header format: Header length

•• ••

44 bits. bits. IP IP header header length length :: Indicates Indicates the the datagram datagram header header length length in in 32 32 bit bit words words (4 (4 bits), bits), and and thus thus points points to to the the beginning beginning of of the the data. data.

IP header format: Service type

•• ••

88 bits. bits. Specifies Specifies the the level level of of importance importance that that has has been been requested requested for for this this datagram datagram by by an an upper-layer upper-layer protocol. protocol. •• •• ••

Precedence. Precedence. Reliability. Reliability. Speed. Speed.

IP header format: Total length

•• ••

16 16 bits. bits. Specifies Specifies the the length length in inbytes bytes of of the the entire entire IP IP packet, packet, including including data data and and header. header.

IP header format: Identification

•• ••

16 16 bits. bits. Contains Contains an an integer integer that that identifies identifies the the current current datagram. datagram. •• Assigned Assigned by by the the sender sender to to aid aid in in assembling assembling the the fragments fragments of of aa datagram. datagram.

IP header format: Flags

•• ••

33 bits. bits. The The second second bit bit specifying specifying whether whether the the packet packet can can be be fragmented fragmented .. •• The The last last bit bit specifying specifying whether whether the the packet packet is is the the last last fragment fragment in in aa series series of of fragmented fragmented packets. packets.

IP header format: Fragment offset

•• 13 13 bits. bits. •• Used Usedwith withfragmented fragmenteddatagrams, datagrams,to toaid aidin in reassembly reassemblyof ofthe thefull fulldatagram. datagram. •• Is Isthe thenumber numberof of64-bit 64-bitpieces pieces(header (headerbytes bytes are not counted) that are contained in are not counted) that are contained in earlier earlierfragments. fragments. •• In Inthe thefirst first(or (oronly) only)fragment, fragment,this thisvalue valueisis always alwayszero. zero.

IP header format: Time to Live

•• 88bits, bits,specifies specifiesthe thetime timeand anddistance distancethis this datagram datagramisisallowed allowedto totravel. travel. •• Each Eachrouter routerrouting routingthis thisdatagram datagramsubtracts subtracts from fromthis thisfield fieldits itsprocessing processingtime timefor forthis this datagram, which gradually decreases datagram, which gradually decreasesit. it. •• ItIthelps helpsprevent preventpackets packetsfrom fromlooping looping endlessly. endlessly.

IP header format: Protocol

•• Indicates Indicates which which upper upper protocol protocol receives receives incoming incoming packets packets after after IP IP processing processing has has been been completed completed •• •• ••

06 06::TCP TCP 17 17::UDP UDP 01: ICMP 01: ICMP

IP header format: Header checksum

•• ••

16 16 bits. bits. A A checksum checksum on on the the header header only, only, helps helps ensure ensure IP IP header header integrity. integrity.

IP header format: Addresses

•• •• ••

32 32 bits bits each. each. Source Source IP IP Address Address Destination Destination IP IP Address Address

IP header format: Options

•• ••

Variable Variable length. length. Allows Allows IP IP to to support support various various options, options, such such as as security, security, route, route, error error report report ... ...

IP header format: Padding

•• The The header header padding padding is is used used to to ensure ensure that that the the internet internet header header ends ends on on aa 32 32 bit bit boundary. boundary.

IP header format: Padding

•• Contains Containsupper-protocol upper-protocolinformation, information, variable length up to 64 Kb. variable length up to 64 Kb.



www.ietf.org and RFC-760.

IP Routing Protocol

Routing Overview • •



Routing is an OSI Layer 3 function. Routing is the process of finding the most efficient path from one device to another. Two key functions of router: – maintain routing tables – use the routing table to forward packets

Layer 2 Switching and Layer 3 Routing

Routing vs. Switching

Routing Protocol •

Routing protocols allow routers to choose the best path for data from source to destination. A routing protocol functions includes the following: – Provides processes for sharing route information – Allows routers to communicate with other routers to update and maintain the routing tables



Eg:RIP, IGRP, OSPF, EIGRP, BGP

Routed vs. Routing protocol

ols ed c o t rot rou ets p ng how pack i t u Ro rmine route s te de tocol pro

Path Determination • Path determination enables a router to compare the destination address to the available routes in its routing table, and to select the best path. • The router uses path determination to decide which port an incoming packet should be sent out of to travel on to its destination.

Routing Tables • Routing tables contain the information of a route to forward data packets across connected networks : – – – –

Protocol type Destination/next-hop associations Route metric and routing protocol reliability Outbound interfaces

Routing Algorithms • Routing protocols often have one or more of the following design goals: – – – – –

Optimization Simplicity and low overhead Robustness and stability Flexibility Rapid convergence

Routing Metrics •

Metrics can be based on a single characteristic of a path, or can be calculated based on several characteristics. The following are the metrics that are most commonly used by routing protocols: – – – – –

Bandwidth: The data capacity of a link Delay: The length of time required to move a packet along each link Load: The amount of activity on a network resource Reliability: Usually a reference to the error rate Hop count: The number of routers that a packet must travel through before reaching its destination – Ticks: delay on a data link using IBM PC clock ticks. One tick is approximately 1/18 second. – Cost: An arbitrary value, usually based on bandwidth, monetary expense, or other measurement, that is assigned by a network administrator.

IGP and EGP • An autonomous system is a network or set of networks under common administrative control. • Two families of routing protocols are: – Interior Gateway Protocols(IGPs): exchange routes within an autonomous system. Eg: RIP, IGRP, OSPF, IS-IS…

– Exterior Gateway Protocols(EGPs): exchange routes between autonomous systems. Eg: BGP

Link state and distance vector • Distance-Vector Protocols (RIP, IGRP, EIGRP): – – – –

View network topology from neighbor’s perspective. Add distance vectors from router to router. Frequent, periodic updates. Pass copy of routing tables to neighbor routers.

• Link State Protocols (OSPF, IS - IS): – – – –

Gets common view of entire network topology. Calculates the shortest path to other routers. Event-triggered updates, respond quickly to network changes . Passes link state advertisement, known as link-state refreshes, to other routers.

Distance vector routing

Link state routing

The Mechanics of Subnetting

Why we need to divide network? • Network administrators sometimes need to divide networks, especially large ones, into smaller networks: – Reduce the size of a broadcast domain. – Support basic network security. – Implement the hierarchical managements.

• So we need more network addresses for your network. But I want the outside networks see our network as a single network.

Subnetting • •

Subnetworks are smaller divisions of network. To create a subnet address, a network administrator borrows bits from the original host portion and designates them as the subnet field.

How ? By using subnet mask

Subnet mask • “Extended Network Prefix”. • Determines which part of an IP address is the network field and which part is the host field. • 32 bits long. • Divided into four octets. • Network and Subnet portions all 1’s. • Host portions all 0’s.

Default subnet mask: Example • • • • •

192.168.2.100 / 255.255.255.0. 11000000.10101000.00000010.01100100. 11111111.11111111.11111111.00000000. 11000000.10101000.00000010.01100100. Class C network: – 24 bits for network portion. – 0 bits for subnet portion. – 8 bits for host portion.

• Subnet address: 192.168.2.0

Subnet mask: Example • • • • •

172.16.65.100 / 255.255.240.0. 10101100.00010000.01000001.01100100. 11111111.11111111.11110000.00000000. 10101100.00010000.01000001.01100100. Class B network: – 16 bits for network portion. – 4 bits for subnet portion. – 12 bits for host portion.

• Subnet address: 172.16.64.0.

How many bits can I borrow? • All of subnet bits are: – 0 : reserved for network address. – 1 : reserved for broadcast address.

• The minimum bits you can borrow is:  2 bits. • The maximum bits you can borrow is:  Number of host bits -2 bits • Slash mask is the sum total of all bits assigned to the subnet field plus the fixed network bits. So 172.16.1.100 with subnet mask 255.255.240.0 may be written as 172.16.1.100/20

Subnetting example

• Given network 172.16.0.0. • We need 8 usable subnets and up to 1000 hosts on each subnet.

Calculating a subnet 1. Determine the class of network and default subnet mask. 2. Determine how many bits to borrow. Determine the subnet mask and the actual number of subnets and hosts. 3. Determine the ranges of host address for each subnet. Choose the subnets that you want to use.

Calculating a subnet: STEP 1 • Determine the Class of network xClass B • Determine the default subnet mask x255.255.0.0

Calculating a subnet: STEP 2 • Number of subnets <= 2n - 2 with n is number of bits that are borrowed. • Number of hosts <= 2m - 2 with m is number of remaining bits. • Determine how many bits to borrow from the host portion from requirement: – 8 subnets. – 1000 hosts on each subnet. • Choose n = 4: – Number of possible subnets is: 24 - 2 = 14 – Number of possible hosts on each subnet is: 2(16-4) - 2 = 4094

Calculating a subnet: STEP 2 (Cont.)

xThe subnet mask: 255.255.240.0.

Calculating a subnet: STEP 3 (Cont.) • Determine the subnets from 4 borrowed bits from the host portion (last 2 bytes): • 1st subnet: .00000000.00000000 • 2nd subnet: .00010000.00000000 • 3rd subnet: .00100000.00000000 • … • 15th subnet: .11110000.00000000

Calculating a subnet: STEP 3 (Cont.) N o

Sub-network address

Possible host address

Broadcast address

Use ?

0

172.16.0.0

172.16.0.1 – 172.16.15.254

172.16.15.255

N

1

172.16.16.0

172.16.16.1 – 172.16.31.254

172.16.31.255

Y

2

172.16.32.0

172.16.32.1 – 172.16.47.254

172.16.47.255

Y

..

..

..

..

..

..

..

..

..

..

13

172.16.208.0

172.16.208.1 – 172.16.223.254

172.16.223.255

Y

14

172.16.224.0

172.16.224.1 – 172.16.239.254

172.16.239.255

Y

15

172.16.240.0

172.16.240.1 – 172.16.255.254

172.16.255.255

N

Calculating a subnet: STEP 3 (Cont.)

• Using subnets No.1 to No.8. • Assign IP addresses to hosts and interfaces on each network. IP address configuration.

Lab Companion • 10.3.5b Subnetting a Class A Network • 10.3.5c Subnetting a Class B Network • 10.3.5d Subnetting a Class C Network

Summary • • • • • • • •

Router protocol Connection-oriented vs. connectionless Process in router IP packet structure Routing protocol and routing table Routing algorithm and metrics Routing categories Subnetting and calculate subnetworks

Related Documents

M10
October 2019 20
Routing
November 2019 34
Routing
November 2019 34
Routing
November 2019 36

More Documents from ""