Answer the question
In order to leave comments, you need to log in
How do nodes communicate through a switch?
Everywhere it is written that the switch operates at the second level of the OSI model, that is, it operates with MAC addresses. It also indicates that it is used to combine the nth number of nodes into a network. Then the question arises, how can packets from one node reach another located on the same network? Then, it turns out, the sending host needs to know the MAC address of the receiving host. He doesn't seem to be able to know this.
Answer the question
In order to leave comments, you need to log in
Ask the second question separately, otherwise it will be a violation of local rules .
To find out the MAC of the second machine, before sending the packet, the first machine makes a request via the ARP protocol, which in Russian sounds like "which machine has IP XYZQ? answer the machine xyzq"
After that, having learned the MAC by IP, the machine can send packets to the right place .
Then the question arises, where do local IPs come from, if it is, as it were, a switch.
> Then the question arises, where do local IPs come from
there - where is this?
if we are talking about a home local network, they are registered by the owner of the PC with their hands or assigned by the DHCP server of the router.
To the second question, in a simple way, I would answer like this.
The simplest home router (router), in fact, can be represented as a switch for several ports + the router itself, which is internally connected to this switch. But there are fewer and fewer such simple pieces of iron.
Then, it turns out, the sending host needs to know the MAC address of the receiving host. He doesn't seem to be able to know this.
Then the question arises, how can packets from one node reach another located on the same network?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question