0% found this document useful (0 votes)
13 views51 pages

MIS2010 - Chapter 07

The document discusses LAN communication protocols, focusing on the network and data-link layers, their addressing mechanisms, and the importance of address resolution. It covers topics such as public and private IP addresses, Network Address Translation (NAT), subnetting, and the transport layer's role in ensuring reliable data transmission. Additionally, it explains the functionalities of TCP and UDP protocols in managing data communication.
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)
13 views51 pages

MIS2010 - Chapter 07

The document discusses LAN communication protocols, focusing on the network and data-link layers, their addressing mechanisms, and the importance of address resolution. It covers topics such as public and private IP addresses, Network Address Translation (NAT), subnetting, and the transport layer's role in ensuring reliable data transmission. Additionally, it explains the functionalities of TCP and UDP protocols in managing data communication.
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/ 51

Data Communications

&
Networking
Lecture 08
LAN Communication Protocols

Lectured by
Nguyễn Đức Thái
1
The Network Layer
 The network layer is concerned with
providing a means for hosts to
communicate with other hosts on different
network segments.
 Data-link layer provides a means for two
hosts on a common network segment to
communicate.
 Technologies such as Ethernet and token
ring provide this intra-segment connectivity

2
Network vs. Data-Link Layer
Addressing
 The data-link layer uses the physical
address (also known as the MAC addresses)
of the NIC to deliver data rather than the
network layer host address.
 For the network and data-link layers to
successfully interact to deliver data, a
direct, one-to-one mapping must be made
between the network layer address and the
data-link layer physical address.

3
Addressing Resolution
 The process of determining the physical
address of an NIC from the network layer
address is known as address resolution.
 Each NIC is assigned a single data-link layer
physical address and one or more network
addresses.

4
Packet Fragmentation

 Fragmentation allows large quantities of data to


be sent across the network in smaller, more
manageable “chunks” of data
5
Network Addressing

6
Network Addressing

7
Network Addressing (2)

8
Network Addressing (3)

9
Reserved IP Addresses
 Certain host addresses are reserved and
cannot be assigned to devices on a
network.
 An IP address that has binary 0s in all
host bit positions is reserved for the
network address.
 An IP address that has binary 1s in all
host bit positions is reserved for the
broadcast address

10
Public and Private IP Addresses
 No two machines that connect to a public
network can have the same IP address
because public IP addresses are global and
standardized.
 However, private networks that are not
connected to the Internet may use any host
addresses, as long as each host within the
private network is unique.
 Connecting a network using private
addresses to the Internet requires
translation of the private addresses to
public addresses using Network Address
Translation (NAT). 11
Public and Private IP Addresses
 RFC 1918 sets aside three blocks of IP
addresses for private, internal use.

Private IP addresses in class A,B,C

12
NAT: Network Address Translation
NAT translation table
2: NAT router 1: host 10.0.0.1
WAN side addr LAN side addr
changes datagram sends datagram to
138.76.29.7, 5001 10.0.0.1, 3345 128.119.40.186, 80
source addr from
…… ……
10.0.0.1, 3345 to
138.76.29.7, 5001, S: 10.0.0.1, 3345
updates table D: 128.119.40.186, 80
10.0.0.1
1
S: 138.76.29.7, 5001
2 D: 128.119.40.186, 80 10.0.0.4
10.0.0.2
138.76.29.7 S: 128.119.40.186, 80
D: 10.0.0.1, 3345
4
S: 128.119.40.186, 80
D: 138.76.29.7, 5001 3 10.0.0.3
4: NAT router
3: Reply arrives changes datagram
dest. address: dest addr from
138.76.29.7, 5001 138.76.29.7, 5001 to 10.0.0.1, 3345
13
Special IP Addresses

14
Network Addresses

15
Direct Broadcast Addresses

16
Limited Broadcast Address

17
“This Host On This Network”

18
“Specific Host On This Network”

19
Loopback Address

20
IP Subnetting
 Classful network: you define only ONE
network.
 What happens if you want to take one
network address and create six networks
from it?
 You would have to do something called
subnetting, because that’s what allows you
to take one larger network and break it into
a bunch of smaller networks.

21
How To Create Subnets
 To create subnetworks, you take bits from
the host portion of the IP address and
reserve them to define the subnet address.
 This means fewer bits for hosts, so the
more subnets, the fewer bits available
for defining hosts.

22
Subnet – Default - Supernet Mask

23
Subnets

24
IP Subnetting (2)
Benefits of IP Subnetting
 Reduce network traffic

 Optimize network performance

 Simplify management

 Facilitate spanning of large geographical


distances.

25
Subnet Masks
 Used to define which part of the host
address will be used as the subnet
address

 A 32-bit value that allows the recipient of


IP packets to distinguish the network ID
portion of the IP address from the host ID
portion.

26
Default Subnet Masks
 Not all networks need subnets, meaning
they use the default subnet mask.
 This is basically the same as saying that a
network doesn’t have a subnet address

27
Default Subnet Masks

28
Host Addresses

29
Addressing Without Subnets

30
Addressing With Subnets

31
Subnet Addressing

32
Subnet Mask

33
CIDR
 Classless Inter-Domain Routing
 ISPs use this method to allocate an amount
of addresses to a company, a home—a
customer.
 What you get will look something like this:
192.168.10.32/28. This tells you what your
subnet mask is.
 The slash notation (/) means how many bits
are turned on (1s)

34
CIDR - Notes
 Obviously, the maximum could only be /32
because a byte is 8 bits and there are 4
bytes in an IP address: (4×8 = 32).
 But keep in mind that the largest subnet
mask available (regardless of the class of
address) can only be a /30 because you’ve
got to keep at least 2 bits for host bits

35
How Many Subnets?
 Number of subnets = 2x
Where x is the number of masked bits, or
the 1s (in host portion).

 Example:
In 11000000, the number of ones gives us 22
subnets. In this example there are 4
subnets

36
How Many Hosts Per Subnet?
 Number of Hosts per subnet = 2y-2
Where y is the number of unmasked bits, or
the 0s (in host portion).

 Example:
In 11000000, the number of zeros gives us
26-2 hosts. In this example, there are 62
hosts per subnet.

37
Broadcast Address For Subnet
 The broadcast address is all host bits
turned on, which is the number
immediately preceding the next subnet

38
Steps To Create Subnets
1. Determine the number of required
network IDs:
 One for each subnet.
 One for each wide area network
connection

39
Steps To Create Subnets
2. Determine the number of required
host IDs per subnet:
 One for each TCP/IP host
 One for each router interface

40
Steps To Create Subnets
3. Based on the above requirements,
create following:
 One subnet mask for your entire network
 A unique subnet ID for each physical
segment
 A range of host IDs for each subnet

41
Subnet Masks
 Used to define which part of the host
address will be used as the subnet
address

 A 32-bit value that allows the recipient of


IP packets to distinguish the network ID
portion of the IP address from the host ID
portion.

42
Default Subnet Masks
 Not all networks need subnets, meaning
they use the default subnet mask.
 This is basically the same as saying that a
network doesn’t have a subnet address

43
Transport Layer
Five basic services:
 Segmenting upper-layer application data
 Establishing end-to-end operations

 Transporting segments from one end host


to another end host
 Ensuring data reliability

 Providing flow control

44
Reliability
 Ensure that segments delivered will be
acknowledged to the sender
 Provide for retransmission of any segments
that are not acknowledged
 Put segments back into their correct
sequence at the destination
 Provide congestion avoidance and control

45
Flow Control

 Avoids the problem of a host at one side of the


connection overflowing the buffers in the
host at the other side
 Ensures the integrity of the data
46
Session Establishment
 One function of the
transport layer is to
establish a
connection-
oriented session
between similar
devices at the
application layer

47
Three-Way Handshake

48
Windowing
 A method of controlling the amount of
information transferred end-to-end
 Information can be measured in terms of
the number of packets or the number of
bytes

49
Transmission Control Protocol
 TCP Protocol
 Connection-oriented
 The protocols that use TCP include:
―FTP (File Transfer Protocol)
―HTTP (Hypertext Transfer Protocol)
―SMTP (Simple Mail Transfer Protocol)
―Telnet

50
User Datagram Protocol
 UDP Protocol
 Connectionless
 The protocols that use UDP include:
―TFTP (Trivial File Transfer Protocol)
―SNMP (Simple Network Management
Protocol)
―DHCP (Dynamic Host Control Protocol)
―DNS (Domain Name System)

51

You might also like