sharing files on different subnets on windows - networking

I am getting internet from a WISP close to my house using an out-door wireless network adapter. so first the internet comes to a desktop PC and from there i want to share it using a wireless router between other devices. beside internet sharing, i want devices connected to my wireless router to share files between each other and PC1.
here is what I've done to get as close as possible to what i need for my network. both devices running windows 8.1.
PC1 (deskptop):
IP address: 192.168.1.1
Default gateway: 192.168.1.1
Subnet: 255.255.255.0
shared network adapter with Ethernet port on PC1. Ethernet port is connected to WAN port of the router. turned on network discovery.
PC1 Ethernet port :
IP address: 192.168.137.1
Subnet: 255.255.255.0
Router:
Set to Wireless router Mode.
Static IP address for WAN port in Router:
IP address: 192.168.137.42
Default Gateway: 192.168.137.1
Subnet: 255.255.255.0
DHCP: enabled from 192.168.1.100 to 192.168.1.224
Port forwarding option: (virtual server) :
192.168.1.100 to 192.168.137.1 (forward internal IP to External IP of router)
Forward port: 5900 to 5900
DMZ: enabled for IP address (192.168.1.100)
PC2 (Laptop):
Static IP address: 192.168.1.100
Subnet: 255.255.255.0
Default Gateway: 192.168.1.1
changed network mode to private. turned on file sharing and network discovery and shared folders.
PC1 can see PC2 using VNC viewer on 192.168.137.42:5900, Done.
PC1 and PC2 both have internet connection, Done.
PC1 (desktop) can't access files/folders on PC2 (laptop
). that's the problem.
Thanks for your help.

It may be easier to get a second Ethernet card for PC1 and hook it to one of your routers switch-ports.
OR
If your routers firmware allows it, you could override the default gateway of DHCP clients to use PC1's IP. That wouldn't require a second NIC.

Related

cannot reach a webcam behind two routers

I am using internet over cable and this is connected via a Vodafone cable router. Attached to a lan port of that Vodafone router is my ASUS Router, which provides WLAN in another floor of my house. Attached to the ASUS Router via WLAN is a WebCam.
If I access a port (lets say 8010) on my IP this should allow me to access the web cam.
IP 45.12.1.4 (LAN) IP 192.168.0.x (WLAN) IP 192.168.1.y
Internet ------------> Vodafone Router -------------------> ASUS Router ----------------> WebCam
(The IP address above is dummy.)
If I access http://45.12.1.4:8010 I want to access the WebCam.
For that I have used port forwarding on the Vodafone Router:
LAN-IP-Adresse Protokoll LAN Port (Bereich) WAN Port (Bereich)
192.168.0.x TCP 8010 8010
Then I have configured the ASUS Router:
Servicename Source Target Portbereich Lokale IP Lokaler Port Protokoll
IP-Camera 8010 192.168.1.y 8010 TCP
When I try to access the camera via the IP address and port number, I get a time out and the server cannot be reached.
How can I achieve this double forwarding?

Wifi router with DHCP enabled to a network

I have this very cheap all in one machine (modem + wifi router) provided by my service provider. I have disabled the wifi on it and bought a netgear nighthawk. Now i am trying to set it up that some devices are connected to wifi and some are connected using wire to the modem. I am trying to figure out how i can have DHCP enabled on both machine and also have access to machines connected to modem. So my setup is as follow.
Modem has 4 LAN ports and have 3 devices and the the nighthawk wifi router connected to it. The access IP of the modem is 192.168.1.1 and starting IP is 192.168.1.2 with subnet mask 255.255.255.0 and have DHCP enabled to provide IPs to everything connected to it.
The WIFI router access IP is IP 192.168.0.1 has starting IP 192.168.0.2 with subnet mask 255.255.255.0 and DHCP enabled to provide IP to everything connected to it.
I would like devices connected to WIFI router to have access to devices connected to Modem and vice versa.
Can someone help me figure this out.
On your configuration you have 2 NAT one from the ISP and another one from your access point/router (nighthawk). Meaning that you have 2 networks with different IP ranges.
This is how I configure the LAN when I have multiple routers to extend the coverage.
Assign an IP address to the nighthawk on the range of 192.168.1.x/255.255.255.0 ex 192.168.1.2
Disable the DHCP on the nighthawk
Connect your ISP router to a LAN interface on the Nighthawk.
What will happen is that your nighthawk will be just an access point, all the DHCP will be at the ISP router meaning that all ips will be on the same range. If you connect your ISP to the Nighthawk WAN interface it is going to go nowhere because some of them are programmed to do a NAT between the Lan an Wan interfaces.
I also configure the DHCP to assign ip's from 192.168.1.100 to 192.168.1.200 range, all devices from 1 to 99 are routers, access points, servers, cameras, printers or devices that need an static ip address. Then I have segments ex. routers are 1-9, printers 10-29, etc etc. By doing this I will now what device is or their purpose on the network.
Hope it helps.

Wireless not working with different subnet

1.Internet Router ip 192.168.0.1 (LAN) - There are 3 more computers connect to this router (ip 192.168.0.2, 192.168.0.3, 192.168.0.4) .
Wireless Router connected to the internet router with ip 192.168.0.5 . The wireless Router send out DHCP ip range 192.168.1.1-100
Wireless printers connected to wireless router 192.168.1.1 .
All 3 computers can't add the printers !!! why ? thanks
I recommend changing the router mode on the wireless router from NAT mode to access point mode if it is possible. The clients on the wired network cannot access the printer behind the wireless router because of NAT or firewall policies.

How to make a desktop (with two network cards) as a router

I have a win 10 machine(A) with 2 network cards. While I have only one Ethernet port at my work place, and recently I got another machine(B). What I want to do is to connect machine A with the first network cart to the Ethernet port, and connect machine B with the second network card to machine B.
So I configured machine A (Win 10) as follows:
[NIC1]:
IP: 202.3.4.136
Subnet: 255.255.255.0
Gateway: 202.3.4.1
[NIC2]:
IP: 192.168.1.1
Subnet: 255.255.255.0
Gateway: 202.3.4.136
I configure machine B as follows:
[NIC1]:
IP: 192.168.1.2
Subnet: 255.255.255.0
Gateway: 192.168.1.1
It's possible to ping machine B from machine A, and vice versa. However I cannot access the internet from machine B. So I tried to use the method mentioned here, adding route add -p 192.168.1.0 MASK 255.255.255.0 192.168.1.1 on machine A. It still does not work. What is the problem for that? Thank you!
The network topology looks like this:
[port to Internet] <------> (NIC1) Machine A (NIC2) <------> (NIC1) Machine B
If you were using Win10, you could just turn on the Internet Connection Sharing on the public NIC, then set the corresponding IP of the following private NICs.
You have to tell machine B to use 192.168.0.1 as default gateway. It makes no sense to introduce yet another subnet 192.168.1.x into the situation.
Machine A needs to be told to do the routing and NAT for B.
With these keywords, please google for concrete steps, you will find an abundance of tutorials.

Change gateway sequence with network manager

My computer has 2 ethernet ports and 1 wireless port. One of the ethernet ports (eth5) and the wireless port (wlan0) are both configured to connect to a network server, and the other ethernet port (eth4) is configured to connect to a local network switch for communicating with some local devices. The route table of the computer looks like this (as I can not post image yet):
Destination Gateway Genmask Iface
0.0.0.0 141.21.32.1 0.0.0.0 eth5
10.10.10.0 0.0.0.0 255.255.255.0 eth4
141.21.12.0 0.0.0.0 255.255.252.0 wlan0
141.21.32.0 0.0.0.0 255.255.224.0 eth5
169.254.0.0 0.0.0.0 255.255.0.0 eth5
My question is that, how I could change the sequence of the gateways with the network-manager in ubuntu (permanently), so that the gateway of wlan0 will be used before the eth4's. Otherwise when I unplug the cable from eth5, I will lose connection to the network (the gateway of eth4 will be used by default).
I tried editing the /etc/network/interfaces file, but it conflicts with the network-manager, and it can not handle the dynamic events (e.g., when network cable is plugged or unplugged), meaning that its settings are static, while the network-manager can handle these things perfectly, and change the network configurations adaptively, so I would like to find a solution for this problem with network-manager.
The os is ubuntu 13.04 32bit. Thanks for viewing and I will appreciate for any advice!
Problem is solved by checking the option "use this connection only for resources on its network" in the "Routes" page of the IPv4 settings of the configuration interface for the local network (used by eth4) in network-manager.

Resources