Sunteți pe pagina 1din 60

Network Layer &

Addressing the Network

Network Fundamentals – Chapter 5 & 6

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1
 The basic role of the Network Layer in data networks

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 2
Network Layer Protocols

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 3
 The basic characteristics and the role of the IPv4 protocol
 It is the only Layer 3 protocol that is used to carry user
data over the Internet

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4
 The implications for the use of the IP as it is media
independent

 Source & Destination IP address is added

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 5
 Major header fields in the IPv4 header -Time-to-Live
(TTL) - is an 8-bit binary value that indicates the
remaining "life" of the packet. It prevent endless loop.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6
 Key factors to consider when grouping hosts into a
common network
 Geographic location
 Purpose
 Ownership

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7
 Common issues with large networks are:
 Performance degradation
 Security issues
 Address Management (Broadcast domains)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 8
 Hierarchical addressing solves the problem of devices
communicating across networks of networks

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 9
 Purpose of further subdividing networks into smaller
networks (/24 – Prefix)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 10
 The role of an intermediary gateway device in allowing
devices to communicate across sub-divided networks

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 11
Configure Default Gateway address
Confirm it using – ipconfig command

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12
Routing Table – contains destination network &
next hop address

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13
 The purpose and use of the destination network in a route

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 14
Default route & gateway address

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 15
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 16
 The purpose and use of the next hop in a route – where
the packet will move next
 The router will do one of three things with the packet:
 Forward it to the next-hop router
 Forward it to the destination host
 Drop it

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 17
 The purpose of routing protocols and the need for both
static and dynamic routes

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 18
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 19
Summary
 In IPv4, information used by the router to forward data packets is -
destination network address (network portion)
 Connectionless - destination is not contacted before a packet is sent.
 Use of default gateway – to communicate with other hosts on outside
network.
 When the destination network is not listed in the routing table - The
router discards the packet or forwards the packet out the interface
indicated by the default route entry.
 Default root – 0.0.0.0
 Netstat –r command – used to check gateway add
 Difference between static & dynamic routing
Static used in small network, required NA all the time, require less
bandwidth
Dynamic used in large network, not required NA all the time, require
more bandwidth to circulate packets
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Three types of IPv4 addresses in the network –
Host Add, Broadcast Add & network Add

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 21
 Three types of communication in the Network Layer -
 Unicast -Sending a packet from one host to an individual
host
 Uses destination add as unicast add

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 22
 Broadcast - Sending a packet from one host to all hosts
in the network.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 23
 Multicast - Sending a packet from one host to a selected
group of hosts

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 24
 The address ranges reserved for these special purposes
in the IPv4 protocol

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 25
Private Addresses & Public addresses

Private address : set aside for use in private networks,


Limited or no Internet access
Public Addresses : Access to Internet

 10.0.0.0 to 10.255.255.255 (10.0.0.0 /8)

 172.16.0.0 to 172.31.255.255 (172.16.0.0 /12)

 192.168.0.0 to 192.168.255.255 (192.168.0.0 /16)


ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 26
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 27
 Internet Assigned Numbers Authority (IANA) is the
master holder of the IP addresses
 IPv6 and Multicast address directly obtained by IANA
 IPv4 address by Regional Internet Registries (RIRs)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 28
 Different types of ISPs and their roles in providing
Internet connectivity
 Shifting from one ISP to another.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 29
 Tier 1 ISP - Directly connected to the Internet backbone.
–Customers - large companies and organizations.
–Advantages – high reliability and speed
–Disadvantage – High Cost

 Tier 2 ISP – Connected to Tier 1


–Customers - business customers
–Advantages – provides more services like website development
–Disadvantage – lower reliability and slow speed than Tier 1

 Tier 3 ISP - Connected to Tier 2


–Customers - retail and home markets in a specific local area.
–Advantages – Good for small size companies, no need of extra
services
–Disadvantage – Low speed and less reliability

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 30
IPv6 Protocol
 Changes made to the IP protocol in IPv6

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 31
 Features -
– Improved packet handling
– Increased scalability and longevity
– QoS mechanisms
– Integrated security

 To provide these features, IPv6 offers:


– 128-bit hierarchical addressing - to expand addressing
– capabilities
– Header format simplification - to improve packet handling
– Improved support for extensions and options - for increased
– scalability/longevity and improved packet handling
– Flow labeling capability - as QoS mechanisms
– Authentication and privacy capabilities - to integrate security
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 32
 The historic method for assigning addresses – by RFC
1700 – Classful and Classless Address

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 33
Address Classes
If the first octet is between
 1-126 it is a Class A address
 128-191 it is a Class B address
 192-223 it is a Class C address
 224-239 it is a Class D address
 240-255 it is a Class E address

127 is reserved for loopback and is used for internal


testing on the local machine
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 34
Prefix

 The prefix length is the number of bits in the address


that gives us the network portion

 Default Subnet mask (calssful subnet mask)


 Class A - 255.0.0.0 /8
 Class B - 255.255.0.0 /16
 Class C - 255.255.255.0 /24

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 35
Example 192.56.32.13 /24
 What class is the address?
C
 What is the default subnet mask?
 255.255.255.0 / 11111111.11111111.11111111.00000000
 What is the network address?
 192.56.32.0
 What is the broadcast address?
 192.56.32.255
 No of hosts ? 2^8 - 2 = 256 – 2 = 254
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 36
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1 Subnet Prefix
mask

1 0 0 0 0 0 0 0 128 /25
1 1 0 0 0 0 0 0 192 /26
1 1 1 0 0 0 0 0 224 /27
1 1 1 1 0 0 0 0 240 /28
1 1 1 1 1 0 0 0 248 /29
1 1 1 1 1 1 0 0 252 /30
1 1 1 1 1 1 1 0 254 /31
1 1 1 1 1 1 1 1 255 /32

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 37
 Calculating Address – Ex.- 172.16.20.0 /25
 Class - ? Default subnet mask - ?
 Network Address –
0101100.00010000.00010100.00000000
172 . 16 . 20 . 0
 Broad Cast Address –
10101100.00010000.00010100.01111111
172 . 16 . 20 . 127
 First Host Address –
10101100.00010000.00010100.00000001
172 . 16 . 20 . 1
 Last Host Address –
10101100.00010000.00010100.01111110
172 . 16 . 20 . 126
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 38
 Use the VLSM to divide a network into smaller networks

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 39
196.54.34.22

 Borrow 2 bits for the subnet mask


 Number of subnets = 2 number of bits borrowed
 22 = 4 subnets

 Number of hosts per subnet =


 2 # host bits - # bits borrowed = 2 8-2
 26 = 64 (also called the range)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 40
 Extract network addresses from host addresses using
the subnet mask

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 41
Calculating Addresses
 Calculate the number of hosts in a network range given
an address and subnet mask

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 42
Testing the Network Layer
 Use ping to verify that a local host can communicate
with a gateway across a local area network

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 43
Testing the Network Layer
 Use ping to verify that a local host can communicate via
a gateway to a device in remote network

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 44
Testing the Network Layer
 Use tracert / traceroute to observe the path between
two devices as they communicate and trace the steps
of tracert / traceroute's operation

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 45
Calculate ?

1. Class
2. Default Subnet
3. Classless Subnet
4. Number of Networks
5. Block Size
6. Number of Usable Hosts per Network
7. Network Address
8. Broadcast Address
9. Next Network Address
10. First Host IP Address
11. Last Host IP Address

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 46
Example - 1

 Given IP Address -

–10.10.10.40

 Given Prefix -

–/27

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 47
Step 1- Class

 1-126 it is a Class A address


 128-191 it is a Class B address
 192-223 it is a Class C address
 224-239 it is a Class D address
 240-255 it is a Class E address
________________________________
 Answer -
–10.10.10.40 - Class A Address

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 48
Step 2 – Default Subnet

 Class A - 255.0.0.0
 Class B - 255.255.0.0
 Class C - 255.255.255.0
_______________________________
 Answer -
–For - 10.10.10.40
–Default Subnet is - 255.0.0.0

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 49
Step 3 – Classless Subnet

 Calculate Binary of given prefix – /27


11111111.11111111.11111111.11100000
8 + 8 + 8 + 3 = 27 bits ON

 Convert it into Decimal-


255 . 255 . 255 . 224
_______________________________________
 Answer –
Classless Subnet mask - 255.255.255.224

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 50
Step 4 - Number of Sub Networks

 No. of Networks = 2^n


•Where n is No. of bits borrowed

 No. of bits borrowed = 11100000 = 3


•2^3 = 8
_______________________________
 Answer –
–Number of Sub Networks = 8

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 51
Step 5 – Block Size

Default subnet mask – Classless subnet mask

255.255.255.256
- 255.255.255.224 (Subnet mask of /27)
------------------------
0.0.0.32
_______________________________
 Answer –
–Block Size = 0.0.0.32

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 52
Step 6 – Total Number of Usable Hosts

 2 ^ (Total Host bits) - 2


–= 2 ^ 5 - 2
–= 32 – 2
–= 30
_______________________________
 Answer –
–Total Number of Usable Hosts = 30

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 53
Step 7 – Network Address

 Use ANDing method


1. Convert IP Add to Binary
2. Convert Subnet mask to Binary
3. Use AND operation
4. Convert answer into decimal

– IP address : 00001010.00001010.00001010.00101000
– Subnet mask : 11111111.11111111.11111111.1110000
– AND -----------------------------------------------------------

– Network address : 00001010.00001010.00001010.00100000


– Decimal Format: 10.10.10.32

_______________________________
 Answer –
– Network Address = 10.10.10.32

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 54
Step 8 - Broadcast Address

 Network Add + Block size - 1

 10.10.10.32 + 0.0.0.32 - 1

 = 10.10.10.63

 Answer –
–Broadcast Address = 10.10.10.63

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 55
Step 8 - Broadcast Address

 Use XOR method


Convert IP Add to Binary
Convert Subnet mask to Binary
Invert Binary Subnet mask
Use XOR operation
Convert answer into decimal

– IP address : 00001010.00001010.00001010.00101000
– Inverted Subnet mask : 00000000.00000000.00000000.00011111
– XOR --------------------------------------------------------------------------------
– Network address : 00001010.00001010.00001010.00111111
– Decimal Format : 10.10.10.63

______________________________________
 Answer –
–Broadcast Address = 10.10.10.63

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 56
Step 10 – First Host IP Address

 First Host IP Add = Network Address + 1


 = 10.10.10.32 + 1
 = 10.10.10.33

____________________________________

 Answer –
–First Host IP Address = 10.10.10.33

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 57
Step 10 – Last Host IP Address

 Last Host IP Add = Broadcast Address - 1


 = 10.10.10.63 - 1
 = 10.10.10.62

____________________________________

 Answer –
–Last Host IP Address = 10.10.10.62

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 58
Step 9 – Next Network Address

Next Network Add = Network add + Block Size


= Broadcast Add + 1
 = 10.10.10.32 + 0.0.0.32
 = 10.10.10.64

____________________________________

 Answer –
–Next Network Address = 10.10.10.64

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 59
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 60

S-ar putea să vă placă și