DCN Unit - 4
DCN Unit - 4
Connecting Devices
10. Repeaters
11. Hubs
12. Bridges
13. Switches
14. Routers
15. Gateways
Data Link Layer: Two sublayers
• Data link layer divided into two functionality-oriented sublayers
• IEEE made this division for LANs
MAC Sublayer
• Preamble: alerting the receiving system to the coming frame and
enabling it to synchronize its input timing
• CRC: CRC-32
1. MAC Address
• Ethernet address in hexadecimal notation
• The least significant bit of the first byte defines the type of address.
If the bit is 0, the address is unicast; otherwise, it is multicast
• The broadcast destination address is a special case of the multicast
address in which all bits are 1s
2. Medium Access Protocols
Random Access
• Each station has the right to the medium without being controlled by
any other station
• Collision, an access conflict, if more than one station tries to send
3. ALOHA
• The earliest random access method developed at the Univ. of Hawaii in the
early 1970s
• Designed for a radio (wireless) LAN
• Pure ALOHA and Slotted ALOHA
• Frames in a pure ALOHA network
Pure ALOHA Protocol: Procedure
• Binary exponential back-off algorithm
Pure ALOHA Protocol
• Pure ALOHA vulnerable time = 2 x Tfr
• Nonpersistent strategy
– Reduces the chance of collision
– Reduces the efficiency of the network
• 1-persistent
– Increases the chance of collision
• p-persistent
– Reduces the chance of collision and improves the effi-
ciency by combining the other two strategies.
CSMA/CD (Collision Detection)
CSMA/CD: Flow Diagram
CSMA/CD: Min. Frame Size
• Example: A network using CSMA/CD has a bandwidth of 10
Mbps. If the maximum propagation time (including the delays in
the devices and ignoring the time needed to send a jamming
signal, as we see later) is 25.6 μs, what is the minimum size of
the frame?
Solution
The frame transmission time is Tfr = 2 × Tp = 51.2 μs. This means,
in the worst case, a station needs to transmit for a period of 51.2 μs
to detect the collision. The minimum size of the frame is 10 Mbps ×
51.2 μs = 512 bits or 64 bytes. This is actually the minimum size of
the frame for Standard Ethernet.
CSMA/CD: Energy Level & Throughput
• MAC Sublayer
• CSMA/CD for the half-duplex approach
• No need for CSMA/CD for full-duplex Fast Ethernet
• Implementation
Fast Ethernet: Encoding
Summary of Fast Ethernet
8. Gigabit Ethernet
• Under the name of IEEE 802.3z
• Upgrade the data rate to 1 Gbps
• Make it compatible with Standard or Fast Ethernet
• Keep the same 48-bit address and the same frame format
• Keep the same min. and max. frame length
• Support autonegotiation as defined in Fast Ethernet
• MAC Sublayer
• Most of all implementations follows full-duplex approach
• In the full-duplex mode of Gigabit Ethernet, there is no collision;
the maximum length of the cable is determined by the signal
attenuation in the cable.
Half-duplex mode (very rare)
• Traditional: 0.512 μs (25m)
• Carrier Extension: 512 bytes (4096 bits) min. length
• Frame bursting to improve the inefficiency of carrier extension
Gigabit Ethernet: Physical Layer
• Topology
Gigabit Ethernet: Physical Layer
• Implementation
Gigabit Ethernet: Physical Layer
• Encoding
Gigabit Ethernet: Summary
9. IEEE 802.11 (Wireless LAN)
IEEE 802.11 (Wireless LAN)
IEEE 802.11 (Wireless LAN)
Architecture
Defines two kinds of services: basic service set (BSS) and
extended service set (ESS)
BSS
– The building block of a wireless LAN
– A BSS is made of stationary or mobile wireless stations and an optional
central base station, known as the access point (AP).
• BSS without an AP
– Stand-alone network
– Cannot send data to other BSSs
– Ad hoc architecture
• BSS with an AP
– Called an infrastructure network
BSS
Extended Service Set (ESS)
• When a station sends an RTS frame, it includes the duration of time that it needs
to occupy the channel. The stations that are affected by this transmission create
a timer called network allocation vector (NAV) that shows how much time must
pass before these stations are allowed to check the channel for idleness
• Collision During handshaking – no provision for detection, sender retries
PCF
• An optional access method that can be implemented in an AP
• A centralized, contention-free polling access method
• To give priority to PCF over DCF, another set of interframe spaces has been
defined: PIFS and SIFS
• PIFS (PCF IFS) is shorter than the DIFS AP using PCF has priority
• Repetition interval starts with a special control frame, called a beacon frame
MAC Layer Frame Format
Frame types
• Three categories of frames
• Management frames for initial communication between stations
and APs
• Control frames for accessing the channel and acknowledging
frames
• Data frames are used for carrying data and control information
Addressing Mechanism
Hidden Station Problems
• The CTS frame in CSMA/CA handshake can prevent collision from a
hidden station.
Exposed Station Problems
Physical Layer
• Industrial, scientific, and medical (ISM) band which defines three unlicensed
bands in three ranges 902-928 MHz, 2.400-4.835 GHz, and 5.725-5.850 GHz
Physical Layer
• IEEE 802.11 FHSS
• IEEE 802.11g
– Forward error correction and OFDM using 2.4 GHz ISM, 22- or 54-Mbps data rate
Connecting devices can be categorized into five based on
layer in which they operate in a network
transport protocols
Ex: Computer using connection oriented TCP/IP protocol needs to talk to a
computer using the connection oriented ATM transport Protocol
It can copy the packets from one connection to other, reformatting them as
need be. They understand the format and contents of the data and trans-
late messages from one format to another
Ex: An e-mail gateway could translate Internet messages into SMS for
mobile phones
Network Layer
1. Logical Addressing
• These are necessary for universal communications that are
independent of underlying physical networks
• A logical address in the internet is currently a 32 bit address
Ex: 10.6.1.10
2. IPV4
• Every host and router on the Internet has an IP address, which
encodes its network number and host number.
• No two machines on the Internet have the same IP address.
IPv4 Addresses
• An IPv4 address is 32 bits long.
• An IPv4 address uniquely and universally defines the connec-
tion of a device (for example, a computer or a router) to the In-
ternet.
• The address space of IPv4 is 232 or 4,294,967,296.
• There are two prevalent notations to show an IPv4 address:
binary notation and dotted-decimal notation.
Binary Notation
• In binary notation, the IPv4 address is displayed as 32 bits.
• Each octet is often referred to as a byte. So it is common to
hear an IPv4 address referred to as a 32-bit address or a 4-byte
address.
• The following is an example of an IPv4 address in binary nota-
tion:
01110101 10010101 00011101 00000010
Dotted-Decimal Notation
• To make the IPv4 address more compact and easier to read, In-
ternet addresses are usually written in decimal form with a
decimal point (dot) separating the bytes.
• The following is the dotted-decimal notation of the above ad-
dress:
117.149.29.2
1. Change the following IPv4 addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
2.Solution:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
3.Solution:
a. There must be no leading zero (045).
b. There can be no more than four numbers in an IPv4 address.
c. Each number needs to be less than or equal to 255 (301 is out-
side this range).
d. A mixture of binary notation and dotted-decimal notation is not
allowed.
IPv4 Protocol
IPv4 Protocol
IP datagram:
• An IP datagram consists of a header part and a payload part.
• The header has a 20-byte fixed part and a variable-length op-
tional part.
• The header format is shown in Fig.
• It is transmitted in from left to right and top to bottom, with the
high-order bit of the Version field going first.
Version:
• The Version field keeps track of which version of the protocol
the datagram belongs to.
• By including the version at the start of each datagram, it be-
comes possible to have a transition between versions over a
long period of time.
IHL:
• Since the header length is not constant, a field in the header,
IHL, is provided to tell how long the header is, in 32-bit words.
• The minimum value is 5, which applies when no options are
present.
• The maximum value of this 4-bit field is 15, which limits the
header to 60 bytes, and thus the Options field to 40 bytes.
Type of Service:
• The Type of service field is one of the few fields that have
changed its meaning (slightly) over the years.
• Originally, the 6-bit field contained (from left to right) - a 3-bit
Precedence field and three flags: D, T, and R.
• The Precedence field was a priority, from 0 (normal) to 7 (net-
work control packet).
• The three flag bits allowed the host to specify what it cared
most about from the set {Delay, Throughput, Reliability}.
• In theory, these fields allow routers to make choices between, for
example, a satellite link with high throughput and high delay or a
leased line with low throughput and low delay.
• In practice, current routers often ignore the Type of service field
altogether.
• Six of the bits are used to indicate which of the service classes
each packet belongs to.
• The bottom 2 bits are used to carry explicit congestion notifica-
tion information
Total Length:
• The Total length includes everything in the datagram-both header
and data.
• The maximum length is 65,535 bytes.
Identification:
• The Identification field is needed to allow the destination host to
determine which datagram a newly arrived fragment belongs to.
• All the fragments of a datagram contain the same Identification value.
DF:
• DF stands for Don't Fragment.
• It is an order to the routers not to fragment the datagram because the
destination is incapable of putting the pieces back together again.
• By marking the datagram with the DF bit, the sender knows it will ar-
rive in one piece, even if this means that the datagram must avoid a
small-packet network on the best path and take a suboptimal route.
MF:
• MF stands for More Fragments. All fragments except the last one have
this bit set. It is needed to know when all fragments of a datagram
have arrived.
Fragment Offset:
• The Fragment offset tells where in the current packet this fragment be-
longs.
• All fragments except the last one in a datagram must be a multiple of 8
bytes, the elementary fragment unit.
• Since 13 bits are provided, there is a maximum of 8192 frag-
ments per datagram, supporting a maximum packet length up to
the limit of the Total length field.
• Working together, the Identification, MF, and Fragment offset
fields are used to implement fragmentation.
TTL:
• The TtL (Time to live) field is a counter used to limit packet life-
times.
• It was originally supposed to count time in seconds, allowing a
maximum lifetime of 255 sec.
• It must be decremented on each hop and is supposed to be
decremented multiple times when a packet is queued for a long
time in a router.
• In practice, it just counts hops.
• When it hits zero, the packet is discarded and a warning packet
is sent back to the source host.
• This feature prevents packets from wandering around forever.
Protocol:
• The Protocol field tells the network layer which transport pro-
cess to give the packet to.
• TCP is one possibility, but so are UDP and some others.
• The numbering of protocols is global across the entire Internet.
• Protocols and other assigned numbers were formerly listed in
RFC 1700, but nowadays they are contained in an online data-
base located at www.iana.org. (IANA – Internet Assigned Num-
bers Authority)
Header Checksum:
• Since the header carries vital information such as addresses, it
rates its own checksum for protection, the Header checksum.
• The algorithm is to add up all the 16-bit half-words of the
header as they arrive, using one’s complement arithmetic, and
then take the one’s complement of the result.
• Such a checksum is useful for detecting errors while the packet
travels through the network.
• Note that it must be recomputed at each hop because at least one
field always changes (the Time to live field), but tricks can be
used to speed up the computation.
Source address and Destination address:
• The Source address and Destination address indicate the IP ad-
dress of the source and destination network interfaces.
Options:
• The Options field was designed to provide an escape to allow
subsequent versions of the protocol to include information not
present in the original design, to permit experimenters to try out
new ideas, and to avoid allocating header bits to information that
is rarely needed.
• The options are of variable length.
Note
Solution
We first need to align the left side of the double colon to
the left of the original pattern and the right side of the
double colon to the right of the original pattern to find
how many 0s we need to replace the double colon.
20.108
IPV6 Addresses
Unicast, Multicast and Anycast network
6. Internetworking
• In practice, many different networks exist, including PANs, LANs, MANs,
and WANs. (like Ethernet, Internet over cable, the fixed and mobile tele-
phone networks, 802.11, 802.16 and more)
Different Networks and Protocols:
• Having different networks invariably means having different protocols.
• We believe that a variety of different networks (and thus protocols) will al-
ways be around, for the following reasons.
I. First of all, the installed base of different networks is large.
II. Nearly all personal computers run TCP/IP.
III. Many large businesses have mainframes running IBM's SNA (Systems
Network Architecture).
IV. A substantial number of telephone companies operate ATM (Asyn-
chronous Transfer Mode) networks.
V. Some personal computer LANs still use Novell NCP/IPX (NetWare
Core Protocol/ Internetwork Packet Exchange) or AppleTalk.
VI. Finally, wireless is an up-and-coming area with a variety of protocols.
• In the future, it may be commonplace for the telephone, the
television set, and other appliances all to be networked to-
gether so that they can be controlled remotely.
• This new technology will undoubtedly bring new networks
and new protocols.
• Bob Metcalfe postulated that the value of a network with N
nodes is the number of connections that may be made between
the nodes, or N2. This means that large networks are much
more valuable than small networks because they allow many
more connections, so there always will be an incentive to
combine smaller networks.
• As an example of how different networks might be connected,
consider the example of Fig.
• Here we see a corporate network with multiple locations tied
together by a wide area ATM network.
A collection of interconnected networks.