D-Link DGS-3308FG Product Manual - Page 48

TCP/IP, TCP and UDP Well-Known Ports

Page 48 highlights

8-port Gigabit Ethernet Switch User's Guide TCP/IP Transmission Control Protocol/Internet Protocol (TCP/IP) is the official name of a suite of protocols designed to allow computers to communicate and share resources across a network. TCP and IP are only the two best known protocols of the suite, but TCP/IP is used to refer to the entire suite. TCP/IP is itself a layered set of protocols. For two computers to communicate across a network, there is first a protocol that defines a set of commands used by the two computers to identify the sender, the recipient, and the content of the message. The application then relies on TCP/IP to actually transmit and receive the packets that make up the message. TCP keeps track of what was sent and received, and retransmits any lost or corrupted packets. If the message is too large for a single packet, TCP divides the message into as many packets as are necessary. TCP also makes sure these packets are receive and reassembled in the correct order. IP routes the packets generated by TCP from their source to their destinations. This may require the packets to cross other networks. IP can route packets through networks connected with gateways so that a user on one network can communicate with any user on any connected network. IP is not aware of the relationship between individual packets, or the contents of the packet - except for the source and destination IP addresses. This is called demultiplexing. The information required by IP is contained in a series of headers which are added to or removed from the packet as it travels from network to network. A header is a few octets of data added to the beginning of a packet to keep track of it. As more data is required for the packet to cross a network, a new header is added. When the data is no longer required, the header is removed and the data in the previous header is used to forward the packet. This process is called encapsulation. To send a packet over the internet, many levels of encapsulation may be used, and IP does all of this transparently to the user. TCP and UDP Well-Known Ports Network devices and computers connected to a network can have multiple connections with other devices and computers simultaneously. Received packets must be directed to the appropriate application at the receiving end. TCP and UDP use IP addresses to keep track of which devices are part of the connection, and port numbers to keep track of which applications within each device are communicating. To retrieve a file from a server using the File Transfer Protocol (FTP), a connection from the user, at 10.0.0.1 (for example) to an FTP Server, at 10.0.0.2 (for example). TCP then opens a connection on the user's computer using some random port number, 1234. The connection on the FTP server is opened using the well-known port number 21 for the FTP application. So, FTP is running on 10.0.0.1 port number 1234, and FTP Server is running on 10.0.0.1 port number 21 (the well-known port for FTP). There is a published list of well-known ports (sometimes called sockets) for many applications. There is no need for a well-known port to be chosen for 10.0.0.1. It is only necessary for TCP to know which port has been chosen. The FTP Server, on the other hand, must have a well-known port number so that connections can be made, commands sent, and messages exchanged. Note that the connection is actually described by a set of four numbers, the IP address and the TCP port number for the local end and the IP address and the TCP port number for the remote end. The Internet address is in the IP header and the TCP port number is in the TCP header. No two connections can have the same set of numbers, but only one number of the four must be different. This allows two different users to send files to the same destination, at the same time. Two FTP Server Connections TCP ports Internet addresses 38

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237

8-port Gigabit Ethernet Switch User’s Guide
38
TCP/IP
Transmission Control Protocol/Internet Protocol (TCP/IP) is the official name of a suite of protocols designed to allow
computers to communicate and share resources across a network. TCP and IP are only the two best known protocols of the
suite, but TCP/IP is used to refer to the entire suite.
TCP/IP is itself a layered set of protocols. For two computers to communicate across a network, there is first a protocol that
defines a set of commands used by the two computers to identify the sender, the recipient, and the content of the message.
The application then relies on TCP/IP to actually transmit and receive the packets that make up the message.
TCP keeps track of what was sent and received, and retransmits any lost or corrupted packets. If the message is too large
for a single packet, TCP divides the message into as many packets as are necessary. TCP also makes sure these packets
are receive and reassembled in the correct order.
IP routes the packets generated by TCP from their source to their destinations. This may require the packets to cross other
networks. IP can route packets through networks connected with gateways so that a user on one network can communicate
with any user on any connected network.
IP is not aware of the relationship between individual packets, or the contents of the packet – except for the source and
destination IP addresses. This is called demultiplexing.
The information required by IP is contained in a series of headers which are added to or removed from the packet as it
travels from network to network. A header is a few octets of data added to the beginning of a packet to keep track of it. As
more data is required for the packet to cross a network, a new header is added.
When the data is no longer required, the
header is removed and the data in the previous header is used to forward the packet. This process is called encapsulation.
To send a packet over the internet, many levels of encapsulation may be used, and IP does all of this transparently to the
user.
TCP and UDP Well-Known Ports
Network devices and computers connected to a network can have multiple connections with other devices and computers
simultaneously.
Received packets must be directed to the appropriate application at the receiving end. TCP and UDP use
IP addresses to keep track of which devices are part of the connection, and port numbers to keep track of which applications
within each device are communicating.
To retrieve a file from a server using the File Transfer Protocol (FTP), a connection from the user, at 10.0.0.1 (for example)
to an FTP Server, at 10.0.0.2 (for example). TCP then opens a connection on the user’s computer using some random port
number, 1234. The connection on the FTP server is opened using the well-known port number 21 for the FTP application.
So, FTP is running on 10.0.0.1 port number 1234, and FTP Server is running on 10.0.0.1 port number 21 (the well-known
port for FTP). There is a published list of well-known ports (sometimes called sockets) for many applications.
There is no need for a well-known port to be chosen for 10.0.0.1. It is only necessary for TCP to know which port has been
chosen. The FTP Server, on the other hand, must have a well-known port number so that connections can be made,
commands sent, and messages exchanged.
Note that the connection is actually described by a set of four numbers, the IP address and the TCP port number for the
local end and the IP address and the TCP port number for the remote end. The Internet address is in the IP header and the
TCP port number is in the TCP header.
No two connections can have the same set of numbers, but only one number of the four must be different.
This allows two
different users to send files to the same destination, at the same time.
Two FTP Server
Connections
TCP
ports
Internet addresses