Selasa, 25 Oktober 2011

Shared Ethernet

CSMA/CD
→ Carrier Sense : The LAN device listens to the Ethernet network to sense the carrier signal on the network, ensures that line is idle to reduce the likelihood of collision.
→ Multiple Access : Any datagram can be received by multiple devices
→ Collision Detection : If there's a collision, the LAN device will wait a random amount of time to transmit again.

The Hub does not have a MAC address and it only forwards data without filtering them.
Disadvantage of Hub : serious collision, broadcast flooding, no security guarantee.

Structure of Ethernet Frame
| DMAC | SMAC | Length/Type | DATA/PAD | FCS |
[6] [6] [2] [46~1500] [4]
If Length/Type > 1500 → represent type of frame → can submit to protocol upper layer without going through the LLC sub-layer (Ethernet II)
If Length/Type <= 1500 → represent length of frame (Ethernet_SNAP / 802.3)

Structure of Ethernet II Frame
… | Length/Type | DATA/PAD | …
0x0800 IP datagram → 0x800 (in hex) is bigger than 1500 (in decimal)
0x0806 ARP request/response
0x8035 RARP request/response

Three Switch Modes
Cut-Through
→ Forward as soon as it receives destination MAC address
→ Low delay
→ No error check
Store-and-forward
→ Forward after it receives all the packets
→ Delay lies on frame length
→ Switch checks error, the error packet will be discarded
Fragment-free → inherit the advantages of cut-through and store-and-forward modes
→ Switch receives the first 64 bytes of the packet, then lookups the address table by header and forwards
→ Switch checks the first 64 bytes, if it finds error, the packet will be discarded

Weakness of L2 Switch : Broadcast flooding, No security guarantee

what is the working theory of the L2 switch?
→ learning based on the source MAC address and forwarding based on the destination MAC address

Tidak ada komentar: