Can anyone tell me difference between DHCP and static IP routing? I am especially concerned about one thing. When I assign static IP to my device, I can not ping it outside office (not from my laptop connected to office network through VPN). But If I configure my device, which is in office to use DHCP for IP then I can ping it from outside LAN. Any idea about where the problem is? I have tried tracert and it blocks at a switch's IP in case of outside network.
migrated from serverfault.com Sep 30 '10 at 16:07
This question came from our site for professional system and network administrators.
The difference between static IP routing and DHCP based routing is simply that when you use DHCP to configure a network interface, the server is generally configured to forward a range of values to the client computer, which usually include at least a network mask and a default gateway. The client computer then sends all traffic to other computers that are not connected directly (i.e. on the same subnet) to the default gateway, which will route them in the appropriate direction.
If you configure an interface to use a static IP address, you need to either setup a routing table manually for all subnets you want to talk to, or you need to add (also manually) a default gateway (in fact, these two actions are not mutually exclusive, you can do both, which is sort of the point I am getting to in a minute).
If you assign a static IP address to an interface, you also need to make sure that it fits within the subnet that the computer is connected to, otherwise it won't be able to talk to any of the other computers on that subnet.
When a computer connects to an office network via VPN, then usually the VPN client needs additional routes in its routing tables, so that traffic for any of the office resources is routed through the VPN tunnel (this can also be done by pointing the default route at the tunnel, in which case ALL traffic goes through the tunnel). If these routes are not there, the computer connected via VPN cannot "see" anything on the other side of the tunnel. Plus: on your office network, routing has to be in place to route the return traffic into the tunnel. In order to easily facilitate this, very often VPN servers use a separate subnet for all their VPN connections, as then all that is needed is a single route on the default gateway in the office to point at the VPN server.
Now, if you are the sysadmin for that office, then the above should give you all the information you need to figure out what is missing. If you are not the sysadmin, then talk to the sysadmin.
|show 1 more comment|
Configure the default gateway: