D-Link DES-3326SRM Product Manual - Page 208

TCP and UDP Well-Known Ports, UDP and ICMP, Internet addresses, TCP ports, Connection 1

Page 208 highlights

D-Link DES-3326S Layer 3 Switch TCP and UDP Well-Known Ports Application protocols run 'on top of' TCP/IP. When an application wants to send data or a message, it gives the data to TCP. Because TCP and IP take care of the networking details, the application can look at the network connection as a simple data stream. To transfer a file across a network using the File Transfer Protocol (FTP), a connection must first be established. The computer requesting the file transfer must connect specifically to the FTP server on the computer that has the file. This is accomplished using sockets. A socket is a pair of TCP port numbers used to establish a connection from one computer to another. TCP uses these port numbers to keep track of connections. Specific port numbers are assigned to applications that wait for requests. These port numbers are referred to as 'well-known' ports. TCP will open a connection to the FTP server using some random port number, 1234 for example, on the local computer. TCP will specify port 21 for the FTP server. Port 21 is the well-known port number for FTP servers. Note that there are two different FTP programs running in this example - an FTP client that requests the file to be transferred, and an FTP server that sends the file to the FTP client. The FTP server accepts commands from the client, so the FTP client must know how to connect to the server (must know the TCP port number) in order to send commands. The FTP Server can use any TCP port number to send the file, so long as it is sent as part of the connection setup. A TCP connection is then described by a set of four numbers - the IP address and TCP port number for the local computer, and the IP address and TCP port number for the remote computer. The IP address is in the IP header and the TCP port number is in the TCP header. No two TCP connection can have the same set of numbers, but only one number needs to be different. It is possible, for example, for two users to send files to the same destination at the same time. This could give the following connection numbers: Internet addresses TCP ports Connection 1 10.42.73.23, 10.128.12.1 1234, 21 Connection 2 10.42.73.23, 10.128.12.1 1235, 21 The same computers are making the connections, so the IP addresses are the same. Both computers are using the same wellknown TCP port for the FTP server. The local FTP clients are using different TCP port numbers. FTP transfers actually involve two different connections. The connection begins by the FTP sending commands to send a particular file. Once the commands are sent, a second connection is opened for the actual data transfer. Although it is possible to send data on the same connection, it is very convenient for the FTP client to be able to continue to send commands (such as 'stop sending this file'). UDP and ICMP There are many applications that do not require long messages that cannot fit into a single packet. Looking up computer names is an example. Users wanting to make connections to other computers will usually use a name rather than the computer's IP or MAC address. The user's computer must be able to determine the remote computer's address before a connection can be made. A designated computer on the network will contain a database of computer names and their corresponding IP and MAC addresses. The user's computer will send a query to the name database computer, and the database computer will send a response. Both the query and the response are very short. There is no need to divide the query or response between multiple packets, so the complexity of TCP is not required. If there is no response to the query after a period of time, the query can simply be resent. The User Datagram Protocol (UDP) is designed for communications that do not require division among multiple packets and subsequent reassembly. UDP does not keep track of what is sent. UDP uses port numbers in a way that is directly analogous to TCP. There are well-known UDP port numbers for servers that use UDP. 198

  • 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
  • 238
  • 239
  • 240
  • 241
  • 242

D-Link DES-3326S Layer 3 Switch
TCP and UDP Well-Known Ports
Application protocols run ‘on top of’ TCP/IP.
When an application wants to send data or a message, it gives the data to
TCP.
Because TCP and IP take care of the networking details, the application can look at the network connection as a
simple data stream.
To transfer a file across a network using the File Transfer Protocol (FTP), a connection must first be established. The
computer requesting the file transfer must connect specifically to the FTP server on the computer that has the file.
This is accomplished using sockets.
A socket is a pair of TCP port numbers used to establish a connection from one
computer to another.
TCP uses these port numbers to keep track of connections.
Specific port numbers are assigned to
applications that wait for requests.
These port numbers are referred to as ‘well-known’ ports.
TCP will open a connection to the FTP server using some random port number, 1234 for example, on the local computer.
TCP will specify port 21 for the FTP server.
Port 21 is the well-known port number for FTP servers.
Note that there are two
different FTP programs running in this example – an FTP client that requests the file to be transferred, and an FTP server that
sends the file to the FTP client.
The FTP server accepts commands from the client, so the FTP client must know how to
connect to the server (must know the TCP port number) in order to send commands. The FTP Server can use any TCP port
number to send the file, so long as it is sent as part of the connection setup.
A TCP connection is then described by a set of four numbers – the IP address and TCP port number for the local computer,
and the IP address and TCP port number for the remote computer.
The IP address is in the IP header and the TCP port
number is in the TCP header.
No two TCP connection can have the same set of numbers, but only one number needs to be different.
It is possible, for
example, for two users to send files to the same destination at the same time.
This could give the following connection
numbers:
Internet addresses
TCP ports
Connection 1
10.42.73.23, 10.128.12.1
1234, 21
Connection 2
10.42.73.23, 10.128.12.1
1235, 21
The same computers are making the connections, so the IP addresses are the same.
Both computers are using the same well-
known TCP port for the FTP server.
The local FTP clients are using different TCP port numbers.
FTP transfers actually involve two different connections.
The connection begins by the FTP sending commands to send a
particular file.
Once the commands are sent, a second connection is opened for the actual data transfer.
Although it is
possible to send data on the same connection, it is very convenient for the FTP client to be able to continue to send
commands (such as ‘stop sending this file’).
UDP and ICMP
There are many applications that do not require long messages that cannot fit into a single packet. Looking up computer
names is an example.
Users wanting to make connections to other computers will usually use a name rather than the
computer’s IP or MAC address.
The user’s computer must be able to determine the remote computer’s address before a
connection can be made. A designated computer on the network will contain a database of computer names and their
corresponding IP and MAC addresses.
The user’s computer will send a query to the name database computer, and the
database computer will send a response.
Both the query and the response are very short.
There is no need to divide the
query or response between multiple packets, so the complexity of TCP is not required. If there is no response to the query
after a period of time, the query can simply be resent.
The User Datagram Protocol (UDP) is designed for communications that do not require division among multiple packets and
subsequent reassembly.
UDP does not keep track of what is sent.
UDP uses port numbers in a way that is directly analogous to TCP.
There are well-known UDP port numbers for servers that
use UDP.
198