Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

COMPUTER NETWORKS

( 00207N )

Week 2
Topics

■ IP Address Overview
■ IP Versions
■ IP v4 addresses and classes
■ NAT Overview
■ How NAT works?
■ NAT Practice
■ Assignment
IP Address Overview

■ An Internet Protocol address (IP address) is a numerical label assigned to each device
(e.g., computer, printer) participating in a computer network that uses the Internet
Protocol for communication. An IP address serves two principal functions: host or
network interface identification and location addressing. Its role has been characterized
as follows: “A name indicates what we seek. An address indicates where it is. A route
indicates how to get there.”
IP Address Overview – Cont.
IP Address Overview – Cont.
IP Versions

■ Two versions of the Internet Protocol (IP) are in use: IP Version 4 and IP Version 6.
Each version defines an IP address differently. Because of its prevalence, the generic
term IP address typically still refers to the addresses defined by IPv4. The gap in
version sequence between IPv4 and IPv6 resulted from the assignment of number 5 to
the experimental Internet Stream Protocol in 1979, which however was never referred to
as IPv5.
IPv4 addresses and classes
IPv4 addresses and classes

■ Some points to be noted about dotted decimal notation:


– The value of any segment (byte) is between 0 and 255 (both included).
– There are no zeroes preceding the value in any segment (054 is wrong, 54 is
correct).
IPv4 addresses and classes
Classful Addressing
The 32 bit IP address is divided into five sub-classes. These are:
IPv4 addresses and classes

■ Each of these classes has a valid range of IP addresses. Classes D and E are reserved for
multicast and experimental purposes respectively. The order of bits in the first octet
determine the classes of IP address.
IPv4 address is divided into two parts:
– Network ID
– Host ID
IPv4 addresses and classes

Class A

Class B

Class C
IPv4 addresses and classes
IPv4 addresses and classes
IPv4 addresses and classes
IPv4 addresses and classes - Practice
Given the following IP address : 221.40.20.54 determine the following:

a. The class of the given IP f. The broadcasting IP


• C • 221.40.20.255

b. The network number g. The default subnet mask of this IP


• 221.40.20.0 • 255.255.255.0

c. The host number


• 0.0.0.54

d. The first valid IP in the network number identified in (b)


• 221.40.20.1

e. The last valid IP in the network number identified in (b)


• 221.40.20.254
IPv4 addresses and classes - Solve
Given the following IP address : 189.20.10.33 determine the following:

a. The class of the given IP f. The broadcasting IP


• •

b. The network number g. The default subnet mask of this IP


• •

c. The host number


d. The first valid IP in the network number identified in (b)


e. The last valid IP in the network number identified in (b)



NAT Overview

■ NAT : Stands for “Network Address Translation”


■ PAT : Port Address Translation
■ SNAT : Source Network
Address Translation
How NAT Works ?

■ To access the Internet, one public IP address is needed, but we can use a private IP
address in our private network. The idea of NAT is to allow multiple devices to access
the Internet through a single public address. To achieve this, the translation of private IP
address to a public IP address is required. Network Address Translation (NAT) is a
process in which one or more local IP address is translated into one or more Global IP
address and vice versa in order to provide Internet access to the local hosts. Also, it does
the translation of port numbers i.e. masks the port number of the host with another port
number, in the packet that will be routed to the destination. It then makes the
corresponding entries of IP address and port number in the NAT table. NAT generally
operates on router or firewall.
How NAT Works ?
NAT Practice
NAT Practice - NAT_home_side
NAT Practice - NAT_home_side
NAT Practice - NAT_ISP_side
NAT Practice - NAT_ISP_side
NAT Practice - NAT_ISP_side
Assignment

NAT_home_side.pcap NAT_ISP_side.pcap

This question is related to previous question 3

You might also like