I'm setting up a vision system using Ubuntu 16.04 with a number of GIGE vision cameras and two local networks. I have 6 GIGE ports on my computer to try and sort out and I'm not having much luck. I'm hoping that this is something fairly obvious that I'm missing.
To list them out:
- enp0s31f6: Connects to the university network using dhcp
- enp1s0: Connects to local instrument LAN (static IP, 192.168.175.x subnet)
- enp2s0: Connects to GIGE camera (192.168.0.3)
- enp3s0: Connects to GIGE camera (192.168.0.4)
- enp4s0: Connects to GIGE camera (192.168.0.5)
- enp5s0: Connects to GIGE camera (192.168.0.6)
My interfaces file so far is: # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback
# Primary interface
auto enp0s31f6
iface enp0s31f6 inet dhcp
# Secondary interface for vehicle comms
auto enp1s0
iface enp1s0 inet static
address 192.168.175.13
netmask 255.255.255.0
gateway 192.168.175.1
up route add -net 192.168.175.0 netmask 255.255.255.0 gw 192.168.175.1
up route del default gw 192.168.175.1
post-up route del -net 192.168.175.0 netmask 255.255.255.0 gw 0.0.0.0
#GIGE Port 1
auto enp2s0
iface enp2s0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
#post-up route del -net 192.168.0.0 netmask 255.255.255.0 gw 0.0.0.0
#up route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1
mtu 9000
The problem I'm having is that the routes are terribly messed up. Right now they are:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.64.226.0 0.0.0.0 255.255.254.0 U 0 0 0 enp0s31f6
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp2s0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
192.168.175.0 0.0.0.0 255.255.255.0 U 0 0 0 enp1s0
Which isn't super helpful, since it now routes all traffic through enp2s0, which is only connected to a camera. I'm also not sure how to route only a single IP address through an interface.
Thoughts?
gateway
statements on the not-primary interfaces?gateway
androute
, that's all done automatically. What you need is a proper concept of how the IP addresses and subnets should be laid out. The important question is: What IP addresses do your cameras have? Where do they get this address from (statically assigned in their GUI, or dhcp)? After answering that, you can work out a concept.