Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Setup is as follows:

  • Primary network is via en0 (192.168.1.0/24)
  • Secondary network is via en1 and contains a DLNA server (192.168.2.0/24). This is 'private' network containing only en1 and the DLNA device, with no router etc.

I'd like for devices on the primary network to be able to communicate with/stream from the device on en1. Both networks are connected to a machine running OS X 10.8.

I've tried various combinations of bridge ('ipconfig bridge create' etc), natd, and sysctl in an attempt to arrive at some kind of functional solution and have consistently failed.

Can this be done, and if so, what is my target configuration?

Thanks in advance.

share|improve this question

migrated from serverfault.com Mar 29 '13 at 16:08

This question came from our site for professional system and network administrators.

3 Answers 3

I'm assuming that these are separate networks with their own gateway to the Internet and that the OSX box is just a computer on both LANs (It's not their gateway)?

Bridging the networks has just effectively put a link cable between the two networks. Hosts on 1.x trying to send data to 2.x will just forward the packets to their default gateway which won't know what to do with them.

You could add a 1.x alias to the media server and keep the bridge but that's quite ugly and running two LANs on top of each other is generally discouraged. In addition, if you really wanted to do this it'd make more sense to just link the two networks with a cable rather than bridge them on a host.

The ideal solution is to probably have the default gateway on each network a router capable of routing between the two. However the routers would both need an interface on their respective LAN and an interface to connect the two routers together, plus relevant routes (at the simplest a static route on each) which probably won't be possible with the equipment you have.

By far the easiest solution is to merge the networks and move 2.x stuff onto 1.x or visa-versa, which ever is the least problematic.

share|improve this answer
    
Thanks for your thoughts, though in this case (as I have now clarified above) 2.x is a 'private' network containing only the bridging device and the DLNA server without any router etc. –  jstephenson Mar 29 '13 at 15:43
    
Can you not just move the DNLA device to a 1.x address then? –  USD Matt Mar 29 '13 at 15:45
    
Ideally not - the OS X device wishes to communicate via wired ethernet with the DLNA device, yet allow wireless clients on 1.x access to stream from it. –  jstephenson Mar 29 '13 at 15:48
    
I'm still not getting why this can't all be on one LAN. Connect the DLNA server to router or switch on 1.x network via cable, connect OSX box to same network via cable, all on 1.x addresses. OSX box communicates to DLNA server via cable through switch/router, and wireless clients can connect to it over wireless as it's all on the same network. Why is there a requirement for the DLNA server to be on a completely different LAN segment when you're trying to link the two anyway? –  USD Matt Mar 29 '13 at 15:53
    
Or if cabling is the issue, connect DLNA server to OSX box, bridge en0 and en1 on the OSX box, give the bridge a 1.x address which should get the OSX box on the network and also give the DLNA server a 1.x address, although bridging through a host like this is a bit messy in my view. –  USD Matt Mar 29 '13 at 15:54

I am wondering whether this led to any working solutions. I have a mostly identical situation and haven't found a good solution yet. Let me try and clarify ax to the why of this particular configuration.

In my case I have a Mac connected to "the Internet" (obviously via my home router) through it's Wifi interface. My DLNA server (a Synology NAS) is connected directly to the same Mac using a wired Ethernet connection.

Why not connect my DLNA server to the router? Wiring constraints! Yes I could solve these, but for now I would like to find it if it is at all possible to get this setup working.

I've created a bridge and connected both my wireless and wired interfaces to it. That's the easy part. However, as you already pointed out this creates a somewhat unclear situation: two different subnets are now connected to a bridge and because they are different subnets they still can't talk to each other even though they are "connected". At the IP level, things aren't as they should: getting from one network to the other requires a (default) gateway in the respective networks.

The problem is that different networks are now connected at L2, and this shouldn't be done. One resolution might be to make sure that both interfaces are on the same network, but this creates a new problem: two of the Mac's interfaces are then on the same network and this causes an unclear routing decision for traffic sent from the Mac, since both interfaces present a default gateway for traffic outside these networks. To solve this, something has to be done to make sure that one of these interfaces (in this example the Wifi) is always used as the default. Furtermore, traffic destined for the DLNA server must always be routed to the wired Ethernet interface. I have not found a working solution for this yet.

You point out that giving the bridge itself an IP address on the "Internet facing" network should do the trick, without having to put both interfaces on the same subnet. I am curious to find out how this would work. Assuming that both interfaces remain, the only thing that changes is that they are bridged together with a logical bridge that has it's own address. How precisely would that alter OS X's network behaviour?

Cheers,

Frank

share|improve this answer
    
Welcome to the site. You've posted this as an answer, which is only for things that directly answer the question asked. If you have a different question, feel free to ask it using the Ask Question button at the top right. –  patrix May 6 '13 at 20:11
    
Frank - I would second the request to just ask your related question. The people that asked this on another site haven't shown up to tend to it in over a month, so chances are the asker may never arrive to even select an answer. Your question is more detailed and by virtue of showing up, we'd get better chance at helping you to work through your take on this problem. –  bmike May 6 '13 at 22:50
    
I wasn't able to get it working. If you can find one, that'd be great. –  jstephenson May 21 '13 at 12:44

Just had this problem myself. My setup is a media server on one bridged router with ip-192.168.1.2 bridged to another router with internet =ip-192.168.1.1.

My media server is 192.168.1.222, I simply put this ip on the DMZ for router 192.168.1.2

As internet traffic still has to pass through 192.xxxx.1 I think its perfectly safe! Not sure what advanced setting you need in order to get your router to distribute dlna information, but my cheap TP link hasn't got the options without installing openwrt or some such ilk.

After putting it in the DMZ works a charm! :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.