Вы находитесь на странице: 1из 40

_____________________________________

Ethernet Basics

Ethernet Basics

Chapter 1

_____________________________________
V1.0
1 - 1
_____________________________________
Ethernet Basics

Notes:

_____________________________________
1 - 2
_____________________________________
Ethernet Basics

Data Communication

_____________________________________
1 - 3
_____________________________________
Ethernet Basics

Layer Models
Each layer has a precisely defined task
Clearly defined interfaces between layers
Each layer provides services for the next higher-level layer
Each layer uses services for the lower-level layer
Supports the exchangeability of subsystems
Supports expandability
Transparency of lower layers

In modern networks, communication tasks usually are subdivided into several different layers. The
individual layers are usually presented in a general layer model.

The layer model is intended to provide an abstraction of individual communication tasks. In this
way, each layer takes over certain tasks that are processed independently of other layers. The
layers exchange information among themselves via pre-determined interfaces. In this way, the
individual layers can be implemented independently of each other and they can also be exchanged.

In these layer models, the user communicates directly with the top layer. All lower-level layers are
transparent for the user. The top level communicates via the determined interfaces with he next
lower-level.
This continues until finally the lowest level of the layer model accesses the transmission medium
and transmits the data via the network.

The most commonly used models are the ISO/ISO layer model as well as the DoD layer model
(also called TCP/IP model).

_____________________________________
IT202001_0005/1
1 - 4
_____________________________________
Ethernet Basics

ISO/OSI Communication Model

ISO = International Standard Organization


OSI = Open System Interconnection

The ISO/OSI communication model (OSI = Open Systems Interconnection) has been introduced by
the ISO as model for function distribution in communication systems and as basis for
standardization. Simultaneously the ISO/OSI model today is a model for further discussion and a
structural design for modern communication systems. The large practical impact of the ISO/OSI
model is best explained by the clearly defined functions of layers and their interfaces.

In the ISO/OSI model it is possible to replace the individual layers by other technical solutions
without needing to modify the other layers (idea of modularity).

The ISO/OSI model has 7 layers with precisely defined individual tasks.

_____________________________________
IT202001_0006/1
1 - 5
_____________________________________
Ethernet Basics

Basic Communication Principle

The layer model in each end device within the network is implemented as software stack. The
software stack thus describes the actual implementation of the ISO/OSI layer model on the
individual devices.

For data transmission in the network, the individual layers of the software stack are run through
subsequently. Data packet transmission is initiated by the transmitter. Here, the application
program transfers the data to be transmitted to the application layer. Each layer transfers the data
to the next layer below. The physical layer transfers the data as data packets onto the transmission
media.

At the receiver, the reversed process is taking place. The physical layer receives the data packets
from the transmission media. Each layer transfers the data to the next higher-level layer. Finally,
the application layer transfers the transmitted data to the application program on the receiver-side.

In the network infrastructure devices not all layers of the layer model are implemented. The
infrastructure devices are distinguished according to these implemented layers: hubs, switches,
routers, and gateways. These devices transfer the individual data packets on their way from
transmitter to receiver.

_____________________________________
IT202001_0012/1
1 - 6
_____________________________________
Ethernet Basics

Different Communication Models

Alongside the ISO/OSI model there is another communication model, the DoD model (DoD =
Department of Defence). The DoD model is the basis for todays Internet. The most common
implementation of this communication model is the TCP/IP stack.

The DoD model can easily be mapped onto the general ISO/OSI model. Thus layers 5 to 7 of the
ISO/OSI model are summarized to form the application layer in the DoD model. Layers 1 and 2 of
the ISO/OSI model form the network layer in the DoD model. Layers 3 and 4 are contained in the
both communication models.

The ISO/OSI model, however, has a more refined structure. In this way, it is more flexible when
exchanging individual layers. The DoD model is the older model and had been developed by the
American Department of Defense. The TCP/IP stack that was most accepted during the
development of the Internet, is an implementation of the DoD model. This also is the reason for the
predominance of this communication model.

In the following we will go into greater detail regarding the concrete implementation of the DoD
model, i.e., the TCP/IP stack.

_____________________________________
IT202001_0013/1
1 - 7
_____________________________________
Ethernet Basics

Data Packet Generation

