switch port

Answered Question
Sep 23rd, 2010

Hi,

I was asked this question during an interview. When a user connects his laptop to a switch port, does he always get the connection?

thanks,

Jingyi

Correct Answer by Mahesh Gohil about 6 years 4 months ago

Hi Jingyi

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 17.2.2.1/24, what if this laptop is configured with an IP address of 17.2.2.4/24?

     ---> again yes laptop will talk to this subnet 17.2.2.0/24

hope this answers your query.

regards

mahesh

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Jon Marshall Thu, 09/23/2010 - 10:12

shelley_wang wrote:

Hi,

I was asked this question during an interview. When a user connects his laptop to a switch port, does he always get the connection?

thanks,

Jingyi

Not necessarily ie.

1) the switchport could be administratively shutdown

2) the switchport may be configured with port security with a configured mac-address

3) the switchport may be configured with 802.1x authentication with machine based authentication and you mac-address is not allowed

also depends what you mean by connection ie. do you simply mean the port comes up or that you have connectivity. If you mean IP connectivity then again not necessarily -

1) you may have the wrong subnet/gateway information for the vlan you have been connected into

2) there may be an access-list denying your laptop

i'm sure other posts can add to the list. Basically the question is way too open and you need to ask further questions about exactly what they mean by connection and what is or is not configured on that switchport.

Jon

burleyman Thu, 09/23/2010 - 11:37

I think those questions are designed for you to think and come up with things like Jon pointed out. I was asked something simular when I interviewed and I went down a bunch of options and even thought of a few they did not...I was hired :-)

Just think about what they asked and make sure you really think about the question.

Is the laptop set up for DHCP?

Is there a DHCP server?

Is the IP helper configured?

What type of cable did they use to connect, straigth-through, cross-over, roll-over?

Is the port configured as a layer2 or layer3 interface?

Is the speed and duplex matching the laptops NIC?

Is the laptops NIC enabled?

Is the cable good?

How is the switchport configured?

How long is the cable run? over 100 Meters?

I am sure there are a bunch more but I think you get the point.

If someone just said yes and left it I don't think they would hired but you never know.

Mike

shelley_wang Sun, 09/26/2010 - 16:56

Hi Jon,

Thanks for your explanation. I would like to use the following 3 scenarios to enhance learning.

1.      If this switchport is a layer 2 port, and it is configured as a trunk port, what will happen?

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?

3.      If this switchport is a layer 3 port with IP address 17.2.2.1/24, what if this laptop is configured with an IP address of 17.2.2.4/24?

Thx,

Jingyi

Correct Answer
Mahesh Gohil Sun, 09/26/2010 - 19:01

Hi Jingyi

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 17.2.2.1/24, what if this laptop is configured with an IP address of 17.2.2.4/24?

     ---> again yes laptop will talk to this subnet 17.2.2.0/24

hope this answers your query.

regards

mahesh

shelley_wang Sun, 09/26/2010 - 19:53

Hi Mahesh,

Thanks for answering my quesitons. However, I think to the second quesiton, since the laptop is configured with an IP address not in vlan 2's subnet, the connection will not come up.

Please let me know if you think otherwise.

thx,

Jingyi

Mahesh Gohil Sun, 09/26/2010 - 21:12

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,

thanks for correcting me , I really forget to see that both having different subnet . laptop will not talk to other hosts

Regards

Mahesh

Actions

This Discussion