When I run into problems it usually helps me to make a (paper) drawing of a network.
This is the one which I get if I put you information into one:
The internet connection arrives at the red line. It is only active after your 'dialled in'.
Since you almost certainly only get one IP from your provider it will be assigned to the modems external interface. This is the only place where you can directly communicate with the internet.
To allow internal devices onto the network your BSNL modem does a few things:
- It hands out non routeable IPs to devices on your internal (green) network via DHCP.
- It makes sure its own IP is in the same range. (192.168.1.x).
- If an internal IP wants to access something on the internet it uses network address translation.
As far as I can tell this part works fine.
However the modem does not have wireless, so you added another device to the network. A Dlink AP.
You connected this AP to the DSNL modem and gave it an IP in a different range. (192.168.0.50). As a result it can not communicate with the 192.168.1.x network.
If all of this is correct, then you can gain access to the internet via wireless if you:
Put the DLINK in the same network range as the BSNL modem, either by
- setting the DLINK to DHCP so it gains a 192.168.1.x address, or
- manually set the DLINK to an unused 192.168.1.x address.
(preferably one outside the DHCP range from the BSNL modem.)
If the DLINK has a DHCP server then disable it.
Now the DLINK should be able to communicate with the internet. Only one step remains: making sure that wireless devices which connect to the Dlink can also reach it. To do this the Dlink will have to forward these connections without using additional masqerading or address translations.
According the the link to provided for the Dlink it supports 'bridge mode'. Enable this.
If all is as a I drew it in the schematic, then it should work.
However the dial up connection part really surprised and confused me. If this is just something which gets sent to the modem and which forwards it then things still should be correct. If it is indeed more of a 'real' modem rather than a regular broadband modem then my explanation will need to be changed.
Edit: The more I think about it and the more the previous answer feels wrong. I am sure it is correct for the normal 'broadband modem-router-firewall' which seems to be the only model I ever see around here. But I found some manuals on the internet which make two other solutions more likely.
The first is the easy way with an always on server. That would yield this configuration:
This would require you to 'dial in' from the server/laptop. Connected via the normal cable.
Once that is done you can share the internet access with the rest of your home network.
If you have two network cards in your server/laptop:
Enable internet sharing. Done.
If you only have a single network card in your server/laptop:
Add a second IP to the network card, then enable internet sharing.
(Note: I wonder if windows allows DHCP and an extra IP via the GUI. This might require some scripting)
If you do not run windows on this machine (e.g. because you want to use your regular laptop and scavenged an old PC with GNU/Linux)
- Set up the dial in connection
- Assign the second IP address (same as in windows with 1 or 2 NICs)
- Add routing table entries.
- Enable forwarding. ( sysctl -w net.ipv4.ip_forward=1 )
- Enable IP Masquerading.
Wow, this is really getting a long post. However I still have more more schematic.
The Dlink AP has two wired ports.
That means that something like this is also possible:
Basically you would 'dial-in' from the laptop at the bottom of the picture, using the Dlink as a bridge. I am not clear what the result after that is. You would have a working connection from the laptop, but I could not find precisely how the laptop gets configured. As a result it is likely that you will need manually set DNS on the Dlink. If the Teracom modem acts as DHCP server then you will need to disable this on the Dlink. If it does not you will need to have it enabled.
This post is getting dratfully long. Please, read it, comment on which of the two is wrong (think of it as options 1 and 2a, 2b) and I will expand the correct part.
ipconfig /all
in the question, once you connect to the AP?