100% Pass Cisco, PMP, CISA, CISM, AWS Dumps on SALE!
Get Now
01:59:56

X

Working principle of devices between router Lan ports

Working principle of devices between router Lan ports

Q1: The router works at the IP layer and is responsible for the communication of different IP devices. The switch works at the data link layer (only the simplest switch or bridge or hub is mentioned, not the network management switch first, I want to get the concept first). Communication between LAN devices. According to my understanding, the communication between the devices of the switches is through the mapping between the MAC address and the Lan port. Of course, the first communication will be flooded. After that, the switch will maintain a mapping table, but why are the devices under the router's LAN port? Each one has a different IP address. For example, my computer and the NAS device at home are connected to the LAN port of the router. Theoretically, they work at the data link layer and should not need the IP address layer, but I still need to know its IP address to access the NAS. Can you tell me why?


A1: The LAN port of the home router is a Layer 2 switching port or a bridging port. It works in the same broadcast domain. The host connected to the LAN port can theoretically communicate without an IP address. So from this perspective, your reasoning is correct!

But then again, the computer operating system and applications you use do not provide you with a ready-made interface that can directly access (layer 2 communication) the other party using the MAC address. If there is such an interface, you can use the hostname of the other party, then send a broadcast message to resolve it to a MAC address, and then you can communicate freely. If you have a strong learning interest, you can try to write a small program based on Raw Socket to achieve this function.



Q2: If I assume that a LAN port of a switch access router is LAN-1, and connect different computers under this switch, then these different computers will obtain different IP addresses through the DHCP function of the main router in the front Or is the device under the switch the same IP address for the LAN-1 port?


A2: Each host will be assigned an IP. If the switch also has the function of a host, the switch can even get an IP to access the Internet.

The switch is also a transparent bridge technology. The so-called Transparency means that the user cannot feel the existence of the switch. You may be confused and say that the switch is placed on the cabinet in our living room. How can I not feel it?

Hehe, in fact, "transparent" here means that when you use a network tracking tool such as TRACEROUTE to track the forwarding path of the traffic, the tool cannot tell you the network traffic, how many switches have been passed, including your own switch, do not believe You can try.

 

Q3: Since the switch works at the data link layer, it should only deal with things like MAC. It should not know about the IP layer of the upper layer. Why are there ARP and DHCP protocols, which involve both IP and MAC What layer of agreement do they belong to?


A3: The way of thinking is too simple. In theory, the Layer 2 switch only cares about the Layer 2 protocol header, but there is still a gap between the world theory and reality. The switch also has a host function and can even apply for an IP address to access the Internet in the form of a DHCP Client. This is not a contradiction at all, because when the switch serves other hosts, it is a Layer 2 switch. When it serves itself, it is a standard host.

The switch is really not interested in ARP, IP, and DHCP protocols. In its eyes, it is the same data frame that needs to be exchanged. Of course, if the switch is configured with "DHCP Snooping", the switch will take special care of the DHCP packets, filter them to the CPU for processing, and then perform hardware exchange after processing.


Q4: Will these concepts change for IPv6?


A4: Whether it is an IPv4 packet or an IPv6 packet, there is no essential difference in the eyes of the switch. The difference is only the "Ether-Type" difference. So the switch can forward / exchange IPv6 data frames without any software upgrade.

However, if IPv6 is taken as a whole, the changes compared to IPv4 are still huge. "Interface Identifier" alone is enough for beginners to learn for a long time. An interface also has multiple IP addresses, "Link Local Address", "Temporary Address", "Global Unicast Address", "Site Local Address", "Global Anycast Address", "All- Nodes Multicast Address", "SolicitationMulticast Address" If the theoretical foundation of IPv4 is not very solid, it is almost impossible to learn IPv6 well.


The above is the news sharing from the PASSHOT. I hope it can be inspired you. If you think today' s content is not too bad, you are welcome to share it with other friends. There are more latest Linux dumps, CCNA 200-301 dumps and CCNP Written dumps waiting for you.

Have any question for us?

Cisco Dumps Popular Search:

ccna exam cost uk 2019 ccnp 300-135 book pdf ccna book writer name ccie dc v2 blog ccna chapter 5 exam quizlet valid cisco dumps ccna 200-123 and 200-301 ccie dc aci version ccnp tshoot bgp シミュレーション ccna 200 301 topics

Copyright © 2024 PASSHOT All rights reserved.