| Static IP and DHCP Setup |
|
***Official Disclaimer***
Neither I nor Alltel/Windstream/Your ISP/Anyone else will be held accountable for what you or anyone else does inside your router or on your computer or any software you download and/or install. If you change/remove/corrupt something up on your computer or router or equipment and someone has to fix it or replace it for you and charge you money/services/beer for fixing it then it's your responsibility not mine nor is it Alltel/Windstream's or your ISP's or anyone else's. I give you the information that I have learned/found/acquired. What you do with it is up to you. Do not email me with questions or complaints about why your router/computer/equipment/etc. doesn't work. I cannot guarantee that this config or these settings or information on this site will work for everyone. I can't test all solutions possible because I don't know them all and there are not enough hours in the day/week/month/year for me to test every combination possible. I have tested/used these configurations/software and they work for me. I am just letting my findings be open to help others in times of need at no cost. If you do not understand these instructions/configurations/software or are afraid that you will mess up the computer/router/equipment/software then you will want to contact a computer/network technician to help fix/configure/build what you need done. |
|
In order for this to work you have to have an actual static IP address assigned to you from your ISP. Setting up your router to use both DHCP and Static IP does have it's advantages and disadvantages. The advantages are that you will be able to have all of your machines connecting to the internet thru one static IP without having to have each machine setup with it's own static external IP address, which can get expensive thru some ISPs. Some of the disadvantages are that the machine(s) on the static IP(s) will not be able to see or talk to the machine(s) using DHCP and vice versa. Another disadvantage is that the machine(s) using DHCP will have to use NAT entries. To describe the way this works, figure that your router will in essence connect to 3 different networks.
1) The DSL network to your ISP 2) Your static IP network 3) Your DHCP network |
|||||||||||||||||
| Setting it all up | |||||||||||||||||
|
For our example here we are going to setup the router and 3 computers, 1 computer will have the static IP and 2 computers will use DHCP. Your external IP address will be something other than what I have here in the example. The router's external IP address (the one that is accessible from the internet) will be 216.50.50.50 The router's internal IP address (the one that is accessible from only your network) will be 192.168.200.1. The static IP computer will be 216.50.50.51 with a subnet mask of 255.255.255.252. The 2 computers using DHCP will be 192.168.200.100 and 192.168.200.110 both of them will have a subnet mask of 255.255.255.0.If you don't know what your external IP address is then while in enable mode type in
sho int You should get something like such, note that the IP address is your router's IP address, your static IP should be 1 number higher.. such as 216.50.50.51
|
|||||||||||||||||
| Image 1 is a graphical representation of this network. | |||||||||||||||||
IMAGE 1
|
|||||||||||||||||
| Most likely DHCP and NAT are turned off in your router because you are using static IP(s). The first thing we have to do is turn these back on. Using either hyperterminal (hyperterminal is the prefered way to do this being as we will be changing the IP addresses gateways and subnets around and could temporarily lock us out of the router) get into the router and get into enable mode. | |||||||||||||||||
|
Next type in:
set dhcp server enable This will set the router to use DHCP set nat enable This will turn on NAT |
|||||||||||||||||
|
The next thing we have to do is set your router's IP address up as a non routable IP address in this case the router's IP address is 192.168.200.1 we will also have to setup the router's subnet mask, in this case 255.255.255.0
The commands are: set int eth0 address 192.168.200.1 set int eth0 mask 255.255.255.0 set nat outside 216.50.50.50 This will be the outside IP address that the DHCP computer(s) will be using. In most cases this should be the router's IP address (your gateway) but you can assign it to one of your static IP addresses that is not being used by another computer. |
|||||||||||||||||
|
Now for the DHCP settings
set dhcp server pool 0 size 128 This is how many ip address to allocate to the DHCP pool in this case 128 IP addresses set dhcp server pool 0 ip 192.168.200.2 This will be the first IP address selected from the DHCP pool set dhcp server pool 0 gateway 192.168.200.1 This is the gateway the router uses for DHCP, this must be the same as the eth0 address. set dhcp server pool 0 dns 166.102.165.13 This sets the primary DNS server that the router will send to the client computers, in this case this is the ALLTEL primary DNS server. set dhcp server pool 0 sdns 166.102.165.11 This sets the secondary DNS server that the router will send to the client computers, in this case this is the ALLTEL secondary DNS server. |
|||||||||||||||||
|
Next, your static IP will now become a Virtual Interface Port in the router as well as your static IP's subnet mask.
The commands for that are: set int vip0 address 216.50.50.51 set int vip0 mask 255.255.255.252 Now that you have all this information entered into the router you need to save the information to the router and reboot it. write reboot |
|||||||||||||||||
|
And that's it.. now to summarize the commands that you will need entered:
set dhcp server enable set nat enable set int eth0 address 192.168.200.1 set int eth0 mask 255.255.255.0 set dhcp server pool 0 size 128 set dhcp server pool 0 ip 192.168.200.2 set dhcp server pool 0 gateway 192.168.200.1 set dhcp server pool 0 dns 166.102.165.13 set dhcp server pool 0 sdns 166.102.165.11 set nat outside 216.50.50.50 set int vip0 address 216.50.50.51 set int vip0 mask 255.255.255.252 write reboot For your network settings, the static IP computer will be as such ip address: 216.50.50.51 subnet mask 255.255.255.252 gateway 216.50.50.50 Your DHCP computers: ip address (obtain automatically) subnet mask (obtain automatically) gateway (obtain automatically) or if you wish you can specify the IP addresses on your network: DHCP computers (with static internal non-routable IP addresses) ip address 192.168.200.2 subnet mask 255.255.255.0 gateway 192.168.200.1 |
|||||||||||||||||
|
Once you have made your entries in the router type in the command
sho int You should get something like this.
|
|||||||||||||||||
| From here on out you should be all setup and ready to go. | |||||||||||||||||
| Static IP and DHCP Setup |