Hi,
I have a problem connecting IP camera through eth0 port while simultaneously using VNC Viewer.
I tried to assign a static ip to eth0 port in dhcpcd.conf file, but it seems that my rpi4 is overriding the manually assigned IP.
Is it possible to access camera through eth0 while using VNC (Camera, rpi4, computer using same router, having 192.168.100.X ip). Or shold the camera be on different network (wont be able to view it on computer and router). Then the eth0 would have different adress, and on wlan0.
Should the manually assigned ip adress to eth0 port match camera ip adress?
Thanks in advance for help
Re: Eth0 camera rpi static ip
eth0 and wlan0 on the Pi should always have different IP addresses. Whether they need to be in the same subnet or not (192.168.100.x vs 192.168.1.x for example) depends on your network configuration.Sendreth wrote: ↑Tue Feb 07, 2023 1:31 pmIs it possible to access camera through eth0 while using VNC (Camera, rpi4, computer using same router, having 192.168.100.X ip). Or shold the camera be on different network (wont be able to view it on computer and router). Then the eth0 would have different adress, and on wlan0.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
Re: Eth0 camera rpi static ip
Ok, so i tried to give static ip adress in dhcpcd.conf file
interface eth0
static_ipadress = 192.168.100.X/24
different from IP camera connected to that port, but still when i run ifconfig command
the eth0 inet is 169.254.94.Y. I think there is just no way i can have both wlan0 ip on 192.168.100X and eth0 on 192.168.100.Y so i can "see" the IP camera through ethernet port
interface eth0
static_ipadress = 192.168.100.X/24
different from IP camera connected to that port, but still when i run ifconfig command
the eth0 inet is 169.254.94.Y. I think there is just no way i can have both wlan0 ip on 192.168.100X and eth0 on 192.168.100.Y so i can "see" the IP camera through ethernet port
Re: Eth0 camera rpi static ip
You’re in error, that’s perfectly feasible. It’s what happens out of the box, when both wireless and Ethernet are connected and configured via DHCP.
Check for typos in dhcpcd.conf.
Select X and Y such that they are outside the DHCP address pool and not in use anywhere in the network.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel
Re: Eth0 camera rpi static ip
My dhcpcd.conf file looks like that:epoch1970 wrote: ↑Wed Feb 08, 2023 12:13 pmYou’re in error, that’s perfectly feasible. It’s what happens out of the box, when both wireless and Ethernet are connected and configured via DHCP.
Check for typos in dhcpcd.conf.
Select X and Y such that they are outside the DHCP address pool and not in use anywhere in the network.
interface wlan0
noipv6
interface eth0
static ip_address = 192.168.100.30/24
The rpi adress on wlan0 i didint set it was automatically set when i connected it to the router. I use it to access rpi by vnc viewer.
The ip_address that i set is not occupied by any other device, but still when i check ifconfig the eth0 address is 169.254....
What I want is to connect the IP camera directly to eth port. When i connected it to router i could access it by its IP, but I want to do it directly through ethernet.
Sorry for my incompetence I am just getting started with rpi
The schematics of the system looks like this:
- Attachments
-
- Diagram.jpg (14.92 KiB) Viewed 268 times
Re: Eth0 camera rpi static ip
How many network interfaces does the IP camera have?
Does your router also act as a WiFi access point?
Frankly, with all devices connected to the router, especially if using a wired connection, you'll get better performance using just the wired connection. Especially if one link is 1000Mbps ethernet and the other 150Mbps (or less) WiFi.
With Linux, if both eth0 and wlan0 (or any two interfaces for that matter) have IP addressses in the same subnet which yours appear to be only one will be used - usually the fastest one.
Why do you feel you want two links between Pi and IP camera?
A 169.254... address is in the self assigned link local subnet which, in this case, likely mean something is broken in you /etc/dhcpcd.conf
Does your router also act as a WiFi access point?
Frankly, with all devices connected to the router, especially if using a wired connection, you'll get better performance using just the wired connection. Especially if one link is 1000Mbps ethernet and the other 150Mbps (or less) WiFi.
With Linux, if both eth0 and wlan0 (or any two interfaces for that matter) have IP addressses in the same subnet which yours appear to be only one will be used - usually the fastest one.
Why do you feel you want two links between Pi and IP camera?
A 169.254... address is in the self assigned link local subnet which, in this case, likely mean something is broken in you /etc/dhcpcd.conf
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
Re: Eth0 camera rpi static ip
thagrol wrote: ↑Wed Feb 08, 2023 2:55 pmHow many network interfaces does the IP camera have?
Does your router also act as a WiFi access point?
Frankly, with all devices connected to the router, especially if using a wired connection, you'll get better performance using just the wired connection. Especially if one link is 1000Mbps ethernet and the other 150Mbps (or less) WiFi.
With Linux, if both eth0 and wlan0 (or any two interfaces for that matter) have IP addressses in the same subnet which yours appear to be only one will be used - usually the fastest one.
Why do you feel you want two links between Pi and IP camera?
A 169.254... address is in the self assigned link local subnet which, in this case, likely mean something is broken in you /etc/dhcpcd.conf
I use wired connection between router and computer, and camera-router. Only rpi is connected with wlan0 to router. Now what i want is to instead of connecting IP camera by cable with router i want it to connect it to eth0 port while still connecting rpi to router so i can use VNC. And here is my question. Do i have to set IP cameras ip on different network, eth0 port on different network (then i wouldnt be able to connect it back to router and use it from there). Or is it possible to have 2 ip's one on wlan0(for vnc) and one on eth0 (to be able to access camera)?
Camera model is : dahua ipc hfw2231s
Router is only for lan connection, no internet.
Re: Eth0 camera rpi static ip
Camera, RPi and computer should all be on the same subnet, eg 192.168.100.
Quis custodiet ipsos custodes?
Re: Eth0 camera rpi static ip
Ok, but when i tried to configure the dhcpcd.conf file to this:
interface wlan0
noipv6
interface eth0
static ip_address = 192.168.100.30/24
I still get the 169.254... address which is self assigned local subnet, and not the one i want to set in dhcpcd.conf file. Any ideas why?
Re: Eth0 camera rpi static ip
Clear documentation from Raspberry Pi here -
https://www.raspberrypi.com/documentati ... -addresses
The syntax you have used in your modified snippet from /etc/dhcpcd.conf does not correspond with that documentation
Re: Eth0 camera rpi static ip
Maybe it's me but I'm still confused about what your network configuration is and what you want to achieve.Sendreth wrote: ↑Thu Feb 09, 2023 7:57 amI use wired connection between router and computer, and camera-router. Only rpi is connected with wlan0 to router. Now what i want is to instead of connecting IP camera by cable with router i want it to connect it to eth0 port while still connecting rpi to router so i can use VNC. And here is my question. Do i have to set IP cameras ip on different network, eth0 port on different network (then i wouldnt be able to connect it back to router and use it from there). Or is it possible to have 2 ip's one on wlan0(for vnc) and one on eth0 (to be able to access camera)?
Camera model is : dahua ipc hfw2231s
Router is only for lan connection, no internet.
What I think you currently have is all three devices in the same subnet and connected to the same router. Though "camera-router" suggest there is another router is involved somewhere.
What I think you goal might be is to have VNC access to the Pi. That should work over the existing network connection - VNC does not require a dedicated link or interface.
Your secondary goal appears to be to move the camera connection from the router to the Pi. As a WiFi interface in client mode cannot be part of a network bridge that means the Pi's eth0 and and the camera must be in a different subnet to the rest of yout network and that if you want the camera to be accessable from the rest of your network you must set up the Pi to act as a router between the two subnets.
As for the link local address, check your syntax as has already been suggested more than once.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
Re: Eth0 camera rpi static ip
eth0 is connected to the camera. That isn't going to work. Just connect the camera, the Pi and whatever else to the router. Then all the addressing will be taken care of for you. You'll be able to VNC into the Pi and HTTP into the camera, it will all just work.
Re: Eth0 camera rpi static ip
Hi Guys
I found a solution to my problem. Probably I didin't explain exactly what i wanted achieve. Here is the solution:
My dhcpcd.conf file:
interface wlan0
noipv6
interface eth0
static ip_address = 192.168.100.X/24
static routers = "wlan0 adress of RPI4 within the same network"
Now i can both have the camera connected directly to eth0 or to the router. The camera,rpi4,computer all within the same network. I am sorry for any inconvenience, its my first steps into rpi4. I didint have any previous experience with networking.
I found a solution to my problem. Probably I didin't explain exactly what i wanted achieve. Here is the solution:
My dhcpcd.conf file:
interface wlan0
noipv6
interface eth0
static ip_address = 192.168.100.X/24
static routers = "wlan0 adress of RPI4 within the same network"
Now i can both have the camera connected directly to eth0 or to the router. The camera,rpi4,computer all within the same network. I am sorry for any inconvenience, its my first steps into rpi4. I didint have any previous experience with networking.