Switching and Mac Address Format
- MAC address helps to uniquely identify a device.
- The first 24 bits are called as OUI and is given to a manufacturer. Assigned by IANA
- Arista uses the OUIs: 001C, 444C,...
- Type tells protocol at higher layer. Eg: For IPv4 it is 0x0800
- The CRC (FCS) helps to know if the frame is corrupted or not
- DLL does only error detection, TL does error correction
- Format of ethernet header: Dest MAC (6 bytes) , Source MAC (6 bytes) and Type (2 bytes) :total 14 bytes
- ○ Preamble: it is just signaling
- ○ Start of Frame Delimiter (SFD)- shows end of preamble and start of ethernet frame
- ○ ---others----
- ○ IFG- Inter Frame Gap: Ethernet devices must allow a minimum idle period between transmission of Ethernet packets known as the interpacket gap (IPG), interframe spacing, or interframe gap (IFG). A brief recovery time between packets allows devices to prepare for reception of the next packet.
- Using SFD and IFG, we know where frame starts and ends
- Administrative Scope MAC Address- Do your research :D
- Nowadays, collision doesn’t happen because hubs are half duplex and we don’t use hubs nowadays. Switches, even if we use half duplex, avoids collision since it breaks the collision domain
- CSMA/ CD:
- Carrier Sense Multiple Access/Collision Detect (CSMA/CD) is the protocol for carrier transmission access in Ethernet networks.
- On Ethernet, any device can try to send a frame at any time. Each device senses whether the line is idle and therefore available to be used.
- If it is, the device begins to transmit its first frame. If another device has tried to send at the same time, a collision is said to occur and the frames are discarded.
- Each device then waits a random amount of time and retries until successful in getting its transmission sent.
- An ethernet bridge is a device that connects one LAN to another. In other words, it connects one hub to another
- 3 ways to connect:
- ○ Console- used as default way of connecting. It is used as Out of Band connectivity
- ○ Management- by default, no ip. To assign IP, we need management port. It is In Band connectivity
- ○ SVI(Switch Virtual Interface) - configuring a logical router (virtual). For Layer-3 switches, used for VLANs. By default, all ports will be in the SVI-1 interface. If we use switch#no switchport then the ports will get disconnected as it is no longer a switch port for the VLANs
- EtherType Field:
- ○ If the size of the field is greater than 1500 bytes, then it represents
- Type .ie. It is used to indicate which protocol is encapsulated in the payload of the frame.
- ○ If the size of field is lesser or equal to 1500 bytes, then it is Length
- If it is less than 1500 bytes, then, to tell about the Type, we use SNAP after the ethertype field
- SNAP:
- ○ Sub Network Access Protocol
- ○ It is an extension of the LLC to describe more higher layer protocols:
- ○
- ○ Thus, if the ethertype field is less than 1500 bytes, then, the format of L2 becomes:
- ○
- VLAN:
- ○ On trunk port, we can send multiple vlan and we need vlan tag. (Some servers can send vlan tags, so their ports can be made trunk port --OR-- we can connect two switches using trunk ports since we need to send data related to all vlans). If untagged packet comes to trunk port, then, it will send to native vlan
- ○ On access port, we can access only one vlan and no need vlan tags. (Our laptops can connect only via this since it cannot send vlan tags .ie. it is not vlan-aware)
- ○ Switches have the concept called native vlan. All packets that are not tagged will be sent to the native vlan. By default, all devices will be in native vlan. Traffic on native vlan will not be tagged. We can make a vlan on a trunked port as native by using:
- #conf
- (conf)#int et 1
- (conf-if)#switchport trunk native vlan <vlan-id>
- Switches always have VLAN 1 as the default VLAN, which is needed for many protocol communication between switches like spanning-tree protocol for instance.You can't change or even delete the default VLAN, it is mandatory.
- The native VLAN is the only VLAN which is not tagged in a trunk, in other words, native VLAN frames are transmitted unchanged.Per default the native VLAN is VLAN 1 but you can change that using (conf-if)#switchport trunk native vlan <vlan-id>. Even then, the default vlan will be vlan 1.
- RULES FOR ACCEPTING PACKETS ON TRUNK AND ACCESS PORTS:
- ○ Trunk- accepts if the tagged packet belongs to allowed vlans (OR) puts the untagged packets on native vlan.
- ○ Access- accepts all untagged packets. If tagged packet, it accepts only those that belong to same vlan.
Great article by the great author, it is very massive and informative but still preaches the way to sounds like that it has some beautiful thoughts described so I really appreciate this article. Best switch virtual interface service provider.
ReplyDelete