Raspberry Pi can't obtain IP address through router or switch ports

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Raspberry Pi can't obtain IP address through router or switch ports

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Raspberry Pi can't obtain IP address through router or switch ports
Raspberry Pi can't obtain IP address through router or switch ports
2023-10-14 03:31:43 - last edited 2023-10-16 15:32:58
Model: TL-ER6020   SG2008P   EAP655-Wall  
Hardware Version: V2
Firmware Version: 2.0.3 Build 20200623 release 39031

I must have something configured incorrectly or am misunderstanding how these should work.

I'll try and keep this as simple as I can.

 

I have a network set up with the router connected to the switch which provides 4 vlans. Each vlan has its own set of ips defined in the Pool Settings.

The Router has 2 WANs (vlan10 and vlan20) set but I am currently only using WAN1. The other 3 ports are set as vlan1 (default vlan for LAN) Port 3 is connected to port 8 of the switch. The other 2 are empty and I would expect could be used to obtain an IP address from the range used by the router just like the ip that is given to the switch?

The switch port setup is as follows.

The switch is set to provide vlan100 (ports 1/0/1-4), vlan200 (ports 1/0/1-4) and vlan300 (ports 1/0/1-4.)

vlan400, which is what I am currently working with is set to ports 1/0/1-7.

 

 

Currently I am only using port 4 (POE) of the switch connected to a single EAP655 which provides wireless access for all vlans. This works without a problem.

Wireless access works great from the EAP and I can enable the ports on the EAP to provide vlan IPs as well. These also work fine. vlan400 is the ip range that I am trying to access using the extra ports 5-7 on the switch.

 

The issue I am having, is trying to connect other devices to the unused switch or router ports and obtain either static or DHCP delivered IPs.

 

I have a raspberry Pi running hassio (HomeAssistant) that is connected using ethernet. It has a static ip and works fine when I have it connected using the port on the EAP. I have been unable to get it to work when connected to the switch. For some reason it does not appear to obtain an IP when connected to the switch. The Pi will also work properly using WIFI and connecting to the EAP wirelessly.

 

Strangely, I have been able to connect a laptop to the switch with ethernet and access the network so I am not sure why the Pi will not work when connected directly to the switch.

 

Depending on the switch port I connect to with the laptop, I will obtain the expected IP from the connected vlan. I would therefore expect that if I connect the Pi to port 5-7 I should obtain the address I require, since I have those ports configured the same as the port the EAP is connected to.

 

I am not sure what to try next. Maybe its a routing problem that I need to set up? It just seems strange that it works fine with one device but not with another.

Have I configure this wrong?

Suggestions?

  0      
  0      
#1
Options
1 Accepted Solution
Re:Raspberry Pi can't obtain IP address through router or switch ports-Solution
2023-10-16 06:23:00 - last edited 2023-10-16 15:32:58

  @barrolete 

I think I might have found it. I had the port set as tagged instead of untagged. I just have to run some more tests to see if that really was the problem.

I'm pretty sure I had already checked that but with all the configurations I was doing I might have missed it.

 

Thanks for you help. I'll report back after I do some more checking.

 

EDIT: Yes that appears to be have been the problem. I had the switch port (5), which was connectted to the Pi via ethernet, set as tagged. Once I switched it to untagged it connected as expected. I don't see an easy way to identify this without going right into the setting itself. The VLAN config just shows the members. I probably just skipped by it instead of going in and checking the actaul settings.

Recommended Solution
  0  
  0  
#5
Options
4 Reply
Re:Raspberry Pi can't obtain IP address through router or switch ports
2023-10-16 03:02:57

  @ksihota I think it's probably a problem with the network configuration of your raspberry Pi. How about setting the connection mode of the raspberry Pi to dynamic IP? Perhaps you can check out the raspberry Pi's network Settings.

  0  
  0  
#2
Options
Re:Raspberry Pi can't obtain IP address through router or switch ports
2023-10-16 05:40:50
Thanks, I'll give that a try and see what I get. I assumed that since the Pi connects without an issue using the ethernet port on the EAP that it would also work connected directly to the switch port that is connected to the same vlan But it is worth a try to see what happens.
  0  
  0  
#3
Options
Re:Raspberry Pi can't obtain IP address through router or switch ports
2023-10-16 06:09:24

  @barrolete 

One step closer.

Yes the Pi does get an IP address assigned but the port its connected to is not visible to the rest of the system. There must be a setting I missed or set wrong on the switch that is not allowing devices connected to that physical port on the switch to be seen by the devices on the other physical switch even though they belong to th same vlan.

Time to go back through all the settings to see if I can find what I missed.

  0  
  0  
#4
Options
Re:Raspberry Pi can't obtain IP address through router or switch ports-Solution
2023-10-16 06:23:00 - last edited 2023-10-16 15:32:58

  @barrolete 

I think I might have found it. I had the port set as tagged instead of untagged. I just have to run some more tests to see if that really was the problem.

I'm pretty sure I had already checked that but with all the configurations I was doing I might have missed it.

 

Thanks for you help. I'll report back after I do some more checking.

 

EDIT: Yes that appears to be have been the problem. I had the switch port (5), which was connectted to the Pi via ethernet, set as tagged. Once I switched it to untagged it connected as expected. I don't see an easy way to identify this without going right into the setting itself. The VLAN config just shows the members. I probably just skipped by it instead of going in and checking the actaul settings.

Recommended Solution
  0  
  0  
#5
Options

Information

Helpful: 0

Views: 966

Replies: 4

Related Articles