0

I have several computers running Windows XP installed in my office. They are all connecting to the WAN providing by the building (wall socket) (DHCP, mask 255.255.252.0). I set up a shared folder in my computer, so all other computers in the same group could access it. I've been using this configuration for a long time.

Recently, I was trying to set up a router. I have the WAN port of the router go to the wall socket, connect the NIC to the LAN port of the router, setup the router in DHCP mode (192.168.0.100/255.255.255.0 to 192.168.0.110 /255.255.255.0).

I turned off all the firewalls (Windows one and router's builtin one), the NIC has IP set as DHCP. If I ipconfig /all, I see that the NIC was assigned ip 192.168.0.100.

I can access the Internet, e-mail, whatever. However, the shared folders can no longer be accessed by other computers in the same group. I think it is a problem with the IP.

But what's really weird is if I turn off the DHCP function in the router, ipconfig /all always gives 0.0.0.0/255.255.255.255 and I cannot access the Internet. I have no idea what's going on. Does anyone know how to fix it and allow the shared folder in application of router?

4
  • What is IP of your computer from which you try to access share and IP of computer hosting share? Can you access other resources on detination computer, or ping it? Check whether you can access destination computer from the first computer using command telnet computer2name 445.
    – ko4evneg
    Oct 24, 2013 at 5:53
  • 1
    Why exactly have you added a router? What features is this router supposed to be giving you? Your problem is almost certainly related to NAT being performed on that router.
    – Zoredache
    Oct 24, 2013 at 6:43
  • 1
    Why do you need the router? Why do you want to use it and not connect directly to the WAN? Oct 24, 2013 at 7:08
  • What IP do you get if you connect your computer directly to the WAN? Oct 24, 2013 at 7:11

2 Answers 2

1

I'd connect all of your computers to your new router.

With some computer connected to the wall & others connect to your router, your Samba requests (share folder data) need to be routed between the two routers. This would need to be configured / allowed.

0

It seems your router is doing NAT (network address translation). This means your router has one WAN IP, learned using DHCP (for example 172.16.12.34), and a complete internal network. For the internal network you configured the IPs 192.168.0.100-192.168.0.110. When your computer sends a packet into the WAN, then the router will forward the packet and replace the sender address with its own WAN address. The receiver of the packet will not see that the packet comes from your computer, he will see a packet from the router and think he talks to the router. If the receiver sends an answer, then the router will look into the NAT table, see that this answer packet is for your computer and forward the packet to you. This works fine for outgoing connections, because the router will find the packet destination in its NAT table. For incoming connections the router will not find the connection in the NAT table and discard the incoming packet because he does not know where to forward the packet.

Regarding your observation that you cannot access the file shares on your computer anymore: access to the file share is - from router perspective - an incoming connection. As stated above this does not work.

Regarding your observation that your computer does not get an IP if you disabled DHCP on your router: when DHCP was enabled on your router, you got an IP from your router and this IP was for the internal network. If you disabled DHCP on the router, then the router does not give you an IP address anymore. You don't get an IP address from your WAN because this is blocked by the NAT on the router. The router knows that WAN and internal network are different networks, so he must block DHCP.

This is not a firewall issue, it does not help to switch off the firewall in the router. What you will need to do is one of the following options:

  1. Configure the router so that your computer is an exposed host. This means that the router will forward any packets without a matching NAT table entry to the exposed host.
  2. Configure the router so that he does port forwarding. This is like exposed host, but not for all ports, only for the necessary ports. This is more secure than exposed host.
  3. Configure the router not to do NAT but to act in bridge mode/bridging mode. In bridging mode the router will just act like a HUB or switch and not do DHCP, NAT, filtering and other magic.
  4. As historystamp said you can put all computers in your room behind your router. In this case your room will have full access in your own network, but computers in the WAN can not access your local network.

And last but not least: if you have so little network knowledge, then please consider asking your local admin before adding routers to the network. When you are doing it wrong and your routers DHCP server is connected to the WAN, then you will break IP on the WAN.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .