Sie sind auf Seite 1von 3

IP address and Port Number

They are both necessary for correctly routing traffic to its destination but have different
scope. An IP Address identifies a particular computer on the Internet. The port number
identifies a particular Program running on that computer.

Consider postal addresses by analogy. The street address and everything following identifies
a particular residence or building, e.g. 1600 Pennsylvania Avenue, Washington DC. That
is all the postal service needs to deliver a letter to its destination. However, once there it
does not describe precisely _who_ the letter should go to. For that you need additional
information - the name of the recipient. Only when this is also given - e.g. Bo the First Dog,
1600 Pennsylvania Avenue, Washington DC, can the letter be finally passed to the intended
recipient.

The port number works in the same way - the IP address is enough to get the data to the right
computer but does not say which application should receive the data on that machine. That is
what the port number does. For example, by convention anything sent to TCP port 80 will be
forwarded to a web server running on that machine. Anything sent to port 21 is directed to the
FTP server instead. Without the port numbers the operating system would have no idea what
data is intended for which application.

A MAC (or Machine Access Control) address is best thought of as a unique serial number
assigned to every network interface on every device. And by unique, I do mean unique; no
two network cards anywhere should have the same MAC address.

You can see your network interfaces MAC addresses using the command prompt in Windows
XP using ipconfig /all:

Ethernet adapter Local Area Connection 2:


.
.
Physical Address. . . . . . . . . : 00-1D-60-2F-4B-39
Each network adapter on your computer will have one.
MAC addresses are typically used only to direct packets in the device-to-device portion of
a network transaction. That means that your computer's MAC address will be in network
packets only until the next device in the chain. If you have a router, then your machine's
MAC address will go no further than that. Your router's MAC address will show up in
packets sent further upstream, until that too is replaced by the MAC address of the next
device - likely either your modem or your ISP's router.
So your MAC address doesn't make it out very far. Even if someone knows your MAC
address, that knowledge certainly doesn't help anyone do anything either good or bad.

An IP address is assigned to every device on a network so that device can be located on


the network. The internet is just a network after all, and every device connected to it has
an IP address so that it can be located. The server that houses Ask Leo!, for example, is at
72.3.133.152. That number is used by the network routing equipment so that when you ask
for a page from the site, that request is routed to the right server.
The computers or equipment you have connected to the internet are also assigned IP
addresses. If you're directly connected, your computer will have an IP address that can be
reached from anywhere on the internet. If you're behind a router, that router will have that
internet-visible IP address, but it will then set up a privatenetwork that your computer is
connected to, assigning IP addresses out of a private range that is not directly visible on the
internet. All internet traffic must go through the router, and will appear on the internet to have
come from that router.
The Internet Assigned Numbers Authority (IANA) is responsible for maintaining the official
assignments of port numbers for specific uses. However, many unofficial uses of both well-
known and registered port numbers occur in practice.
Well-known ports
The port numbers in the range from 0 to 1023 are the well-known ports. They are used by
system processes that provide widely-used types of network services. On Unix-like operating
systems, a process must execute with superuser privileges to be able to bind a network socket
to an IP address using one of the well-known ports.
20 TCP FTP—data transfer Official
21 TCP FTP—control (command) Official
80 TCP UDP Hypertext Transfer Protocol (HTTP) Official
110 TCP POP3 Official

Registered ports: 1024–49151


The ranges of port number from 1024 to 49151 are the registered ports. They are assigned
by IANA for specific service upon application by a requesting entity. On most systems
registered ports can be used by ordinary users.
MSSQL (Microsoft SQL Server database management
1433 TCP Official
system) Server
1234 UDP VLC media player Default port for UDP/RTP stream Unofficial
1527 TCP Apache Derby Network Server default port Unofficial
6891–
TCP UDP BitTorrent part of full range of ports used most often Unofficial
6900
6891–
TCP UDP Windows Live Messenger (File transfer) Unofficial
6900

Dynamic, private or ephemeral ports: 49152–65535

The range above the registered ports contains dynamic or private ports that cannot be
registered with IANA. It is used for custom or temporary purposes and for automatic
allocation of ephemeral ports.

An ephemeral port is a short-lived transport protocol port for Internet Protocol (IP)
communications allocated automatically from a predefined range by the TCP/IP software.
It is used by the Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or
the Stream Control Transmission Protocol (SCTP) as the port assignment for the client end
of a client–server communication to a well-known port on a server. On servers, ephemeral
ports may also be used to continue communications with a client that initially connected to
one of the server's well-known service listening ports to make the well-known port available
to service requests from other clients. The allocations are temporary and only valid for the
duration of the communication session. After completion of the communication session, the
ports become available for reuse.
The Internet Assigned Numbers Authority (IANA) suggests the range 49152 to 65535 for
dynamic or private ports.
Many Linux kernels use the port range 32768 to 61000.
FreeBSD has used the IANA port range since release 4.6. Previous versions, including the
Berkeley Software Distribution (BSD), use ports 1024 through 4999 as ephemeral ports.
Microsoft Windows operating systems through Server 2003 use the range 1025 to 5000 as
ephemeral ports.
Windows Vista, Windows 7, and Server 2008 use the IANA range.

Internet socket
In computer networking, an Internet socket or network socket is an endpoint of a
bidirectional inter-process communication flow across an Internet Protocol-based computer
network, such as the Internet.

The term Internet sockets is also used as a name for an application programming interface
(API) for the TCP/IP protocol stack, usually provided by the operating system. Internet
sockets constitute a mechanism for delivering incoming data packets to the appropriate
application process or thread, based on a combination of local and remote IP addresses and
port numbers. Each socket is mapped by the operating system to a communicating application
process or thread.

A socket address is the combination of an IP address (the location of the computer) and a
port (which is mapped to the application program process) into a single identity, much like
one end of a telephone connection is the combination of a phone number and a particular
extension.

Das könnte Ihnen auch gefallen