Sie sind auf Seite 1von 34

LECTURE 8

Subnetwork
Router
Gateway
Overview
 Subnet Work
 Subnet Addresses
 Benefits

 Subnet Mask

 Subnet Planning

 Router
 Functions
 Protocols

 Interface Port

 Types

 Gateway
 Introduction
 Types
Subnetwork: Introduction

Network administrators sometimes need to divide


networks, especially large ones, into smaller
networks
These smaller divisions are called subnetworks
and provide addressing flexibility.
 Most of the time subnetworks are simply referred
to as subnets.
Subnet: Addresses
Subnet: Addresses
Subnetting provides a third level of hierarchy in
addressing.

 The three levels are:


 Network ID – defines the site
 Subnet ID – defines the physical subnet

 Host ID - defines the connection of the hosts of the

subnetwork
Subnet: Addresses
 The subnet field and the host field are created
from the original host portion of the entire network

Any number of bits can be borrowed as long as


two bits remains.
Subnet: Addresses
Subnet: Benefits

Some of the benefits of subnetworking


includes the following
 Reduce network traffic

Reduce the size of the broadcast domain
 Optimize network performance
 Simplified management
Facilitate spanning of large geographical
distances
Subnet Mask

Subnet masking is the process that extracts the


physical network address from an IP address.
Subnet Mask

To determine the subnet mask for a particular


subnetwork IP address, follow these steps.
 Express the subnetwork IP address in binary
form.
 Replace the network and subnet portion of the
address with all 1s.
 Replace the host portion of the address with
all 0s.
 As the last step, convert the binary
expression back to dotted-decimal notation.
Masking: Example

 Without subnetting (if no bit is borrowed)

141.14.2.21 Mask 141.14.0.0


255.255.0.0
IP address Network address

 With subnetting (if 8 bit is borrowed for the subnet field)

141.14.2.21 141.14.2.0
Mask
255.255.255.0 Subnetwork address
IP address
Subnet Mask

Finding the network/subnetwork address


involves bitwise AND operator. Hence three rules
are applied.

The bytes in the IP address that corresponds to 255 in the


mask will be repeated in the network/subnetwork address

The bytes in the IP address that corresponds to 0 in the


mask will change to 0 in the network/subnetwork address

 For other bytes, the bit-wise AND operator is used.


Subnet Mask: AND function
Subnet Mask: AND function

IP address 45 . 123 . 22 . 123


Subnet Mask 255 . 192 . 0 . 0
-------------------------------------------------------
Subnet Address 45 . 64 . 0 . 0

The second byte needs the bit-wise AND operation.

123 0 1 1 1 1 0 1 1
192 1 1 0 0 0 0 0 0
--------------------------------------------
64 0 1 0 0 0 0 0 0
Subnet Planning
 Each time you borrow one bit from the host field,
the number of subnets created increases by a power
of 2 (gets doubles).
The formula 2n - 2, where n is the number of bits stolen, gives the
number of USABLE subnetworks created.

 Each time you borrow one bit from the host field,
the number of host addresses that you can assign
decreases by a power of 2 (gets cut in half).

The formula 2m - 2, where m is the number of bits NOT stolen,


gives the number of USABLE host numbers created.
Subnet Planning: Example

Consider a Class C network address


 If there is no subnet mask, all 8 bits in the last octet are used
for the host field. Therefore, there are 256 (28) possible hosts
(254 usable)

 If you borrow 2 bits from the default 8 bit host field, the host
field decreases in size to 6 bits and the total number of
possible hosts that could be assigned in each subnet would be
reduced to 64 (26) (62 usable)

 If you borrow 3 bits, the size of the host field decreases to 5


bits and the total number of hosts in each subnet would be
reduced to 32 (25) (30 usable)
Subnet Planning: Example
Subnet Planning: Assignment

Subnet Planning for Class


A and Class B network
Router: Introduction
Routers are devices that implement the network
service

They provide interface for a wide range of speed


and subnetworks at a wide range of speeds.

Routers are active and intelligent network node


and participate in managing the network

 Support the tasks and goals for network



connectivity,

reliable performance,

management control and

flexibility
Router: Introduction
 Routers can also connect different layer 2
technologies, such as Ethernet, Token-ring, and
FDDI
 Routers are the most important traffic-regulating
devices on large networks
 They enable virtually any type of computer to
communicate with any other computer anywhere in
the world
 They implemented a variety of value added
features (sequencing traffic based of traffic, traffic
filtering) to improve the cost effectiveness of the
network
Functions of Router

A Routers has some primary functions


 To examine incoming packets (layer 3 data)
 Choose the best path for them through the
network

Switch them to the proper outgoing port
 To share path information (the route) with
other routers
Router: Symbols & Protocols

Symbol

Protocols
Router utilizes Routed protocols to direct
network traffic and Routing protocols to
communicate the other routers to update and
maintain Routing tables
Router: Protocols
 Routed protocols
Network protocol that provide sufficient
information in its network layer address to allow a
packet to be forwarded from its host to host based
on addressing scheme.
 Routing protocols
A protocols that accomplished routing through
the implementation of a specific routing algorithm
(hop count, tic count, relative expense).
 Routing tables
A table that keeps track of the routes to
networks and the cost associated with those routes.
Router: Protocols
Routed protocols
 Internet Protocol (IP)
 Internetwork Packet eXchange (IPX)

 DECnet


AppleTalk

NetBEUI is a non-routable protocol

Routing protocols

Routing information Protocol (RIP)

Interior Gateway Routing Protocol (IGRP)

Enhanced Interior Gateway routing Protocol (EIGRP)

Open Shortest Path First (OSPF)
Router: Protocols
Router: Protocols
Routing Table
Router: Interface Port

The figure shows a port interface type. The type shown


is an Ethernet port which is a LAN connection. This particular
router has both a 10BASE-T and AUI connector for the Ethernet
connection.
Router : Layer 3 Device
Router: Types

Routers come in two general types


 Static Router

These routers do not determines the paths.

The network administrator configure the routing table

Sufficient when the network is accessible by only one path

This type of partition is caller stub network

 Dynamic Router

These routers have the capabilities to determine routes

Traffic changes automatically based on the information it
receives from other routers

Success depends on two basic functions
 Maintenance of routing table
 Timely distribution of knowledge
Router: Types
Router: Types
Gateway: Introduction
 Gateways potentially operate in all the seven
layers of the OSI model

 Enables communication between different protocol


systems

 It can accept a packet formatted in one protocol


and convert it to a packet formatted for other
protocols

 A gateway is generally software installed within a


router
Gateway: Types

There are three major types of gateway


 Address Gateway

Connects networks with same protocols

Example: Message Handling Service

 Protocol Gateway

Connects networks that are using different protocols

Translate the source protocol so that the destination
network can understand

 Application Gateway
Converting the contents of one application to one that is
compatible with others