Chapter 7
Last updated
Last updated
Ethernet 2.0 and IEEE 802.3 compatible and can communicate with each other, they use CSMA/CD
Ethernet 2 (also known as “Ethernet ii”, “Ethernet Version 2” or “Ethernet 802.3”) is a standard protocol used across all the parts of networking equipment, regardless of the manufacture. It was developed by IEEE.
802.3 and 802.2 do not refer directly to physical architectures, but to the format of the layer 2 Ethernet frame.
802.2 is the default frame type for Netware 3.12 and 4.x, 802.3 is used for Netware 3.11 and earlier.
802.3 is a bit like Novell 802.3 raw + 802.2 LLC, created by IEEE for its own Ethernet specification. Hence, it came to be known as Ethernet 2.
There are three frame formats from the IEEE: IEEE 802.3, IEEE 802.3 with SNAP, and 802.3 with 802.2. Modern operating systems can send and receive any of these frame formats.
To run TCP/IP over IEEE 802.3, the SNAP format has to be used. That requires 8 bytes of the data field to identify the kind of data the frame is carrying: three bytes for the Logical Link Control, three bytes for the SNAP header, and two bytes for the Protocol Type field. That means the data field shrinks from the standard range of 46 to 1500 bytes down to a range of 38 to 1492. This is the reason most network managers stay with Ethernet II.
The Ether Type field contains two bytes of hexadecimal code. This table translates the codes to some of the more commonly used codes:
Carrier-sense multiple access with collision detection (CSMA/CD) is a media access control (MAC) method used most notably in early Ethernet technology for local area networking. It uses carrier-sensing to defer transmissions until no other stations are transmitting. This is used in combination with collision detection in which a transmitting station detects collisions by sensing transmissions from other stations while it is transmitting a frame. When this collision condition is detected, the station stops transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame.
CSMA/CD is a modification of pure carrier-sense multiple access (CSMA). CSMA/CD is used to improve CSMA performance by terminating transmission as soon as a collision is detected, thus shortening the time required before a retry can be attempted.
With the growing popularity of Ethernet switches in the 1990s, IEEE 802.3 deprecated Ethernet repeaters in 2011,making CSMA/CD and half-duplex operation less common and less important.
Filters A signal that intentionally introduces interference into a communication channel, either to intentionally prevent error-free reception or as a means of advising stations of some event.21In local area networks (LANs), employing the carrier sense multiple access with collision detection (CSMA/CD) protocol, a station that detects a signal collision sends a jamming signal over a subcarrier frequency to advise all stations of that fact.
Exponential backoff is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate.
In a variety of computer networks, binary exponential backoff or truncated binary exponential backoff refers to an algorithm used to space out repeated retransmissions of the same block of data, often to avoid network congestion.
Examples are the retransmission of frames in carrier sense multiple access with collision avoidance (CSMA/CA) and carrier sense multiple access with collision detection (CSMA/CD) networks, where this algorithm is part of the channel access method used to send data on these networks. In Ethernet networks, the algorithm is commonly used to schedule retransmissions after collisions. The retransmission is delayed by an amount of time derived from the slot time (for example, the time it takes to send 512 bits; i.e., 512 bit-times) and the number of attempts to retransmit.
After c collisions, a random number of slot times between 0 and 2c − 1 is chosen. After the first collision, each sender will wait 0 or 1 slot times. After the second collision, the senders will wait anywhere from 0 to 3 slot times (inclusive). After the third collision, the senders will wait anywhere from 0 to 7 slot times (inclusive), and so forth. As the number of retransmission attempts increases, the number of possibilities for delay increases exponentially.
The 'truncated' simply means that after a certain number of increases, the exponentiation stops; i.e. the retransmission timeout reaches a ceiling, and thereafter does not increase any further. For example, if the ceiling is set at i = 10 (as it is in the IEEE 802.3 CSMA/CD standard), then the maximum delay is 1023 slot times. This is useful because these delays cause other stations that are sending to collide as well. There is a possibility that, on a busy network, hundreds of people may be caught in a single collision set.
This example is from the Ethernet protocol, where a sending host is able to know when a collision has occurred (that is, another host has tried to transmit), when it is sending a frame. If both hosts attempted to re-transmit as soon as a collision occurred, there would be yet another collision — and the pattern would continue forever. The hosts must choose a random value within an acceptable range to ensure that this situation doesn't happen. An exponential backoff algorithm is therefore used. The value '51.2 μs' is used as an example here because it is the slot time for a 10 Mbit/s Ethernet line. However, 51.2 μs could be replaced by any positive value, in practice.
When a collision first occurs, send a "Jamming signal" to prevent further data from being sent.
Resend a frame after either 0 seconds or 51.2 μs, chosen at random.
If that fails, resend the frame after either 0 s, 51.2 μs, 102.4 μs, or 153.6 μs.
If that still doesn't work, resend the frame after k · 51.2 μs, where k is a random integer between 0 and 23 − 1.
In general, after the c th failed attempt, resend the frame after k · 51.2 μs, where k is a random integer between 0 and 2c − 1.
switch (full-duplex) used in CSMA / CD
the use of CSMA/CD is a system that sees traffic lights in the crossing of goods, in the process of seeing whether there are goods passing is called carrier sense. after that they will start sending goods and while hearing if there are goods that are passing, and if there is a collision then the goods will not be sent and there will be something we call a jamming signal after jamming signal they will run to BEB.
Carrier-sense multiple access with collision avoidance (CSMA/CA) in computer networking, is a network multiple access method in which carrier sensing is used, but nodes attempt to avoid collisions by beginning transmission only after the channel is sensed to be "idle". When they do transmit, nodes transmit their packet data in its entirety.
It is particularly important for wireless networks, where the collision detection of the alternative CSMA/CD is not possible due to wireless transmitters desensing their receivers during packet transmission.
CSMA/CA is unreliable due to the hidden node problem.
CSMA/CA is a protocol that operates in the Data Link Layer (Layer 2) of the OSI model.
Collision avoidance is used to improve the performance of the CSMA method by attempting to divide the channel somewhat equally among all transmitting nodes within the collision domain.
Carrier Sense: prior to transmitting, a node first listens to the shared medium (such as listening for wireless signals in a wireless network) to determine whether another node is transmitting or not. Note that the hidden node problem means another node may be transmitting which goes undetected at this stage.
Collision Avoidance: if another node was heard, we wait for a period of time (usually random) for the node to stop transmitting before listening again for a free communications channel.
Request to Send/Clear to Send (RTS/CTS) may optionally be used at this point to mediate access to the shared medium. This goes some way to alleviating the problem of hidden nodes because, for instance, in a wireless network, the Access Point only issues a Clear to Send to one node at a time. However, wireless 802.11 implementations do not typically implement RTS/CTS for all transmissions; they may turn it off completely, or at least not use it for small packets (the overhead of RTS, CTS and transmission is too great for small data transfers).
Transmission: if the medium was identified as being clear or the node received a CTS to explicitly indicate it can send, it sends the frame in its entirety. Unlike CSMA/CD, it is very challenging for a wireless node to listen at the same time as it transmits (its transmission will dwarf any attempt to listen). Continuing the wireless example, the node awaits receipt of an acknowledgement packet from the Access Point to indicate the packet was received and checksummed correctly. If such acknowledgement does not arrive in a timely manner, it assumes the packet collided with some other transmission, causing the node to enter a period of binary exponential backoff prior to attempting to re-transmit.
Although CSMA/CA has been used in a variety of wired communication systems, it is particularly beneficial in a wireless LAN due to a common problem of multiple stations being able to see the Access Point, but not each other. This is due to differences in transmit power, and receive sensitivity, as well as distance, and location with respect to the AP. This will cause a station to not be able to 'hear' another station's broadcast. This is the so-called 'hidden node', or 'hidden station' problem. Devices utilizing 802.11 based standards can enjoy the benefits of collision avoidance (RTS / CTS handshake, also Point coordination function), although they do not do so by default. By default they use a Carrier sensing mechanism called 'exponential backoff', or (Distributed coordination function) that relies upon a station attempting to 'listen' for another station's broadcast before sending. CA, or PCF relies upon the AP (or the 'receiver' for Ad hoc networks) granting a station the exclusive right to transmit for a given period of time after requesting it (Request to Send / Clear to Send).
CSMA-CA requires a determination of whether a channel is 'idle', even when incompatible standards and overlapping transmission frequencies are used. Per the standards, for 802.11/Wi-Fi transmitters on the same channel, transmitters must take turns to transmit if they can detect each other even 3 dB above the noise floor (the thermal noise floor is around -101 dBm for 20 MHz channels). On the other hand, transmitters will ignore transmitters with incompatible standards or on overlapping channels if the received signal strength from them is below a threshold Pth which, for non Wi-Fi 6 systems, is between -76 and -80 dBm.
It used wired (ethernet ) to BEB after collision
It used wireless ( wifi ) to BEB before transmission
Before starting it is better to get acquainted with a term called Protocol Data Unit (PDU). The term PDU is used to refer to the packets in different layers of the OSI model. Thus PDU gives an abstract idea of the data packets. The PDU has a different meaning in different layers still we can use it as a common term.
To give a clear picture:-
The PDU of Transport Layer is called as a Segment.
The PDU of Network Layer is called as a Packet.
The PDU of the Data-Link Layer is called Frames.
This is the basic meaning of different terms used in Computer Networks.
The Application layer can give any amount of data to the underlying layers, but it is not possible to send all the data given by the application layer to send directly. Thus, the TCP comes into the picture. The TCP helps break the data(given by application layer) into MSS(Maximum Segment Size) that the given network can handle so that further fragmentation doesn’t occur in the routers.
A frame check sequence (FCS) is an error-detecting code added to a frame in a communication protocol. Frames are used to send payload data from a source to a destination.
Preamble is used to adjust the clock rate at the receiver side.
In wireless networking, the hidden node problem or hidden terminal problem occurs when a node can communicate with a wireless access point (AP), but cannot directly communicate with other nodes that are communicating with that AP. This leads to difficulties in medium access control sublayer since multiple nodes can send data packets to the AP simultaneously, which creates interference at the AP resulting in no packet getting through.
Although some loss of packets is normal in wireless networking, and the higher layers will resend them, if one of the nodes is transferring a lot of large packets over a long period, the other node may get very little goodput.
Practical protocol solutions exist to the hidden node problem. For example, Request To Send/Clear To Send (RTS/CTS) mechanisms where nodes send short packets to request permission of the access point to send longer data packets. Because responses from the AP are seen by all the nodes, the nodes can synchronize their transmissions to not interfere. However, the mechanism introduces latency, and the overhead can often be greater than the cost, particularly for short data packets.
In wireless networks, the exposed node problem occurs when a node is prevented from sending packets to other nodes because of co-channel interference with a neighboring transmitter. Consider an example of four nodes labeled R1, S1, S2, and R2, where the two receivers (R1, R2) are out of range of each other, yet the two transmitters (S1, S2) in the middle are in range of each other. Here, if a transmission between S1 and R1 is taking place, node S2 is prevented from transmitting to R2 as it concludes after carrier sense that it will interfere with the transmission by its neighbor S1. However note that R2 could still receive the transmission of S2 without interference because it is out of range of S1.
IEEE 802.11 RTS/CTS mechanism helps to solve this problem only if the nodes are synchronized and packet sizes and data rates are the same for both the transmitting nodes. When a node hears an RTS from a neighboring node, but not the corresponding CTS, that node can deduce that it is an exposed node and is permitted to transmit to other neighboring nodes.
If the nodes are not synchronized (or if the packet sizes are different or the data rates are different) the problem may occur that the sender will not hear the CTS or the ACK during the transmission of data of the second sender.
The exposed node problem is not an issue in cellular networks as the power and distance between cells is controlled to avoid it.
The information needed for a computer to gain access to a website for example google is: IP Address, Network Mask, Default Gateway (Router), and DNS.
The purpose of the network mask is to tell whether the nodes of the destination and source are on the same or different networks, and if they are different, it will involve a default gateway.
IPv4 & IPv6 are both IP addresses that are binary numbers. Comparing IPv6 vs IPv4, IPv4 is 32 bit binary number while IPv6 is 128 bit binary number address. IPv4 address are separated by periods while IPv6 address are separated by colons.
Both are used to identify machines connected to a network. In principle, they are the same, but they are different in how they work. Below are the main differences between IPv4 and IPv6:
IPv4 and IPv6 cannot communicate with other but can exist together on the same network. This is known as Dual Stack.
What makes IPv4 not better than IPv6 :
IPv4 addresses are not enough
security issue.
performance issue
1. Hierarchical Routing Protocol : Hierarchical Routing is the method of routing in networks that is based on hierarchical addressing. Most transmission control protocol, Internet protocol (DCPIP). Routing is based on two level of hierarchical routing in which IP address is divided into a network, person and a host person. Gateways use only the network a person tell an IP data until gateways delivered it directly.
It addresses the growth of routing tables. Routers are further divided into regions and they know the route of their own regions only. It works like a telephone routing.
Example – City, State, Country, Continent.
2. Flat Routing Protocol : In flat routing protocol, if any node needs to transmit data, it first searches for a valid route to the base station and then transmits the data. Nodes to the base station may drain their energy quickly.
They are the flat networks in which every incoming packet is sent out on every outgoing line except the one it arrived on. Vast numbers of duplicate packets are generated. It is good for small networks and offers high reliability.
Example – Routing Information Protocol, Interior Gateway Routing Protocol.
Difference between Hierarchical and Flat Routing Protocol :
A domain is a type of computer network in which all user computers, printers accounts, and other devices registered. It is a central database located on single or multiple clusters of central computers, that is known as domain controllers.
The collision domain defines the set of devices on which their frames could collide. It is a network segment connected by a shared medium or using repeaters where real-time data transmissions collide.
The collision domain applies to wireless networks. However, it also affects earlier versions of Ethernet. A collision happens when two separate devices simultaneously send a packet on the commonly shared network segment. The packets collide, and both devices require sending the packets again. That helps you to reduce network efficiency.
A broadcast domain is a logical division of a computer network. In this type of Domain, nodes can reach each other using broadcast at the data link layer. A broadcast domain either in the same LAN segment or which can bridge to other LAN networks.
This Domain contains all devices which can reach each other at the data link layer with the help of broadcast. Every port on a switch or in a hub should be in the same broadcast domain.
However, all port on a router are in the distinct broadcast domains, and routers never broadcast from one Domain to another.
Above given image is an example of a collision domain.
In the above example, you can see "Computer A" send a data signal to "Computer C." In the same way, "Computer B" sends a data signal to "Computer D" where a Collision will happen.
When the number of devices in a collision domain rises, and the chances of Collision will be increased. If there is more traffic in a collision domain, there are high chances of crashes to occur. More collisions will happen with many network devices in a Collision domain.
An increased number of collisions will result in a low-quality network because hosts spend a large amount of time for packet processing and retransmission.
In other words, Collision never happens between two devices, which are connected to different ports of a Switch.
In the above-given image, you can see "Computer A" is sending a broadcast, and the switch will forward it to all the ports. Every connected switch will get a copy of the broadcast packet. Here, all the switches will flood the broadcast packet to all types of ports.
In this domain type, the router also gets a copy of the broadcast packet. However, the route will not forward the packet to the next network segment. When the number of broadcasts Domain increases, the number of broadcasts also increases, and the network quality comes down.
Here are some important differences between Collision and Broadcast Domain:
The Collision domain is a network section that allows traffic to flow forward and backward. In contrast, a Broadcast domain is a type of Domain wherein traffic flows all over the network.
In the Collision domain, all the devices might include the devices of other IP subnetworks, whereas in the broadcast Domain is never limited to the specific IP subnetwork for all types of IP broadcasts.
In collision domain, packet collision occurs as multiple devices transmit data on a single wire link. On the other hand, the broadcast domain mostly uses a switched environment to broadcast, so no collision occurs.
Ether Type
Protocol
0x0800
Internet Protocol, Version 4 (IPv4)
0x0806
Address Resolution Protocol (ARP)
0x8035
Reverse Address Resolution Protocol (RARP)
0x8100
VLAN-tagged frame (IEEE 802.1Q)
0x814C
Simple Network Management Protocol (SNMP)
0x86DD
Internet Protocol, Version 6 (IPv6)
0x8847
MPLS unicast
0x8848
MPLS multicast
0x8870
Jumbo Frames
0x888E
EAP over LAN (IEEE 802.1X)
0x88E5
MAC security (IEEE 802.1AE)
0x88F7
Precision Time Protocol (IEEE 1588)
Basis for differences
IPv4
IPv6
Size of IP address
IPv4 is a 32-Bit IP Address.
IPv6 is 128 Bit IP Address.
Addressing method
IPv4 is a numeric address, and its binary bits are separated by a dot (.)
IPv6 is an alphanumeric address whose binary bits are separated by a colon (:). It also contains hexadecimal.
Number of header fields
12
8
Length of header filed
20
40
Checksum
Has checksum fields
Does not have checksum fields
Example
12.244.233.165
2001:0db8:0000:0000:0000:ff00:0042:7879
Type of Addresses
Unicast, broadcast, and multicast.
Unicast, multicast, and anycast.
Number of classes
IPv4 offers five different classes of IP Address. Class A to E.
lPv6 allows storing an unlimited number of IP Address.
Configuration
You have to configure a newly installed system before it can communicate with other systems.
In IPv6, the configuration is optional, depending upon on functions needed.
VLSM support
IPv4 support VLSM (Variable Length Subnet mask).
IPv6 does not offer support for VLSM.
Fragmentation
Fragmentation is done by sending and forwarding routes.
Fragmentation is done by the sender.
Routing Information Protocol (RIP)
RIP is a routing protocol supported by the routed daemon.
RIP does not support IPv6. It uses static routes.
Network Configuration
Networks need to be configured either manually or with DHCP. IPv4 had several overlays to handle Internet growth, which require more maintenance efforts.
IPv6 support autoconfiguration capabilities.
Best feature
Widespread use of NAT (Network address translation) devices which allows single NAT address can mask thousands of non-routable addresses, making end-to-end integrity achievable.
It allows direct addressing because of vast address Space.
Address Mask
Use for the designated network from host portion.
Not used.
SNMP
SNMP is a protocol used for system management.
SNMP does not support IPv6.
Mobility & Interoperability
Relatively constrained network topologies to which move restrict mobility and interoperability capabilities.
IPv6 provides interoperability and mobility capabilities which are embedded in network devices.
Security
Security is dependent on applications - IPv4 was not designed with security in mind.
IPSec(Internet Protocol Security) is built into the IPv6 protocol, usable with a proper key infrastructure.
Packet size
Packet size 576 bytes required, fragmentation optional
1208 bytes required without fragmentation
Packet fragmentation
Allows from routers and sending host
Sending hosts only
Packet header
Does not identify packet flow for QoS handling which includes checksum options.
Packet head contains Flow Label field that specifies packet flow for QoS handling
DNS records
Address (A) records, maps hostnames
Address (AAAA) records, maps hostnames
Address configuration
Manual or via DHCP
Stateless address autoconfiguration using Internet Control Message Protocol version 6 (ICMPv6) or DHCPv6
IP to MAC resolution
Broadcast ARP
Multicast Neighbour Solicitation
Local subnet Group management
Internet Group Management Protocol GMP)
Multicast Listener Discovery (MLD)
Optional Fields
Has Optional Fields
Does not have optional fields. But Extension headers are available.
IPSec
Internet Protocol Security (IPSec) concerning network security is optional
Internet Protocol Security (IPSec) Concerning network security is mandatory
Dynamic host configuration Server
Clients have approach DHCS (Dynamic Host Configuration server) whenever they want to connect to a network.
A Client does not have to approach any such server as they are given permanent addresses.
Mapping
Uses ARP(Address Resolution Protocol) to map to MAC address
Uses NDP(Neighbour Discovery Protocol) to map to MAC address
Combability with mobile devices
IPv4 address uses the dot-decimal notation. That's why it is not suitable for mobile networks.
IPv6 address is represented in hexadecimal, colon- separated notation. IPv6 is better suited to mobile networks.
Hierarchical Routing Protocol
Flat Routing Protocol
It is simple but non-optimal routing.
Routing can be made optimal but with an added complexity.
It is a Channel Reservation-based scheduling.
It is a Contention-based scheduling.
Collisions is avoided.
Collisions over-head in attendance.
Overhead of cluster information all over the network.
Routes form only in the regions that have data for transmission.
Fair channel allocation.
Fairness is not guaranteed.
In this, Energy Dissipation is consistent.
In this, Energy Dissipation depends on traffic patterns.
Collision Domain
Broadcast Domain
The Collision domain is a network section that allows traffic to flow forward and backward.
A Broadcast domain is a type of Domain wherein traffic flows all over the network.
The Collision domain refers to a set of devices in which packet collision could occur.
Broadcast domain refers to a logical set of reachable computer systems without using a router.
The devices might include the devices of other IP subnetworks.
Broadcast Domain is never limited to the specific IP subnetwork for all types of IP broadcasts.
Packet collision occurs as multiple devices transmit data on a single wire link.
The broadcast domain mostly uses a switched environment to broadcast, so no collision occurs.
Switches will break in the collision domain.
Switches will never break in the broadcast domain.
In, collision domain, every port on a router are in the separate broadcast domains.
All ports on a switch or a hub likely to be in the same broadcast domain.