06-27-2011 02:00 AM - edited 03-07-2019 12:59 AM
Hi,
if i connect a pc on a trunk port will it get an ip address ?
int fas0/1
switchport mode trunk
switchport trunk native vl1
but i have tried this config and it gets an ip address? how is it ?
int fas0/1
switchport mode trunk
swtch port trunk native vla1
switchport voice vlan10
Thanks
Solved! Go to Solution.
06-27-2011 02:13 AM
Hi,
Normally a PC NIC won't tag traffic and doesn't care of the switch port config.
Now the config you input is the administrative role of the port but what is important is the operational mode.
Could you do a sh int f0/1 trunk and if the output is empty then a sh int f0/1 switchport.
This should show an operational mode of access
Regards.
Alain.
06-27-2011 02:16 AM
Hello Network Pro,
if this switch is a C2950 or similar it supports only 802.1Q as trunk encapsulation.
802.1Q has the native vlan concept: frames belonging to the native vlan are sent out untagged.
untagged frames received are associated with the native vlan.
This is for cases like yours when a NIC that is not capable to support tagged frames or it is not configured for
It is a fallback mechanism in 802.1Q standard
so in your case the PC should get an IP address from DHCP scope associated to vlan 1
if you change the list of permitted vlans to something like
switchport trunk allowed vlan 10,20
the PC should be not able anymore to get an ip address unless you configure it for using tagged frames
the default configuration allows all Vlans defined on the switch including the native vlan.
Edit:
the state of the port may be trunk in operational mode, but still untagged frames are used for native vlan.
Hope to help
Giuseppe
06-27-2011 02:13 AM
Hi,
Normally a PC NIC won't tag traffic and doesn't care of the switch port config.
Now the config you input is the administrative role of the port but what is important is the operational mode.
Could you do a sh int f0/1 trunk and if the output is empty then a sh int f0/1 switchport.
This should show an operational mode of access
Regards.
Alain.
06-27-2011 02:16 AM
Hello Network Pro,
if this switch is a C2950 or similar it supports only 802.1Q as trunk encapsulation.
802.1Q has the native vlan concept: frames belonging to the native vlan are sent out untagged.
untagged frames received are associated with the native vlan.
This is for cases like yours when a NIC that is not capable to support tagged frames or it is not configured for
It is a fallback mechanism in 802.1Q standard
so in your case the PC should get an IP address from DHCP scope associated to vlan 1
if you change the list of permitted vlans to something like
switchport trunk allowed vlan 10,20
the PC should be not able anymore to get an ip address unless you configure it for using tagged frames
the default configuration allows all Vlans defined on the switch including the native vlan.
Edit:
the state of the port may be trunk in operational mode, but still untagged frames are used for native vlan.
Hope to help
Giuseppe
06-27-2011 02:43 AM
Thanks for your replies..
so this config
int fa0/1
switchport mode trunk
will it give an ip address in vlan 1 if all vlans are allowed on trunk ?
Thanks
06-27-2011 02:56 AM
Yes
the default config allows all defined VLANs on the trunk port
Hope to help
Giuseppe
06-27-2011 03:03 AM
Thanks
07-05-2011 02:01 AM
hi
we have a cisco 3560 and the config is
int fa0/1
switchport mode trunk
switchpo trunk encap dot1q
switchport voice vlan 100
switchport portfast
but when a laptop is connected, it does not get an ip address (switchport trunk encap native vlan1) command is given but it does not display on sh run - looks like its a default command - still the pc does not get an ip address when connected by itself - but works when connected daisy chaied with a phone
any ideas?
thanks
07-05-2011 03:10 AM
Hi,
you can try this config:
int f0/1
switchport mode access
switchport voice vlan 100
switchport portfast
Regards.
Alain.
07-05-2011 04:21 AM
yes the above config will work aif we have cisco ip phones but we have nortel ip phones which dont understand cdp...the above config that i have pasted seems to work fine on other switches with just pc's connected (not through phones)...even out above discoussed with the ports trunked pcs's shd get ip address on native vla with this command switchport trunk native vlan 1 -shoudnt it ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide