Monday, March 4, 2019

Ethernet

Ehternet is LAN protocol to carry packet from one node to another within LAN network within short distance.

PPP and frame delay are protocol to carry packet in WAN - over long distances.

Ethernet packet format-
Preamble - 8 bytes - used for synchronisation
DST MAC - 6 bytes destination network device mac address
SRC MAC  - 6 bytes source network device address
Type - 2 bytes Type of the packet -
Payload - 46 - 1500 bytes
FCS - 4 bytes - Error detection

minimum frame size as 64 bytes and the maximum as 1518 bytes. includes all the bytes of the packet

The IEEE 802.3ac standard, released in 1998, extended the maximum allowable frame size to 1522 bytes. The frame size was increased to accommodate a technology called Virtual Local Area Network (VLAN). VLANs are created within a switched network. Also, many quality of service (QoS) technologies leverage the User Priority field to implement various levels of service, such as priority service for voice traffic.

Ethernet is subdivided into 2 protocols
1. LLC  -
2  MAC sub layer  - Medium access . Completely implemented in  hardware

Good Ethernet Link
http://teachweb.milin.cc/datacommunicatie/tcp_osi_model/data_link_layer/ethernet_protocol.html












IGMP

IGMP - Internet Group management Protocol.

It is between adjacent Routers and nodes connected to router. It is used to manage multicast traffic more efficiently.

IGMP V1 - Does not have option for nodes to leave the group proactively. Router after sending IGMP query message,  if the node does send response with Report message, router will wait for 180 secs before it can delete that node from the corresponding group.
For 180 secs Router keeps sending packets to that node also even though node it not interested.

IGMP V2- Default version that active in network. Allows node leave the group by using IGMP leave message.

IGMP v3 - Provides nodes the option to choose source based multicast traffic. If two sources are   generating multicast traffic for same multicast group, then nodes have the option to choose the source from which they want to receive the multicast traffic.

224.0.0.1 Local multicast commands. Used by router to send query packets.


Multicast Snooping - In switch, nodes are connected to multiple ports of the siwtch. But all the nodes that are connected are not interested to receive the multicast packets. But switch does not recognize the mulitcast MAC address used in multicast packets, it will flood the multicast packet received to all the ports except on port on which packet is received.
This flooding will cost bandwidth.

To solve this problem L2 switches use multicast snooping. Here switch learns Mulitcast MAC address by parsing IGMP report, join packets from nodes connected to switch ports. Mulitcast MAC address of the multicast group is derived from corresponding multicast group IP address.

The 24-bit MAC address prefix 01-00-5E is reserved for layer 2 multicast. 

  1. We convert your IP address to binary:
decimal: 239.192.0.1
binary: 11101111 11000000 00000000 00000001
  1. We only care about the last 23 bits of your IP address so I removed the first 9 bits, that gives us:
1000000 00000000 00000001
  1. Now we need to convert these 23 bits into hexadecimal. You need to take 4 binary bits and convert them to hexadecimal:
binary: 100 0000 0000 0000 0000 0001
hex: 4 0 0 0 0 1
That gives us:
40:00:01
The first part of a multicast MAC address always starts with 01:00:5e so let’s put that in front:
01:00:5e + 40:00:01 = 01:00:5e:40:00:01 (your multicast MAC address).