Switch
Today I will talk about switch, what is a switch, then friends switch is a type of networking device that works to connect two or more network devices, it works on the datalink layer of the OSI model, it works on the local area network. It also works for whatever packet is received from the network layer, converts it into frame and copies the MAC address present inside the header to its memory and sends it to the destination and not to the whole computer.
How switch work
As we know that any encapsulate data reaches inside the switch in the form of a frame inside which the MAC address of the distance is there, now the responsibility of the switch is to pass the frame to the destination, for this it is necessary that the switch has a distance from it. There should be a complete database of the MAC address of the connected device so that it sends that frame to the destination, rather than broadcasting that frame to all the computers and so that the frame for which it is accepted, but the problem is that it Collision will happen inside the network and the speed will decrease but the switch only sends the frame to the destination, for this it creates a database.
How create database
First the switch broadcasts to everyone and thus all the computer or network devices send their own information to the switch, thus when the switch gets the MAC address of everyone, it sends the particular frame to them, now if a new device is added. If so, it creates its database through the same process.
IP address configuration in switch
I will show through Cisco packet tracer how to configure the IP address of the switch, for this first open the switch
1- First of all check how many interfaces are available inside it by going to CLI mode
Type en or enable and then enter
Then type show interface brief
In this way all the interfaces will be visible, let us tell you that the IP is not given to the interface like the router inside the switch, inside the switch there is an interface vlan1, it is assigned the IP address.
2- Type configure terminal or config t and then press enter key
3-Type int vlan1 or interface vlan1
4- ip address 192.168.1.2 255.255.255.0 and press enter
Vlan
Abhi we talk about vlan i.e. virtual local area network which is configured inside the switch, so before configuring it is important to know what is vlan
The purpose of creating a VLAN is to create another virtual switch inside the same switch through a switch, so that the other becomes a local area network, why is it needed, suppose you work inside a company and you want your There are 3 branches inside the company and they should work separately so that they are not connected to each other, so that the security will be done very closely, if there are 200 or 100 users in a local area and they are being controlled from one place. They do not control easily and closely, if you divide those users into two or three parts and ask them to control them from different places, then all the branches can easily monitor their own users, the second reason is that If someone wants to give some services to a branch and some not, then VLAN is made, so we do not need to lay many switches or other networking devices or separate cabling, if we make VLAN then its biggest demerit is that it is only available to a small number of users and is good
configure VLAN
For this, first of all type switch in CLI mode
switch>enable
switch# config t
Switch(config)# vlan2
Switch(config-vlan)#name Cisco
The thing to note here is that vlan1 is by default inside the switch and other vlan you can create from vlan2 you can name the vlan whatever where i put cisco
Now the next task we have to move the port inside the switch inside the vlan, for this again go to configuration mode and move the desired port.
switch(config)#int fa0/2
switch(config-if)# switchport access vlan2
In this way vlan will be ready hope you will like it
Watch video of Vlan configuration
0 Comments