Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from Sep 30 '10 at 16:07

This question came from our site for system and network administrators.

Can you ping the device from inside the network? Sounds like you might not be setting the correct gateway on it, hence why it can't respond to the ping maybe? – emtunc Sep 30 '10 at 12:12

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.

share|improve this answer
There's no such thing as "DHCP based routing" and DHCP has little to do with static routes. I think you're intentions are good here, but the questioner is obviously confused and you haven't pointed that out. – Chris S Sep 30 '10 at 12:37
@Chris S - that's not entirely true. Admittedly DHCP and routing are two distinct seperate things, however, Windows Server DOES have the ability to create a static route when a particular account joins via VPN and is assigned a DHCP address. All that said, that's probably got absolutally nothing to do with what the op is asking. – Mark Henderson Sep 30 '10 at 12:55
@Farseeker, that's a RRAS service, setting up the routes, not a function of DHCP. – Chris S Sep 30 '10 at 12:58
@Chris - no, but the IP addresses can be assigned by DHCP. Never mind, I was trying to make some sort of abstract join between the two concepts, I never meant for it to be taken seriously. – Mark Henderson Sep 30 '10 at 13:05
@Farseeker, you crack me up some days. – Chris S Sep 30 '10 at 13:26

Configure the default gateway:

 Linux: #route add default gw GATEWAY
 Windows: route -p add mask
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.