Week 5 - Lecture Notes
Week 5 - Lecture Notes
Computer
Networks
Module Code: COM5014M
Level: 5
Credits: 20
Week 5
IP Addressing &
Subnetting &
TCP/IP Protocols
ICANN/IANA (Internet Assigned Number Authority)
• Many countries, machines, and organizations are connected to the Internet, using IP
addresses.
• As IP address for each machine should be unique all over the globe, it should be
managed uniformly.
• ICANN ’s (Internet Corporation for Assigned Names and Numbers) primary role is to
manage Internet resources, coordinates the allocation and assignment of:
o Domain names system (DNS)
o IP addresses and Autonomous System (AS) numbers
o Protocol port and parameter numbers
• Public IP's must be purchased before use through your Internet Service Provider.
Source: http://www.icann.org/
ICANN/IANA Structure
Source: http://www.icann.org/
Regional Internet Registries (RIRs)
• ICANN has delegated the distribution of IP addresses to the Regional Internet
Registries (RIR).
• There are five RIRs.
Classful
Subnets
Classless
Subnets
Subnetting: Classful vs Classless
• Classful subnet 192.168.1.0/24
• 1 networks = 20 where 0 is the number of borrowed bits. Meaning 0 subnet.
• 256 IP addresses = 28 where 8 where s is the number of borrowed bits
The "−2" at the end of the formula is because the first and last IP
addresses in each subnet are reserved, one for the Network
ID and one for the Broadcast Address.
Calculating Number of Subnets
• Subnets and IP ranges for 192.168.1.64/26
IP Range Subnets
First IP Last IP
Subnet 1 192.168.1.0 192.168.1.63
Subnet 2 192.168.1.64 192.168.1.127
Subnet 3 192.168.1.128 192.168.1.191
Subnet 4 192.168.1.192 192.168.1.255
• Network IDs: First IP of each subnet is considered as network ID for that subnet
• Broadcast ID: last IP of each subnet is considered as network ID for that subnet
Subnetting Scenario
• The company needs 20 offices with 5 users in each office.
20 subnets
5 hosts per subnet
Class C address: 192.168.1.0
192.168.1.16
Other
subnets
192.168.1.32 192.168.1.48
Subnetting Scenario
IP Host Address: 192.168.5.121
Subnet Mask: 255.255.255.248
Network Network Network Subnet Host
• The main downsides of TCP is that it is the latency, as the connection need to
be established before sending the packet out.
User Datagram Protocol (UDP)
• UDP is a connectionless protocol.
• UDP is simple but fast protocol, as it doesn’t need to establish a connection before
sending data, and there is no mechanism for congestion control.
• UDP is unreliable protocol and there is no guarantee that the packet arrives to its
destination.
• This protocol is suitable for low-latency and loss-tolerating applications.
• Time-sensitive and real-time applications like online games often use UDP.
TCP v.s. UDP
TCP UDP
SMTP POP3
HTTP IPAM
FTP SSL
Hypertext Transfer Protocol (HTTP)
• HTTP is the core protocol for the World Wide Web (WWW) and the foundation of any
data exchange on the Web.
• HTTP is a protocol for fetching resources such as HTML documents. It was designed
for communication between web browsers and web servers.
• It is based on client-server architecture model, which define:
o the data that a client should send to a Web server to request services,
o the meaning of received data,
o the data that a Web server should send to the client, such that it can understand.
• The client uses Uniform Resource Identifier (URL).
HTTP Request and Response
• A typical flow over HTTP involves client & server communications (message exchange).
• The messages sent by the client are called requests
• The messages sent by the server as an answer are called responses.