Pages

Friday, 25 October 2024

Ethernet IEEE 802.3

The basic frame format which is required for all MAC implementation is defined in IEEE 802.3 standard. Ethernet frame starts with the Preamble and SFD, both work at the physical layer. The ethernet header contains both the Source and Destination MAC address, after which the payload of the frame is present. The last field is CRC which is used to detect the error. 

1. Preamble

It is a 7 byte field that contains a pattern of alternating 0’s and 1’s.
It alerts the stations that a frame is going to start.
It also enables the sender and receiver to establish bit synchronization.
 
2. Start Frame Delimiter (SFD)-
 
It is a 1 byte field which is always set to 10101011.
The last two bits “11” indicate the end of Start Frame Delimiter and marks the beginning of the frame.
 
NOTES
The above two fields are added by the physical layer and represents the physical layer header.
Sometimes, Start Frame Delimiter (SFD) is considered to be a part of Preamble.
That is why, at many places, Preamble field length is described as 8 bytes.
 
3. Destination Address-
 
It is a 6 byte field that contains the MAC address of the destination for which the data is destined.
 
4. Source Address-
 
It is a 6 byte field that contains the MAC address of the source which is sending the data.
 
5. Length-
 
It is a 2 byte field which specifies the length (number of bytes) of the data field.
This field is required because Ethernet uses variable sized frames.
 
NOTES
The maximum value that can be accommodated in this field = 2^16 – 1 = 65535.
But it does not mean maximum data that can be sent in one frame is 65535 bytes.
The maximum amount of data that can be sent in a Ethernet frame is 1500 bytes.
This is to avoid the monopoly of any single station.
 
The following three fields collectively represents the Ethernet Header–
Destination Address (6 bytes)
Source Address (6 bytes)
Length (2 bytes)
Thus, Ethernet Header Size = 14 bytes.
 
6. Data-
 
It is a variable length field which contains the actual data.
It is also called as a payload field.
The length of this field lies in the range [ 46 bytes , 1500 bytes ].
Thus, in a Ethernet frame, minimum data has to be 46 bytes and maximum data can be 1500 bytes.
 
Minimum Length of Data Field
 
Ethernet uses CSMA / CD as access control method to deal with collisions.For detecting the collisions, CSMA / CD requires-
Minimum length of data packet = 2 x Propagation delay x Bandwidth
Substituting the standard values of Ethernet, it is found that minimum length of the Ethernet frame has to be 64 bytes starting from the destination address field to the CRC field and 72 bytes including the Preamble and SFD fields.
Therefore, minimum length of the data field has to be = 64 bytes – (6+6+2+4) bytes = 46 bytes
 
Maximum Length of Data Field
 
The maximum amount of data that can be sent in a Ethernet frame is 1500 bytes.
This is to avoid the monopoly of any single station.
If Ethernet allows the frames of big sizes, then other stations may not get the fair chance to send their data.
 
7. Frame Check Sequence (CRC)-
 
It is a 4 byte field that contains the CRC code for error detection.
 
Advantages of Using Ethernet-
 
It is simple to understand and implement.
Its maintenance is easy.
It is cheap.

Asynchronous Transfer Mode (ATM): Architecture and Layers

ATM has a three-dimensional architecture. It contains the user plane, control plane, and management plane.Both the user plane and the control plane are divided into the following layers: 

physical layer, 
ATM layer, 
ATM Adaptation Layer (AAL), and upper layer. 

Each layer is further divided into sublayers.The control plane establishes and tears down connections with signaling protocols. The management plane contains layer management and plane management. Layer management manages the layers in each plane and has a layered structure corresponding to other planes. Plane management manages the system and the communications between different planes.Figure shows the relationships between layers and planes in ATM.

ATM layers have the following functions:

Physical layer—Provides transmission channels for ATM cells. At this layer, cells received from the ATM layer are transferred into a continuous bit stream after transmission overheads are added to them. Meanwhile, continuous bit streams received from physical media are restored to cells, which are then passed to the ATM layer.

