LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-15-2017, 03:01 PM   #1
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 44

Rep: Reputation: 17
Direct cable connection which must have DNS and Gateway


I have an Ubuntu PC with a primary network card which connects it to my home network and a secondary network card which links directly to a CCTV server (All-in-one DVR setup, with embedded linux).

The problem I have is in configuring the secondary network.

Normally if it were just two PCs that we were connecting via ethernet cable (not router or network), then simply setting a fixed IP on the same subnet on both PCs should do the job, e.g. PC1 = 10.0.0.1, PC2 = 10.0.0.2. I wouldn't normally set a default gateway or DNS server address.

However, the CCTV server that I am using which uses some flavour of embedded linux must have a default gateway and DNS server specified otherwise it complains and won't save the network settings.

It's designed for streaming the camera feeds over the internet, but I want it to just stream to a single PC (which is running Zoneminder).

What should I set as values for default gateway and DNS in this situation?

I have tried putting the PC IP address as the default gateway on the CCTV server and I've tried both the PC IP and the CCTV server IP as the DNS server address, but so far nothing works.

I get a link light on the connection at both ends and the activity light flickers for a couple of seconds when first connected but then goes to steady on.

On the CCTV server's network configuration screen the status shows "No link".

Incidentally, I have tried both normal and crossover network cables.

Any pointer would be appreciated.

Thanks.

Last edited by r3g; 10-15-2017 at 03:02 PM. Reason: correction
 
Old 10-16-2017, 09:50 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,486

Rep: Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838
Without knowing anything about your DVR I don't know if the configuration no link status is actually referring to the local network connection or maybe that it is trying to "phone home" Most IoT devices work by connecting to the manufactures server similar to a reverse tunnel and then you can connect to it using a phone or desktop application.

If your DVR streams using RTSP then I would expect that the gateway and DNS would not be required. You would just configure zoneminder with something like the IP addressort and camera.
 
Old 10-16-2017, 05:30 PM   #3
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 44

Original Poster
Rep: Reputation: 17
Yes, I hadn't thought about that for the link status. It does make sense.

And I agree with you about the DNS and gateway. For a simple PC to PC connection, neither of them are required, just an IP on each device. However the DVR will not let me leave those values blank when configuring the network connection.

The choices I have on the DVR network configuration menu are;

Automatic (DHCP) []

IP:
Netmask:
Gateway:
DNS:

If I click the checkbox to enable DCHP it says "DHCP server not found", which is correct as there isn't one running on the PC it's connected to. Unchecking the box then allows me to manually enter values for the other inputs.

If I just enter IP address and Netmask and try to leave Gateway and DNS blank, it complains about the missing values and won't save the settings.

All I want to do is access the RTSP streams form the DVR directly on the PC without streaming them over my main network as the two boxes sit side by side.

It looks like this may not be possible, even though in principle it should be simple.

Could I maybe install a local DHCP server on my PC and have it only run on the one network card so that it doesn't interfere with the DHCP server from my network router?
 
Old 10-16-2017, 05:56 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,486

Rep: Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838
Yes, you can setup a DHCP server just for the second network card.

If you set the gateway as the PC IP address for the second card, DNS as 8.8.8.8 (google DNS) and then set ip4 forwarding to true (echo 1 > /proc/sys/net/ipv4/ip_forward) that should work...
 
Old 10-21-2017, 08:48 AM   #5
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 44

Original Poster
Rep: Reputation: 17
All sorted now and without setting up DHCP.

On the DVR I had to set the DNS to 0.0.0.0 and the gateway to 10.0.0.1 (which is the PC IP).

This alone did not work when I tried it previously, but restarting both the PC and DVR allowed the settings to work and I can now see the camera streams on the PC.

Got there in the end. thanks for the assistance michaelk.
 
Old 10-21-2017, 09:24 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,486

Rep: Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838Reputation: 5838
Good, you can mark the thread as solved if desired using the thread tools pull down menu at the top of the page.
 
  


Reply

Tags
dns, network interface, peertopeer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kubuntu direct cable connection and WiFi, different networks mickboda Linux - Networking 1 10-28-2009 08:57 PM
Direct Cable Connection between Slack 10.0 and Windows XP Johnnyae17 Linux - Networking 1 12-22-2004 05:16 AM
direct connection to Linux through a serial cable 0perat0r Linux - Newbie 5 08-03-2004 03:04 PM
Direct Cable Connection using LPT1 chem1 Linux - Hardware 1 03-10-2004 10:59 AM
Direct Cable Connection suchi Linux - Networking 4 11-23-2003 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration