Blame
Date:
Wed Feb 1 05:00:29 2023 UTC
Message:
Daily backup
01
2023-01-22
jrmu
version=pmwiki-2.2.130 ordered=1 urlencoded=1
02
2023-01-22
jrmu
agent=w3m/0.5.3+git20210102
03
2023-01-22
jrmu
author=jrmu
04
2023-01-22
jrmu
charset=UTF-8
05
2023-01-22
jrmu
csum=
06
2023-01-22
jrmu
ctime=1597216592
07
2023-01-22
jrmu
host=38.87.162.8
08
2023-01-22
jrmu
name=Openbsd.Tcpip
09
2023-01-22
jrmu
rev=6
10
2023-01-22
jrmu
targets=
11
2023-01-22
jrmu
text=(:title TCP/IP Overview:)%0a%0aEvery computer on the internet uses the Internet Protocol (IP). There are two protocols that are added on top of IP: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).%0a%0a'''TCP''' is used when we need to send data in a '''reliable''' way. For example, email uses TCP because every word in a letter is important. '''UDP''' is used when some data loss is acceptable and '''speed''' is the most important. For example, audio phone calls use UDP because losing a few datagrams hurts sound quality only slightly. You can learn more about common applications, their protocols, and their ports by viewing /etc/services.%0a%0aIP is used to carry packets of information. Inside those packets, we have different data that follows different protocols depending upon the application. Common applications include SMTP for email, FTP for uploading/downloading files, SSH for remotely connecting to computers, HTTP for the world wide web, IRC for text messages and chat, and so on.%0a%0aTCP/IP relies on client-server architecture. One side will act as the '''server''', and another side the '''client'''. The client requests information, and the server delivers it. For example, if you use your phone to view a video, your phone is the client, and the server is in a data center. The server is often an expensive machine with a fast internet connection, but not always. Any computer running the right software can act as a server. For example, your home desktop PC could run an IRC server and serve chat messages which your phone could request. In fact, even your phone can run a web server and deliver web pages to other desktop PCs, which would become clients. There is no physical definition of a server; the only definition is that the client requests information and the server responds to it. %0a%0a!! IP Addresses%0a%0aEach computer has at least one network interface to connect it with the global Internet. Each network interface will have at least one IP address, which will look something like 192.168.0.1. Each IP address can have any number of ports starting from 1 to 65535. When you combine an IP address with a port, you have a '''socket'''. For example, 192.168.0.1:443 is the socket that your web server (openhttpd) listens on.%0a%0aEvery client must specify a unique socket with a specific protocol, and the server must listen on that exact same combination in order to respond. For example, suppose you send a request to a web server with IP 192.168.0.1 on port 443 using TCP. If the web server is instead listening on a different socket (IP 192.168.0.1 port 80 using TCP), the web server will '''not''' to respond. Port 443 is not the same as port 80. Both the socket and protocol must be identical. If the IP address, port, or protocol type is wrong, the client-server connection will not work.%0a%0aIP addresses are not physically bound to any hardware device. A hardware device can easily change its IP address. As a result, when routing packets, it becomes necessary to know which networking interface an IP address is actually referring to. This is where ethernet MAC addresses often come in. MAC addresses are a unique 48-bit identifier which uniquely identify network interfaces on hardware. They are usually written in hexadecimal (such as 01:23:45:67:89:ab).%0a%0aServers sometimes ask you to '''bind''' to an IP address. This means that the server will listen and send packets using only that IP address. This can be important if your server has multiple IP addresses it can choose from; you may only want to use one for your server.%0a%0a!! Subnets%0a%0aIPv4 addresses are written as four numbers separated by periods (dotted-quad notation). They are, however, stored on the computer using binary. For example, 192.168.0.1 in binary could be represented as 11000000.10101000.00000000.00000001. Each IPv4 address can be separated into a '''subnet identifier''' and a '''host identifier'''.%0a%0aThe Internet has billions of computers on it, so it is helpful to be able to divide all these computers into smaller subnetworks, or '''subnets''' for short. Once we group up all the computers into subnets, it will make it much easier to find a subnet, and then to find a computer inside the subnet. Routers use this in order to help with routing (delivering) packets to the right place.%0a%0aSuppose the first 24 bits of the IPv4 address are part of the subnet identifier. We would indicate this by adding /24 at the end of the IPv4 address: 192.168.0.1/24. This tells us that the first 24 bits of the IPv4 address indicate what subnet the address is a part of; and that the last 8 bits indicate the device on the subnet.%0a%0aComputers often use bitmasks in order to quickly calculate the subnet identifier and the host identifier. The '''subnet mask''' is basically a number where all the binary digits of the subnet are 1s, and the rest are 0s. So a /24 subnet mask could be described in three ways. In binary, it would be 11111111.11111111.11111111.00000000. In dotted-quad notation, it is 255.255.255.0. In hexadecimal, it is 0xffffff00. You will find this information very valuable later when you configure your network interface's subnet mask and default gateway.%0a%0a!! Special Addresses%0a%0aSome IPv4 addresses have special meaning. IP addresses from 127.0.0.0 to 127.255.255.255 are loopback addresses. This address refers to your current computer itself. Instead of using the network to connect to another computer, you use the network to connect to yourself. Using a loopback address helps you test a network service without having to use the Internet. For example, you might install a web server and then view it locally by visiting http://127.0.0.1.%0a%0aNotice that we can rewrite this address range more compactly by using 127.0.0.0/8. Here, we are referring to the entire subnet where the first 8 bits are the same as in the IPv4 address 127.0.0.0.%0a%0aThere are a few other reserved IP addresses you should also be aware of. For example, 192.168.0.0/16 refers to a private network that is not connected to the Internet. For this reason, an IP address like 192.168.0.1 can '''never''' be used for a public Internet service.%0a
12
2023-01-22
jrmu
time=1643046300
13
2023-01-22
jrmu
title=TCP/IP Overview
14
2023-01-22
jrmu
author:1643046300=jrmu
15
2023-01-22
jrmu
diff:1643046300:1597222001:=37c37%0a%3c There are a few other reserved IP addresses you should also be aware of. For example, 192.168.0.0/16 refers to a private network that is not connected to the Internet. For this reason, an IP address like 192.168.0.1 can '''never''' be used for a public Internet service.%0a---%0a> There are a few other reserved IP addresses you should also be aware of. For example, 192.0.0.0/24 refers to a private network that is not connected to the Internet. For this reason, an IP address like 192.168.0.1 can '''never''' be used for a public Internet service.%0a\ No newline at end of file%0a
16
2023-01-22
jrmu
host:1643046300=38.87.162.8
17
2023-01-22
jrmu
author:1597222001=gry
18
2023-01-22
jrmu
csum:1597222001=fmt
19
2023-01-22
jrmu
diff:1597222001:1597221130:minor=5,6c5,6%0a%3c '''TCP''' is used when we need to send data in a '''reliable''' way. For example, email uses TCP because every word in a letter is important. '''UDP''' is used when some data loss is acceptable and '''speed''' is the most important. For example, audio phone calls use UDP because losing a few datagrams hurts sound quality only slightly. You can learn more about common applications, their protocols, and their ports by viewing /etc/services.%0a%3c %0a---%0a> TCP is used when we need to send data in a reliable way. For example, email uses TCP because every word in a letter is important. UDP is used when some data loss is acceptable and speed is the most important. For example, audio phone calls use UDP because losing a few datagrams hurts sound quality only slightly. You can learn more about common applications, their protocols, and their ports by viewing /etc/services.%0a> %0a9c9%0a%3c TCP/IP relies on client-server architecture. One side will act as the '''server''', and another side the '''client'''. The client requests information, and the server delivers it. For example, if you use your phone to view a video, your phone is the client, and the server is in a data center. The server is often an expensive machine with a fast internet connection, but not always. Any computer running the right software can act as a server. For example, your home desktop PC could run an IRC server and serve chat messages which your phone could request. In fact, even your phone can run a web server and deliver web pages to other desktop PCs, which would become clients. There is no physical definition of a server; the only definition is that the client requests information and the server responds to it. %0a---%0a> TCP/IP relies on client-server architecture. One side will act as the server, and another side the client. The client requests information, and the server delivers it. For example, if you use your phone to view a video, your phone is the client, and the server is in a data center. The server is often an expensive machine with a fast internet connection, but not always. Any computer running the right software can act as a server. For example, your home desktop PC could run an IRC server and serve chat messages which your phone could request. In fact, even your phone can run a web server and deliver web pages to other desktop PCs, which would become clients. There is no physical definition of a server; the only definition is that the client requests information and the server responds to it. %0a
20
2023-01-22
jrmu
host:1597222001=203.129.25.247
21
2023-01-22
jrmu
author:1597221130=jrmu
22
2023-01-22
jrmu
diff:1597221130:1597220094:=18,19d17%0a%3c %0a%3c Servers sometimes ask you to '''bind''' to an IP address. This means that the server will listen and send packets using only that IP address. This can be important if your server has multiple IP addresses it can choose from; you may only want to use one for your server.%0a
23
2023-01-22
jrmu
host:1597221130=38.81.163.143
24
2023-01-22
jrmu
author:1597220094=jrmu
25
2023-01-22
jrmu
diff:1597220094:1597219024:=8a9,10%0a> Each computer has at least one network interface to connect it with the global Internet. Each network interface will have at least one IP address, which will look something like 192.168.0.1. Each IP address can have any number of ports starting from 1 to 65535. When you combine an IP address with a port, you have a '''socket'''. For example, 192.168.0.1:443 is the socket that your web server (openhttpd) listens on.%0a> %0a11,14d12%0a%3c !! IP Addresses%0a%3c %0a%3c Each computer has at least one network interface to connect it with the global Internet. Each network interface will have at least one IP address, which will look something like 192.168.0.1. Each IP address can have any number of ports starting from 1 to 65535. When you combine an IP address with a port, you have a '''socket'''. For example, 192.168.0.1:443 is the socket that your web server (openhttpd) listens on.%0a%3c %0a17,20d14%0a%3c IP addresses are not physically bound to any hardware device. A hardware device can easily change its IP address. As a result, when routing packets, it becomes necessary to know which networking interface an IP address is actually referring to. This is where ethernet MAC addresses often come in. MAC addresses are a unique 48-bit identifier which uniquely identify network interfaces on hardware. They are usually written in hexadecimal (such as 01:23:45:67:89:ab).%0a%3c %0a%3c !! Subnets%0a%3c %0a29,35c23,27%0a%3c !! Special Addresses%0a%3c %0a%3c Some IPv4 addresses have special meaning. IP addresses from 127.0.0.0 to 127.255.255.255 are loopback addresses. This address refers to your current computer itself. Instead of using the network to connect to another computer, you use the network to connect to yourself. Using a loopback address helps you test a network service without having to use the Internet. For example, you might install a web server and then view it locally by visiting http://127.0.0.1.%0a%3c %0a%3c Notice that we can rewrite this address range more compactly by using 127.0.0.0/8. Here, we are referring to the entire subnet where the first 8 bits are the same as in the IPv4 address 127.0.0.0.%0a%3c %0a%3c There are a few other reserved IP addresses you should also be aware of. For example, 192.0.0.0/24 refers to a private network that is not connected to the Internet. For this reason, an IP address like 192.168.0.1 can '''never''' be used for a public Internet service.%0a\ No newline at end of file%0a---%0a> IP addresses are not physically bound to any hardware device. A hardware device can easily change its IP address. As a result, when routing packets, it becomes necessary to know which networking interface an IP address is actually referring to. This is where ethernet MAC addresses often come in. MAC addresses are a unique 48-bit identifier which uniquely identify network interfaces on hardware. They are usually written in hexadecimal (such as 01:23:45:67:89:ab).%0a> %0a> Some IPv4 addresses have special meaning. IP addresses from 127.0.0.0 to 127.255.255.255 are loopback addresses: they referr. Notice that we can rewrite this address range more compactly by using 127.0.0.0/8. Here, we are referring to the entire subnet where the first 8 bits are the same as in the IPv4 address 127.0.0.0.%0a> %0a> reserved ip addresses%0a
26
2023-01-22
jrmu
host:1597220094=38.81.163.143
27
2023-01-22
jrmu
author:1597219024=jrmu
28
2023-01-22
jrmu
diff:1597219024:1597216592:=5,26c5,26%0a%3c TCP is used when we need to send data in a reliable way. For example, email uses TCP because every word in a letter is important. UDP is used when some data loss is acceptable and speed is the most important. For example, audio phone calls use UDP because losing a few datagrams hurts sound quality only slightly. You can learn more about common applications, their protocols, and their ports by viewing /etc/services.%0a%3c %0a%3c IP is used to carry packets of information. Inside those packets, we have different data that follows different protocols depending upon the application. Common applications include SMTP for email, FTP for uploading/downloading files, SSH for remotely connecting to computers, HTTP for the world wide web, IRC for text messages and chat, and so on.%0a%3c %0a%3c Each computer has at least one network interface to connect it with the global Internet. Each network interface will have at least one IP address, which will look something like 192.168.0.1. Each IP address can have any number of ports starting from 1 to 65535. When you combine an IP address with a port, you have a '''socket'''. For example, 192.168.0.1:443 is the socket that your web server (openhttpd) listens on.%0a%3c %0a%3c TCP/IP relies on client-server architecture. One side will act as the server, and another side the client. The client requests information, and the server delivers it. For example, if you use your phone to view a video, your phone is the client, and the server is in a data center. The server is often an expensive machine with a fast internet connection, but not always. Any computer running the right software can act as a server. For example, your home desktop PC could run an IRC server and serve chat messages which your phone could request. In fact, even your phone can run a web server and deliver web pages to other desktop PCs, which would become clients. There is no physical definition of a server; the only definition is that the client requests information and the server responds to it. %0a%3c %0a%3c Every client must specify a unique socket with a specific protocol, and the server must listen on that exact same combination in order to respond. For example, suppose you send a request to a web server with IP 192.168.0.1 on port 443 using TCP. If the web server is instead listening on a different socket (IP 192.168.0.1 port 80 using TCP), the web server will '''not''' to respond. Port 443 is not the same as port 80. Both the socket and protocol must be identical. If the IP address, port, or protocol type is wrong, the client-server connection will not work.%0a%3c %0a%3c IPv4 addresses are written as four numbers separated by periods (dotted-quad notation). They are, however, stored on the computer using binary. For example, 192.168.0.1 in binary could be represented as 11000000.10101000.00000000.00000001. Each IPv4 address can be separated into a '''subnet identifier''' and a '''host identifier'''.%0a%3c %0a%3c The Internet has billions of computers on it, so it is helpful to be able to divide all these computers into smaller subnetworks, or '''subnets''' for short. Once we group up all the computers into subnets, it will make it much easier to find a subnet, and then to find a computer inside the subnet. Routers use this in order to help with routing (delivering) packets to the right place.%0a%3c %0a%3c Suppose the first 24 bits of the IPv4 address are part of the subnet identifier. We would indicate this by adding /24 at the end of the IPv4 address: 192.168.0.1/24. This tells us that the first 24 bits of the IPv4 address indicate what subnet the address is a part of; and that the last 8 bits indicate the device on the subnet.%0a%3c %0a%3c Computers often use bitmasks in order to quickly calculate the subnet identifier and the host identifier. The '''subnet mask''' is basically a number where all the binary digits of the subnet are 1s, and the rest are 0s. So a /24 subnet mask could be described in three ways. In binary, it would be 11111111.11111111.11111111.00000000. In dotted-quad notation, it is 255.255.255.0. In hexadecimal, it is 0xffffff00. You will find this information very valuable later when you configure your network interface's subnet mask and default gateway.%0a%3c %0a%3c IP addresses are not physically bound to any hardware device. A hardware device can easily change its IP address. As a result, when routing packets, it becomes necessary to know which networking interface an IP address is actually referring to. This is where ethernet MAC addresses often come in. MAC addresses are a unique 48-bit identifier which uniquely identify network interfaces on hardware. They are usually written in hexadecimal (such as 01:23:45:67:89:ab).%0a%3c %0a%3c Some IPv4 addresses have special meaning. IP addresses from 127.0.0.0 to 127.255.255.255 are loopback addresses: they referr. Notice that we can rewrite this address range more compactly by using 127.0.0.0/8. Here, we are referring to the entire subnet where the first 8 bits are the same as in the IPv4 address 127.0.0.0.%0a%3c %0a---%0a> TCP is used when we need to send data in a reliable way (for example, email uses TCP because you don't want to lose any words!). UDP is used when some data loss is acceptable and speed is most important (for example, a slightly worse quality voice call is not a big deal). You can learn more about common applications, their protocols, and their ports by viewing /etc/services.%0a> %0a> TCP/IP is used to carry basic packets. Inside those packets, we have different protocols to describe different applications. Common applications include SMTP for email, FTP for uploading/downloading files, SSH for remotely connecting to computers, HTTP for the world wide web, IRC for text messages and chat, and so on.%0a> %0a> Each computer has network interfaces to connect it with the global Internet. Each network interface will have at least one IP address, which will look something like 192.168.0.1. Each IP address can have any number of ports from 1 to 65535. When you combine an IP address with a port, you have a socket. For example, 192.168.0.1:443 is the socket that your web server (openhttpd) listens on.%0a> %0a> TCP/IP relies on client-server architecture. One thing will act as the server, and another the client. The client requests something, and the server delivers it. For example, if you use your phone to view a video, your phone is the client, and the server is in a mysterious data center somewhere. The server is often an expensive, professional machine in an expensive data center, but not always. Any computer running the right software can act as a server. For example, your home desktop PC could run an IRC server and serve chat messages which your phone could request. Your phone could even run a web server and deliver web pages. The important thing to remember is that the client requests information and a server responds to it. %0a> %0a> Every client must specify a unique socket with a specific protocol, and the server must listen on that exact same combination in order to respond. For example, if you request from a web server with IP 192.168.0.1 on port 443 using TCP, if the web server is listening on a different socket (IP 192.168.0.1 port 80 using TCP), your web server will '''not''' be able to respond. Port 443 is not the same as port 80. Both the socket and protocol must be identical. If the IP addres, port, or protocol type is wrong, the client-server connection will not work.%0a> %0a> Internet Control Message Protocol (ICMP)%0a> IPv6%0a> %0a> Network address translation (NAT)%0a> DNS%0a> SSL/TLS%0a> subnetting%0a> Ethernet MAC address%0a> hex and /24%0a> for example , 0xffffff00%0a> Subnet Mask and Default Gateway%0a> %0a27a28,31%0a> %0a> loopback ip addresses: 127.0.0.0 to 127.255.255.255.%0a> %0a> Some devices have multiple network interfaces%0a\ No newline at end of file%0a
29
2023-01-22
jrmu
host:1597219024=38.81.163.143
30
2023-01-22
jrmu
author:1597216592=jrmu
31
2023-01-22
jrmu
diff:1597216592:1597216592:=1,31d0%0a%3c (:title TCP/IP Overview:)%0a%3c %0a%3c Every computer on the internet uses the Internet Protocol (IP). There are two protocols that are added on top of IP: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).%0a%3c %0a%3c TCP is used when we need to send data in a reliable way (for example, email uses TCP because you don't want to lose any words!). UDP is used when some data loss is acceptable and speed is most important (for example, a slightly worse quality voice call is not a big deal). You can learn more about common applications, their protocols, and their ports by viewing /etc/services.%0a%3c %0a%3c TCP/IP is used to carry basic packets. Inside those packets, we have different protocols to describe different applications. Common applications include SMTP for email, FTP for uploading/downloading files, SSH for remotely connecting to computers, HTTP for the world wide web, IRC for text messages and chat, and so on.%0a%3c %0a%3c Each computer has network interfaces to connect it with the global Internet. Each network interface will have at least one IP address, which will look something like 192.168.0.1. Each IP address can have any number of ports from 1 to 65535. When you combine an IP address with a port, you have a socket. For example, 192.168.0.1:443 is the socket that your web server (openhttpd) listens on.%0a%3c %0a%3c TCP/IP relies on client-server architecture. One thing will act as the server, and another the client. The client requests something, and the server delivers it. For example, if you use your phone to view a video, your phone is the client, and the server is in a mysterious data center somewhere. The server is often an expensive, professional machine in an expensive data center, but not always. Any computer running the right software can act as a server. For example, your home desktop PC could run an IRC server and serve chat messages which your phone could request. Your phone could even run a web server and deliver web pages. The important thing to remember is that the client requests information and a server responds to it. %0a%3c %0a%3c Every client must specify a unique socket with a specific protocol, and the server must listen on that exact same combination in order to respond. For example, if you request from a web server with IP 192.168.0.1 on port 443 using TCP, if the web server is listening on a different socket (IP 192.168.0.1 port 80 using TCP), your web server will '''not''' be able to respond. Port 443 is not the same as port 80. Both the socket and protocol must be identical. If the IP addres, port, or protocol type is wrong, the client-server connection will not work.%0a%3c %0a%3c Internet Control Message Protocol (ICMP)%0a%3c IPv6%0a%3c %0a%3c Network address translation (NAT)%0a%3c DNS%0a%3c SSL/TLS%0a%3c subnetting%0a%3c Ethernet MAC address%0a%3c hex and /24%0a%3c for example , 0xffffff00%0a%3c Subnet Mask and Default Gateway%0a%3c %0a%3c reserved ip addresses%0a%3c %0a%3c loopback ip addresses: 127.0.0.0 to 127.255.255.255.%0a%3c %0a%3c Some devices have multiple network interfaces%0a\ No newline at end of file%0a
32
2023-01-22
jrmu
host:1597216592=38.81.163.143
IRCNow