0% found this document useful (0 votes)
6 views

Week 4 - Lecture Notes

Uploaded by

siennachang1202
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Week 4 - Lecture Notes

Uploaded by

siennachang1202
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Module Title:

Computer
Networks
Module Code: COM5014M
Level: 5
Credits: 20
Week 4

IP Addressing &
Subnetting
Internet Protocol (IP)
• At the network layer the TCP/IP model supports IP.
• IP is a transmission mechanism that uses IP addresses to deliver packets to network
devices through best effort service.
• The best effort service means, IP does its best to deliver a packet to destination, but
no error checking or tracking (no guarantee).
• IP is unreliable protocol, has no guarantee for delivery, meaning that a packet might
be lost, corrupted, delivered late or out of order.
• IP transports data in individual packers called datagrams, each of which is
transported separately.
• Core Functionalities: Routing, address assignment, multicasting
IP Address
• An IP address is a unique logical address
that identifies a device on a network,
either in a local network or the Internet.
• IP address for a device in a network is
like a postal code in a mailing address.
• IP addresses are how computers on the
internet recognise one another.
• It is basically developed to supports
networks consisting of multiple
networks or sub-networks.
IP Address
• IP addresses are made up of two
main components.
• 32 binary digits
• 4 octets
• Dotted decimal notation
• Two versions:
• IP Version 4 (IPv4)
o Most common IP addresses
• IP Version 6 (IPv6)
IPv4
• Internet Protocol version 4 is the original and most
common deployed internet protocol used to connect
devices to the internet.
• The IP address is made up of binary numbers (1 or 0)
• IPv4 uses 32-bit address scheme, divided into four 8-
bit fields, called octets, separated by a period or dot.

Binary Format Decimal Notation

11000000.10101000.00000001.00001010 192.168.1.10
IPv4
IPv4
• Each of the 4 Octets has 8 Bits.
• Each Bit can only be a One or a Zero.
• In addressing each octet is converted to a 128+64+32+16+8+4+2+1=255
decimal number, ranging from 0 to 255
and separated by a by a period.
• Example of IPv4 address: 163.1.125.98
• IPv4 with this format allows only around 4
billion IP addresses, that is not enough for
supporting addressing of all devices in the
future.
IPv4 Addressing • IP addresses are made up of
two main components.
o Net ID (Network ID)
o Host ID

• Determined by IP class

• Similar to your phone


number
o Area code = network
o phone number = host
5 Classes of IP Addresses:
IPv4
o A: 1 byte for NetID, 3 for HostID
Addressing o B: 2 byte for NetID, 2 for HostID
o C: 3 byte for NetID, 1 for HostID
o D: For multicast addresses
o E: Reserved for future use

Octet Octet Octet Octet

Class A Net Host Host Host

Class B Net Net Host Host

Class C Net Net Net Host


Address
Class Supports
Range

Class A 1 – 127 16 million host on each of 127 network

Class B 127 – 191 65,000 hosts on each of 16,000 networks


IPv4
Addressing Class C 192 – 223 254 hosts on each of 2 million networks

Class D 224 – 239 Reserved for multicast groups

Class E 240 - 254 Reserved for future use


Data could be transported over a network by three simple
methods: Unicast, Broadcast, and Multicast.

Unicast, Types of IPv4 Address


Broadcast, Unicast from one source to one destination i.e.,
and Multicast One-to-One
Multicast from one source to multiple destinations,
stating an interest in receiving the traffic
i.e., One-to-Many
Broadcast from one source to all possible
destinations i.e., One-to-All
Unicast Address - IPv4 Addressing
• Most common type of address
• Intended for a specific host
• Must have both destination IP and MAC in the header

Source: Cisco
Multicast Address - IPv4 Addressing
• Send packet to a group of devices
• Must use multicast address range
• Range 224.0.0.0 – 239.255.255.255
• Used for remote gaming

Source: Cisco
Broadcast Address - IPv4 Addressing
• All ones in the host portion of the IP address

Source: Cisco
IPv4 & Subnet Mask / Subnet Address
• We use an IP address with the subnet mask.
• A subnet mask separates the network address from the host address.
• It is an easy way of identifying which part of the IP address relates to the network and
which part relates to the host.
• Each IP address class has a matching subnet mask.

Class Subnet Mask Binary

A 255.0.0.0 11111111.00000000.00000000.00000000
B 255.255.0.0 11111111. 11111111. 00000000.00000000
C 255.255.255.0 11111111. 11111111. 1111111.00000000
IPv4 & Subnet Mask
• The subnet mask is a 32-bit value just
like the IP address
• Subnet mask bits:
• 1: Correspond to the network and
subnet portions of the address
• 0: Contain host information
IPv4 & Subnet Mask

IP Address 12 34 158 5

00001100 00100010 10011110 00000101

11111111 00000000 00000000 00000000

Subnet Mask 255 0 0 0


IPv4 Subnetting
• Essentially, a subnet is a smaller portion
of the network within class A, B, or C.

• What is subnetting?
o Process of subdividing a single class of
network into multiple subnetworks.

• Why subnet
o Creating and using subnets can help to keep your network organised and functional.
o Makes it easier to manage your network (lower total cost of ownership)
o Makes you network more secure
o Reduce Collision Domain
IPv4 Subnetting
• Before Net Host
subnetting

• After
Net Host Host
subnetting

• Class B before subnetting

Net Net Host Host

• Class B after subnetting

Net Net Host Host


IPv4 Subnetting
• Given the Class B address 190.152.0.0
• Using the 3rd octet, 190.152.0.0 is 190 152 0 0
divided into 3 subnets.
• We assign different IP to 3 hosts using After Subnetting
the 4th octet in 190.152.1.---

190 152 1 0 190 152 1 Host

190 152 1 1 190 152 2 Host

190 152 1 2 190 152 3 Host


IPv4 Subnetting
• Network address 190.152.0.0 with
255 Subnets: 28 - 1 Network Network Subnet Host
• Cannot use last subnet, 190.152.255.0, 190 152 0 Host
as it contains broadcast address.
190 152 1 Host
190 152 2 Host
190 152 3 Host


190 152 Host

190 152 254 Host


190 152 255 Host

22
IPv6
• It stands for Internet Protocol version 6 and is the successor version of IP.
• IPv6 developed by the IETF to replace IP4, to supply IP addressing for a greater
number of connected devices, as predicted growth of connected devices in the
future.
• IPv6 uses a 128-bit address, divided into eight 16 bits blocks, each block is converted
into 4 digits Hexadecimal numbers separated by colon.
• Example: 8145 : 010C : 0000 : 0000 : 1100 : 1A06 : 8800 : 0001
• IPv6 can support addressing for around 340 trillion devices.
• IPv6 support more new features: Auto-configuration, better Multicast, better quality
of service (QoS), built-in authentication and privacy support, and more efficient
routing.
• IPv6 address is split into 2 segments:
o Network segment: 64 bits
o Host segment: 64 bits

o Network segment is used for routing, splits into 2


IPv6 blocks:
o 48 bits for site prefix (public topology), and
Addressing o 16 bits for subnet ID (private topology).

• Host segment identifies the interface ID which is:


• Automatically configured from the interface's MAC
address, or
• Manually configured in Extended Unique
Identifier (EUI-64) format.
IPv6
Addressing
IPv6 Addressing

Unicast Multicast Anycast

Assigned Solicited-Node

Global Unique Embedded


Link-local Loopback Unspecified
Unicast Local IPv4
IPv6
Addressing • Anycast is not supported by IPv4, IPv6 introduced this
mode for packet routing.
• In anycast, a group of potential receivers (topologically
nearest nodes) are assigned the same Anycast IP
address.

• Once the group is created, any interface from the group


can receive packets on the behalf of group.
• Note that packets sent to an anycast address are
received by only one interface of the group, not by all
interfaces.
References
1. Stallings, W. (2003) Data and Computer Communications. 7th Ed. Prentice Hall
2. Tanenbaum, A. (2002) Computer Networks. Prentice Hall PTR.
3. Forouzan, B. A., & Fegan, S. C. (2007). Data communications and networking (4th. ed.). New York:
McGraw-Hill.
4. Burgess, M. (2003) Principles of Network and System Administration. 2nd Ed. John Wiley and Sons Ltd.
5. Limoncelli, T. and Hogan, C. (2001) The Practice of System and Network Administration. Addison-
Wesley.
6. Olifer, N. and Olifer, V. (2005) Computer Networks: Principles, Technologies and Protocols for Network
Design. John Wiley and Sons Ltd.
Thank You
Hamidreza Bagheri
[email protected]

You might also like