For each data transmission via the network, the application program transfers information to the
application layer. Then the data are transmitted throughout all layers until the bottom layer passes
on the information as data packets to the transmission medium.

In the concrete implementation of the DoD model, i.e., the TCP/IP stack, the rule is as follows: The
application layer receives the information to be transmitted from the application program. In the
application layer, the information of the protocol to be used (e.g., HTTP, FTP, etc). These user data
are then passed on from layer to layer. During this process, each layer adds certain monitoring and
address information to the application data, the so-called header. These pieces of information help
the respective layer of the receiver to interpret the data correctly.

If the data packet has been given monitoring and addressing functions by all layers, it can be sent
via the network to the receiver. The data packet now contains all pieces of address information so
that it will be forwarded to the correct receiver.

_____________________________________
IT202001_0014/1
1 - 8
_____________________________________
Ethernet Basics

Addressing the Data Packets

The transmission of data packets in the network is like posting letters. For posting the letter at the
receiver, the address information on the envelope is sufficient. The receiver then checks the
address once more to see whether the letter was really intended for him. Finally the receiver takes
the letter with the actual information on it out of the envelope. The information has been
successfully transferred from the sender to the receiver.

For data exchange in the network a similar process is used. The essential difference is that the user
data are packaged several times and that pieces of address information are attached to them.
However, this address information is also intended to ensure that each data packet reaches its aim.
The receiver then takes the address information off the actual information as in the letter posting
example until finally the actual information has reached the receiver.

_____________________________________
IT202001_0015/1
1 - 9
_____________________________________
Ethernet Basics

Protocol Structure in the TCP/IP Stack

The TCP/IP stack is a concrete implementation of the DoD communication model. The TCP/IP
stack usually contains a certain set of protocols for the realization of the individual layers.

The network layer usually uses Ethernet. Thus also the way of data transmission via copper cables
or FO cables is pre-determined. However, this layer could also be implemented suing Wireless
LAN. In this way a wireless transmission of information would also be possible.

In the network layer, the IP protocol (IP = Internet Protocol) is used. Among others, the IP protocol
is responsible for the logic addressing of end devices but also for routing on the Internet. Also
protocols such as ARP (Address Resolution Protocol) or ICMP (Internet Control Message Protocol)
are in the network layer. They provide further functionalities in the network. ICMP for example is the
protocol behind the PING command. It serves to check the availability of the devices within the
network.

In the application layer several types of protocols are used. For instance HTTP (Hypertext Transfer
Protocol) for calling Internet pages or FTP (File Transfer Protocol) for the exchange of files via the
network.

_____________________________________
IT202001_0016/1
1 - 10
_____________________________________
Ethernet Basics

Network Infrastructure

_____________________________________
1 - 11
_____________________________________
Ethernet Basics

Hub Features
Multi-port repeater (signal amplifier)
Shared medium
Half duplex connections
All data packets are forwarded on all ports
Large bandwidth required
No checking for faulty packets

Basically the hub is a simple signal amplifier with several ports. A hub outputs all incoming packets
on all other ports. This is an easy way to ensure that all data packets will reach their target within
the network.

The larger disadvantage of a hub is the duplex mode. Hubs only support half-duplex connections.
This means that packets can be either sent or received simultaneously. It is not possible to
simultaneously transmit and receive data packets. In this way, different data packets might collide
on the transmission medium and become useless. This might lead to unpredictable delays during
data transmission. For this reason, networks based on hub technology are not real-time capable.

_____________________________________
IT202001_0020/1
1 - 12
_____________________________________
Ethernet Basics

Operating Functionality of the Hub

The hub operates in the first layer of the ISO/OSI layer model. The data packet is received at the
receive port and is then forwarded on all other ports together with an amplified signal.
The hub does not change the data packet in any way.

_____________________________________
IT202001_0021/1
1 - 13
_____________________________________
Ethernet Basics

Hub Duplex Mode

Combined transmit and receive unit


It is only possible to transmit or to receive at the same time
Half duplex (HD)
Data packets might collide on the line
No real-time capability

The hub does only have one combined transmit and receive unit per port. In this way, despite
separate wire pairs for sending and receiving on the line, it is not possible to simultaneously send
and receive.

The capabilities of a device regarding the transmission and reception of packets are called duplex
mode. The possibility to be capable of either transmitting or receiving data packets is called half-
duplex.

