No DHCP on pfSense VLAN with Cisco Smart Switch
-
I have had pfSense running on a custom server for several months, which has been very stable.
I recently added a VLAN to pfSense to segregate some servers from the main LAN.
I’m running a Cisco SG250 Smart Switch, which has also been configured to support the pfSense VLAN.Unfortunately, I can not get pfSence to server a DHCP IP to the VLAN.
I have gone over the pfSense and Cisco configs several times and can not isolate the problem.
I checked the pfSense DHCP log and do not see a DHCPREQUEST for the VLAN. Only “Listening on BPF/igb1” and “Sending on BPF/igb1” appear in the pfSense DHCP log.Config in a nutshell is:
- pfSense -
- VLAN10 assigned to igb1 in Interface Assignments
- VLAN10 configured in Interfaces and IPv4 Address defined
- DHCP enabled for VLAN10 and IP range defined
- One rule added to VLAN10 to accept all src and dst traffic
- Switch -
-
VLAN10 added in VLAN Settings
-
GE1 port defined as Trunk for VLAN10 in Interface Settings (GE1 is connected to the pfSense igb1 interface)
-
Port to VLAN config is:
Port 1 (pfSense port):
GE1 – Trunk – Tagged
GE24 – Access – Excluded -
Port 24 (VLAN10 test port):
GE1 – Trunk - Tagged
GE24 – Access – UntaggedAdded IP for VLAN10, which matches IP defined in pfSense VLAN10 in Interfaces
Hopefully some fresh eyes can spot what I may be missing.
Any help appreciated. -
Did you check the Smartports feature on the Switch. Usually this feature changes the port configuration automatically. Best practice is to disable it, to be sure, that the port configurations apply correctly.
-
@pete35 said in No DHCP on pfSense VLAN with Cisco Smart Switch:
Did you check the Smartports feature on the Switch.
Thanks for your reply pete35! I have confirmed that Smartport is disabled on the switch.
-
@cannondale what switch do you have exactly - I am running cisco sg-300..
Here is a port I have vlans on.
sg300-28#sho run int gi5 interface gigabitethernet5 description "sg4860 WLan and vlans" switchport trunk allowed vlan add 4,6 switchport trunk native vlan 2 ! sg300-28#sho run int gi18 interface gigabitethernet18 description "Vlan 6 - work laptop" switchport mode access switchport access vlan 6 ! sg300-28#
gi5 is the port on the switch connected to igb2 on pfsense, and gi18 is device on have on vlan 6.
The native network I have on the igb2 is vlan 2 in the switch.
-
Thanks for the information johnpoz.
Below is what my config looks like.
-
@cannondale Well that config is pretty borked to be honest.
Your port connected to pfsense igb1 which your vlan runs on should be trunked with native vlan whatever your vlan is on your switch for your lan1 network, normally this would just be the native vlan 1. And vlan 10 allowed.
The port connected to your device you want in vlan 10 should just be access mode in vlan 10, which would set the pvid to 10. Like my gi18 in my example.
-
@johnpoz
Thanks for the additional information johnpoz. I found "native vlan" set to "none" for port 1 (pfsense igb1), which I have set to "1" with all vlans allowed.
Port 24 (VLAN10) "vlan mode" was set to "Access" and "vlan id" was set to 10.So in summary, the only change that I made was "native vlan" set to from "none" to "1" for port 1 (pfsense igb1).
However, I still do not see a DHCPREQUEST for the VLAN10 in the DHCP log.
Did I understand you correctly? -
@cannondale On your port 1 connected to pfsense you have to allow it to send tagged vlan 10.. or no some access port you have on the switch in vlan 10 would never get to pfsense..
Whatever vlan you want to use for lan1 native network in pfsense, this would be the native vlan you set on that port - switches would default to vlan 1. But maybe you want this network to be some other vlan on the switch, like my vlan 2 example I gave above.
You would have untagged traffic going to this igb1 interface, this is the network that pfsense just has on the interface. you would then need to allow tagged vlan 10 on this same trunk port.
Then any devices you want on your switch to be in vlan 10, you would set that port to access in vlan 10.
-
Thanks for your continued help johnpoz! I'm not a network engineer and muddling through this VLAN config on this Cisco switch for the first time.
My current config is below but VLAN10 still does not seem to be working. Does the pfSense VLAN10 DHCP server need to be restarted after any switch config changes? -
@cannondale no you wouldn't have to restart.. What exactly do you have plugged into gi24, your not trying to set a vlan 10 on it are you?
The pvid should be 10 on it as well, normally when you set to access it would set the pvid.
But I don't see the switchport mode access actually set on your gi24 from your output.
Only the access setting - it should show on gi24
switchport mode access switchport access vlan 10
-
johnpoz, I currently have a Linux workstation plugged into port 24 (VLAN10) for testing.
Not sure why the cli is not showing switchport mode for port 24.
Here is what the WebGUI shows: -
@cannondale well if the client is not showing it - then its not set, just set the command at the cli
conf t int gi24 switchport mode access
-
johnpoz, you may have missed it in the previous screenshot but the vlan mode for port 24 was set to "Access". I reset it in the cli as well be it did not make a difference in DHCP.
-
@cannondale I saw that but again lets see your cli output.. Which was not showing that it was in switchport mode..
This pretty basic stuff..
access vlan 10.. on port 24
Trunk port vlan 10 would be tagged..
Unless your tagging on your linux box the untagged traffic comes into port 24, the switch says oh this is vlan 10.. Oh its broadcast (dhcp) send it out on port 1 to pfsense, and any other ports that set to vlan 10 because its a broadcast.
So either the port is not correct as of yet, or its pvid is not 10? Or you have the client plugged into that port tagging 10 which wouldn't work.
Or you dhcp is not enabled?
-
johnpoz,
Here is the screenshot of the cli commands:
"So either the port is not correct as of yet, or its pvid is not 10?"
I don't believe that the pvid can be set on an Access port as there is no option on the WebGUI for pvid."Or you have the client plugged into that port tagging 10 which wouldn't work."
I currently have a Linux workstation plugged into port 24 (VLAN10)."Or you dhcp is not enabled"
-
@cannondale And again your cli is showing wrong... It should show that the interface is switchport mode..
Please set it to switchport mode via the cli. Oh looks like you did.. I would reset your interface then.. Your saying none of your interfaces in access mode show they are actually in switchport mode access?
Why are you trying to route???
Pfsense is your router - your switch would be layer 2 only..
I currently have a Linux workstation plugged into port 24 (VLAN10).
And you didn't set vlan 10 on its interface did you?
Can you post your full running config please.
Do you have smartport enabled? I would turn that off.
-
@johnpoz
CLI output might be dependant of the switch software version
Don't know about the SG-series, but CBS-series switch software has the ports default mode as access and looks like the config only shows the switchport command when set to something other than access.
Maybe they decided to "cleanup" the config by hiding the commands that set the "default value"This is snippet from my switch (CBS250) "sh run" with ports and vlans working as intended
interface GigabitEthernet1 description Firewall switchport mode trunk switchport trunk allowed vlan 10,20,25,30,35,40,50 ! interface GigabitEthernet2 description "Wifi AP" switchport mode trunk switchport trunk allowed vlan 10,20,25,30,35,40,50 ! interface GigabitEthernet3 description "Main PC" switchport access vlan 20 ! interface GigabitEthernet4 description HomeServer switchport access vlan 20 !
-
Thanks for your continued help johnpoz!
I have confirmed that smartport is disabled.
I'm not a network engineer but mvikman's explanation for why the cli is not displaying "switchport mode access" sounds reasonable as the WebGUI does show "switchport mode access" for port 24 (VLAN10).Below is the output of my running config:
config-file-header Roth-SG250-50P-1 v2.5.9.16 / RCBS3.1_930_871_108 CLI v1.0 file SSD indicator excluded @ ! unit-type-control-start unit-type unit 1 network gi uplink none unit-type-control-end ! vlan database vlan 10 exit voice vlan state auto-triggered voice vlan oui-table add 0001e3 Siemens_AG_phone________ voice vlan oui-table add 00036b Cisco_phone_____________ voice vlan oui-table add 00096e Avaya___________________ voice vlan oui-table add 000fe2 H3C_Aolynk______________ voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone voice vlan oui-table add 00d01e Pingtel_phone___________ voice vlan oui-table add 00e075 Polycom/Veritel_phone___ voice vlan oui-table add 00e0bb 3Com_phone______________ no boot host auto-config no boot host auto-update no bonjour enable bonjour interface range vlan 1 hostname Roth-SG250-50P-1 username jer password encrypted $86$5/Jf/f1pY8/95XGv$kPRdzeRMBXmEdsjyTZ1l4+OqCg9fuZ7uKSe5I7LV9IbcgUpUgGQXoGLMEO1AZF52onsZ3HTShH3OYBSXslXbVA== privilege 15 username jer2 password encrypted $86$Jd6VBm9YYE9hsEqS$Wr7/T+o2oqDACWSHr0SNJrmwXG2QQ3MS+4EG1j6BknUM6Z8LMYb1/kokfIc3KefDaW5JkhtnW3+gJTnr3sbDJA== privilege 15 username cisco password encrypted $86$/AkLn2WkB5AHHhIy$e/TgE126IBbIHLLsdMMw6ozjTovM1bR132PxH3lGmJeltzZ4U3ug9F3ZaUl+BclKIcE60h2j7Sn6o7RYksS53g== ip http timeout-policy 0 clock timezone J -4 clock dhcp timezone ip telnet server ! interface vlan 10 name "VL10" no snmp trap link-status ! interface GigabitEthernet1 switchport mode trunk switchport trunk allowed vlan 10 ! interface GigabitEthernet24 switchport access vlan 10 ! exit
-
@cannondale that doesn't seem like a full config..
But what I would do is lets isolate if pfsense problem or switch problem - there is no way pfsense can hand out a dhcp if doesn't see it, and for it to see it the discover has to come in tagged for vlan 10.
So I would do a packet capture via tcpdump on that interface on pfsense - do you see the tagged traffic come?
example.. here tcpdump on my igb2 where I run tagged vlans.. See traffic from my tagged vlans 4 and 6, and there is stp that is not tagged
[23.01-RELEASE][admin@sg4860.local.lan]/root: tcpdump -i igb2 -e tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on igb2, link-type EN10MB (Ethernet), capture size 262144 bytes 06:39:53.641566 68:57:2d:98:28:22 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, office3.local.lan.62514 > 255.255.255.255.6667: UDP, length 172 06:39:53.681635 00:08:a2:0c:e6:20 (oui Unknown) > f8:e4:3b:72:18:bb (oui Unknown), ethertype 802.1Q (0x8100), length 174: vlan 6, p 0, ethertype IPv4, 165.225.60.29.https > TIAA-17503J3.local.lan.49373: UDP, length 128 06:39:53.682349 00:08:a2:0c:e6:20 (oui Unknown) > f8:e4:3b:72:18:bb (oui Unknown), ethertype 802.1Q (0x8100), length 1292: vlan 6, p 0, ethertype IPv4, 165.225.60.29.https > TIAA-17503J3.local.lan.49373: UDP, length 1246 06:39:53.684130 f8:e4:3b:72:18:bb (oui Unknown) > 00:08:a2:0c:e6:20 (oui Unknown), ethertype 802.1Q (0x8100), length 139: vlan 6, p 0, ethertype IPv4, TIAA-17503J3.local.lan.49373 > 165.225.60.29.https: UDP, length 93 06:39:53.694328 18:69:d8:39:e4:23 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, island2.local.lan.64137 > 255.255.255.255.6667: UDP, length 172 06:39:53.706147 68:57:2d:98:36:83 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, office2.local.lan.62515 > 255.255.255.255.6667: UDP, length 172 06:39:53.709447 50:14:79:d4:0f:11 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 60: vlan 4, p 0, ethertype ARP, Request who-has sg4860.wpsk.local.lan (Broadcast) tell iRobot.local.lan, length 42 06:39:53.709464 00:08:a2:0c:e6:20 (oui Unknown) > 50:14:79:d4:0f:11 (oui Unknown), ethertype 802.1Q (0x8100), length 46: vlan 4, p 0, ethertype ARP, Reply sg4860.wpsk.local.lan is-at 00:08:a2:0c:e6:20 (oui Unknown), length 28 06:39:53.786496 d4:a6:51:cf:c5:45 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, endtable.local.lan.58883 > 255.255.255.255.6667: UDP, length 172 06:39:53.814764 d4:a6:51:cc:f7:a6 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, chair-lamp.local.lan.65202 > 255.255.255.255.6667: UDP, length 172 06:39:53.819990 18:69:d8:3a:03:cd (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, island1.local.lan.52605 > 255.255.255.255.6667: UDP, length 172 06:39:53.843301 18:69:d8:39:ed:ba (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 218: vlan 4, p 0, ethertype IPv4, D5.local.lan.59982 > 255.255.255.255.6667: UDP, length 172 06:39:54.078536 70:6e:6d:f3:11:98 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Learn, Forward, Agreement], bridge-id 1000.70:6e:6d:f3:11:93.8035, length 43
Make sure your client does a dhcp discover while your sniffing.. Do you see this traffic hit pfsense tagged vlan 10? If so then something wrong with pfsense. if it doesn't send a response - if you never see it, then something wrong downstream, your switch, the client, you sure your actually connected to port 24 and get a link light for example.
-
Thanks for the information johnpoz. Very helpful.
I ran tcpdump -i igb1 -e. Note that ibg1 is my pfSence interface.
While tcpdump was running, I unplugged and plugged the port 24 cable (VLAN10) that is connected to a Linux workstation.
I then stopped tcpdump and cut and pasted the output into a text editor to search for "vlan" but found nothing.Also checked the pfSence DHCP log and did not see DHCPREQUEST for the VLAN.
To double check the workstation connection, I plugged the workstation into another switch port and got an DHCP IP as normal. Then reconnected to port 24 (VLAN10).