Skip to content
Open

Tpsi #129

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TPSI/costanzo_francesco/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.idea/
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
div {
background-color: lightblue;
color:navy;
border-top: 15px solid navy;
border-bottom: 15px solid navy;
}

#div1 {
width: 100px;
padding: 25px;
border: 25px solid navy;
margin-bottom: 2rem;
}

#div2 {
width: 250px;
padding-left: 15px;
padding-right: 10px;
border-left: 10px solid navy;
border-right: 15px solid navy;
margin-bottom: 2rem;
}

#div3 {
width: 353px;
padding-left: 1px;
padding-right: 19px;
border-left: 14px solid navy;
border-right: 21px solid navy;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="it"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="costanzo_esercizio_css_18.css" type="text/css">
<title>Esercizio 18</title><!-- titolo della pagina -->
</head>
<body>
<div id="div1">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
<div id="div2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
<div id="div3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
h1 {
border-bottom: solid 5px blue;
border-left: solid 2px green;
}

h2{
border-top: dashed 2px green;
}

p{
border-bottom: dashed 3px grey;
border-left: solid 1px green;
border-right: solid 1px green;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="in">
<head>
<meta charset="UTF-8" />
<meta name="author" content="Francesco Costanzo" />
<title>local host</title>

<link https://en.wikipedia.org/wiki/Localhost>
<link href="./costanzo_esercizio_css_19.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Localhost</h1>
<p>
The local loopback mechanism may be used to run a network service on a
host without requiring a physical network interface, or without making the
service accessible from the networks the computer may be connected to. For
example, a locally installed website may be accessed from a Web browser by
the URL http://localhost to display its home page. The name localhost
normally resolves to the <abbr title="Internet Protocol version 4">IPv4</abbr> loopback address 127.0.0.1, and to the
<abbr title="Internet Protocol version 5">IPv6</abbr>
loopback address ::1. <br>

<cite>“I computer sono incredibilmente veloci, accurati e stupidi. Gli uomini sono incredibilmente lenti,
inaccurati e intelligenti. L'insieme dei due costituisce una forza incalcolabile.”</cite><br>Albert Einstain
</p>

<h2>Loopback</h2>
<p>
IPv4
<a href="https://it.wikipedia.org/wiki/Network" target="_blank"
>network</a
>
standards <span style="color: red">reserve</span> the entire address block
127.0.0.0/8 (more than 16 million addresses) for loopback purposes.[2]
That means any packet sent to any of those addresses is looped back. The
address 127.0.0.1 is the standard address for IPv4
<a
href="https://it.wikipedia.org/wiki/Interfaccia_di_loopback"
target="_blank"
>loopback</a>
traffic; the rest are not supported by <s>all</s> operating systems. However,
they can be used to set up multiple server applications on the host, all
listening on the same port number. The IPv6 standard assigns only a single
address for loopback: ::1. The resolution of the name localhost to one or
more IP addresses is normally configured by the following lines in the
operating system's hosts file:IPv4 network standards reserve the entire
address block 127.0.0.0/8 (more than 16 million addresses) for loopback
purposes.[2] That means <span style="color: blue">any packet</span> sent
to any of those addresses is looped back. The address 127.0.0.1 is the
standard address for IPv4 loopback traffic; the rest are not supported by
all operating systems. However, they can be used to set up multiple server
applications on the host, all listening on the same <s>port number</s>. The IPv6
standard assigns only a single address for loopback: ::1. The resolution
of the name localhost to one or more IP addresses is normally configured
by the following lines in the operating system's hosts file: <br />
127.0.0.1 localhost<br />
::1 localhost<br />
127.0.0.1 localhost<br />
::1 localhost
<br /><br />
<img
src="https://www.computernetworkingnotes.com/wp-content/uploads/networking-tutorials/images/it04-01-ipv-6-structure-and-format.PNG"
alt="immagine ipv6, esempio"
/>
<br />
The name may also be resolved by Domain Name System (DNS) servers, but
queries for this name should be resolved locally, and should not be
forwarded to remote name servers. <br />
<br />
In addition to the mapping of localhost to the loopback addresses
(127.0.0.1 and ::1), localhost may also be mapped to other IPv4 (loopback)
addresses and it is also possible to assign other, or additional, names to
any loopback address. The mapping of localhost to addresses other than the
designated loopback address range in the hosts file or in DNS is not
guaranteed to have the desired effect, as applications may map the name
internally.
<br /><br />
In the Domain Name
<a
href="https://it.wikipedia.org/wiki/Sistema_informatico"
target="_blank"
>System</a
>, the name localhost is reserved as a top-level domain name, originally
set aside to avoid confusion with the hostname used for loopback
purposes.[3] IETF standards prohibit domain name registrars from assigning
the name localhost.
</p>

<h2>IETF standards</h2>
<img src="./ietf.jpeg" alt="immagine ietf" />

<p>
The name localhost is reserved for loopback purposes by RFC 6761
(Special-Use Domain Names),[4] which achieved the Proposed Standard
maturity level in February 2013. The standard sets forth a number of
special considerations governing the use of the name in the Domain Name
System: <br />
<br />


An <u>IPv4</u> or <u>IPv6</u> address query for the name localhost must always resolve
to the respective loopback address, which is specified in a separate
standard. Applications may resolve the name to a loopback address
themselves, or pass it to the local name resolver mechanisms. When a name
resolver receives an address (A or AAAA) <s>query</s> for localhost, it should
return the appropriate loopback addresses, and negative responses for any
other requested record types. Queries for localhost should not be sent to
caching name servers. To avoid burdening the <s>Domain</s> Name System root
servers with traffic, caching name servers should never request name
server records for localhost, or forward resolution to authoritative name
servers. DNS registrars are precluded from delegating domain names in the
top-level domain localhost. When
<span style="color: green">name servers</span> receive queries for
'localhost' in spite of the provisions mentioned resolve them
appropriately. The IPv4 loopback addresses are reserved within the IPv4
address space by the <q>IETF</q> "Special Use IPv4 Addresses" standard (RFC
5735).[5] The reservation can be traced back to the November 1986
"Assigned Numbers" standard (RFC 990).
<blockquote cite ="https://www.frasicelebri.it/frasi-di/john-von-neumann/">
“Chiunque consideri i metodi aritmetici metodi di produrre numeri casuali è, naturalmente, in uno stato di peccato.”
</blockquote>
<br />
<br />
In contrast, the
<a
href="https://it.wikipedia.org/wiki/Internet_Engineering_Task_Force"
target="_blank"
>IETF</a
>
"IP Version 6 Addressing Architecture" <s>standard</s> (RFC 4291) reserves the
single IPv6 loopback address ::1 within the IPv6 address space. The
standard precludes the assignment of that address to any physical
interface, as well as its use as the source or destination address in any
packet sent to remote hosts. Any such packet that is erroneously
transmitted is not supposed to be routed, and should be dropped by all
routers or hosts that receive it.
</p>
<code>sudo pacman -S IETF</code>
<pre>Quest'ultimo è un comando inutile che non funziona</pre>

<h2>Packet processing</h2>
<a href="https://en.wikipedia.org/wiki/Packet_processing" target="_blank">
<img
src="https://www.erg.abdn.ac.uk/users/gorry/course/images/ip-send.gif"
alt="schema packet processing"
width="400"
/>
</a>
<p>
The processing of any packet sent to a loopback address, is implemented in
the link layer of the TCP/IP stack. Such packets are never passed to any
network interface controller (NIC) or hardware device driver and must not
appear outside of a computing system, or be routed by any router. This
permits software testing and local services in the absence of any hardware
network interfaces. <br /><br />
Looped-back packets are distinguished from any other packets traversing
the TCP/IP stack only by the special IP address they were addressed to.
Thus, the services that ultimately receive them respond according to the
specified destination. For example, an HTTP service could route packets
addressed to <q>127.0.0.99:80</q> and 127.0.0.100:80 to different Web servers, or
to a single server that returns different web pages. To simplify such
testing, the hosts file may be configured to provide appropriate names for
each address.
<br /><br />
Packets received on a <u>non-loopback</u> interface with a loopback source or
destination address must be dropped. Such packets are sometimes referred
to as Martian packets.[6] As with any other bogus packets, they may be
malicious and <u>any problems</u> they might cause can be avoided by applying
bogon filtering.
</p>
<h2>Special cases</h2>

<p>
The releases of the
<a href="https://www.mysql.com/it/" target="_blank">MySQL</a> database
differentiate between the use of the hostname localhost and the use of the
addresses 127.0.0.1 and ::1.[7] <q>When</q> qusing localhost as the destination in
a client connector interface of an application, the MySQL application
programming interface connects to the database using a Unix domain socket,
while a TCP connection via the loopback interface requires the direct use
of the explicit address. <br /><br />
One notable exception to the use of the <u>127.0.0.0/8</u> addresses is their use
in Multiprotocol Label <q>Switching</q> (MPLS) traceroute error detection, in
which their property of not being routable provides a convenient means to
avoid delivery of faulty packets to end users.
</p>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
h1{
text-transform: uppercase;
color:blue;
}

h2{
text-transform: capitalize;
text-decoration: underline;
color:red;
}

p{
text-align: justify;

}

#p3{
text-align: right;
}

#obreggiatura{
text-shadow: 2px 2px 5px red;
}
Loading