Computer Network Mid
Computer Network Mid
1. DATA COMMUNICATIONS: Data communications are the exchange of data between two devices via
some form of transmission medium such as a wire cable.
3. Data Flow: Communication between two devices can be simplex, half-duplex, or full-duplex.
➢ Simplex In simplex mode, the communication is unidirectional, as on a one-way street. Only one
of the two devices on a link can transmit; the other can only receive. Keyboards and traditional
monitors are examples of simplex devices.
➢ Half-Duplex In half-duplex mode, each station can both transmit and receive, but not at the same
time. When one device is sending, the other can only receive, and vice versa. Example – A walkie-
talkie uses the Half-Duplex Transmission Mode.
➢ Full-Duplex In full-duplex, both stations can transmit and receive simultaneously. One common
example of full-duplex communication is the telephone network. When two people are
communicating by a telephone line, both can talk and listen at the same time.
4. Network: A network is a set of devices (often referred to as nodes) connected by communication links.
5. Types of connections: point-to-point and multipoint:
➢ Point-to-Point: A point-to-point connection provides a dedicated link between two devices. The
entire capacity of the link is reserved for transmission between those two devices.
➢ Multipoint: A multipoint connection is one in which more than two specific devices share a single
link. In a multipoint environment, the capacity of the channel is shared, either spatially or
temporally.
6. THE INTERNET: The Internet is a vast network that connects computers all over the world. Through
the Internet, people can share information and communicate from anywhere with an Internet connection.
➢ International Internet Service Providers: At the top of the hierarchy are the international service
providers that connect nations together.
➢ National Internet Service Providers: The national Internet service providers are back bone
networks created and maintained by specialized companies.
➢ Regional Internet Service Providers: Regional internet service providers or regional ISPs are
smaller ISPs that are connected to one or more national ISPs. They are at the third level of the
hierarchy with a smaller data rate.
➢ Local Internet Service Providers: Local Internet service providers provide direct service to the end
users. The local ISPs can be connected to regional ISPs or directly to national ISPs. Most end users
are connected to the local ISPs.
Chapter – 2
Network Models
➢ 1. Physical layer: This layer includes the physical equipment involved in the data transfer,
such as the cables and switches.
Responsibilities:
➢ 2. Data link layer: The data link layer is responsible for moving frames from one hop
(node) to the next.
Responsibilities
• Framing: Dividing data into frames for transmission.
• MAC addressing: Identifying devices on the same local network.
• Error detection/correction: Identifying and correcting transmission errors.
• Flow control: Managing data transmission rate between devices.
➢ 3. Network layer: The network layer is responsible for the delivery of individual packets
from the source host to the destination host.
Responsibilities:
➢ 4. Transport layer: The transport layer is responsible for the delivery of a message from
one process to another.
Responsibilities:
➢ 5. Session layer: The session layer is responsible for dialog control and synchronization.
Responsibilities:
Responsibilities:
➢ 7. Application layer: The application layer is responsible for providing services to the
user.
Responsibilities:
➢ Physical and Data Link Layers: At the physical and data link layers, TCPIIP does not
define any specific protocol. It supports all the standard and proprietary protocols. A
network in a TCP/IP internetwork can be a local-area network or a wide-area network.
➢ Network Layer: At the network, TCP/IP supports the Internetworking Protocol. IP, uses
four supporting protocols: ARP, RARP, ICMP, and IGMP.
➢ Transport Layer: Traditionally the transport layer was represented in TCP/IP by two
protocols: TCP and UDP. UDP and TCP are transport level protocols responsible for
delivery of a message from a process to another process.
➢ Application Layer: The application layer in TCPIIP is equivalent to the combined session,
presentation, and application layers in the OSI model Many protocols are defined at this
layer.
➢ Physical Addresses: The physical address, also known as the link address, is the address ofa node
as defined by its LAN or WAN. It is included in the frame used by the data link layer. It is the
lowest-level address.
➢ Logical Addresses: Logical addresses are necessary for universal communications that are
independent of underlying physical networks. A logical address in the Internet is currently a 32-
bit address that can uniquely define a host connected to the Internet. No two publicly addressed
and visible hosts on the Internet can have the same IP address.
➢ Port Addresses: The physical addresses change from hop to hop, but the logical and port addresses
usually remain the same.
➢ Specific Addresses: Some applications have user-friendly addresses that are designed for that
specific address. Examples include the e-mail address (for example, forouzan@fhda.edu) and the
Universal Resource Locator (URL) (for example, www.mhhe.com).
5. The differences between physical address, logical address, and port address:
• Transmission Control Protocol (TCP): Ensures reliable, ordered, and error-checked delivery of
data between applications.
• Internet Protocol (IP): Handles the routing and addressing of data packets to ensure they reach
the correct destination.
Together with other protocols (like HTTP, FTP, UDP, etc.), they form a comprehensive set of rules for
how data is transmitted, ensuring interoperability and communication between different systems on a
network.
6. What are the concerns of the physical layer in the Internet model?
1. Concerns: Transmission of raw bits over a physical medium (e.g., cables, wireless signals).
2. Tasks: Signal encoding, transmission medium specifications, bit synchronization, and managing
the data rate.
7. What are the responsibilities of the data link layer in the Internet model?
Responsibilities:
8. What are the responsibilities of the network layer in the Internet model?
Responsibilities:
• Routing: Determines the best path for data to travel across networks.
• Logical addressing: Assigns and manages IP addresses for devices.
• Packet forwarding: Moves data packets from the source to the destination across networks.
• Fragmentation: Breaks larger packets into smaller ones if necessary.
9. What are the responsibilities of the transport layer in the Internet model?
Responsibilities:
In the Internet (TCP/IP) model, the Application Layer is the user support layer.
12. What is the difference between network layer delivery and transport layer delivery?
Transport layer is responsible for process (source) - to - process (destination) delivery of entire message,
whereas network layer oversees host (source) - to - host (destination) delivery of individual packets
across multiple links.
13. What is a peer-to-peer process? The processes at each machine that communicate at a given layer.
Physical Layer has a direct link between 2 devices, while other layers have to pass the information down
to the lower layers on the sender device by adding extra bits at each layer, and the receiver device
unwraps the message at each layer moving upwards till it finally reaches the corresponding
communicating layer.
14. How does information get passed from one layer to the next in the Internet model? At the physical
layer, communication is direct between devices. At the higher layers, however, communication must
move down through the layers on sending device, over to receiving device, and then back up through the
layers. Each layer in the sending device adds its own information to the message it receives from the
layer just above it and passes the whole package to the layer just below it. At layer I the entire package
is converted to a form that can be transmitted to the receiving device. At the receiving machine, the
message is unwrapped layer by layer, with each process receiving and removing the data meant for it.
15. What are headers and trailers, and how do they get added and removed? Additional information
wrapped with the data unit at each layer. Usually, a trailer is added at data link layer. Header and trailer
contain information such as source/destination address, control bits, error correction bits etc. These extra
bits are added at the layer at sender's side, and removed at the corresponding layer at receiver's side.
16. Name some services provided by the application layer in the Internet model. it provides user
interfaces and support for services such as electronic mail, remote file access and transfer, shared
database management, and other types of distributed information services.
17. How do the layers of the Internet model correlate to the layers of the OSI model?
The TCP/IP protocol suite, developed before the OSI model, consists of four original layers: host-to-
network, internet, transport, and application. In comparison to the OSI model, the layers can be
mapped as follows:
• Host-to-Network Layer: Equivalent to the Physical and Data Link layers of OSI.
• Internet Layer: Corresponds to the Network Layer of OSI.
• Transport Layer: Handles functions similar to the Transport and part of the Session Layer of
OSI.
• Application Layer: Combines the duties of the Session, Presentation, and Application layers
from OSI.
In this context, the TCP/IP protocol suite is often described as having five layers: Physical, Data Link,
Network, Transport, and Application. The first four layers align with the corresponding layers in the
OSI model, while the top three OSI layers are represented by a single Application Layer in TCP/IP.
Chapter – 13
Wired LANs: Ethernet
1. IEEE STANDARDS: The IEEE has subdivided the data link layer into two sublayers: logical link control
(LLC) and media access control (MAC). IEEE has also created several physical layer standards for different
LAN protocols.
➢ Data Link Layer: The data link layer in the IEEE standard is divided into two sublayers: LLC
and MAC.
• Logical Link Control (LLC): In IEEE Project 802, flow control, error control, and
part of the framing duties are collected into one sublayer called the logical link control.
• Media Access Control (MAC): IEEE Project 802 has created a sublayer called media
access control that defines the specific access method for each LAN. For example, it
defines CSMA/CD as the media access method for Ethernet LANs and the token-
passing method for Token Ring and Token Bus LANs.
➢ Physical Layer: The physical layer is dependent on the implementation and type of physical
media used. IEEE defines detailed specifications for each LAN implementation. For example,
although there is only one MAC sublayer for Standard Ethernet, there is a different physical layer
specification for each Ethernet implementations .
2. HDLC frame compared with LLC and MAC frames:
Preamble: The first field of the 802.3 MAC frame contains 7 bytes (56 bits) of alternating 0’s and 1’s that alerts
the receiving system to the coming frame and enables it to synchronize its input timing.
Start frame delimiter (SFD): The SFD warns the station or stations that this is the last chance for
synchronization. It contains 1 byte (l byte: 10101011).
Destination address (DA): The DA field is 6 bytes and contains the physical address of the destination station
or stations to receive the packet.
Source address (SA): The SA field is also 6 bytes and contains the physical address of the sender of the packet.
Length or type: This field is defined as a type field or length field. The IEEE standard used it as the length field
to define the number of bytes in the data field. Both uses are common today.
Data: This field carries data encapsulated from the upper-layer protocols. It is a minimum of 46 and a maximum
of 1500 bytes.
CRC: The last field contains error detection information, in this case a CRC-32.
5. Frame Length
Ethernet has imposed restrictions on both the minimum and maximum lengths of a frame,
The minimum length restriction is required for the correct operation of CSMA/CD as we will see shortly. An
Ethernet frame needs to have a minimum length of 512 bits or 64 bytes.
The standard defines the maximum length of a frame (without preamble and SFD field) as 1518 bytes.
Unicast, Multicast, and Broadcast Addresses: If the least significant bit of the first byte in a destination address
is 0, the address is unicast; otherwise, it is multicast.
6. Define the type of the following destination addresses:
a. 4A:30:10:21:1O:1A
b. 47:20:1B:2E:08:EE
c. FF:FF:FF:FF:FF:FF
Solution
To find the type of the address, we need to look at the second hexadecimal digit from the left. If it is even, the
address is unicast. If it is odd, the address is multicast. If all digits are F's, the address is broadcast. Therefore, we
have the following:
a. This is a unicast address because A in binary is 1010 (even).
b. This is a multicast address because 7 in binary is 0111 (odd).
c. This is a broadcast address because all digits are F's.
9. 10Base5 implementation:
The first implementation is called 10Base5, thick Ethernet, or Thick net. The nick-name derives from the size of
the cable. 10Base5 was the first Ethernet specification to use a bus topology with an external transceiver
(transmitter/receiver) connected via a tap to a thick coaxial cable.
The maximum length of the coaxial cable must not exceed 500 m, otherwise, there is excessive degradation of
the signal.
10. 10Base2: Thin Ethernet:
The second implementation is called 10Base2, thin Ethernet, or Cheaper net. 10Base2 also uses a bus topology,
but the cable is much thinner and more flexible. The cable can be bent to pass very close to the stations. The
length of each segment cannot exceed 185 m (close to 200 m) due to the high level of attenuation in thin coaxial
cable.
The third implementation is called 10Base-T or twisted-pair Ethernet. 10Base-T uses a physical star topology.
The stations are connected to a hub via two pairs of twisted cable. The maximum length of the twisted cable here
is defined as 100 m, to minimize the effect of attenuation in the twisted cable.
12. 10Base-F implementation
Although there are several types of optical fiber 10-Mbps Ethernet, the most common is called 10Base-F. 10Base-
F uses a star topology to connect stations to a hub. The stations are connected to the hub using two fiber-optic
cables.
100Base-TX uses two pairs of twisted-pair cable (either category 5 UTP or STP). Each network segment can
have maximum length of 100m. It has a data rate of 125 Mbps. The maximum fundamental frequency obtained
is 31.25 MHz’s A cable connects only two nodes. Resulting in point-to-point connection topology.
100Base-FX uses two pairs of fiber-optic cables. Optical fiber can easily handle high bandwidth requirements
by using simple encoding schemes. Maximum distance between hub and station is 2000m. It has a data rate of
125 Mbps. It uses NRZ-I encoding scheme along with 4B/5B block coding.
100Base-T4: This has four pairs of unshielded twisted pair of Category 3. Each twisted pair is capable of
transmitting a maximum of 25Mbaud data. Thus the three pairs can handle a maximum of 75Mbaud data. It uses
the encoding scheme 8B/6T.
17. Summary of Fast Ethernet implementations
• Preamble Field: A series of bits (typically 7 bytes) that signal the beginning of an Ethernet frame and allow
devices to synchronize.
• SFD (Start Frame Delimiter): A 1-byte field that follows the preamble, indicating the actual start of the frame's
data. It helps the receiving device know when to start processing the frame.
• A Network Interface Card (NIC) enables devices to connect to a network. It converts data from the computer
into a format suitable for transmission over the network and handles physical addressing (MAC).
• Unicast Address: A unique address for a single recipient (e.g., one-to-one communication).
• Multicast Address: An address that allows data to be sent to multiple specified recipients (e.g., one-to-many
communication).
• Broadcast Address: An address that allows data to be sent to all devices in a network segment (e.g., one-to-all
communication).
4. What are the advantages of dividing an Ethernet LAN with a bridge?
• Reduced Collision Domains: Bridges reduce the chances of collisions by creating separate collision domains.
• Improved Performance: By segmenting traffic, performance can improve, especially in high-traffic situations.
• Increased Flexibility: Bridges can connect different network segments, enhancing scalability.
• Both switches and bridges operate at the Data Link Layer (Layer 2) and are used to segment networks. A switch
is essentially a multi-port bridge that can connect multiple devices, managing data traffic more efficiently by
using MAC addresses for forwarding.
• In full-duplex switched Ethernet, there is no need for the CSMAICD method. In a full duplex switched Ethernet,
each station is connected to the switch via two separate links. Each station or switch can send and receive
independently without worrying about collision. Each link is a point-to-point dedicated path between the station
and the switch. There is no longer a need for carrier sensing; there is no longer a need for collision detection.
7. Compare the data rates for Standard Ethernet, Fast Ethernet, Gigabit Ethernet, and Ten-Gigabit Ethernet.
• Common implementations include 10BASE-T (twisted pair cabling) and 10BASE-2 (thin coaxial cable).
• Common implementations include 100BASE-TX (twisted pair cabling) and 100BASE-FX (fiber optic cabling).
• Common implementations include 1000BASE-T (twisted pair cabling), 1000BASE-SX (short-range fiber), and
1000BASE-LX (long-range fiber).
• Common implementations include 10GBASE-T (twisted pair cabling), 10GBASE-SR (short-range fiber), 10GBASE-
LR (long-range fiber), and 10GBASE-ER (extended range fiber).
Hexadecimal Equivalent:
• Group binary digits into sets of 4:
o 0101 1010 → 5A
o 0001 0001 → 11
o 0101 0101 → 55
o 0001 1000 → 18
o 1010 1010 → AA
o 0000 1111 → 0F
13. How does the Ethernet address 1A:2B:3C:AD:5E:6F appear on the line in binary?
• 1A → 00011010
• 2B → 00101011
• 3C → 00111100
• AD → 10101101
• 5E → 01011110
• 6F → 01101111
14. If an Ethernet destination address is 07:01:02:03:04:05, what is the type of the address (unicast, multicast,
or broadcast)?
Address: 07:01:02:03:04:05
o The first byte in binary is 00000111. The least significant bit is 1. This means that the pattern defines a
multicast
15. The address 43:7B:6C:DE:10:00 has been shown as the source address in an Ethernet frame. The receiver
has discarded the frame. Why?
• Address is Invalid: If the source address is not a valid MAC address or if it is detected as being part of a loop or a
known bad address, the receiver may discard the frame. Another reason could be a duplicate address detected
on the network.
16. An Ethernet MAC sublayer receives 42 bytes of data from the upper layer. How many bytes of padding must
be added to the data?
Calculation:
17. An Ethernet MAC sublayer receives 1510 bytes of data from the upper layer. Can the data be encapsulated
in one frame? If not, how many frames need to be sent? What is the size of the data in each frame?
No, the data cannot be encapsulated in one frame because the maximum payload size for an Ethernet
frame is 1500 bytes. Since the data received is 1510 bytes, it exceeds the Ethernet frame payload limit.
Solution:
Maximum Frame Payload Size: 1500 bytes (without including Ethernet header and trailer)
Steps:
1. IPv4 address: An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a
device (for example, a computer or a router) to the Internet.
3. Example:
4. Finding the classes in binary and dotted-decimal notation:
5. A block of 16 addresses granted to a small organization:
6. A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28.
What is the first address in the block?
➢ Solution
The binary representation of the given address is 11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get 11001101 00010000 00100101 0010000 or 205.16.37.32.
9. Another way: