CCNA1 M10 Routing Fundamentals Subnets

Embed Size (px)

Citation preview

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    1/29

    CCNA Semester1

    Module 10

    Rout ing Fundam ent a ls and Subnet s

    Objectives

    Routed protocol

    IP routing protocols

    The mechanics of subnetting

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    2/29

    Internet Protocol - Routed

    Routed protocols

    A routed protocol allows the router to forwarddata between different networks

    In order for a protocol to be routable, it must

    provide the ability to assign a network numberand a host number to each individual device.

    The network address is obtained by ANDing theaddress with the network mask.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    3/29

    Routed protocols

    Connection oriented network services

    A connection is established between the sender and therecipient before any data is transferred.

    All packets travel sequentially across the same circuit, or

    more commonly, across the same virtual circuit.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    4/29

    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-effortdelivery protocol.

    IP does not verify that

    the data reached itsdestination. Thisfunction is handled bythe upper layerprotocols.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    5/29

    Packet Propagation

    Process in Router

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    6/29

    IP header format

    20bytes

    IP header format: Version

    4 bits.

    Indicates the version ofIP currently used.

    IPv4 : 0100

    IPv6 : 0110

    4 bits.

    Indicates the version ofIP currently used.

    IPv4 : 0100

    IPv6 : 0110

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    7/29

    IP header format: Header length

    4 bits.

    IP header length : Indicates thedatagram header length in 32 bitwords (4 bits), and thus points to

    the beginning of the data.

    4 bits.

    IP header length : Indicates thedatagram header length in 32 bitwords (4 bits), and thus points to

    the beginning of the data.

    IP header format: Service type

    8 bits.

    Specifies the level of importancethat has been requested for thisdatagram by an upper-layerprotocol.

    Precedence.

    Reliability. Speed.

    8 bits.

    Specifies the level of importancethat has been requested for thisdatagram by an upper-layerprotocol.

    Precedence.

    Reliability. Speed.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    8/29

    IP header format: Total length

    16 bits.

    Specifies the length in bytes ofthe entire IP packet, includingdata and header.

    16 bits.

    Specifies the length in bytes ofthe entire IP packet, including

    data and header.

    IP header format: Identification

    16 bits.

    Contains an integer that identifiesthe current datagram.

    Assigned by the sender to aid in

    assembling the fragments of adatagram.

    16 bits.

    Contains an integer that identifiesthe current datagram.

    Assigned by the sender to aid inassembling the fragments of adatagram.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    9/29

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    10/29

    IP header format: Time to Live

    8 bits, specifies the time and distance thisdatagram is allowed to travel.

    Each router routing this datagram subtractsfrom this field its processing time for this

    datagram, which gradually decreases it. It helps prevent packets from looping

    endlessly.

    8 bits, specifies the time and distance thisdatagram is allowed to travel.

    Each router routing this datagram subtractsfrom this field its processing time for thisdatagram, which gradually decreases it.

    It helps prevent packets from loopingendlessly.

    IP header format: Protocol

    Indicates which upper protocolreceives incoming packets after IPprocessing has been completed 06 : TCP

    17 : UDP 01: ICMP

    Indicates which upper protocolreceives incoming packets after IPprocessing has been completed 06 : TCP

    17 : UDP

    01: ICMP

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    11/29

    IP header format: Header checksum

    16 bits.

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

    16 bits.

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

    IP header format: Addresses

    32 bits each.

    Source IP Address

    Destination IP Address

    32 bits each.

    Source IP Address

    Destination IP Address

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    12/29

    IP header format: Options

    Variable length.

    Allows IP to support variousoptions, such as security, route,error report ...

    Variable length.

    Allows IP to support variousoptions, such as security, route,error report ...

    IP header format: Padding

    The header padding is used to

    ensure that the internet header endson a 32 bit boundary.

    The header padding is used to

    ensure that the internet header endson a 32 bit boundary.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    13/29

    IP header format: Padding

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

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

    www.ietf.org and RFC-760.

    IP Routing Protocol

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    14/29

    Routing Overview

    Routing is an OSI Layer 3function.

    Routing is the process offinding the most efficient path

    from one device to another. Two key functions of router:

    maintain routing tables

    use the routing table to forwardpackets

    Layer 2 Switching and Layer 3 Routing

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    15/29

    Routing vs. Switching

    Routing Protocol

    Routing protocols allowrouters to choose the bestpath for data from source todestination. A routingprotocol functions includes

    the following: Provides processes for

    sharing route information

    Allows routers to

    communicate with otherrouters to update andmaintain the routing tables

    Eg:RIP, IGRP, OSPF, EIGRP,BGP

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    16/29

    Routed vs. Routing protocol

    Routi

    ngproto

    cols

    Routi

    ngproto

    cols

    determ

    ineho

    wrou

    ted

    determ

    ineho

    wrou

    ted

    protoc

    ols

    protoc

    olsrou

    tepack

    ets

    routep

    ackets

    Path Determination

    Path determination enables a router to compare thedestination address to the available routes in itsrouting table, and to select the best path.

    The router uses path determination to decide which

    port an incoming packet should be sent out of totravel on to its destination.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    17/29

    Routing Tables

    Routing tables contain the information of a route toforward 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 thefollowing design goals: Optimization

    Simplicity and low overhead

    Robustness and stability

    Flexibility

    Rapid convergence

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    18/29

    Routing Metrics

    Metrics can be based on a single characteristic of a path, orcan be calculated based on several characteristics. Thefollowing are the metrics that are most commonly used byrouting 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 throughbefore reaching its destination

    Ticks: delay on a data link using IBM PC clock ticks. One tick isapproximately 1/18 second.

    Cost: An arbitrary value, usually based on bandwidth, monetaryexpense, or other measurement, that is assigned by a networkadministrator.

    IGP and EGP

    An autonomous system is a network or set of networksunder 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

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    19/29

    Link state and distance vector

    Distance-Vector Protocols (RIP, IGRP, EIGRP): View network topology from neighbors 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

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    20/29

    Link state routing

    The Mechanics of Subnetting

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    21/29

    Why we need to divide network?

    Network administrators sometimes need to dividenetworks, 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 asingle network.

    Subnetting

    Subnetworks are smaller divisions of network.

    To create a subnet address, a network administrator borrowsbits from the original host portion and designates them as thesubnet field.

    How ?

    By using subnetmask

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    22/29

    Subnet mask

    Extended Network Prefix.

    Determines which part of an IP address is thenetwork field and which part is the host field.

    32 bits long. Divided into four octets.

    Network and Subnet portions all 1s.

    Host portions all 0s.

    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

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    23/29

    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 tothe subnet field plus the fixed network bits. So172.16.1.100 with subnet mask 255.255.240.0 maybe written as 172.16.1.100/20

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    24/29

    Subnetting example

    Given network 172.16.0.0.

    We need 8 usable subnets and up to1000 hosts on each subnet.

    Calculating a subnet

    1. Determine the class of network anddefault subnet mask.

    2. Determine how many bits to borrow.

    Determine the subnet mask and theactual number of subnets and hosts.

    3. Determine the ranges of host address foreach subnet. Choose the subnets thatyou want to use.

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    25/29

    Calculating a subnet: STEP 1

    Determine the Class of network

    Class B

    Determine the default subnet mask

    255.255.0.0

    Calculating a subnet: STEP 2

    Number of subnets

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    26/29

    Calculating a subnet: STEP 2 (Cont.)

    The subnet mask: 255.255.240.0.

    Calculating a subnet: STEP 3 (Cont.)

    Determine the subnets from 4 borrowedbits from the host portion (last 2 bytes):

    1st subnet: .00000000.00000000

    2nd

    subnet: .00010000.00000000 3rd subnet: .00100000.00000000

    15th subnet: .11110000.00000000

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    27/29

    Calculating a subnet: STEP 3 (Cont.)

    No

    Sub-networkaddress

    Possible host addressBroadcastaddress

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

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    28/29

    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

  • 8/14/2019 CCNA1 M10 Routing Fundamentals Subnets

    29/29