SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-01-02 12:16:02

blue_sun89
New Member
Registered: 2013-12-09
Posts: 9

Setting Up a Static IP Address

I've become curious about how to setup a laptop (macbook) so that it uses a static ip address. To my understanding, it's mostly inputting the correct information into certain fields and then testing to insure the info's valid. I get that part, but what I'm unclear about is if I would have to call up my ISP for this info, or if it can be found by accessing the router from the web interface. I think I've seen the needed information from accessing the router, but I'd have to check again.

Additionally, I don't even know if it would be possible with my ISP. DHCP is used for the wireless devices in the house, so I don't know if I could just change a device to use a static ip address (given the proper setup information) or if it depends on the ISP. Essentially, what I'm asking is: if I were to set up the laptop to have a static ip address, would the router typically acknowledge this or would I have to contact my ISP to find out if they even allow use of static addresses. I use a broadband connection, so I don't know if this would affect anything. I should probably do a little more research on how static ip's work, since I've only got the basics/theory. I just don't know how much of the work/setup I can do on my own and how much depends on my ISP.

Also, this isn't quite a "problem" I'm having (yet), that's why didn't put it in the Help section.

Offline

Help fund CrunchBang, donate to the project!

#2 2014-01-02 13:21:09

pdc
#! Member
From: America
Registered: 2013-12-03
Posts: 52
Website

Re: Setting Up a Static IP Address

If your laptop is connected to your router, then it is likely getting its address automatically via DHCP (Dynamic Host Configuration Protocol). Routers use NAT (Network Address Translation) as form of first-level firewall to translate the Big Internet address handed out by the ISP to the router itself into Private Internet addresses for the devices in your house.

You can usually 'reserve' one of those addresses permanently in the router. This method varies from router to router, but should be easily find-able once you login to your router's settings panel. To login, just enter the IP address of your router into your browser and you will be presented with a login screen. Most default router IP addresses are either 192.168.0.1 or 192.168.1.1, unless you have change the defaults for your router. Using this method, you don't need to make any changes to the 'client' machine, whether it is a Mac, Windows, or Linux machine.

Otherwise, you can make the change at the machine itself...usually, by disabling DHCP and entering a static IP address. You still need to be sure that you are assigning an address that is not already in use by some other machine, though, because your router is still handing out addresses willy nilly via DHCP to any other machine requesting one. You can see what addresses are already connected via the router. Most routers have a LAN status section that will show you what IP address and MAC addresses are currently connected. If you do assign an address that is already in use, you will usually get an error message somewhere and can just reboot the machine that is the duplicate and it will usually fetch another via DHCP from the router.

In answer to your question re: the ISP, all of the steps listed above DO NOT require you to contact your ISP. Unless you have requested multiple IP addresses from them directly, the ISPs routers hand you (or your router) a single Big Internet IP address when requested via DHCP. That is all they know...or need to know

Last edited by pdc (2014-01-02 13:25:27)


Anything that doesn't take years of your life and drive you to suicide hardly seems worth doing.
-Cormac McCarthy

Offline

#3 2014-01-02 14:47:42

retf
#! CrunchBanger
From: On top of spaghetti
Registered: 2013-12-25
Posts: 200

Re: Setting Up a Static IP Address

Here's my lame attempt at describing the very basic functional areas of an ISP provided wireless router... or any really, but since the question seems to be about ISP vs. Home user controlled areas...

                       Typical ISP provided wireless router

              .-------------------------------------------------------.
              |                               Home Network Connection |
              |      ISP connection                                   |
              |                                                       |
              |                                    .-------------.    |
              |  .-------------.                   |             |    |
              |  |             |                   |  Wireless   |    |
              |  |  WAN        |                   |  Radio      |    |
              |  |  Ethernet   |                   |             |    |
              |  |  Port       |                   |             |    |
              |  |             |  .--------------. '-------------'    |
              |  '-------------'  |*********     |        ^           |
              |         ^         |Home Network  |        |           |
              |         |         |DHCP Server   |--------'           |
              |         |         |*********     |                    |
              |         |         |              |                    |
              |         '--       '--------------' .-------------.    |
              |  .----------------.       |        |             |    |
              |  |                |       |        | 4 Port      |    |
              |  |ISP Internet    |       |        | Ethernet    |    |
              |  |Address Info    |       '------->| Switch      |    |
              |  |Assigned by ISP |                |             |    |
              |  |                |                |             |    |
              |  '----------------'                '-------------'    |
              |                                                       |
              |                                                       |
              '-------------------------------------------------------'

You - the home network connection - may assign "inside" network addresses as you please.  A "static" Internet address would be assigned through your ISP.  However, "static" home networking addresses can be assigned by you.  All your devices that connect to your router reside on the network interfaces that you are free to assign "static" or "dynamic" addresses...

Many newer wireless routers allow you to design your home network using static addresses that are assigned through the DHCP server.  This is the proper way - adding an entry for a static address for a given MAC address in the the DHCP server.

If you turn off the DHCP server in the wireless router, you will need to manually enter networking information in each device that will ever connect to your network.  However, the desired configuration is usually a few static addresses for things like a network printer and a small pool of addresses to be assigned dynapmically for things that are not always present in the network or guest devices.

So - in short - you definitely do not need to call your ISP to assign a static address for a device that resides on your home network...

There are several places where you can read about networking for the beginner.  It can be very confusing at first, but the RFCs are a really good place to work through the confusion...
http://www.faqs.org/rfcs/rfc1918.html

Offline

#4 2014-01-02 15:09:54

blue_sun89
New Member
Registered: 2013-12-09
Posts: 9

Re: Setting Up a Static IP Address

Thank you very much! I'd been reading an article about how to go from using dynamic addresses to static ones, but the info here breaks things down even further. It's also nice to know I don't have to get the ISP involved; nothing against them, but it seemed like a hassle for something that's likely going to be another experiment.

Offline

#5 2014-01-03 04:16:58

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: Setting Up a Static IP Address

My router here assigns DHCP to the clients if they have DHCP enabled, but if I set up a static IP on the client, this gets priority (TP-LINK WR340G+ is the router in question)

To set up the static IP manually, as root open
/etc/network/interfaces
and it looks something like this

auto lo
iface lo inet loopback

# this one is for the wireless card - on the old Thinkpad T43 
# it is indeed labelled eth1 instead of wlan0
allow-hotplug eth1
iface eth1 inet dhcp
        wpa-key-mgmt NONE
        wpa-ssid WHATEVER

# and this is the wired one
auto eth0
iface eth0 inet static
        address 192.168.1.3
        broadcast 192.168.1.255
        dns-nameservers 8.8.8.8
        gateway 192.168.1.1
        netmask 255.255.255.0
        network 192.168.1.0

Of course you could use the Network Manager applet (in the tray) if network-manager is handling your connections, as graphical user interface.

Last edited by machinebacon (2014-01-03 04:17:46)


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#6 2014-01-03 05:12:40

retf
#! CrunchBanger
From: On top of spaghetti
Registered: 2013-12-25
Posts: 200

Re: Setting Up a Static IP Address

I never really understood why wireless routers couldn't just have three sections for the DHCP server...
one listed "network and subnet"
one listed "pool assigned ranges" and
one listed "static IP assignments"

There should even be a built in subnetting calculator that will warn you if you are outside of your subnet...

As it is - many wireless routers are hamstrung and are not properly or easily configurable to do what a DHCP server does best - assign multiple types of addresses across several types of networking topologies including VLAN - with no need to enter in data manually on any client after the initial setup --- ahhh! oh well! ...

I got tired of struggling with the hamstrung versions - so, I disable them and instead run my own dhcp server from an old netbook running Debian [stable] and the "isc-dhcp-server" package... I highly recommend this type of solution, since you don't need to worry so much about the death of a router, or even the machine the server is running on --- just save the few config files and you can easily transfer the information to another machine if need be...

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo