Documente Academic
Documente Profesional
Documente Cultură
CHAPTER 1
Presented By
CHANDAN G M
• 10 Mb/s
• 100 Mb/s
• 1000 Mb/s (1 Gb/s)
• 10,000 Mb/s (10 Gb/s)
Initially named ALTO ALOHA, the name was later changed to Ethernet.
This first version of Ethernet ran at speeds up to 2.94 Mbps. later this
version is not successfully commercialized.
The first commercial Ethernet was by DEC, Intel, and Xerox (DIX) in
1980 as Ethernet,Version 1 called as a Ethernet DIX80.
DIX Frame:
Destination
Preamble Source address Type Data CRC
address
8 bytes 6 bytes 2 bytes 46 to 1500 bytes 4 bytes
6 bytes
Type : (2 bytes)
This field drawn a difference between Ethernet 2 (DIX standard) and the IEEE
802.3.
In Ethernet 2, the higher level protocols (Ex: IP-0x800h, ARP-0x806h, RARP-
0x835h) are present which uses an Ethernet frame to send data.
Length : (2 bytes)
This field is used only by IEEE 802.3.
which indicates length of data field (number of LLC data bytes)
or which defines how many actual data in bytes able to send.
PAD:
When data is less than 46 bytes then this field pads 0’s in order to reach
the minimum data field of 46 bytes.
TRAILER:
CRC/FCS:
Detects transmission errors and provides quality of service at receiving
end.
1. Physical layer:
sending and receiving the serial bit streams over the physical medium (ex: cables,
repeaters (hub,switch, gate...etc))
Helps in Detecting collisions.
2. Switch:
Switches on the other hand are more advanced and it is a data link layer device, It is
design that can boost its efficiency(large number of ports imply less traffic) and
performance.
Switch can perform error checking before forwarding data, that makes it very efficient as
it does not forward packets.
Based on the MAC address of destination operation take place, hence it reduces traffic
and collision.
©2017 Graphene Semiconductor Confidential
3. Bridge:
A bridge operates at data link layer. A bridge is a repeater, It is also used for
interconnecting two LANs working on the same protocol.
4. Routers:
Routers are used to connect different LANs or a LAN with a WAN (e.g. the internet).
Routers come with hub or switch technology to connect computers directly, Now a
days.
5. Repeaters:
Repeaters are simple devices that work at the physical layer of the OSI. They regenerate
signals (active hubs does that too).
6. Hybrid Topology
The Ethernet LLC sublayer handles the communication between the upper layers and
the lower layers. The LLC sublayer takes the network protocol data, which is typically
an IPv4 packet,and adds control information to help deliver the packet to the
destination node.
MAC:
MAC constitutes the lower sublayer of the data link layer. MAC is implemented by
hardware, typically in the computer NIC. The specifics are specified in the IEEE 802.3
standards.
Ex: when you are using bus topology (if collision occurs) that time Channel access
control Mechanisms applied by MAC layer.
Different kind of channel access control mechanisms are applied by the MAC layer
for media access are CSMA/ CD, CSMA/ CA.
It is responsible for encapsulating frames so that they are suitable for transmission
via the physical medium.
It generates the frame check sequences and thus contributes to protection against
transmission errors.
Each Ethernet network has network interface card (NIC) has a unique identifier called
MAC address assigned by card manufacturer (physical address).
Here each MAC address is a 48 bit number
First 24 bits identify the manufacturer this part called manufacturer ID or organized
unique identifier (OUI) [IEEE registration authority].
Second part is assigned by manufacturers, this number is usually programmed into the
hardware so that it cannot be changed.
EX: OUI
CC:46:D6 (cisco)
3C:D9:2B (Hewlett packard)
1. Unicast
2. Multicast
3. Broad cast
1. Unicast:
A Unicast addressed frame is only sent out to the interface leading to specific NIC. If
the LSB (least significant bit) of first octet of an address is set to zero, the frame is
meant to reach only one receiving NIC.
MAC Address of source machine is always Unicast.
Listen to medium
No
Carrier Detect?
Yes
Transmission
Complete
©2017 Graphene Semiconductor Confidential
Step 1: Check if the sender is ready for transmitting data packets.
Sender transmits its data on the link. CSMA/CD does not use ‘Acknowledgement’
system. It checks for the successful and unsuccessful transmissions through collision
signals. During transmission, if collision occurs then transmission is stopped. The station
then transmits a Jam signal onto the link and waits for random time interval (backoff-
wait) before it resends the frame.
Step 4: If no collision was detected , then sender completes its frame or data transmission
and resets the counters.
Conclusion:
Probability that A wins = 1/4
Probability that B wins = 1/4
Probability of collision = 2/4 ....so probality of collision is more, hence go for case 2.
Conclusion:
Note:
so compared to previous case probability of collision is very less.
A starts send the first bit of its frame at t1, C sees the channel idle at t2, and
starts sending its frame at t2. C detects A’s frame at t3 and aborts
transmission. A detects C’s frame at t4 and aborts its transmission.
Transmission time for C’s frame is therefore t3-t2 and for A’s frame is t4-t1.
The frame transmission time (Tfr) should be at least twice the maximum
propagation time (Tp) .....[Tfr>=2Tp]
Only one wire is used to connected the 2 wires are used to connected the
networks and transmit data networks and transmit data
The chances of collison if client and There is no chance of collision
server transmit a data simultaneously
It uses CSMA/CD protocol CSMA/CD is not required hence data
transmission rate is 100 percent
• Speed
• Latency
• Reliable
• Security
Speed:
According to the IEEE standards like 802.11ac and 802.11n, wifi offer
maximum speed of 866.7 Mb/s and 150 Mb/s, respectively. In order to handle
our daily tasks Wifi good.
But Ethernet can theoretically offer up to 10 Gb/s, if you used Cat6 cable. The
speed Ethernet depends on the type of Ethernet cables using. The Cat5e cable in
common use supports up to 1 Gb/s.
Latency:
The time taken for a packet to be transferred across a network.
Wi-Fi has more latency compared Ethernet connection.(Ex: online games).
Ethernet:
wi-fi:
Wi-Fi convenience, If a device needs to move around or you just don’t want to
run a cable to it, Wi-Fi is the right choice.
NIC establishes a link between a computer and a network, and then manages that link it
is also called as ethernet card or network adapter.
The primary task of a network interface card is to enable the host system to transfer
data between main memory and the network.
NICs connect to the host system via a local interconnect such as the Peripheral
Component Interconnect (PCI) bus. A device driver running on the host system is
responsible for communicating with the NIC over this interconnect.
1. Ethernet NIC:
Provides interface between computer and the local network or the other
networks on internet.
2. Wireless network NIC:
Wireles network adapters enables devices to communicate with each other
over wifi or other wireless networking protocols.
Note: Each NIC has a unique hardware network address called MAC.
Host- processor
DMA Controller MAC
Full duplex
Link
Local memory
Main memory Buffer - rx
Buffer - tx
PCI interface
Host- processor 1
DMA Controller MAC
Network
3 2
Packet Buffer - rx
Packet
Buffer - tx
PCI interface
Host- processor 4
DMA Controller MAC
Network
Buffer - tx
Packet
PCI interface
The device also contains other support blocks, such as the oscillator, on-chip voltage
regulator, level translators to provide 5V tolerant I/Os and system control logic.
CS Chip select
Control Registers
Ethernet Buffer
PHY Registers
Receive Buffer
(Circular FIFO)
The PHY registers are not directly accessible. Instead, access is accomplished through a
special set of MAC control registers that implement Media Independent Interface
Management (MIIM).
The MII connects Media Access Control (MAC) devices with Ethernet physical
layer (PHY) circuits.
The MAC device controlling the MDIO is called the Station Management Entity
(SME).
MDIO
READ
MAC Initialization
PHY Initialization
Soft Reset
Clear ECON 1
Enable RX FIFO
Enable TX FIFO
Start: ERXSTL=1
Start: ETXSTL=1
End: ERXNDL=1
End: ETXNDL=1
ERXRDPTL=1
ERXFCON_UCEN=1
ERXFCON_BCEN=1
ERXFCON_CRCEN=1
MACON1_MARXEN=1
MACON1_TXPAUS=1
MACON1_RXPAUS=1
MACON3_PADCFG0=1 MACON3_PADCFG0=1
MACON3_TXCRCEN=1 MACON3_TXCRCEN=1
MACON3_FRMLNEN=1 MACON3_FRMLNEN=1
MAX_FRAMELEN=1
(1518 bytes)
Full duplex
IF PHCON1_PDPXMD=1
PHCON2=0x00
Half duplex
ELSE PHCON1=0x00
PHCON2_HDLDIS=1
Function:The ECON1 register is used to control the main functions of the ENC28J60.
Receive enable, transmit request, DMA control and bank select bits can all be found in
ECON1.
0 Unimplemented Read as 0
1 Unimplemented Read as 0
2 Unimplemented Read as 0
4 RESERVED Maintained as 0
0 Unimplemented Read as 0
4 RESERVED Maintain as 0
9 Reserved Write as 0
15 Unimplemented Read as 0
7 Reserved Maintain as 0
9 Unimplemented Read as 0
10 Reserved Maintain as 0
FILTER MODE
priv->next_pk_ptr = start;
nolock_regw_write(priv, ERXSTL, start);
erxrdpt = erxrdpt_workaround(priv->next_pk_ptr, start, end);
nolock_regw_write(priv, ERXRDPTL, erxrdpt);
nolock_regw_write(priv, ERXNDL, end);
}
/* Configure LEDs */
if (!enc28j60_phy_write(priv, PHLCON, ENC28J60_LAMPS_MODE))
return 0;
if (priv->full_duplex) {
if (!enc28j60_phy_write(priv, PHCON1, PHCON1_PDPXMD))
return 0;
if (!enc28j60_phy_write(priv, PHCON2, 0x00))
return 0;
} else {
if (!enc28j60_phy_write(priv, PHCON1, 0x00))
return 0;
if (!enc28j60_phy_write(priv, PHCON2, PHCON2_HDLDIS))
return 0;
}
if (netif_msg_hw(priv))
enc28j60_dump_regs(priv, "Hw initialized.");
return 1;
}