The half-duplex operation can lead to collisions on the transmission medium. These collisions lead
to delays in data transmission. Another transmission of the destroyed data packets is triggered after
a random period of time.
Since a collision might theoretically happen every time a data packet is being transmitted again, the
entire delay time during data transmission via hubs is unpredictable. For this reason, networks
using hubs are not real-time capable.

_____________________________________
IT202001_0022/1
1 - 14
_____________________________________
Ethernet Basics

Switch Features
Differentiated transmission and receive units
Full duplex connections
Elimination of collision domains
Evaluating physical addresses
Target-related forwarding of data packets
Transparent for end devices
Checking for faulty packets

The switch has separate transmit and receive units. In this way, the switch can simultaneously
transmit and receive data packets on a port. This capability is called full duplex. On the connection
lines between two switches operating in full-duplex mode, there are no collisions of data packets.
Thanks to this elimination of collision domains, the cause for unpredictable delays in data
transmission does not exist here. In this way, a network using switches is real-time capable.

The switch evaluates physical addresses of data packets. According to the address information the
switch can tell to which port the data packet is to be sent so that it will reach its receiver. An internal
address table that is being dynamically maintained during operation by the switch itself supports
this procedure. Thus the data packets are transmitted in a target-related way. This results in
essentially reduced data traffic as compared to hubs.

An end device in the network addresses another device in the same network. The device is not
responsible for the data packet finding its way to the receiver. This is done by the switches within
the network. For the end devices, the switches in the network are entirely transparent.

_____________________________________
IT202001_0023/1
1 - 15
_____________________________________
Ethernet Basics

Operating Principle of the Switch

The switch operates in the second layer (data link layer) of the ISO/OSI communication model. The
receive port of the switch receives the data packet. The physical layer that is responsible for the
interface to the transmission medium, transfers the packet to the data link layer. After processing
the data packet in the data link layer, the data packet is forwarded to the physical layer by the
output port. The physical layer then transfers the data packet to the transmission medium. The
medium might be another medium than the one at the receive port. In this case the switch also
serves as media converter.

During the processing of data packets in the data link layer, the switch only needs the physical
addresses contained in each data packet. The switch looks at the transmitters address of each
incoming data packet. Due to the fact that a packet with this transmitters address was received at a
specified port, the switch knows that this device is accessible via this port. The switch stores this
information in its internal address table. During operation, the switch is continuously maintaining
this table. Thanks to this address table, the switch knows after evaluation of the target address
to which port the packet is to be sent so that it will reach its goal. However, if the switch does not
yet have any entry in its address table, the switch behaves like a hub and forwards packets at all
ports in order to make sure that each packet reaches its goal.

_____________________________________
IT202001_0024/1
1 - 16
_____________________________________
Ethernet Basics

Switch - Duplex Mode

Separate transmit and receive unit


Simultaneous transmitting and receiving possible
Full duplex (FD)
No collisions on the line
Real-time capability

The switch has separate transmit and receive units per port. In this way, the switch is able to
simultaneously transmit and receive data packets on each port. This feature of a switch is called full
duplex.

Moreover, the data packets are buffered within a switch. In this way, each connecting line between
two switches can be regarded as point-to-point connection.

Thanks to these two switch features collisions do not occur within the network anymore. In this way,
unpredictable delays during data transmission are omitted. The transmission time becomes
calculable so that the network becomes real-time capable.

_____________________________________
IT202001_0025/1
1 - 17
_____________________________________
Ethernet Basics

Notes:

_____________________________________
1 - 18
_____________________________________
Ethernet Basics

MAC Addresses

_____________________________________
1 - 19
_____________________________________
Ethernet Basics

MAC Addresses

00. A0. 45. XX. YY. YY.


Manufacturer-specific Individual number of the
address (3 bytes) component (3 bytes)

OUI Consecutive
(Organizationally Unique Identifier) device enumeration

MAC addresses (Media Access Control)


Hardware address of the network interface
Unique worldwide
MAC addresses in a network must be unique

On the common transmission medium in a local network, each end device needs a unique
physical address, the so-called MAC address.

The MAC address has a fixed length of 6 bytes (48 bits). The first 3 bytes contain a
manufacturer-specific ID, the so-called OUI Organizationally Unique Identifier). OUIs are centrally
managed by the IEEE (Institute of Electrical and Electronics Engineers). Each manufacturer can
order a OUI there. The second 3 Bytes contain a consecutive device enumeration. For this device
enumeration the manufacturer himself is responsible. He has to make sure that each device
produced by him has its own unique MAC address.

This system is to make sure that each MAC address is unique worldwide. In this way only, each
device worldwide can be uniquely identified using its MAC address.

_____________________________________
IT202002_0010/1
1 - 20
_____________________________________
Ethernet Basics

MAC Address Types


Unicast
- A station transmits data to one specified
station only
- Target and source addresses are direct
hardware addresses

Multicast
- A station transmits data to a group of
stations
- The target address is a group address

Broadcast
- A station transmits data to all stations within
the network
- The target address is the broadcast address

Unicast
With a unicast data packet, exactly one device within the network is addressed. The target and
source address in the Ethernet data packet are assigned to one network interface each.

Multicast
With the multicast data packet a group of devices within the network is addressed. The target
address in the Ethernet data packet is a group address. Multicast packets are forwarded by
commonly used switches to all ports. In this way only it can be ensured that all group members will
receive the data packet. All devices that are members of the respective group receive multicast
data packets. All other devices ignore the packets and reject them.

Broadcast
A broadcast data packet addresses all devices in the network. The target address in the Ethernet
telegram is a broadcast address (FF:FF:FF:FF:FF:FF). The packets are forwarded to all devices
within the local network. All devices can identify the target address and accept the data packets.

_____________________________________
IT202002_0011/1
1 - 21
_____________________________________
Ethernet Basics

MAC Address Examples


Unicast
- Unicast addresses start with 00 in the first byte
- 00:A0:45:xx:xx:xx Hardware addresses by Phoenix Contact

Multicast
- Multicast addresses start with 01 in the first byte
- 01:00:5E:xx:xx:xx IP multicast
- 01:80:C2:00:00:00 Spanning Tree Protocol (STP)
- 01:0E:CF:xx:xx:xx PROFINET group addresses

Broadcast
- In the broadcast address all bits are set
- FF:FF:FF:FF:FF:FF Broadcast address

For the individual target MAC addresses in the Ethernet telegrams it is very easy to recognize the
MAC address type.

Usually the unicast addresses start with 00 in the first byte. The MAC address the first byte of which
is 01 basically are multicast addresses. Broadcast addresses always consist of the FF character
sequence in all 6 bytes.

_____________________________________
IT202002_0012/1
1 - 22
_____________________________________
Ethernet Basics

Ethernet Telegram Format

_____________________________________
1 - 23
_____________________________________
Ethernet Basics

Ethernet Frame Format

Ethernet paket (64 1518 bytes)

Preamble Target address Source address Type Data Checksum


8 bytes 6 bytes 6 bytes 2 bytes 46 1500 bytes 4 bytes

Preamble: Synchronization
Target address: MAC address of the receiver
Source address: MAC address of the transmitter
Type: Type information of the subsequent data
Data field: User data
Checksum: CRC checksum

The actual Ethernet data packet comprises fields such as target address, source address, type,
data, checksum. The length restrictions of the data field from 46 to 1.500 bytes result in a length of
64 1.518 bytes for the entire data packet including the packet overhead.

If the minimum data field length of 46 bytes of user data has not been made use of to the full so that
the rest of the data field is filled with zeros (Padding bytes) to achieve the minimum data field
length.

With the checksum field a received packet can be checked for transmission errors. If transmission
errors that cannot be corrected by the receiver re detected in a packet the data packet is rejected.
The re-transmission of rejected packets is the task of higher-level layers.

Beyond the pure Ethernet data packet there still is the preamble (8 bytes). It serves to synchronize
the receiver. Moreover a certain waiting time has to be observed between consecutive transmission
attempts, it is called the interframe gap (12 bytes). For the calculation of the required bandwidth, a
data packet must thus have the following number of bytes per data packets:

Entire number of bytes = Ethernet packet (64 1.518 bytes) + preamble (8 bytes) + interframe gap
(12 bytes)

_____________________________________
IT202002_0014/1
1 - 24
_____________________________________
Ethernet Basics

Ethernet Data Packet

With the Wireshark software, the Ethernet telegrams can be recorded. In the hexadecimal
presentation of the data packet, the telegram structure of an Ethernet data packet can be
recognized.

