The switch belongs to the second layer of OSI, that is, the data link layer device. It selects routes from the station table based on MAC address addressing. The establishment and maintenance of the station table is automatically implemented by the switch. Switching refers to forwarding and filtering frames.
A router is a layer-3 network-layer device of OSI. It is addressing based on IP addresses and is generated through the route table routing protocol. A route is a non-directly connected link in a network.
The biggest advantage of a vswitch is its speed. The biggest advantage of a vro is its strong control capability.
Differences:
① IP address is not required for switching, but for routing, because IP is the layer-3 protocol and MAC address is required for layer-2 protocol.
② The Layer 2 technology is different from the Layer 3 technology. The Layer 2 can be used for VLAN, port binding, and Nat, ACL, and QoS.
VLAN, short for a virtual LAN, is a layer-2 technology that features broadcast control, security, flexibility, and scalability.
Which five pieces of information do each vro need to know when looking for a vro:
Destination Address: the target host for sending packets.
Determine the neighboring station: specify who is directly connected to the router interface.
Discovery of routes: Discover the networks that the neighboring sites know.
Select route: Provides the optimal route to the destination based on the information learned from the neighboring station.
Keep route info: the router saves a route table, which stores all the route information it knows.