I have a server that has two ethernet ports, each one running on a separate NIC (eth0 and eth1). I would like to connect eth0 to a separate machine that streams video over UDP (and no other traffic) while the other interface (eth1) is connected to the network gateway/router.
I don't care if the udp traffic port does not connect to the wider network.
Thank you!
EDIT: Since this question was put on hold, I would like to further clarify my system as per the comments below. My system consists of a machine, running linux, with two ethernet NIC's. I am receiving a UDP stream on one of those ports from a direct LAN-LAN connection to a security camera, and even though I've been able to read the packets coming in from the camera using tcpdump
I have yet to be seeing anything coming through via gstreamer
which I plan on using to display the video.
Both ports have a static IP address, configured as seen below:
eth0 Link encap:Ethernet HWaddr 5C:F8:21:34:80:F6 inet addr:192.168.1.233 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::5ef8:21ff:fe34:80f6%132688/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1237 errors:0 dropped:0 overruns:0 frame:0 TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:113089 (110.4 KiB) TX bytes:14016 (13.6 KiB) Interrupt:99 eth1 Link encap:Ethernet HWaddr 5C:F8:21:34:80:F7 inet addr:192.168.1.234 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%132688/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:330 errors:0 dropped:0 overruns:0 frame:0 TX packets:330 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:277171 (270.6 KiB) TX bytes:277171 (270.6 KiB)
And the internal routing table:
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
The camera is on address 192.168.1.239
, and broadcasts to my server directly over UDP. (the destination MAC is hardcoded into the packets) It is broadcasting an MJPEG stream, and when I take the packets saved by tcpdump
I can rebuild it into the MJPEG.
however, when I use gstreamer
using the following command:
gst-launch-1.0 udpsrc multicast-iface=eth0, port=1234 ! filesink location=foo
foo
does not save any data. I've used this machine to save udp streams using gstreamer in the past, but not when both ports were in use. IE, the video was coming from another machine, through the router, to this server in question.
So, why can't these packets, which the server clearly sees and understands (it's not dropping them at least) not get to my gstreamer program?
eth0
oreth1
to the other machine, what do you expect to happen, and what do you observe that does not match your expectations?ifconfig
ornetstat
might be handy.