Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have obtained a static ip address for my router from my ISP (it is a dsl router provided by my ISP). Many devices are connected to this router in wireless mode. One of them is my Server. The server is running JBoss on port 8080.

To forward incoming requests to JBOSS. I have done port-forwarding in the router. It is done using a feature called virtual servers in the DSL router, wherein you can forward requests on specific ports (in this case 8080) to a specific Internal ip address.

The internal ip address is obtained dynamically from the router when the server gets connected to the router. But if due to some problem, the router reboots or the connection between the server and the router has to be re established, the internal ip address gets changed (as it is assigned dynamically) and the incoming 8080 requests are forwarded to the wrong machine.

So I tried to change the settings on Windows. Instead of

Obtain an IP Address Automatically

I chose

Use the following IP Address

and gave an internal ip address, subnet mask and set the default gateway to the address of the router. But I get

No internet access error.

I am not able to access the internet with this setting. So I tried disabling DHCP on the router. Still I get the same

No internet access

share|improve this question
    
What do you mean "I have obtained a static ip address for my router"? You've gotten an address for the router from your ISP? Or you have reserved an IP in the router for the server? –  CharlieRB Aug 17 '12 at 12:38
    
@CharlieRB : I've gotten an address for the router from m ISP. –  Ashwin Aug 17 '12 at 12:56
add comment

4 Answers

up vote 2 down vote accepted

You can resolve this issue by two different way.

  • At first you should look for reserve an internal ip for your server. Some router having option to reserve ip in DHCP options.
  • If your router don't having any option for reservation, You should configure port farwarding at your router first, and configure an manual ip at your server, But remember server's IP should be outside from router's DHCP loop.
  • It's not compulsory to disable DHCP at your router. It's depends on your requirement.
  • You should assign router's ip as an server's default gateway.
  • You should assign your ISP's DNS server's IP as an your server's DNS as well. (You can check your ISP's DNS server's IP from router web adminpanel as well.)

And you should be fine.

share|improve this answer
    
Assigning ISP's DNS server's IP as my server's DNS IP did the trick. Thanks:) –  Ashwin Aug 17 '12 at 15:54
add comment
  • Disable DHCP server in the router
  • Enter the DNS servers in the router
  • Disable DHCP in WIndows client
  • Setup static IP in Windows, and don't forget to set gateway IP as the router IP
  • Setup DNS server in Windows

and you should be fine.

share|improve this answer
add comment

Most routers have some kind of static DCHP address ability so that a specific computer (or rather a specific MAC-address) always gets assigned the same internal IP-address by the DHCP server, and that IP-address is reserved and never assigned to anyone else.

What this function is called varies between router brands (and sometime models) but it's a common function so you probably have it. Some models reserves an IP-address within the DHCP range and some outside it. Read the manual to see how your router should be configured for this.

So:

  • enable automatic IP on the JBOSS
  • enable DHCP on the router
  • enable the function that locks a specific IP to a specific MAC-address (computer)
share|improve this answer
add comment

You won't want to disable DHCP service on the router or else all those other devices you talked about probably won't connect anymore.

When DHCP is configured on a router, it has a range of addresses that it will give out say from 192.168.1.100 to 192.168.1.254 with a subnet mask of 255.255.255.0. And let's say the gateway address is 192.1.68.1.1. Because of where the gateway address is and the size of the subnet mask, there's nothing stopping you from setting up a static IP of 192.168.1.20 (subnet:255.255.255.0 gw:192.168.1.1)

If setting a static IP doesn't work, you could just set incredibly long DHCP leases and that might be as good as a static IP.

share|improve this answer
    
okay say I set the leasing period to 1000000 hours. But what if the router powers down in between? Will it be able to assign the same leased ip address to the server?\ –  Ashwin Aug 17 '12 at 13:33
    
Your router should maintain a database of which IPs are available and which ones are not. You can test this by rebooting your router and seeing if the leased address table is the same before and after the reboot. Your Windows client should refresh the lease before it expires. There is a chance that your windows machine will be off when it would have renewed the lease and a different device will get that IP. However, this is unlikely since your machine is a server and therefor "always on". –  Green Aug 17 '12 at 13:37
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.