ATM layer—Resides over the physical layer, and implements cell-based communication with its peer layer by invoking the services provided by the physical layer. It is independent of physical media, implementation of the physical layer, and types of services being carried. AAL passes 48-byte payloads, which are called segmentation and reassembly protocol data units (SAR-PDUs) to the ATM layer. The ATM layer encapsulates the 48-byte payloads in 5-byte headers, and passes 53-byte cells to the physical layer. Other functions of the ATM layer include VPI/VCI transmission, cell multiplexing/demultiplexing, and generic flow control.

ATM Adaptation Layer—Provides interfaces between high-level protocols and the ATM Layer. It forwards information between the ATM layer and upper-layer protocols. Four types of AAL are available: AAL1, AAL2, AAL3/4, and AAL5, each of which supports specific services provided in an ATM network. Hewlett Packard Enterprise uses AAL5 for data communication services.

ATM upper-layer protocols—Responsible for WAN interconnection, Layer 3 interconnection, and multiprotocol over ATM (such as IP, IPoE, PPP, and PPPoE).

Wired LAN(IEEE 802.3) vs Wireless LAN(IEEE 802.11)

Wired LAN: IEEE 802.3 Standards

IEEE 802.3 is a collection of standards that define the physical and data link layers for wired Ethernet networks. This includes specifications for media access control (MAC) and various physical media types, primarily using copper and fiber optic cables. The standard was developed by the Institute of Electrical and Electronics Engineers (IEEE) to facilitate packet-based communication in local area networks (LANs) 

Key Variants of IEEE 802.3
  • 10BASE-T: 10 Mbps using twisted-pair cabling, up to 100 meters.
  • 100BASE-TX (Fast Ethernet): 100 Mbps, also using twisted-pair cabling, with a maximum length of 100 meters.
  • 1000BASE-T (Gigabit Ethernet): 1 Gbps over twisted-pair cabling, up to 100 meters.
  • 10GBASE-T: 10 Gbps connections over twisted-pair cables, supporting lengths up to 100 meters 
These standards have evolved to support higher data rates and different types of cabling, reflecting advancements in technology and increasing demands for bandwidth.

Wireless LAN: IEEE 802.11 Standards

The IEEE 802.11 standards define wireless local area network (WLAN) technologies. These standards specify the protocols for over-the-air communication between wireless clients and access points, ensuring compatibility and interoperability among devices 
Key Variants of IEEE 802.11

  • 802.11b: Operates at up to 11 Mbps in the 2.4 GHz band using Direct Sequence Spread Spectrum (DSSS).
  • 802.11g: Offers speeds up to 54 Mbps in the same frequency band as 802.11b, using Orthogonal Frequency-Division Multiplexing (OFDM).

  • 802.11n: Supports multiple input multiple output (MIMO) technology, achieving speeds exceeding 600 Mbps
Each variant enhances performance, range, and security features compared to its predecessors

Tuesday, 15 October 2024

OSPF Using CPT

OSPF (Open Shortest Path First) is a common networking protocol used for routing within an autonomous system and is widely used due to its speed and scalability.

Topology Setup:
Let’s assume you have a basic topology with 3 routers connected to each other:
Router1
Router2
Router3
Each router will have an interface connected to its neighbor. 
The process involves:
  1. Assigning IP addresses to interfaces.
  2. Enabling OSPF and assigning networks to OSPF areas.

Step-by-Step Instructions
1. Setup the Topology
Drag and drop 3 routers onto the Packet Tracer workspace. Use appropriate cables to connect the routers (choose cross-over for routers if needed).Add PCs if you want to test connectivity, but this is optional for basic OSPF setup.

2. Enable OSPF on Each Router
After configuring the IP addresses, you will now enable OSPF on each router and assign the networks to an OSPF area.

