Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Static IP

  1. Nov 17, 2005 #1


    User Avatar
    Homework Helper

    I know it's embarrassing to ask this. But I don't know anything about the stuff about Internet, server,...
    What's a static IP? How can I create a static IP?
    What's a port? What's a port used for? How can I establish a port?
    What's DHCP? What does it do? And what's MAC?
    I tried to search for this, but I didn't quite understand it. The words they used are soooo confusing... :cry: Can you guys please help me...
    Any help will be appreciated,
  2. jcsd
  3. Nov 17, 2005 #2


    User Avatar
    Gold Member

    Static IP
    MAC - the definition changes depending on the context its used in.
    Are you sure you searched properly:tongue2:
  4. Nov 17, 2005 #3


    User Avatar
    Staff Emeritus

    1) A static IP is an IP address that stays fixed while a dynamic IP is an IP address that changes every so often.

    A static IP is assigned differently depending on what operating system you using.

    2) Ports are used distinguish between different services. Example: Port 80 - HTTP, Port 22 - SSH, Port 631 - IPP

    You can open ports by using a library like sockets.h in c/c++

    3) DHCP is used to assign computers a dynamic IP

    MAC is a unique number given to an ethernet card. It is an easy way to identify you computer from the rest of the network.
  5. Nov 17, 2005 #4
    Ports are the sockets that tells the upper layers how to service the data that is being streamed into the application layer.

    port 21 means that the ftp application should service the data
    port 23 means that the telnet application should service the data

    When packets are being encapsulated, the layers below the transport layer (where ports are situated) dont really care, its when packets are being decapsulated ports are important.. You can also impliment a bit of securty on the network using ports.

    Mac addresses are Hexidecimal 'numbers' that are used for switching packets to there destination, and are an important part of the IP protocol suit, and are needed to find Network devices on a LAN.

    DHCP is the Dynamic Host configuration protocol, so people who dont need to care about the inner workings of IP can have there IP addresses given to them automagically by a DHCP server. The DHCP server would be configured by your Network Admin
    Last edited: Nov 17, 2005
  6. Nov 17, 2005 #5


    User Avatar
    Science Advisor

    You'll want a static IP instead of a dynamic IP if you're running services on your computer that you'd like other people to access, such as a web server, ftp server, mail server...etc
    The reason is not that you can't be reached if you have a dynamic IP, the reason is that your Internet Service Provider will change your IP every so often (i've had the same dynamic ip for a while now, +3 months i think, it has only changed once). So if you have a domain name www.mydomain.com[/url] which is associated with your IP, in the future if your ISP changes your dynamic IP, then [url]www.mydomain.com[/URL] will be associated with an incorrect IP so it won't direct visitors to your site. Of course you can easily realize this and change it, giving time for DNS to update it'll be fine within a day.
    Unless you are a business or have some really big plans you probably won't need a static IP. Notice that, depending on your ISP, you have to pay more to get a static IP, they usually have a "Business Plan" or something which includes a static IP, but i've never checked to see how much more i'd have to pay (you'd also get more bandwidth and a better upstream with a business plan).
    Notice that your ISP assigns you a dynamic IP using DHCP (this is all related). That's what DHCP does, it dynamically assigns IP addresses (making sure that no two computers have the same one). Usually you have either a traditional server (Win Server, Unix Server, ..) or just a simple router taking care of the DHCP. If you have a router at home, whenever you connect the computer to the router, the router, acting as DHCP server, dynamically assigns your computer some IP.
    The alternative to DHCP, is for you to go to every computer in your network and manually assign an IP (static IP), making sure that no two IPs are the same. So DHCP is alot better.

    On to servers. What a server is is a piece of software running on some machine (any machine will do, but fast ones are better) that is listening in on a port. Ports aren't physical, they don't actually exist, a port is just a parameter varying from 0 to 65535 (give or take). A web server runs on port 80 for instance. So for example [PLAIN]www.yahoo.com[/url] has a web server listening on port 80 (they really have more than one server, but to simplify). When you point your browser to [url]www.yahoo.com[/URL], your browser does the following:
    . gets the IP address that [url]www.yahoo.com[/url] is pointing to (with a DNS query)
    . connects to that IP on port 80.
    . talks to the server using the HTTP protocol.
    . the server replies with an html document which is the webpage.
    . the browser parses the html and displays the page

    This is an over simplification, but it gives you the idea, of how ports are used. Mainly, the advantage is that i can have many servers running on a machine (Mail, Web, FTP) which listen on different ports, so you won't, for instance, connect [url]www.yahoo.com[/url] and instead of getting the web server, you get the mail server.

    If you're a programmer, you use use a socket to create a connection to a port on some computer, in Java it's kind of simple, like new Socket(, 80). That's my server's ip address, [PLAIN]http://www.bloo.us [Broken].
    Last edited by a moderator: May 2, 2017
  7. Nov 18, 2005 #6


    User Avatar
    Homework Helper

    Thanks guys very much. I understand it now... :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook