Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-09-2014, 02:56 PM
|
#1
|
LQ Newbie
Registered: Apr 2014
Location: California
Distribution: Ubuntu Precise
Posts: 2
Rep:
|
Dual NIC setup procedure
Hello - Ubuntu Linux Newbie Here.
The situation: Building a Camera DVR system for my office.
Ubuntu 12.04 on a repurposed server running Ubiquity "Airvision" DVR system.
eth0 is connected to LAN network (10.0.0.0/24) and it all works fine with a couple of test cameras also on the 10.0.0.0/24 network.
I want to create a different network (192.168.0.0/24) that the cameras will live on to keep all the camera feeds off the regular LAN and to keep that network separate and private.
How can I setup the server (it has dual NICS) so that the "Airvision" server can see all the cameras on 192.168.0.0/24, and at the same time be accessible from the LAN side 10.0.0.0/24
The LAN connection to the server is via the eth0 NIC
The cameras will connect to the server via eth1 NIC
I assume it requires eth1 to be static with a 192.168.0.X address, and then some settings to allow routing across the two networks so that the Airvision software can see the cameras and be accessed from the LAN, but I don't want to make the camera network visible to all the 10.0.0.0/24 users.
Thanks for any help and advice!
|
|
|
04-09-2014, 03:11 PM
|
#2
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
I'm not an expert here, but have you tried it yet? I can't imagine you'd need to do anything more than assign each interface an IP on the respective network, configure your ip routes to default to the one with internet access, and go.
The server software listens on a port, not on an IP, so it should be able to accept incoming requests from either network.
I have several servers that are split onto two subnets, and I didn't have to do any more than what I described in my first paragraph. eth0 has a static IP on subnet 1, eth1 has a static IP on subnet 2, and ip route is configured to default to subnet 1 (subnet 2 has no internet access). I can access any server daemon on the machine (ssh, ftp, httpd, etc) from either subnet by using the proper address.
|
|
|
04-09-2014, 04:52 PM
|
#3
|
LQ Newbie
Registered: Apr 2014
Location: California
Distribution: Ubuntu Precise
Posts: 2
Original Poster
Rep:
|
Thanks for the info suicidaleggroll.
Any chance you can provide more detail (real newbie here), such as the gateway settings for the second NIC, plus the "ip route" setup.
Appreciate the help!
|
|
|
04-09-2014, 06:54 PM
|
#4
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
The gateway settings are no different than on a single NIC setup
eth0:
Code:
inet addr:192.168.1.134 Bcast:192.168.1.255 Mask:255.255.255.0 Gateway:192.168.1.1
eth1:
Code:
inet addr:192.168.2.134 Bcast:192.168.2.255 Mask:255.255.255.0 Gateway:192.168.2.1
And for ip route I just made sure that the default was eth0 (for some reason it was defaulting to eth1 after I set up both interfaces)
Code:
# ip route change default via 192.168.1.1 dev eth0
|
|
|
All times are GMT -5. The time now is 05:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|