Differenze tra le versioni di "Net-HOWTO"

Da GolemWiki.
Jump to navigation Jump to search
Riga 31: Riga 31:
  
 
===Subnetting===
 
===Subnetting===
Addresses in a network have some digits in common, that part is called the ''network portion'' of the address, the remaining numbers are called the '''host portion'''. The number of bits shared by all addresses of a network is called the '''netmask''' and its role is to determine which addresses belong to the network and which don't.  
+
Addresses in a network have some digits in common, that part is called the '''network portion''' of the address, the remaining numbers are called the '''host portion'''.  
  
 
For example:
 
For example:
 
             -----------------  ---------------
 
             -----------------  ---------------
 
             Host Address      192.168.0.23
 
             Host Address      192.168.0.23
            Network Mask      255.255.255.0
 
 
             Network Portion    192.168.0.
 
             Network Portion    192.168.0.
 
             Host portion                .23
 
             Host portion                .23
Riga 43: Riga 42:
 
             Broadcast Address  192.168.0.255
 
             Broadcast Address  192.168.0.255
 
             -----------------  ---------------
 
             -----------------  ---------------
           
 
https://en.wikipedia.org/wiki/Subnet
 
  
 +
[https://en.wikipedia.org/wiki/Subnet Subnetting] is a way to subdivide an TCP/IP network. The Classless Inter-Domain Routing (CIDR) is the current method for defining subnet, the IP address is followed by a ''prefix number'' between 0 and 32 that shows how many bits represent the network; es.: <code>192.168.0.23/24</code>. This method replace the obsolete [https://en.wikipedia.org/wiki/Classful_network classful network] addressing architecture.
  
 +
The maximum number of addresses of a network may be calculated as 2<sup>32 − prefix number</sup>,
 +
 +
{| class="wikitable"
 +
|-----
 +
! Notazione CIDR || Classful network mask || Number of Hosts || Typical use
 +
|-----
 +
| align="right" | /8 || 255.0.0.0 || align="right" | 16777214 = 2<sup>24</sup> - 2 || Largest IANA block allocation
 +
|-----
 +
| align="right" | /9 || 255.128.0.0 || align="right" | 8388608 = 2<sup>23</sup> ||
 +
|-----
 +
| align="right" | /10 || 255.192.0.0 || align="right" | 4194304 = 2<sup>22</sup> ||
 +
|-----
 +
| align="right" | /11 || 255.224.0.0 || align="right" | 2097152 = 2<sup>21</sup> ||
 +
|-----
 +
| align="right" | /12 || 255.240.0.0 || align="right" | 1048576 = 2<sup>20</sup> ||
 +
|-----
 +
| align="right" | /13 || 255.248.0.0 || align="right" | 524288 = 2<sup>19</sup> ||
 +
|-----
 +
| align="right" | /14 || 255.252.0.0 || align="right" | 262144 = 2<sup>18</sup> ||
 +
|-----
 +
| align="right" | /15 || 255.254.0.0 || align="right" | 131072 = 2<sup>17</sup> ||
 +
|-----
 +
| align="right" | /16 || 255.255.0.0 || align="right" | 65536 = 2<sup>16</sup> ||
 +
|-----
 +
| align="right" | /17 || 255.255.128.0 || align="right" | 32768 = 2<sup>15</sup> || ISP / large business
 +
|-----
 +
| align="right" | /18 || 255.255.192.0 || align="right" | 16384 = 2<sup>14</sup> || ISP / large business
 +
|-----
 +
| align="right" | /19 || 255.255.224.0 || align="right" | 8192 = 2<sup>13</sup> || ISP / large business
 +
|-----
 +
| align="right" | /20 || 255.255.240.0 || align="right" | 4096 = 2<sup>12</sup> || Small ISP / large business
 +
|-----
 +
| align="right" | /21 || 255.255.248.0 || align="right" | 2048 = 2<sup>11</sup> || Small ISP / large business
 +
|-----
 +
| align="right" | /22 || 255.255.252.0 || align="right" | 1024 = 2<sup>10</sup> ||
 +
|-----
 +
| align="right" | /23 || 255.255.254.0 || align="right" | 512 = 2<sup>9</sup> ||
 +
|-----
 +
| align="right" | /24 || 255.255.255.0 || align="right" | 256 = 2<sup>8</sup> || Large LAN
 +
|-----
 +
| align="right" | /25 || 255.255.255.128 || align="right" | 128 = 2<sup>7</sup> || Large LAN
 +
|-----
 +
| align="right" | /26 || 255.255.255.192 || align="right" | 64 = 2<sup>6</sup> || Small LAN
 +
|-----
 +
| align="right" | /27 || 255.255.255.224 || align="right" | 32 = 2<sup>5</sup> || Small LAN
 +
|-----
 +
| align="right" | /28 || 255.255.255.240 || align="right" | 16 = 2<sup>4</sup> || Small LAN
 +
|-----
 +
| align="right" | /29 || 255.255.255.248 || align="right" | 8 = 2³ || The smallest multi-host network
 +
|-----
 +
| align="right" | /30 || 255.255.255.252 || align="right" | 4 = 2² || ''Point-to-point links (glue network)''
 +
|-----
 +
| align="right" | /31 || 255.255.255.254 || align="right" | 2 = 2<sup>1</sup> || ''Point-to-point network'' (RFC 3021)
 +
|-----
 +
| align="right" | /32 || 255.255.255.255 || align="right" | 1 = 2<sup>0</sup> || Single host
 +
|}
  
  
https://tldp.org/HOWTO/NET3-4-HOWTO-5.html
 
  
 
= Bibliography =  
 
= Bibliography =  
 
[https://tldp.org/HOWTO/NET3-4-HOWTO-5.html Linux Networking HOWTO]
 
[https://tldp.org/HOWTO/NET3-4-HOWTO-5.html Linux Networking HOWTO]

Versione delle 17:20, 14 dic 2024

Introduction

This is the first release of the GOLEM Network Howto, this document aims to be a sort of unofficial update of the Linux Networking Howto.

General Information about Networking

Sources of non-linux-specific network information

If you are looking for general TCP/IP networking information, here you can find some resources:


Generic Network Configuration Information

Network tools

iproute2: IP Routing Utilities

nftables: Linux kernel packet control tool (firewall)

iputils: arping, clockdiff, ping, tracepath

Legacy tools

net-tools: configuration tools for Linux networking (arp, ifconfig, ipmaddr, iptunnel, mii-tool, nameif, netstat, plipconfig, rarp, route, slattach)

iptables: Linux kernel packet control tool (firewall)

Network Application Programs

Most common network application programs are collected in the inetutils package: dnsdomainname, ftp, ftpd, hostname, ifconfig, ping, rcp, rlogin, rlogind, rsh, rshd, talk, talkd, telnet, telnetd, whois


IPv4 Addresses, an Explanation

Ipv4-1.webp

Internet Protocol v4 Addresses are composed of 4 bytes (32 bit), each byte is converted to a decimal number (0-255) and bytes are separated by a . (dot), for this reason IPv4 addresses are limits to near 4 billions (232). Usually every network interface has its own IP address in a format like this: 192.168.0.5

Subnetting

Addresses in a network have some digits in common, that part is called the network portion of the address, the remaining numbers are called the host portion.

For example:

           -----------------  ---------------
           Host Address       192.168.0.23
           Network Portion    192.168.0.
           Host portion                .23
           -----------------  ---------------
           Network Address    192.168.0.0
           Broadcast Address  192.168.0.255
           -----------------  ---------------

Subnetting is a way to subdivide an TCP/IP network. The Classless Inter-Domain Routing (CIDR) is the current method for defining subnet, the IP address is followed by a prefix number between 0 and 32 that shows how many bits represent the network; es.: 192.168.0.23/24. This method replace the obsolete classful network addressing architecture.

The maximum number of addresses of a network may be calculated as 232 − prefix number,

Notazione CIDR Classful network mask Number of Hosts Typical use
/8 255.0.0.0 16777214 = 224 - 2 Largest IANA block allocation
/9 255.128.0.0 8388608 = 223
/10 255.192.0.0 4194304 = 222
/11 255.224.0.0 2097152 = 221
/12 255.240.0.0 1048576 = 220
/13 255.248.0.0 524288 = 219
/14 255.252.0.0 262144 = 218
/15 255.254.0.0 131072 = 217
/16 255.255.0.0 65536 = 216
/17 255.255.128.0 32768 = 215 ISP / large business
/18 255.255.192.0 16384 = 214 ISP / large business
/19 255.255.224.0 8192 = 213 ISP / large business
/20 255.255.240.0 4096 = 212 Small ISP / large business
/21 255.255.248.0 2048 = 211 Small ISP / large business
/22 255.255.252.0 1024 = 210
/23 255.255.254.0 512 = 29
/24 255.255.255.0 256 = 28 Large LAN
/25 255.255.255.128 128 = 27 Large LAN
/26 255.255.255.192 64 = 26 Small LAN
/27 255.255.255.224 32 = 25 Small LAN
/28 255.255.255.240 16 = 24 Small LAN
/29 255.255.255.248 8 = 2³ The smallest multi-host network
/30 255.255.255.252 4 = 2² Point-to-point links (glue network)
/31 255.255.255.254 2 = 21 Point-to-point network (RFC 3021)
/32 255.255.255.255 1 = 20 Single host


Bibliography

Linux Networking HOWTO