0% found this document useful (0 votes)
17 views17 pages

CS2105 Tutorial 5 Slides PRINT

Uploaded by

teohongruiseth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views17 pages

CS2105 Tutorial 5 Slides PRINT

Uploaded by

teohongruiseth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

CS2105 T15 T16 T18 T19

TUTORIAL 5
LECTURE 6 MAIN POINTS

• Network Layer Begins

• IP Address
Next Tutorial:
• Subnets
• IPv4 Datagram
• DHCP
• IP Fragmentation

• Longest Prefix Matching (IP) • NAT – Network Address Translation


IP ADDRESS & SUBNET

• 32 bit integer
• Dotted Decimal Notation: XXX.XXX.XXX.XXX
• Binary: 4 blocks of 8 bits

• Subnet and Subnet Mask


SPECIAL IP ADDRESSES
DHCP (DYNAMIC HOST CONFIGURATION PROTOCOL)
How to get an IP?

• Manually Configured

• DHCP protocol
TUTORIAL 5
Q1
• What is the 32-bit binary equivalent of the IP address 202.3.14.25?

11001010 00000011 00001110 00011001


Remainder Number
Q2
• Suppose an application generates chunks of 40 bytes of data every 20 msec,
and each chunk gets encapsulated in a TCP segment and then an IP
datagram. Assume TCP header is 20 bytes and IP header is another 20 bytes,
what percentage of each datagram will be overhead, and what percentage
will be application data?
20 20

40
IP Datagram: 40 + 20 + 20 = 80 bytes

Percentage of overhead: 50% (40 out of 80 bytes)


Percentage of data: 50%
Q3
• 3. Combine the following three blocks of IP addresses into a single block:
• a) 16.27.24.0/26
• b) 16.27.24.64/26 0 -> 00000000
• c) 16.27.24.128/25 64 -> 01000000
128 -> 10000000

16.27.24.0/24
Q4
• a) Consider a subnet with network prefix 192.168.56.128/26. Give an
example IP address (of form xxx.xxx.xxx.xxx) that belongs to this network.

Any IP address in the range:


192.168.56.128 - 192.168.56.191

128 -> 1000 0000


191 -> 1011 1111
Q4
• b) Suppose an ISP owns the block of addresses of the form
192.168.56.128/26. Suppose it wants to create four subnets from this block,
with each block having the same number of IP addresses. What are the
network prefixes (of form a.b.c.d/x) for the four subnets?

Network Prefix Binary Expression

192.168.56.128/28 11000000 10101000 00111000 10000000

192.168.56.144/28 11000000 10101000 00111000 10010000

192.168.56.160/28 11000000 10101000 00111000 10100000

192.168.56.176/28 11000000 10101000 00111000 10110000


LONGEST PREFIX MATCHING

• 16 -> 0001 0000


• 17
• 18 -> 0001 0010
• 19 -> 0001 0011
• 20 -> 0001 0100
LONGEST PREFIX MATCHING

• 16 -> 0001 0000


• 17
• 18 -> 0001 0010
• 19 -> 0001 0011
• 20 -> 0001 0100
Q5 • Consider a datagram network using 8-bit addresses. Suppose a router has
the following forwarding table:
• For each of the four interfaces, give the associated range of destination host
addresses and the number of addresses in the range.

Prefix Match Interface IP Range No. of IP


11 0 1100 0000 – 1111 1111 64
101 1 1010 0000 – 1011 1111 32
100 2 1000 0000 – 1001 1111 32
otherwise 3 0000 0000 – 0111 1111 128
Q6
• What is private IP address? Does LumiNUS use private or public IP? When
your laptop is connected to NUS network, does it receive a private or public
IP?

Private IP: IPs that can be used within an internal network without coordination with IANA or
an Internet Registry.

LumiNUS: Public IP

Laptop receives Private IP


QUESTIONS

You might also like