[SOLVED] 2 different networks on the same RJ45 cable

low2020

Reputable
Sep 12, 2020
15
0
4,510
Hi all,

I hope i can explain my question well.

I have a TCP/IP network used to interconnect two devices.
The devices are far from each other, i use a fast Ethernet to Fiber Media Converter to convert 100TX to 100FX.

My fiber media converter is only 1 port RJ45 and 1 port Fibre SC; Fibre standard: Multi mode. I want to share internet over Ethernet cable to another device in the same location but using the same Fiber media convert.
Is it possible to do it, means sending 2 datas, TCP/IP and Internet on the same Ethernet networking via fiber optic and connect each RJ45 to his destination device.

Thanks.
 
Solution
Are they really 2 different network. So the traffic from 1 set of devices you do not want connected to the traffic from the other.

The first step is a switch on both end. This would allow all the device to share the fiber connection but they are all on the same network.

To get 2 different networks you need slightly better switches. These used to be called managed switches but some vendors now call very limited managed switches smart switches. The feature you want to look for is VLAN support.

What you would do is say assign port 1 on each switch to vlan 1. Then assign port 2 on each switch to vlan 2. You would then say connect port 3 on both switches to the fiber converters. You would configure this port to have both...
Are they really 2 different network. So the traffic from 1 set of devices you do not want connected to the traffic from the other.

The first step is a switch on both end. This would allow all the device to share the fiber connection but they are all on the same network.

To get 2 different networks you need slightly better switches. These used to be called managed switches but some vendors now call very limited managed switches smart switches. The feature you want to look for is VLAN support.

What you would do is say assign port 1 on each switch to vlan 1. Then assign port 2 on each switch to vlan 2. You would then say connect port 3 on both switches to the fiber converters. You would configure this port to have both vlans on it. What the switches do it place special markers (tags) on the data packet as they pass over the common that goes over the fiber. It then uses these tags to properly direct the data.

Note this is a very simple sample you can actually put many more than 2 port on any particular vlan and you can have a lot more than 2 vlans.
 
  • Like
Reactions: low2020
Solution

low2020

Reputable
Sep 12, 2020
15
0
4,510
Are they really 2 different network. So the traffic from 1 set of devices you do not want connected to the traffic from the other.

The first step is a switch on both end. This would allow all the device to share the fiber connection but they are all on the same network.

To get 2 different networks you need slightly better switches. These used to be called managed switches but some vendors now call very limited managed switches smart switches. The feature you want to look for is VLAN support.

What you would do is say assign port 1 on each switch to vlan 1. Then assign port 2 on each switch to vlan 2. You would then say connect port 3 on both switches to the fiber converters. You would configure this port to have both vlans on it. What the switches do it place special markers (tags) on the data packet as they pass over the common that goes over the fiber. It then uses these tags to properly direct the data.

Note this is a very simple sample you can actually put many more than 2 port on any particular vlan and you can have a lot more than 2 vlans.

Thanks for your help.
Yes they are 2 different network. As i don't have a good idea about this stuff, did you mean switches like this for example Switch Vlan ?
I've heard also talking about RJ45 splitter, could this work in my case
Here is a picture of what i want to have 2 NET
 
A splitter won't work. It would basically be the same as if you took the cable apart and crimped 2 ends on both ends of the cable. You still only have 1 place to plug into the media converter. They just pretend you ran a second ethernet cable next to the first one but now they can only run at 100mbps.

That is the type of switch I was talking about. You need one on each end.

Now SamirD made a good point. When the switches send the data over the fiber connection they add 4 bytes to the packet to mark which vlan it belongs to. This technically can make the packet longer than the maximum allowed length. Some very old equipment may not support this. Your media converter likely will support this but there is a small chance they will not.

Now what I think will happen is the pcs will just figure this out and send slightly shorter packets. PC when they setup communication between machines do what it call MTU discovery to figure out the longest packet that will pass.

My guess it is will work fine but I have not use 100mbps media converters in many years.
 
  • Like
Reactions: low2020 and SamirD
Thanks for your help.
Yes they are 2 different network. As i don't have a good idea about this stuff, did you mean switches like this for example Switch Vlan ?
I've heard also talking about RJ45 splitter, could this work in my case
Here is a picture of what i want to have 2 NET
That switch is a bit confused--what you are looking for is a 'managed' switch with vlan capability. Not sure what that one you linked to will do as it is an unmanaged switch and they usually do not have vlan support.

vlans can do what you want, but if you can set static IP addresses on different subnets for your device a/b, you can also just use regular switches and the devices can communicate over different IP subnets on the same cable.
 
  • Like
Reactions: low2020
That is really strange. The description say "smart managed" but the photo shows unmanaged on the device itself. If you look at the third photo in the amazon ad it has a different front panel.
This is all from the tplink store which makes it even more strange.

If you go to tplink that part number give this

They do sell a unmanaged version of that switch but it has a different photo
 
  • Like
Reactions: low2020

low2020

Reputable
Sep 12, 2020
15
0
4,510
That switch is a bit confused--what you are looking for is a 'managed' switch with vlan capability. Not sure what that one you linked to will do as it is an unmanaged switch and they usually do not have vlan support.

vlans can do what you want, but if you can set static IP addresses on different subnets for your device a/b, you can also just use regular switches and the devices can communicate over different IP subnets on the same cable.

I wanted to mention that, yes i can set static IP for devices, in this case how will be the configuration (can you please elaborate the section in red)

Thanks.
 
This is basically a very non standard way to do this. You must manually set the IP on all the device. You can not use things like DHCP because these are broadcast messages and broadcast go to all devices no matter the subnet.

So you would set for example

192.168.2.50 and 192.168.2.51

For the other pair you would set

192.168.1.50 and 192.168.1.51

Both you would use a subnet mask of 255.255.255.0. Those are just example addresses key is the third octet is what makes this work.
 
  • Like
Reactions: low2020 and SamirD
That is really strange. The description say "smart managed" but the photo shows unmanaged on the device itself. If you look at the third photo in the amazon ad it has a different front panel.
This is all from the tplink store which makes it even more strange.

If you go to tplink that part number give this

They do sell a unmanaged version of that switch but it has a different photo
Yeah, this is why I avoid Amazon at all costs--even if a listing is correct, you still have to worry about bait and switch. I'd rather get one locally from an office supply store--it's the same price usually anyways.
 
I wanted to mention that, yes i can set static IP for devices, in this case how will be the configuration (can you please elaborate the section in red)

Thanks.
So it really depends on the specifics of the devices and if the connection is simply point-to-point or really needs a network.

For my own usage I do this to have additional bandwidth from my systems with additional ethernet ports to my nas units that have a second ethernet port. I'll lay out an example of how this works in my setup. It is all running over the same single switch which is unmanaged.

My nas unit will be dhcp on lan1 just as the system is. This will allow them to communicate at 1Gbps. But since my system as an additional lan port and so does the nas, I assign a static IP to the nas lan2 of 10.10.10.8 and a static IP to the second system lan port of 10.10.10.9. Even without a default gateway, these can also communicate at 1Gbps, so copies from the system to the nas on the dhcp address can saturate 1Gbps and a second copy from the system to the nas on 10.10.10.8 will also have an additional 1Gbps.

The physical wiring is identical to your use case except I don't have fibre in between. system lan1 and lan2 into switch<-->cable<-->main switch<-->cable<-->switch where nas lan1 and lan2 plug in.

Depending on what the device is and what protocols it can run, you can also use another non-tcp/ip protocol on the same ethernet cable. For example, if I ran IPX/SPX on both the nas and system 2nd ports, they would communicate on that protocol and would not interfere with the TCP/IP traffic on the same wire.

Hope this helps.
 
  • Like
Reactions: low2020