Confused About Internet Basics?

In summary, a static IP is an IP address that stays fixed while a dynamic IP is an IP address that changes every so often. Ports are used distinguish between different services. DHCP is used to assign computers a dynamic IP. MAC is a unique number given to an ethernet card.
  • #1
VietDao29
Homework Helper
1,426
3
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,
Thanks,
 
Computer science news on Phys.org
  • #2
Static IP
DHCP
MAC - the definition changes depending on the context its used in.
Are you sure you searched properly:tongue2:
 
  • #3
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.
 
  • #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) don't really care, its when packets are being decapsulated ports are important.. You can also implement 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 don't 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:
  • #5
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 a lot 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(64.118.189.241, 80). That's my server's ip address, [PLAIN]http://www.bloo.us .
 
Last edited by a moderator:
  • #6
Thanks guys very much. I understand it now... :smile:
 

1. What is the Internet?

The Internet is a global network of interconnected computer systems that allows for the exchange of information and communication between users.

2. How does the Internet work?

The Internet works through a system of interconnected computer networks that use standardized communication protocols to transmit data between devices.

3. What is a web browser?

A web browser is a software application used to access and view websites and web pages on the Internet.

4. What is a URL?

A URL (Uniform Resource Locator) is the address of a specific webpage or file on the Internet. It typically starts with "http://" or "https://" and includes the domain name and specific page or file location.

5. How do I stay safe on the Internet?

To stay safe on the Internet, it is important to use strong and unique passwords, be cautious of clicking on links from unknown sources, and regularly update your antivirus software. It is also important to be mindful of the information you share online and to use secure websites (indicated by "https://" in the URL) when making online transactions.

Similar threads

Replies
3
Views
2K
  • Computing and Technology
Replies
27
Views
2K
  • Computing and Technology
Replies
10
Views
2K
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
1
Views
975
Replies
13
Views
1K
  • Programming and Computer Science
Replies
7
Views
440
Replies
5
Views
1K
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
Back
Top