Switching and Routing

needleorderΔίκτυα και Επικοινωνίες

24 Οκτ 2013 (πριν από 3 χρόνια και 5 μήνες)

103 εμφανίσεις

Switching and Routing

BCS/BS Elective


Spring 2012


Dr.
Husnain

Mansoor

Ali

Lecture 4,5 and 6


18
th
, 23
rd

and 25
th

January
2012

SZABIST

Today's Lecture


Internet layer Protocols


ARP


RARP



IP Addressing


Subnetting

basics


How to create subnets


Subnet masks and CIDR


Class C
subnetting


Class B
subnetting

Internet Layer Protocols


Internet Protocol (IP) (RFC 791)



Internet Control Message Protocol
(ICMP)



Address Resolution Protocol (ARP)



Reverse Address Resolution Protocol
(RARP)


ARP

finds hardware address of a host from a known IP address

ARP Header example

Ethernet Header

Destination: FF:FF:FF:FF:FF:FF

Ethernet Broadcast

Source: 00:A0:24:48:60:A5

Protocol Type: 0x0806
IP ARP

ARP
-

Address Resolution Protocol

Hardware: 1 Ethernet
(10Mb)

Protocol: 0x0800
IP

Hardware Address Length: 6

Protocol Address Length: 4

Operation: 1
ARP Request

Sender Hardware Address: 00:A0:24:48:60:A5

Sender Internet Address: 172.16.10.3

Target Hardware Address: 00:00:00:00:00:00
(ignored)

Target Internet Address: 172.16.10.10

Extra bytes (Padding):

................ 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A

0A 0A 0A 0A 0A

Frame Check Sequence: 0x00000000

RARP

IP Addressing


An IP address is a numeric identifier
assigned to each machine on an IP network



It designates the specific location of a
device on the network



IP addressing was designed to allow hosts
on one network to communicate with a host
on a different network regardless of the
type of LANs the hosts are participating in

IP Terminology


BIT:

A bit is one digit, either a 1 or a 0.


BYTE:

A byte is 7 or 8 bits, depending on whether parity is used. For the
rest of this chapter, always assume a byte is 8 bits.


OCTET:

An octet, made up of 8 bits, is just an ordinary 8
-
bit binary
number. In this chapter, the terms byte and octet are completely
interchangeable.


Network address:
This is the designation used in routing to send
packets to a remote network

for example, 10.0.0.0, 172.16.0.0, and
192.168.10.0.


Broadcast address:
The address used by applications and hosts to send
information to all nodes on a network is called the broadcast address.


Network Addressing

Subdividing an IP address into a network and
node address is determined by the class
designation of one’s network. This figure
summarizes the three classes of networks


Reserved Addressing



Address




Function


Network address of all 0s

Interpreted to mean ―this network or






segment.‖


Network address of all 1s

Interpreted to mean ―all networks.‖


Network 127.0.0.1


Reserved for loopback tests.


Node address of all 0s



Interpreted to mean ―network address‖ or






any host on specified network.


Node address of all 1s



Interpreted to mean ―all nodes‖ on the






specified network


Entire IP address set to all 0s

Used by Cisco routers to designate the






default route. Could also mean ―any






network.‖


Entire IP address set to all 1s

(same as Broadcast to all nodes on the






current network; 255.255.255.255)






sometimes called an ―all 1s broadcast‖ or






limited broadcast


Private Addressing


Address Class




Reserved Address Space


Class A


10.0.0.0 through














10.255.255.255


Class B



172.16.0.0 through














172.31.255.255


Class C



192.168.0.0 through














192.168.255.255

IP Address Demonstration

Subnetting

Basics


Benefits of
subnetting

include:


Reduced network traffic


Optimized network performance


Simplified management


Facilitated spanning of large geographical
distances.


Subnet Masks


Used to define which part of the host
address will be used as the subnet
address



A 32
-
bit value that allows the
recipient of IP packets to distinguish
the network ID portion of the IP
address from the host ID portion


Default Subnet Masks

How To Create Subnets

Take bits from the host portion of the IP address
and reserve them to define the subnet address

Classless Inter
-
Domain Routing
(CIDR)

Used to allocate an amount of IP
address space to a given entity
(company, home, customer, etc).

Example: 192.168.10.32/28

The slash notation (/) means how
many bits are turned on (1s) and tells
you what your subnet mask is


CIDR Values

Subnetting

Class C Addresses

In a Class C address, only 8 bits are available for defining the
hosts. Remember that subnet bits start at the left and go to
the right, without skipping bits. This means that the only
Class C subnet masks can be the following:


Binary Decimal CIDR

---------------------------------------------------------

10000000 = 128 /25

11000000 = 192 /26

11100000 = 224 /27

11110000 = 240 /28

11111000 = 248 /29

11111100 = 252 /30

Subnetting

Class C Addresses

How Many Subnets?


2
x

= number of subnets.


X is the number of masked bits, or the
1s.


For example, in 11000000, the number
of ones gives us 2
2

subnets. In this
example there are 4 subnets.


How Many Hosts Per Subnet?


2
y
-
2 = number of hosts per subnet.


Y is the number of unmasked bits, or the
0s.


For example, in 11000000, the number
of zeros gives us 2
6
-
2 hosts. In this
example, there are 62 hosts per subnet.


What Are The Valid Subnets?


256
-
subnet mask = block size, or
base number.


For example 256
-
192=64. 64 is the
first subnet. The next subnet would
be the base number plus itself or
64+64=128, (the second subnet).


What’s The Broadcast Address
For Each Subnet?



The broadcast address is all host
bits turned on, which is the number
immediately preceding the next
subnet


What Are The Valid Hosts?



Valid hosts are the number
between the subnets, omitting all
0s and all 1s.