How do I connect a simple network to the internet?
up vote
0
down vote
favorite
Okay, so here's the deal. I have two PCs setup for gaming. One is specifically for streaming, and the other is just for gaming. In order to get the video output from the gaming PC to the streaming PC, I use the NDI plugin with OBS Studio, which allows me to output video via an ethernet cable to my streaming PC, where that video is then received, processed, and sent to Twitch, YouTube, or wherever. The way I have the network setup, is I have my gaming laptop connected to my streaming PC via a crossover cable, and then I have my gaming computer connected to my ap via a (different, obviously) ethernet cable. The problem is, from my laptop, I can only access the internet if I use Wi-Fi (since my laptop only has one ethernet port, unlike my streaming PC), and Wi-Fi is not ideal for gaming. So, I would like to find a way to allow my streaming PC to act almost like a switch, and allow any traffic not destined for it (i.e. the gaming traffic, and not the NDI traffic) to automatically get forwarded to the AP as if it were directly connected, therefore allowing my gaming laptop to access both the internet and send its screencapture through the ethernet cable. I have been playing around with the routing tables for the past hour, and can't quite get it to work. I am running Windows 10 on my gaming PC, and a debian-based linux distro on my streaming PC. Any help would be greatly appreciated! Thanks!
Edit: I understand that using a simple switch would be the easiest solution, but I would still like to know how to make it work the way I originally mentioned, for learning sake. So for now, let's assume I only have the two PCs, one crossover cable, and one patch cable connected to the AP. Thanks!
networking gaming crossover
add a comment |
up vote
0
down vote
favorite
Okay, so here's the deal. I have two PCs setup for gaming. One is specifically for streaming, and the other is just for gaming. In order to get the video output from the gaming PC to the streaming PC, I use the NDI plugin with OBS Studio, which allows me to output video via an ethernet cable to my streaming PC, where that video is then received, processed, and sent to Twitch, YouTube, or wherever. The way I have the network setup, is I have my gaming laptop connected to my streaming PC via a crossover cable, and then I have my gaming computer connected to my ap via a (different, obviously) ethernet cable. The problem is, from my laptop, I can only access the internet if I use Wi-Fi (since my laptop only has one ethernet port, unlike my streaming PC), and Wi-Fi is not ideal for gaming. So, I would like to find a way to allow my streaming PC to act almost like a switch, and allow any traffic not destined for it (i.e. the gaming traffic, and not the NDI traffic) to automatically get forwarded to the AP as if it were directly connected, therefore allowing my gaming laptop to access both the internet and send its screencapture through the ethernet cable. I have been playing around with the routing tables for the past hour, and can't quite get it to work. I am running Windows 10 on my gaming PC, and a debian-based linux distro on my streaming PC. Any help would be greatly appreciated! Thanks!
Edit: I understand that using a simple switch would be the easiest solution, but I would still like to know how to make it work the way I originally mentioned, for learning sake. So for now, let's assume I only have the two PCs, one crossover cable, and one patch cable connected to the AP. Thanks!
networking gaming crossover
1
But why not use an actual ethernet switch? The dedicated chip will almost always offer better performance than the streaming PC's already quite burdened CPU.
– grawity
Nov 22 at 22:49
You're definitely right, the problem is that I don't own one, and I was hoping to find a fix tonight! :) But you're right, I may end up getting one as a future investment, or possibly even a capture card. But for now, if I could get this to work, it would be the cheapest option, which is definitely good for me! Besides, I think my streaming PC should be able to handle it. I've got two Intel Xeon server-grade processors in it, as well as two separate nics, if need-be, to handle the connections.
– Noah
Nov 22 at 22:58
You could create a bridge and attach the two interfaces to it. But you're probably better off using the existing wired connection you have using the AP's switch.
– multithr3at3d
Nov 23 at 1:42
Do you own a router? (I mean the typical "4 LAN ports" home router.) The LAN ports in those are actually an internal switch and can be used here. But honestly, a good 5-port Gigabit switch costs... $20 or so?
– grawity
Nov 23 at 8:20
It would depend on the OS you're using. Windows simply supports Internet Connection Sharing which you could use. Doing the routing manually can be hard on Windows depending on your version and edition. For Linux you would change/proc/sys/net/ipv4/ip_forward
.
– Seth
15 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Okay, so here's the deal. I have two PCs setup for gaming. One is specifically for streaming, and the other is just for gaming. In order to get the video output from the gaming PC to the streaming PC, I use the NDI plugin with OBS Studio, which allows me to output video via an ethernet cable to my streaming PC, where that video is then received, processed, and sent to Twitch, YouTube, or wherever. The way I have the network setup, is I have my gaming laptop connected to my streaming PC via a crossover cable, and then I have my gaming computer connected to my ap via a (different, obviously) ethernet cable. The problem is, from my laptop, I can only access the internet if I use Wi-Fi (since my laptop only has one ethernet port, unlike my streaming PC), and Wi-Fi is not ideal for gaming. So, I would like to find a way to allow my streaming PC to act almost like a switch, and allow any traffic not destined for it (i.e. the gaming traffic, and not the NDI traffic) to automatically get forwarded to the AP as if it were directly connected, therefore allowing my gaming laptop to access both the internet and send its screencapture through the ethernet cable. I have been playing around with the routing tables for the past hour, and can't quite get it to work. I am running Windows 10 on my gaming PC, and a debian-based linux distro on my streaming PC. Any help would be greatly appreciated! Thanks!
Edit: I understand that using a simple switch would be the easiest solution, but I would still like to know how to make it work the way I originally mentioned, for learning sake. So for now, let's assume I only have the two PCs, one crossover cable, and one patch cable connected to the AP. Thanks!
networking gaming crossover
Okay, so here's the deal. I have two PCs setup for gaming. One is specifically for streaming, and the other is just for gaming. In order to get the video output from the gaming PC to the streaming PC, I use the NDI plugin with OBS Studio, which allows me to output video via an ethernet cable to my streaming PC, where that video is then received, processed, and sent to Twitch, YouTube, or wherever. The way I have the network setup, is I have my gaming laptop connected to my streaming PC via a crossover cable, and then I have my gaming computer connected to my ap via a (different, obviously) ethernet cable. The problem is, from my laptop, I can only access the internet if I use Wi-Fi (since my laptop only has one ethernet port, unlike my streaming PC), and Wi-Fi is not ideal for gaming. So, I would like to find a way to allow my streaming PC to act almost like a switch, and allow any traffic not destined for it (i.e. the gaming traffic, and not the NDI traffic) to automatically get forwarded to the AP as if it were directly connected, therefore allowing my gaming laptop to access both the internet and send its screencapture through the ethernet cable. I have been playing around with the routing tables for the past hour, and can't quite get it to work. I am running Windows 10 on my gaming PC, and a debian-based linux distro on my streaming PC. Any help would be greatly appreciated! Thanks!
Edit: I understand that using a simple switch would be the easiest solution, but I would still like to know how to make it work the way I originally mentioned, for learning sake. So for now, let's assume I only have the two PCs, one crossover cable, and one patch cable connected to the AP. Thanks!
networking gaming crossover
networking gaming crossover
edited Nov 23 at 20:30
asked Nov 22 at 22:38
Noah
32
32
1
But why not use an actual ethernet switch? The dedicated chip will almost always offer better performance than the streaming PC's already quite burdened CPU.
– grawity
Nov 22 at 22:49
You're definitely right, the problem is that I don't own one, and I was hoping to find a fix tonight! :) But you're right, I may end up getting one as a future investment, or possibly even a capture card. But for now, if I could get this to work, it would be the cheapest option, which is definitely good for me! Besides, I think my streaming PC should be able to handle it. I've got two Intel Xeon server-grade processors in it, as well as two separate nics, if need-be, to handle the connections.
– Noah
Nov 22 at 22:58
You could create a bridge and attach the two interfaces to it. But you're probably better off using the existing wired connection you have using the AP's switch.
– multithr3at3d
Nov 23 at 1:42
Do you own a router? (I mean the typical "4 LAN ports" home router.) The LAN ports in those are actually an internal switch and can be used here. But honestly, a good 5-port Gigabit switch costs... $20 or so?
– grawity
Nov 23 at 8:20
It would depend on the OS you're using. Windows simply supports Internet Connection Sharing which you could use. Doing the routing manually can be hard on Windows depending on your version and edition. For Linux you would change/proc/sys/net/ipv4/ip_forward
.
– Seth
15 hours ago
add a comment |
1
But why not use an actual ethernet switch? The dedicated chip will almost always offer better performance than the streaming PC's already quite burdened CPU.
– grawity
Nov 22 at 22:49
You're definitely right, the problem is that I don't own one, and I was hoping to find a fix tonight! :) But you're right, I may end up getting one as a future investment, or possibly even a capture card. But for now, if I could get this to work, it would be the cheapest option, which is definitely good for me! Besides, I think my streaming PC should be able to handle it. I've got two Intel Xeon server-grade processors in it, as well as two separate nics, if need-be, to handle the connections.
– Noah
Nov 22 at 22:58
You could create a bridge and attach the two interfaces to it. But you're probably better off using the existing wired connection you have using the AP's switch.
– multithr3at3d
Nov 23 at 1:42
Do you own a router? (I mean the typical "4 LAN ports" home router.) The LAN ports in those are actually an internal switch and can be used here. But honestly, a good 5-port Gigabit switch costs... $20 or so?
– grawity
Nov 23 at 8:20
It would depend on the OS you're using. Windows simply supports Internet Connection Sharing which you could use. Doing the routing manually can be hard on Windows depending on your version and edition. For Linux you would change/proc/sys/net/ipv4/ip_forward
.
– Seth
15 hours ago
1
1
But why not use an actual ethernet switch? The dedicated chip will almost always offer better performance than the streaming PC's already quite burdened CPU.
– grawity
Nov 22 at 22:49
But why not use an actual ethernet switch? The dedicated chip will almost always offer better performance than the streaming PC's already quite burdened CPU.
– grawity
Nov 22 at 22:49
You're definitely right, the problem is that I don't own one, and I was hoping to find a fix tonight! :) But you're right, I may end up getting one as a future investment, or possibly even a capture card. But for now, if I could get this to work, it would be the cheapest option, which is definitely good for me! Besides, I think my streaming PC should be able to handle it. I've got two Intel Xeon server-grade processors in it, as well as two separate nics, if need-be, to handle the connections.
– Noah
Nov 22 at 22:58
You're definitely right, the problem is that I don't own one, and I was hoping to find a fix tonight! :) But you're right, I may end up getting one as a future investment, or possibly even a capture card. But for now, if I could get this to work, it would be the cheapest option, which is definitely good for me! Besides, I think my streaming PC should be able to handle it. I've got two Intel Xeon server-grade processors in it, as well as two separate nics, if need-be, to handle the connections.
– Noah
Nov 22 at 22:58
You could create a bridge and attach the two interfaces to it. But you're probably better off using the existing wired connection you have using the AP's switch.
– multithr3at3d
Nov 23 at 1:42
You could create a bridge and attach the two interfaces to it. But you're probably better off using the existing wired connection you have using the AP's switch.
– multithr3at3d
Nov 23 at 1:42
Do you own a router? (I mean the typical "4 LAN ports" home router.) The LAN ports in those are actually an internal switch and can be used here. But honestly, a good 5-port Gigabit switch costs... $20 or so?
– grawity
Nov 23 at 8:20
Do you own a router? (I mean the typical "4 LAN ports" home router.) The LAN ports in those are actually an internal switch and can be used here. But honestly, a good 5-port Gigabit switch costs... $20 or so?
– grawity
Nov 23 at 8:20
It would depend on the OS you're using. Windows simply supports Internet Connection Sharing which you could use. Doing the routing manually can be hard on Windows depending on your version and edition. For Linux you would change
/proc/sys/net/ipv4/ip_forward
.– Seth
15 hours ago
It would depend on the OS you're using. Windows simply supports Internet Connection Sharing which you could use. Doing the routing manually can be hard on Windows depending on your version and edition. For Linux you would change
/proc/sys/net/ipv4/ip_forward
.– Seth
15 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
There are two options.
Messing with routing tables only helps if you are trying to turn the streaming PC into a router, i.e. have two different subnets on different sides. In your case though, there are no changes needed to the PC's routing table at all (after all, it already knows both networks), but instead to the gaming PC and the main LAN router.
Make sure both networks (the LAN and the gaming PC's mini-net) use different subnet prefixes.
On the gaming PC, make sure the streaming PC is set as the "default gateway".
On the streaming PC, make sure IP forwarding is enabled:
sysctl net.ipv4.conf.all.forwarding=1
On the LAN's main router, add a static route towards the mini-net:
- Destination: <mini-net's subnet address/mask>
- Gateway: <streaming PC's main LAN address>
If and only if the main router has no option to add static routes
(and still dares to call itself a router), instead enable SNAT on the streaming PC by adding an iptables "masquerade" rule.
Note: Using NAT would mean that all ports to the gaming PC must be manually forwarded twice – once from router to streaming PC, and then from the streaming PC to the gaming PC (by adding DNAT rules to iptables).
On the other hand, if you want to turn the streaming PC into a switch, what you're looking for the "bridge" feature in Linux. Configuring it varies between distributions; here's how to do it by hand (temporarily), or via NetworkManager, or via traditional Debian ifupdown, but the general principle is:
- Remove all IP configuration from both Ethernet ports.
- Create a virtual "bridge" interface.
- Add both Ethernet interfaces as "ports" to the bridge.
- Configure IP (e.g. DHCP) on the bridge interface only.
Now everything that's attached to both Ethernet interfaces becomes part of the same subnet. The gaming PC can use DHCP to get its address directly from your main LAN router.
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
There are two options.
Messing with routing tables only helps if you are trying to turn the streaming PC into a router, i.e. have two different subnets on different sides. In your case though, there are no changes needed to the PC's routing table at all (after all, it already knows both networks), but instead to the gaming PC and the main LAN router.
Make sure both networks (the LAN and the gaming PC's mini-net) use different subnet prefixes.
On the gaming PC, make sure the streaming PC is set as the "default gateway".
On the streaming PC, make sure IP forwarding is enabled:
sysctl net.ipv4.conf.all.forwarding=1
On the LAN's main router, add a static route towards the mini-net:
- Destination: <mini-net's subnet address/mask>
- Gateway: <streaming PC's main LAN address>
If and only if the main router has no option to add static routes
(and still dares to call itself a router), instead enable SNAT on the streaming PC by adding an iptables "masquerade" rule.
Note: Using NAT would mean that all ports to the gaming PC must be manually forwarded twice – once from router to streaming PC, and then from the streaming PC to the gaming PC (by adding DNAT rules to iptables).
On the other hand, if you want to turn the streaming PC into a switch, what you're looking for the "bridge" feature in Linux. Configuring it varies between distributions; here's how to do it by hand (temporarily), or via NetworkManager, or via traditional Debian ifupdown, but the general principle is:
- Remove all IP configuration from both Ethernet ports.
- Create a virtual "bridge" interface.
- Add both Ethernet interfaces as "ports" to the bridge.
- Configure IP (e.g. DHCP) on the bridge interface only.
Now everything that's attached to both Ethernet interfaces becomes part of the same subnet. The gaming PC can use DHCP to get its address directly from your main LAN router.
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
add a comment |
up vote
0
down vote
accepted
There are two options.
Messing with routing tables only helps if you are trying to turn the streaming PC into a router, i.e. have two different subnets on different sides. In your case though, there are no changes needed to the PC's routing table at all (after all, it already knows both networks), but instead to the gaming PC and the main LAN router.
Make sure both networks (the LAN and the gaming PC's mini-net) use different subnet prefixes.
On the gaming PC, make sure the streaming PC is set as the "default gateway".
On the streaming PC, make sure IP forwarding is enabled:
sysctl net.ipv4.conf.all.forwarding=1
On the LAN's main router, add a static route towards the mini-net:
- Destination: <mini-net's subnet address/mask>
- Gateway: <streaming PC's main LAN address>
If and only if the main router has no option to add static routes
(and still dares to call itself a router), instead enable SNAT on the streaming PC by adding an iptables "masquerade" rule.
Note: Using NAT would mean that all ports to the gaming PC must be manually forwarded twice – once from router to streaming PC, and then from the streaming PC to the gaming PC (by adding DNAT rules to iptables).
On the other hand, if you want to turn the streaming PC into a switch, what you're looking for the "bridge" feature in Linux. Configuring it varies between distributions; here's how to do it by hand (temporarily), or via NetworkManager, or via traditional Debian ifupdown, but the general principle is:
- Remove all IP configuration from both Ethernet ports.
- Create a virtual "bridge" interface.
- Add both Ethernet interfaces as "ports" to the bridge.
- Configure IP (e.g. DHCP) on the bridge interface only.
Now everything that's attached to both Ethernet interfaces becomes part of the same subnet. The gaming PC can use DHCP to get its address directly from your main LAN router.
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
There are two options.
Messing with routing tables only helps if you are trying to turn the streaming PC into a router, i.e. have two different subnets on different sides. In your case though, there are no changes needed to the PC's routing table at all (after all, it already knows both networks), but instead to the gaming PC and the main LAN router.
Make sure both networks (the LAN and the gaming PC's mini-net) use different subnet prefixes.
On the gaming PC, make sure the streaming PC is set as the "default gateway".
On the streaming PC, make sure IP forwarding is enabled:
sysctl net.ipv4.conf.all.forwarding=1
On the LAN's main router, add a static route towards the mini-net:
- Destination: <mini-net's subnet address/mask>
- Gateway: <streaming PC's main LAN address>
If and only if the main router has no option to add static routes
(and still dares to call itself a router), instead enable SNAT on the streaming PC by adding an iptables "masquerade" rule.
Note: Using NAT would mean that all ports to the gaming PC must be manually forwarded twice – once from router to streaming PC, and then from the streaming PC to the gaming PC (by adding DNAT rules to iptables).
On the other hand, if you want to turn the streaming PC into a switch, what you're looking for the "bridge" feature in Linux. Configuring it varies between distributions; here's how to do it by hand (temporarily), or via NetworkManager, or via traditional Debian ifupdown, but the general principle is:
- Remove all IP configuration from both Ethernet ports.
- Create a virtual "bridge" interface.
- Add both Ethernet interfaces as "ports" to the bridge.
- Configure IP (e.g. DHCP) on the bridge interface only.
Now everything that's attached to both Ethernet interfaces becomes part of the same subnet. The gaming PC can use DHCP to get its address directly from your main LAN router.
There are two options.
Messing with routing tables only helps if you are trying to turn the streaming PC into a router, i.e. have two different subnets on different sides. In your case though, there are no changes needed to the PC's routing table at all (after all, it already knows both networks), but instead to the gaming PC and the main LAN router.
Make sure both networks (the LAN and the gaming PC's mini-net) use different subnet prefixes.
On the gaming PC, make sure the streaming PC is set as the "default gateway".
On the streaming PC, make sure IP forwarding is enabled:
sysctl net.ipv4.conf.all.forwarding=1
On the LAN's main router, add a static route towards the mini-net:
- Destination: <mini-net's subnet address/mask>
- Gateway: <streaming PC's main LAN address>
If and only if the main router has no option to add static routes
(and still dares to call itself a router), instead enable SNAT on the streaming PC by adding an iptables "masquerade" rule.
Note: Using NAT would mean that all ports to the gaming PC must be manually forwarded twice – once from router to streaming PC, and then from the streaming PC to the gaming PC (by adding DNAT rules to iptables).
On the other hand, if you want to turn the streaming PC into a switch, what you're looking for the "bridge" feature in Linux. Configuring it varies between distributions; here's how to do it by hand (temporarily), or via NetworkManager, or via traditional Debian ifupdown, but the general principle is:
- Remove all IP configuration from both Ethernet ports.
- Create a virtual "bridge" interface.
- Add both Ethernet interfaces as "ports" to the bridge.
- Configure IP (e.g. DHCP) on the bridge interface only.
Now everything that's attached to both Ethernet interfaces becomes part of the same subnet. The gaming PC can use DHCP to get its address directly from your main LAN router.
answered Nov 23 at 9:25
grawity
229k35481540
229k35481540
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
add a comment |
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
Thank you! That's the answer I was looking for! :)
– Noah
Nov 23 at 20:31
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377689%2fhow-do-i-connect-a-simple-network-to-the-internet%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
But why not use an actual ethernet switch? The dedicated chip will almost always offer better performance than the streaming PC's already quite burdened CPU.
– grawity
Nov 22 at 22:49
You're definitely right, the problem is that I don't own one, and I was hoping to find a fix tonight! :) But you're right, I may end up getting one as a future investment, or possibly even a capture card. But for now, if I could get this to work, it would be the cheapest option, which is definitely good for me! Besides, I think my streaming PC should be able to handle it. I've got two Intel Xeon server-grade processors in it, as well as two separate nics, if need-be, to handle the connections.
– Noah
Nov 22 at 22:58
You could create a bridge and attach the two interfaces to it. But you're probably better off using the existing wired connection you have using the AP's switch.
– multithr3at3d
Nov 23 at 1:42
Do you own a router? (I mean the typical "4 LAN ports" home router.) The LAN ports in those are actually an internal switch and can be used here. But honestly, a good 5-port Gigabit switch costs... $20 or so?
– grawity
Nov 23 at 8:20
It would depend on the OS you're using. Windows simply supports Internet Connection Sharing which you could use. Doing the routing manually can be hard on Windows depending on your version and edition. For Linux you would change
/proc/sys/net/ipv4/ip_forward
.– Seth
15 hours ago