Connecting to cameras on second NIC

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
JimS
Posts: 37
Joined: Sun Feb 18, 2007 3:16 pm

Connecting to cameras on second NIC

Post by JimS »

Have set up a second NIC on Ubuntu for an isolated camera network. Is connecting to the cameras as simple as using the IP of the cameras or is something else needed to access the second port network? I haven't done anything with 2 NICs before so unsure how things work.
Ralphred
Posts: 32
Joined: Fri Jul 08, 2022 12:23 pm

Re: Connecting to cameras on second NIC

Post by Ralphred »

There is a thing called a "routing table" within the kernels network stack that tells it how to reach certain networks, so as long as the camera's network is only available via the IP address assigned to your second NIC, traffic to and from the cameras will be sent via that NIC. You could manually add entries to the routing table to force connections to/from camera IP's via a specific device, but it's easier to just move the second NIC and the cameras on to a network with a separate address space.
plainequally
Posts: 3
Joined: Thu Dec 08, 2022 7:25 am

Re: Connecting to cameras on second NIC

Post by plainequally »

Thank you for this clarification. drive mad
JimS
Posts: 37
Joined: Sun Feb 18, 2007 3:16 pm

Re: Connecting to cameras on second NIC

Post by JimS »

Was easier than I thought it would be.
Used
ip addr show
to get MAC of both ports. Then set up DHCP by MAC on the routers on both networks.

Added file: /etc/netplan/02-network-dual-nic.yaml

Code: Select all

network:
    version: 2
    renderer: NetworkManager
    ethernets:
        eno1:
            dhcp4: true
            dhcp6: no
        enp2s0:
            dhcp4: true
            dhcp6: no
then
sudo netplan --debug apply

And everything works as desired. Just have to use the address for the source in zoneminder for whichever network the cameras are on. I am not sure the netplan stuff was needed but that's what I did and it works.
Post Reply