The first six bytes (ff ff ff ff ff ff) contains the broadcast address. The data packet is thus sent to all
devices within the network. The target address is followed by the source address (00 a0 45 03 fb
a9). This data packet was transmitted by a Phoenix Contact device. The source address is followed
by the data packet type (08 06). This type stands for ARP (Address Resolution Protocol), a protocol
for the resolution of network addresses.

The type field is followed by the user data of the ARP. Since less than 46 user data have been
transmitted for this data packet, the user data were filled with zeros so that a minimum length of the
user data field of 46 bytes was achieved.

_____________________________________
IT202002_0015/1
1 - 25
_____________________________________
Ethernet Basics

Notes:

_____________________________________
1 - 26
_____________________________________
Ethernet Basics

Comparison of Hubs and Switches

_____________________________________
1 - 27
_____________________________________
Ethernet Basics

Media Access via CSMA/CD


Carrier Sense
- Check whether the line is free
- Transmission only if the line is free
- If the line is occupied, transmission has to wait

Multiple Access
- All stations have equal rights
- Transmission time is defined independently

Collision Detection
- Collisions possible due to signal runtimes
- Collisions must be detected by the stations
- Transmission attempt is repeated

The media access within an Ethernet network is controlled by the CSMA/CD method. CSMA/CD
stands for Carrier Sense Multiple Access with Collision Detection.

Carrier Sense describes the checking of the transmission cable before the transmission takes
place. Before transmission, each station must check whether the line is free or whether it is already
occupied by another station. If the transmission line is occupied, the station must wait until the line
is free again before the data packet can be transmitted.

Multiple Access defines the fact that all stations within a network have the same rights. All stations
within the network have the same right to access the medium. The point in time of the transmission
can thus be determined independently by each station. However, certain rules have to be observed
here.

Due to the signal runtimes on the line, it might still be that two stations within the network almost
simultaneously put a data packet onto the line. This results in a data collision destroying data. A
collision on a line must be detected so that the transmission process can be repeated i.e. the
Collision Detection. If a collision is detected on the line, both stations withdraw their transmission.
Subsequently, a random period of time goes by until a new transmission process is initiated. The
random waiting time is intended to prevent yet another collision of the data packets of the same two
stations.

_____________________________________
IT202002_0005/1
1 - 28
_____________________________________
Ethernet Basics

Comparison of Hubs and Switches

A D Hub A D
Switch
A C A C
B C
B D B D

HD = Half Duplex FD = Full Duplex

CSMA / CD CSMA / CD

Not real-time capable! Real-time capable!

The hub forwards all incoming data packets to all ports. This ensures that all data packets within
the network reach their goal. In this way, each device in the network contains all data packets
transmitted within this network. If one data packet was not intended for a certain end device, this
data packet is simply rejected. Since each transmitted data packet occupies all data lines within the
network, only one station can transmit data packets at a time.

The switch buffers the data packets for a short time. In this way, a data packet on a connecting line
does not have an influence on a data packet on another connecting line. In this way, two stations
within one network can simultaneously transmit data packets within a network. The switch buffers
the packets for a short time and then forwards them on the corresponding ports.

Another important aspects about network infrastructure devices is the real-time capability. Since the
hub only supports half duplex mode, it is obliged to use the CSMA/CD method. For this reason a
network using hubs is not real-time capable. Switches support full duplex mode. In this way, no
collisions can occur on the connecting lines and the CSMA/CD method is not needed anymore.
Networks using switches only are thus real-time capable.

Real-time capability is an important reason for the fact that switches are required for many
Industrial Ethernet solutions.

_____________________________________
IT202002_0019/1
1 - 29
_____________________________________
Ethernet Basics

Processing Packets in a Switch


Reception of data packets
Error control via CRC checksum
Evaluation of the source address
Update of the MAC address table
- New entry
- Change entry

Search for target address in the MAC address table


Data packet is forwarded
- Directly to the target port if entry exists in MAC address table
- To all ports if no entry is in the MAC address table

The switch uses an internal MAC address table to be able to know which devices are accessible via
which ports so that data packets can be transmitted directly to the target within the network. This
MAC address table is filled dynamically during operation.

For each data packet received by the switch, a certain sequence of tasks is executed. First the data
packet is checked for possible transmission errors using its CRC checksum. Faulty packets are
rejected by the switch and the network is automatically cleaned of faulty data packets.

In the next step, the source address of the data packet is evaluated. Via the source address, the
switch recognizes the device by which the data packet was sent that was received by a certain
switch port. Thanks to the MAC address and the port number, the switch knows via which port it will
be able to access this device again. The switch saves this information in the internal MAC address
table.

Furthermore, the switch has a look at the target address of the data packet. If the MAC address
table contains an entry corresponding to this address, the switch forwards the data packet to the
port entered in the MAC address table. If there is no entry for the target address, the packet is
forwarded to all ports.

_____________________________________
IT202002_0020/1
1 - 30
_____________________________________
Ethernet Basics

Switch Function Scheme

Target Address Soruce Address Type Data CRC

Target Address Source Address

Search Update
MAC address table MAC address table

Entry present? Device in the MAC


address table?
nein ja No Yes

Packet at all Packet to Overwrire


New entry
ports target port entry

For the structure of the internal MAC address table the switch needs the fields for the target and
source address only.
Via the source address in the Ethernet data packets the switch continuously updates its MAC
address table. With the help of the target address, the switch searches the address table for each
packet and thus finds out to which port the respective data packet is to be transmitted.

_____________________________________
IT202002_0021/1
1 - 31
_____________________________________
Ethernet Basics

MAC Address Table

The MAC address of switches with web interface, the MAC address table can be displayed.

The table contains the MAC addresses of the device participating in the network.
The corresponding port indicates via which switch port the respective device is accessible.

_____________________________________
IT202002_0022/1
1 - 32
_____________________________________
Ethernet Basics

IP Addresses

_____________________________________
1 - 33
_____________________________________
Ethernet Basics

IP Addresses

IP address: 91 .121 .71 .62


(Example) 0101 1011.0111 1001.0010 0011.0011 1110

Subnet mask: 255 .255 .255 .0


(Example) 1111 1111.1111 1111.1111 1111.0000 0000

Subnet address structure:


0101 1011.0111 1001.0010 0011.0011 1110 IP address
AND 1111 1111.1111 1111.1111 1111.0000 0000 Subnet mask
0101 1011.0111 1001.0010 0011.0000 0000 = subnet address
91 .121 .71 .0

IP Address Structure
The IP address is a 32-bit binary number. For a better understanding and overview, the four octets
of the 32-bit binary number are presented as decimal numbers.

IP Address and Subnet Mask


The subnet mask is defined to be able to create subnets. With the help of the subnet mask the
network address can be derived from the IP address. The subnet mask also is a 32-bit binary
number and consists of a sequence of ones and a sequence of zeroes. The sequence of ones
characterizes the IP address bit positions forming the network address. The subsequent series of
zeroes characterizes those IP address bit positions representing the host address of the device in
the corresponding subnet.

Also the four octets of the subnet mask are represented as decimal numbers to provide a better
overview.

Creating the Subnet Address


The subnet address is created by ANDing the IP address with the subnet mask bit-by-bit.

_____________________________________
IT202003_0007/1
1 - 34
_____________________________________
Ethernet Basics

Special IP Addresses (1)


31 0

Class A 0

Network PC (Host)
Networks: 127 Hosts per network: 16.777.214

Class B 10

Network PC (Host)
Networks: 16.383 Hosts per network: 65.534

Class C 11 0

Network PC (Host)

Networks: 2.097.152 Hosts per network: 254

The international organization managing all IP addresses worldwide is the IANA


(Internet Assigned Numbers Authority, www.iana.org).

The worldwide IP address area is subdivided into network classes:

A-class networks with the network addresses 0.0.0.0 to 126.0.0.0 and the netmask 225.0.0.0. In
the A class, there are 127 networks with 16.777.214 host addresses each. A-class networks can
be identified by their highest IP address bit being 0.

B-class networks with the network addresses 128.0.0.0 to 191.255.0.0 and the netmask
255.255.0.0.
In the B class there are 16.383 networks with 65.534 host addresses each.
B-class networks can be identified by their two highest IP address bits being 10.

C-class networks with the network addresses 192.0.0.0 to 223.255.255.0 and the netmask
255.255.255.0.
In the C class there are 2.097.151 networks with 254 host addresses each.
C-class networks can be identified by their highest three IP address bits being 110.