Router1 OSPF Configuration:
Router# en
Router# configure terminal
Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 20.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 30.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 40.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 50.0.0.0. 0.255.255.255 area 0
Router(config-router)# exit




Router2 OSPF Configuration:
Router# en
Router# configure terminal
Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 20.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 30.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 40.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 50.0.0.0. 0.255.255.255 area 0
Router(config-router)# exit


Router3 OSPF Configuration:
Router# en
Router# configure terminal
Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 20.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 30.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 40.0.0.0. 0.255.255.255 area 0
Router(config-router)# network 50.0.0.0. 0.255.255.255 area 0
Router(config-router)# exit


4. Verify OSPF Configuration
To verify routing table entries:
Router# show ip route


To verify OSPF neighbors:
Router# show ip ospf neighbor


This should show you routes learned through OSPF, marked with an "O" for OSPF.

5. Test Connectivity
You can now use Ping from one router to another to check the connectivity through the OSPF network.
Router# ping 192.168.3.1
If OSPF is correctly configured, you should be able to ping between routers across different networks.


Notes:
OSPF works by building a link-state database and uses the Dijkstra algorithm to calculate the shortest path. This is why it quickly adapts to network changes.
You should ensure that all routers are in the same OSPF area (e.g., area 0), which is referred to as the backbone area.

Wildcard Mask Basics:
A wildcard mask is used in OSPF (Open Shortest Path First) and other routing protocols (like EIGRP) to define which bits of an IP address should be matched and which bits can vary. It’s essentially the inverse of a subnet mask.

A subnet mask uses binary 1s to represent network bits and 0s for host bits.
A wildcard mask is the opposite: it uses binary 0s to indicate which bits must match and 1s to indicate which bits can vary.

Key Concepts:
0 in the wildcard mask means "must match" (fixed bit).
1 in the wildcard mask means "can be anything" (wild bit).
Example: Wildcard Mask Calculation
For example, consider the subnet mask 255.255.255.0 (a /24 subnet):

Subnet Mask (Binary) Wildcard Mask (Binary)
11111111.11111111.11111111.00000000 00000000.00000000.00000000.11111111
The wildcard mask corresponding to 255.255.255.0 would be: 0.0.0.255

This wildcard mask tells the router that:
The first three octets must match exactly (because of the 0s),
The last octet can vary (because of the 255, which is all 1s).
Wildcard Mask Usage in OSPF
When configuring OSPF, you use the wildcard mask in the network command to specify which parts of the IP address should be considered for matching within OSPF areas.

Example in OSPF Configuration:
If you want to configure OSPF on the 192.168.1.0/24 network, you would use:
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
This command tells OSPF:

Match the first three octets (i.e., 192.168.1),
Allow any host address in the last octet (due to the 0.0.0.255 wildcard).
Another Example:
For the 10.10.0.0/16 network (subnet mask 255.255.0.0), the corresponding wildcard mask would be 0.0.255.255, meaning:
Router(config-router)# network 10.10.0.0 0.0.255.255 area 0
This command allows any host address in the last two octets (10.10.x.x), but the first two octets must match 10.10.

Summary of Common Subnet Masks and Corresponding Wildcard Masks:
Subnet Mask     Wildcard Mask
255.255.255.0     0.0.0.255
255.255.0.0     0.0.255.255
255.0.0.0             0.255.255.255
255.255.255.128   0.0.0.127
255.255.255.192   0.0.0.63
Formula to Calculate Wildcard Mask:
You can calculate the wildcard mask manually by subtracting each octet of the subnet mask from 255:
Wildcard Mask = 255.255.255.255 - Subnet Mask
For example:
Subnet Mask: 255.255.255.0
Wildcard Mask: 255.255.255.255 - 255.255.255.0 = 0.0.0.255

Peer-to-Peer Networks

  Peer-to-Peer (P2P) networks are a decentralized type of network architecture where each device (or node) on the network can act as both a...