I was asked this question during an interview. When a user connects his laptop to a switch port, does he always get the connection?
Please find the response
1. If this switchport is a layer 2 port, and it is configured as a trunk port, what will happen
---> PC does not understand vlan trunking so by default your laptop will not talk unless the vlan called on trunk port is made native vlan.
command: "switch port trunk native vlan 2" to be configured on trunk port of switch
2. If this switchport is a layer 2 port, and it is configured as an access port in vlan 2. Other devices in vlan 2 are in 10.10.10.0/24 subnet. What if this laptop is configured with an IP address of 10.10.20.4/24?
---->Yes this laptop will talk to entire 10.10.10.0/24 subnet
3. If this switchport is a layer 3 port with IP address 188.8.131.52/24, what if this laptop is configured with an IP address of 184.108.40.206/24?
---> again yes laptop will talk to this subnet 220.127.116.11/24
hope this answers your query.