_____________________________________
IT202003_0008/1
1 - 35
_____________________________________
Ethernet Basics

Subnets in the Predefined Address Area


Entire network:
149.218.0.0
255.255.0.0
Subnet 1: Subnet 2:
149.218.4.0 149.218.8.0
255.255.252.0 255.255.252.0

Subnet 3:
149.218.12.0
255.255.252.0

Subnet 1: 149 . 218 . 4 .0


1001 0101 . 1101 1010 . 0000 0100 . 0000 0000
Subnet 2: 149 . 218 .8 .0
1001 0101 . 1101 1010 . 0000 1000 . 0000 0000
Subnet 3: 149 . 218 . 12 .0
1001 0101 . 1101 1010 . 0000 1100 . 0000 0000
Netmask: 255 . 255 . 252 .0
1111 1111 . 1111 1111 . 1111 1100 . 0000 0000

In the presented example, we see a class B network (149.218/16 prefix). Subnets are created to
make network administration more efficient and to structure departments or areas of a company
with regard to information.

In the present case, there are three subnets with one common subnet mask:

Subnet 1: 149 .218 .4 .0


1001 0101.1101 1010.0000 0100.0000 0000
Subnet 2: 149 .218 .8 .0
1001 0101.1101 1010.0000 1000.0000 0000
Subnet 3: 149 .218 .12 .0
1001 0101.1101 1010.0000 1100.0000 0000
Net mask: 255 .255 .252 .0
1111 1111.1111 1111.1111 1100.0000 0000

In each subnet, there are 1022 devices, from 1 to 1022


(00.0000 0001 to 11.1111 1110).

The device assignment to one of the three subnets is only possible and detectable with the help of
the subnet mask:

Device A: 149 .218 .7 .1


1001 0101.1101 1010.0000 0111.0000 0001 Subnet 1
1111 1111.1111 1111.1111 1100.0000 0001
Device B: 149 .218 .8 .1
1001 0101.1101 1010.0000 1000.0000 0001 Subnet 2
1111 1111.1111 1111.1111 1100.0000 0000
Device C: 149 .218 .14 .1
1001 0101.1101 1010.0000 1110.0000 0001 Subnet 3
1111 1111.1111 1111.1111 1100.0000 0000

_____________________________________
IT202003_0010/1
1 - 36
_____________________________________
Ethernet Basics

Devices in the Same Network


D1: 149.218.7.4
R

D2: 149.218.7.10

D1 149.218.7.4 = 1001 0101. 1101 1010. 0000 0111. 0000 0100


Netmask 255.255.252.0 = 1111 1111. 1111 1111. 1111 1100. 0000 0000
Relevant of D1 = 1001 0101. 1101 1010. 0000 0100. 0000 0000

D2 149.218.7.10 = 1001 0101. 1101 1010. 0000 0111. 0000 1010


Netmask 255.255.252.0 = 1111 1111. 1111 1111. 1111 1100. 0000 0000
Relevant of D1 = 1001 0101. 1101 1010. 0000 0100. 0000 0000

D1 and D2 are in the same logic networks


Default gateway (R) is not addressed

_____________________________________
IT202003_0011/1
1 - 37
_____________________________________
Ethernet Basics

Devices in the Other Network


D1: 149.218.7.4 D2: 149.218.8.1
R

D1 149.218.7.4 = 1001 0101. 1101 1010. 0000 0111. 0000 0100


Netmask 255.255.252.0 = 1111 1111. 1111 1111. 1111 1100. 0000 0000
Relevant of D1 = 1001 0101. 1101 1010. 0000 0100. 0000 0000

D2 149.218.8.1 = 1001 0101. 1101 1010. 0000 1000. 0000 0001


Netmask 255.255.252.0 = 1111 1111. 1111 1111. 1111 1100. 0000 0000
Relevant of D1 = 1001 0101. 1101 1010. 0000 1000. 0000 0000

D1 and D2 are in different logic networks


Default gateway (R) is addressed

_____________________________________
IT202003_0012/1
1 - 38
_____________________________________
Ethernet Basics

Notes:

_____________________________________
1 - 39
_____________________________________
Ethernet Basics

Notes:

_____________________________________
1 - 40

Вам также может понравиться