<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>http://mediawiki.monptisite.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin</id>
	<title>MonPtitSite - Contributions de l’utilisateur [fr]</title>
	<link rel="self" type="application/atom+xml" href="http://mediawiki.monptisite.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin"/>
	<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php/Sp%C3%A9cial:Contributions/Admin"/>
	<updated>2026-11-02T11:11:10Z</updated>
	<subtitle>Contributions de l’utilisateur</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/KVM/Intro&amp;diff=494</id>
		<title>Virtualisation/KVM/Intro</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/KVM/Intro&amp;diff=494"/>
		<updated>2026-10-29T12:37:43Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Convertir un ensemble de fichiers  VMDK en .qcow2 : &lt;br /&gt;
&lt;br /&gt;
 for f in *.vmdk; do echo $f ; qemu-img  convert -p -O qcow2  -S 0  $f ${f%.vmdk}.qcow2  ; done&lt;br /&gt;
 &lt;br /&gt;
{{REFERENCE&lt;br /&gt;
|nom=QEMU&lt;br /&gt;
|url=https://fr.wikipedia.org/wiki/QEMU&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOC:UNIX:Commandes&amp;diff=493</id>
		<title>DOC:UNIX:Commandes</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOC:UNIX:Commandes&amp;diff=493"/>
		<updated>2023-07-17T06:58:22Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* renommage de fichiers en masse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Recettes de cuisine du sysadmin}}&lt;br /&gt;
=Recettes de cuisine &amp;amp; commandes utiles=&lt;br /&gt;
&lt;br /&gt;
==Comment dire à linux qu'un disque (LUN SAN) a changé de taille ? ==&lt;br /&gt;
&lt;br /&gt;
la commande a lancer est : &lt;br /&gt;
&lt;br /&gt;
  '''# blockdev --rereadpt /dev/sdx''' &lt;br /&gt;
  (x = lettre associée au LUN)&lt;br /&gt;
&lt;br /&gt;
  # dmesg &lt;br /&gt;
  SCSI device sdc: drive cache: write back w/ FUA&lt;br /&gt;
  '''sdc: detected capacity change from 42949672960 to 214748364800'''&lt;br /&gt;
   sdc: sdc1&lt;br /&gt;
  SCSI device sdc: 419430400 512-byte hdwr sectors (214748 MB)&lt;br /&gt;
  sdc: Write Protect is off&lt;br /&gt;
  sdc: Mode Sense: a5 00 10 08&lt;br /&gt;
&lt;br /&gt;
  # fdisk -l /dev/sdx&lt;br /&gt;
  Disk /dev/sdx: 214.7 GB, '''214748364800''' bytes&lt;br /&gt;
  255 heads, 63 sectors/track, 26108 cylinders&lt;br /&gt;
  Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
  /dev/sdc1               1       26108   209712478+  8e  Linux LVM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Puis, il faut rescanner les chemins, soit avec en lancant simplement multipath soit en utilisant le démon multipathd &lt;br /&gt;
&lt;br /&gt;
  # multipathd -k&amp;quot;resize multipath mpathX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Comment zipper (ou traiter) un ensemble de fichiers contenant des caractères blancs dans le nom ?==&lt;br /&gt;
&lt;br /&gt;
la commande magique : &lt;br /&gt;
&lt;br /&gt;
   find &amp;lt;nom rép&amp;gt;  -name '*.pdf' -print | sed &amp;quot;s/'/\\\'/g&amp;quot; | xargs -I &amp;quot;{}&amp;quot; zip -9m &amp;quot;{}&amp;quot;.zip &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
que fait cette commande ?&lt;br /&gt;
&lt;br /&gt;
elle recherche à partir d'un répertoire donné tous les fichiers PDF, affiche leurs noms, protège le caractère ' ' s'il y a lieu et ZIP le fichier en compression maximale&lt;br /&gt;
&lt;br /&gt;
petite variante : &lt;br /&gt;
&lt;br /&gt;
  find . -mtime +365 -name '*.pdf' -print | sed &amp;quot;s/'/\\\'/g&amp;quot; | xargs -I &amp;quot;{}&amp;quot; zip -9m &amp;quot;{}&amp;quot;.zip &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
idem que précédemment, mais ne prend que les fichiers modifiés il y à plus d'un an à partir du répertoire courant&lt;br /&gt;
&lt;br /&gt;
==Comment supprimer les sous dossiers vides d'un répertoire ==&lt;br /&gt;
&lt;br /&gt;
   find /symlnks/io/jobs/workflows/wkftwist -depth -mindepth 2 -type d -empty  -mtime +1  -print  | xargs rmdir&lt;br /&gt;
&lt;br /&gt;
recherche tous les sous dossiers (-type d )  vides (-empty) modifiés il y a plus d'un jour  (-mtime +1) en ne prenant en compte qu'à partir du 2è niveau (-depth -mindepth 2)&lt;br /&gt;
&lt;br /&gt;
==Commande equivalente à un &amp;quot;tree size&amp;quot; par répertoire ==&lt;br /&gt;
&lt;br /&gt;
ex : trouver la taille des dossiers .trash&amp;quot; de MisTRAL &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  du -k `find /mnt/nfsshare/6.0/MiSTRAL/raid \ &lt;br /&gt;
              -maxdepth 2 \&lt;br /&gt;
              -name '*.trash' \&lt;br /&gt;
              -type d  ` |  \&lt;br /&gt;
         perl -ni -e '$i += $_ ; END {printf &amp;quot;%.02f Mo&amp;quot; , $i/1024/1024 .&amp;quot;\n&amp;quot;}'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= bash =&lt;br /&gt;
&lt;br /&gt;
== créer 100 fichiers (vides) en 1 commande ==&lt;br /&gt;
&lt;br /&gt;
Utilisation de l'opérateur &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ touch {0..9}{0..9}.fic&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== renommage de fichiers en masse ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ex : changer l'extension de fichiers : *.fic en *.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ for file in `find -name &amp;quot;*.fic&amp;quot;`; do mv &amp;quot;$file&amp;quot; &amp;quot;${file/.fic/.txt}&amp;quot; ; done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== connaître les processus qui utilisent la swap ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
for proc in /proc/[0-9]*; do&lt;br /&gt;
   awk '/VmSwap/ { print $2 &amp;quot;\t'`readlink $proc/exe | awk '{ print $1 }'`'&amp;quot; }' $proc/status; &lt;br /&gt;
done | sort -n | awk '{ total += $1 ; print $0 } END { print total &amp;quot;\tTotal&amp;quot; }'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOC:UNIX:Commandes&amp;diff=492</id>
		<title>DOC:UNIX:Commandes</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOC:UNIX:Commandes&amp;diff=492"/>
		<updated>2023-07-16T21:55:35Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* renommage de fichiers en masse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Recettes de cuisine du sysadmin}}&lt;br /&gt;
=Recettes de cuisine &amp;amp; commandes utiles=&lt;br /&gt;
&lt;br /&gt;
==Comment dire à linux qu'un disque (LUN SAN) a changé de taille ? ==&lt;br /&gt;
&lt;br /&gt;
la commande a lancer est : &lt;br /&gt;
&lt;br /&gt;
  '''# blockdev --rereadpt /dev/sdx''' &lt;br /&gt;
  (x = lettre associée au LUN)&lt;br /&gt;
&lt;br /&gt;
  # dmesg &lt;br /&gt;
  SCSI device sdc: drive cache: write back w/ FUA&lt;br /&gt;
  '''sdc: detected capacity change from 42949672960 to 214748364800'''&lt;br /&gt;
   sdc: sdc1&lt;br /&gt;
  SCSI device sdc: 419430400 512-byte hdwr sectors (214748 MB)&lt;br /&gt;
  sdc: Write Protect is off&lt;br /&gt;
  sdc: Mode Sense: a5 00 10 08&lt;br /&gt;
&lt;br /&gt;
  # fdisk -l /dev/sdx&lt;br /&gt;
  Disk /dev/sdx: 214.7 GB, '''214748364800''' bytes&lt;br /&gt;
  255 heads, 63 sectors/track, 26108 cylinders&lt;br /&gt;
  Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
  /dev/sdc1               1       26108   209712478+  8e  Linux LVM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Puis, il faut rescanner les chemins, soit avec en lancant simplement multipath soit en utilisant le démon multipathd &lt;br /&gt;
&lt;br /&gt;
  # multipathd -k&amp;quot;resize multipath mpathX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Comment zipper (ou traiter) un ensemble de fichiers contenant des caractères blancs dans le nom ?==&lt;br /&gt;
&lt;br /&gt;
la commande magique : &lt;br /&gt;
&lt;br /&gt;
   find &amp;lt;nom rép&amp;gt;  -name '*.pdf' -print | sed &amp;quot;s/'/\\\'/g&amp;quot; | xargs -I &amp;quot;{}&amp;quot; zip -9m &amp;quot;{}&amp;quot;.zip &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
que fait cette commande ?&lt;br /&gt;
&lt;br /&gt;
elle recherche à partir d'un répertoire donné tous les fichiers PDF, affiche leurs noms, protège le caractère ' ' s'il y a lieu et ZIP le fichier en compression maximale&lt;br /&gt;
&lt;br /&gt;
petite variante : &lt;br /&gt;
&lt;br /&gt;
  find . -mtime +365 -name '*.pdf' -print | sed &amp;quot;s/'/\\\'/g&amp;quot; | xargs -I &amp;quot;{}&amp;quot; zip -9m &amp;quot;{}&amp;quot;.zip &amp;quot;{}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
idem que précédemment, mais ne prend que les fichiers modifiés il y à plus d'un an à partir du répertoire courant&lt;br /&gt;
&lt;br /&gt;
==Comment supprimer les sous dossiers vides d'un répertoire ==&lt;br /&gt;
&lt;br /&gt;
   find /symlnks/io/jobs/workflows/wkftwist -depth -mindepth 2 -type d -empty  -mtime +1  -print  | xargs rmdir&lt;br /&gt;
&lt;br /&gt;
recherche tous les sous dossiers (-type d )  vides (-empty) modifiés il y a plus d'un jour  (-mtime +1) en ne prenant en compte qu'à partir du 2è niveau (-depth -mindepth 2)&lt;br /&gt;
&lt;br /&gt;
==Commande equivalente à un &amp;quot;tree size&amp;quot; par répertoire ==&lt;br /&gt;
&lt;br /&gt;
ex : trouver la taille des dossiers .trash&amp;quot; de MisTRAL &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  du -k `find /mnt/nfsshare/6.0/MiSTRAL/raid \ &lt;br /&gt;
              -maxdepth 2 \&lt;br /&gt;
              -name '*.trash' \&lt;br /&gt;
              -type d  ` |  \&lt;br /&gt;
         perl -ni -e '$i += $_ ; END {printf &amp;quot;%.02f Mo&amp;quot; , $i/1024/1024 .&amp;quot;\n&amp;quot;}'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= bash =&lt;br /&gt;
&lt;br /&gt;
== créer 100 fichiers (vides) en 1 commande ==&lt;br /&gt;
&lt;br /&gt;
Utilisation de l'opérateur &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ touch {0..9}{0..9}.fic&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== renommage de fichiers en masse ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ex : changer l'extension de fichiers : *.fic en *.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ for file in `find -name &amp;quot;*.fic&amp;quot;`; do mv &amp;quot;$file&amp;quot; &amp;quot;${file/.fic/.txt}&amp;quot; ; done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot; connaître les processus qui utilisent la swap ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
for proc in /proc/[0-9]*; do&lt;br /&gt;
   awk '/VmSwap/ { print $2 &amp;quot;\t'`readlink $proc/exe | awk '{ print $1 }'`'&amp;quot; }' $proc/status; &lt;br /&gt;
done | sort -n | awk '{ total += $1 ; print $0 } END { print total &amp;quot;\tTotal&amp;quot; }'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/SNMPv3&amp;diff=491</id>
		<title>Virtualisation/VMWARE/SNMPv3</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/SNMPv3&amp;diff=491"/>
		<updated>2023-05-25T14:51:45Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Sur une appliance VCSA 7 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|VMWare - '''Configuration SNMPv3'''}}&lt;br /&gt;
&lt;br /&gt;
=Configurer snmpv3 sur un ESX=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set -r -e 1 -l debug&lt;br /&gt;
&lt;br /&gt;
engineid=$(esxcli system snmp get   |grep Engineid |awk '{print $2}')&lt;br /&gt;
esxcli system snmp get&lt;br /&gt;
&lt;br /&gt;
SNMP_USER=s_monitoring&lt;br /&gt;
SECRETS_PATH=/vmfs/volumes/localDS-${HOSTNAME}/.secrets&lt;br /&gt;
mkdir ${SECRETS_PATH}&lt;br /&gt;
&lt;br /&gt;
mv secret*  ${SECRETS_PATH}&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set --authentication SHA1&lt;br /&gt;
esxcli system snmp set --privacy AES128&lt;br /&gt;
&lt;br /&gt;
hash=$(esxcli system snmp hash --auth-hash ${SECRETS_PATH}/secret1 --priv-hash  ${SECRETS_PATH}/secret2)&lt;br /&gt;
echo $hash&lt;br /&gt;
authhash=$(echo $hash | awk '{print $2}')&lt;br /&gt;
privhash=$(echo $hash | awk '{print $4}')&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp hash --auth-hash ${SECRETS_PATH}/secret1 --priv-hash  ${SECRETS_PATH}/secret2&lt;br /&gt;
esxcli system snmp set --users ${SNMP_USER}/${authhash}/${privhash}/priv&lt;br /&gt;
esxcli system snmp test --user  ${SNMP_USER}  --auth-hash ${SECRETS_PATH}/secret1  --priv-hash  ${SECRETS_PATH}/secret2&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set --remote-users ${SNMP_USER}/SHA1/${authhash}/AES128/${privhash}/${engineid}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configurer snmpv3 sur une appliance VCSA 7 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
shell&lt;br /&gt;
mkdir .secrets&lt;br /&gt;
vi .secrets/secret1&lt;br /&gt;
vi .secrets/secret2&lt;br /&gt;
&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
snmp.set --authentication SHA1&lt;br /&gt;
snmp.set --privacy AES128&lt;br /&gt;
snmp.hash  --auth_hash /root/.secrets/secret1 --priv_hash /root/.secrets/secret2&lt;br /&gt;
&lt;br /&gt;
snmp.set --user monitoring_user@vsphere.local/c84c59c......1/787....d23/priv&lt;br /&gt;
snmp.get&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/SNMPv3&amp;diff=490</id>
		<title>Virtualisation/VMWARE/SNMPv3</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/SNMPv3&amp;diff=490"/>
		<updated>2023-05-25T14:51:33Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* sur un ESX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|VMWare - '''Configuration SNMPv3'''}}&lt;br /&gt;
&lt;br /&gt;
=Configurer snmpv3 sur un ESX=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set -r -e 1 -l debug&lt;br /&gt;
&lt;br /&gt;
engineid=$(esxcli system snmp get   |grep Engineid |awk '{print $2}')&lt;br /&gt;
esxcli system snmp get&lt;br /&gt;
&lt;br /&gt;
SNMP_USER=s_monitoring&lt;br /&gt;
SECRETS_PATH=/vmfs/volumes/localDS-${HOSTNAME}/.secrets&lt;br /&gt;
mkdir ${SECRETS_PATH}&lt;br /&gt;
&lt;br /&gt;
mv secret*  ${SECRETS_PATH}&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set --authentication SHA1&lt;br /&gt;
esxcli system snmp set --privacy AES128&lt;br /&gt;
&lt;br /&gt;
hash=$(esxcli system snmp hash --auth-hash ${SECRETS_PATH}/secret1 --priv-hash  ${SECRETS_PATH}/secret2)&lt;br /&gt;
echo $hash&lt;br /&gt;
authhash=$(echo $hash | awk '{print $2}')&lt;br /&gt;
privhash=$(echo $hash | awk '{print $4}')&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp hash --auth-hash ${SECRETS_PATH}/secret1 --priv-hash  ${SECRETS_PATH}/secret2&lt;br /&gt;
esxcli system snmp set --users ${SNMP_USER}/${authhash}/${privhash}/priv&lt;br /&gt;
esxcli system snmp test --user  ${SNMP_USER}  --auth-hash ${SECRETS_PATH}/secret1  --priv-hash  ${SECRETS_PATH}/secret2&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set --remote-users ${SNMP_USER}/SHA1/${authhash}/AES128/${privhash}/${engineid}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Sur une appliance VCSA 7 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
shell&lt;br /&gt;
mkdir .secrets&lt;br /&gt;
vi .secrets/secret1&lt;br /&gt;
vi .secrets/secret2&lt;br /&gt;
&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
snmp.set --authentication SHA1&lt;br /&gt;
snmp.set --privacy AES128&lt;br /&gt;
snmp.hash  --auth_hash /root/.secrets/secret1 --priv_hash /root/.secrets/secret2&lt;br /&gt;
&lt;br /&gt;
snmp.set --user monitoring_user@vsphere.local/c84c59c......1/787....d23/priv&lt;br /&gt;
snmp.get&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/SNMPv3&amp;diff=489</id>
		<title>Virtualisation/VMWARE/SNMPv3</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/SNMPv3&amp;diff=489"/>
		<updated>2023-05-25T14:51:03Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec « {{MediaWiki}} &amp;lt;br&amp;gt; {{FOND_BLEU|VMWare - '''Configuration SNMPv3'''}}  = sur un ESX =  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;  esxcli system snmp set -r -e 1 -l debug  engineid=$(es… »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|VMWare - '''Configuration SNMPv3'''}}&lt;br /&gt;
&lt;br /&gt;
= sur un ESX =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set -r -e 1 -l debug&lt;br /&gt;
&lt;br /&gt;
engineid=$(esxcli system snmp get   |grep Engineid |awk '{print $2}')&lt;br /&gt;
esxcli system snmp get&lt;br /&gt;
&lt;br /&gt;
SNMP_USER=s_monitoring&lt;br /&gt;
SECRETS_PATH=/vmfs/volumes/localDS-${HOSTNAME}/.secrets&lt;br /&gt;
mkdir ${SECRETS_PATH}&lt;br /&gt;
&lt;br /&gt;
mv secret*  ${SECRETS_PATH}&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set --authentication SHA1&lt;br /&gt;
esxcli system snmp set --privacy AES128&lt;br /&gt;
&lt;br /&gt;
hash=$(esxcli system snmp hash --auth-hash ${SECRETS_PATH}/secret1 --priv-hash  ${SECRETS_PATH}/secret2)&lt;br /&gt;
echo $hash&lt;br /&gt;
authhash=$(echo $hash | awk '{print $2}')&lt;br /&gt;
privhash=$(echo $hash | awk '{print $4}')&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp hash --auth-hash ${SECRETS_PATH}/secret1 --priv-hash  ${SECRETS_PATH}/secret2&lt;br /&gt;
esxcli system snmp set --users ${SNMP_USER}/${authhash}/${privhash}/priv&lt;br /&gt;
esxcli system snmp test --user  ${SNMP_USER}  --auth-hash ${SECRETS_PATH}/secret1  --priv-hash  ${SECRETS_PATH}/secret2&lt;br /&gt;
&lt;br /&gt;
esxcli system snmp set --remote-users ${SNMP_USER}/SHA1/${authhash}/AES128/${privhash}/${engineid}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sur une appliance VCSA 7 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
shell&lt;br /&gt;
mkdir .secrets&lt;br /&gt;
vi .secrets/secret1&lt;br /&gt;
vi .secrets/secret2&lt;br /&gt;
&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
snmp.set --authentication SHA1&lt;br /&gt;
snmp.set --privacy AES128&lt;br /&gt;
snmp.hash  --auth_hash /root/.secrets/secret1 --priv_hash /root/.secrets/secret2&lt;br /&gt;
&lt;br /&gt;
snmp.set --user monitoring_user@vsphere.local/c84c59c......1/787....d23/priv&lt;br /&gt;
snmp.get&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=VMWARE&amp;diff=488</id>
		<title>VMWARE</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=VMWARE&amp;diff=488"/>
		<updated>2023-05-25T14:46:38Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Virtualisation/VMWARE/CommandsCLI| Liste de commandes CLI utiles]]&lt;br /&gt;
* [[Virtualisation/VMWARE/SNMPv3| Configuration SNMPv3 pour ESXi 7 et VCSA 7]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=487</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=487"/>
		<updated>2023-02-20T18:09:21Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Advanced Commands Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show log messages }}&lt;br /&gt;
|operational&lt;br /&gt;
| Dump system logs &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show cli history }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get cli commands history &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Advanced Commands Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|configure }}&lt;br /&gt;
|operational&lt;br /&gt;
| Switch to configuration mode&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|delete interface &amp;lt;interface&amp;gt; }}&lt;br /&gt;
|operational&lt;br /&gt;
| Delete an interface (ex : delete xe-0/0/0)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|commit check }}&lt;br /&gt;
|operational&lt;br /&gt;
| Validate a conf without apply&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|commit }}&lt;br /&gt;
|operational&lt;br /&gt;
| apply a modified conf&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|commit confirmed &amp;lt;timeout in min&amp;gt;}}&lt;br /&gt;
|operational&lt;br /&gt;
| Apply a conf and roll back after x min if not commited in timelapse&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|load set terminal }}&lt;br /&gt;
|operational&lt;br /&gt;
| Input a set of commands from the terminal until ^D is pressed&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces &amp;lt;interface name&amp;gt; mtu 9126 }}&lt;br /&gt;
|operational&lt;br /&gt;
| Configure Jumbo frame on an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces &amp;lt;interface name&amp;gt; unit 0 family ethernet-switching interface-mode trunk }}&lt;br /&gt;
|operational&lt;br /&gt;
| Configure a TRUNK on an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces &amp;lt;interface name&amp;gt; unit 0 family ethernet-switching vlan members [ VLANS or  vlans id ] }}&lt;br /&gt;
|operational&lt;br /&gt;
| Configure VLANs allowed in a trunk&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|delete apply-groups &amp;lt;group name&amp;gt; }}&lt;br /&gt;
|operational&lt;br /&gt;
| Remove a group applied&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE| show interfaces \\  display set \\ grep description }}&lt;br /&gt;
|operational&lt;br /&gt;
| Display commands used for interfaces descriptions settings&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE| show  \\  display set  }}&lt;br /&gt;
|operational&lt;br /&gt;
| Display commands used for all con figuration settings&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=486</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=486"/>
		<updated>2023-02-20T18:08:47Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Advanced Commands Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show log messages }}&lt;br /&gt;
|operational&lt;br /&gt;
| Dump system logs &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show cli history }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get cli commands history &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Advanced Commands Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|configure }}&lt;br /&gt;
|operational&lt;br /&gt;
| Switch to configuration mode&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|delete interface &amp;lt;interface&amp;gt; }}&lt;br /&gt;
|operational&lt;br /&gt;
| Delete an interface (ex : delete xe-0/0/0)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|commit check }}&lt;br /&gt;
|operational&lt;br /&gt;
| Validate a conf without apply&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|commit }}&lt;br /&gt;
|operational&lt;br /&gt;
| apply a modified conf&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|commit confirmed &amp;lt;timeout in min&amp;gt;}}&lt;br /&gt;
|operational&lt;br /&gt;
| Apply a conf and roll back after x min if not commited in timelapse&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|load set terminal }}&lt;br /&gt;
|operational&lt;br /&gt;
| Input a set of commands from the terminal until ^D is pressed&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces &amp;lt;interface name&amp;gt; mtu 9126 }}&lt;br /&gt;
|operational&lt;br /&gt;
| Configure Jumbo frame on an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces &amp;lt;interface name&amp;gt; unit 0 family ethernet-switching interface-mode trunk }}&lt;br /&gt;
|operational&lt;br /&gt;
| Configure a TRUNK on an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces &amp;lt;interface name&amp;gt; unit 0 family ethernet-switching vlan members [ VLANS or  vlans id ] }}&lt;br /&gt;
|operational&lt;br /&gt;
| Configure VLANs allowed in a trunk&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|delete apply-groups &amp;lt;group name&amp;gt; }}&lt;br /&gt;
|operational&lt;br /&gt;
| Remove a group applied&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE| show interfaces \\  display set \\ grep description }}&lt;br /&gt;
|operational&lt;br /&gt;
| Display commands used for interfaces descriptions settings&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE| show  \\  display set  }}&lt;br /&gt;
|operational&lt;br /&gt;
| Display commands used for all con figuration settings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=485</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=485"/>
		<updated>2023-02-20T17:51:24Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show log messages }}&lt;br /&gt;
|operational&lt;br /&gt;
| Dump system logs &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show cli history }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get cli commands history &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Advanced Commands Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show log messages }}&lt;br /&gt;
|operational&lt;br /&gt;
| Dump system logs &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show cli history }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get cli commands history &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/CommandsCLI&amp;diff=484</id>
		<title>Virtualisation/VMWARE/CommandsCLI</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/CommandsCLI&amp;diff=484"/>
		<updated>2022-12-01T16:17:22Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|VMWare- '''Petit guide de survie''' en CLI ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|ESXi CLI commands&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxtop }}&lt;br /&gt;
|monitoring&lt;br /&gt;
| Monitor ESXi system activity &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli storage filesystem list }}&lt;br /&gt;
|storage&lt;br /&gt;
| Get list of available filesystems &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli network nic list}}&lt;br /&gt;
|network&lt;br /&gt;
| Get list of available network interfaces &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli network nic [up / down] -n vmnicX}}&lt;br /&gt;
|network&lt;br /&gt;
| enable / disable a network interfaces &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/CommandsCLI&amp;diff=483</id>
		<title>Virtualisation/VMWARE/CommandsCLI</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/CommandsCLI&amp;diff=483"/>
		<updated>2022-12-01T14:08:24Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|VMWare- '''Petit guide de survie''' en CLI ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|ESXi CLI commands&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli storage filesystem list }}&lt;br /&gt;
|storage&lt;br /&gt;
| Get list of available filesystems &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli network nic list}}&lt;br /&gt;
|network&lt;br /&gt;
| Get list of available network interfaces &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli network nic [up / down] -n vmnicX}}&lt;br /&gt;
|network&lt;br /&gt;
| enable / disable a network interfaces &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/CommandsCLI&amp;diff=482</id>
		<title>Virtualisation/VMWARE/CommandsCLI</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation/VMWARE/CommandsCLI&amp;diff=482"/>
		<updated>2022-12-01T09:52:23Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec « {{MediaWiki}} &amp;lt;br&amp;gt; {{FOND_BLEU|VMWare- '''Petit guide de survie''' en CLI ...}}   =Command Summary=   {| class=&amp;quot;wikitable&amp;quot; !colspan=&amp;quot;3&amp;quot;|ESXi CLI commands |- ! class=&amp;quot;wikit… »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|VMWare- '''Petit guide de survie''' en CLI ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|ESXi CLI commands&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli storage filesystem list }}&lt;br /&gt;
|storage&lt;br /&gt;
| Get list of available filesystems &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|esxcli network nic list}}&lt;br /&gt;
|network&lt;br /&gt;
| Get list of available network interfaces &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=VMWARE&amp;diff=481</id>
		<title>VMWARE</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=VMWARE&amp;diff=481"/>
		<updated>2022-12-01T09:47:44Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec « {{MediaWiki}} &amp;lt;br&amp;gt; *  Liste de commandes CLI utiles »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Virtualisation/VMWARE/CommandsCLI| Liste de commandes CLI utiles]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:Virtualisation&amp;diff=480</id>
		<title>Modèle:Virtualisation</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:Virtualisation&amp;diff=480"/>
		<updated>2022-12-01T09:46:14Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[VMWARE|VMWare]]&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[Virtualisation|Virtualisation]]&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:Virtualisation&amp;diff=479</id>
		<title>Modèle:Virtualisation</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:Virtualisation&amp;diff=479"/>
		<updated>2022-12-01T09:45:41Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[Virtualisation|VMWare]]&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[Virtualisation|Virtualisation]]&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=478</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=478"/>
		<updated>2022-11-25T09:55:20Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show log messages }}&lt;br /&gt;
|operational&lt;br /&gt;
| Dump system logs &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show cli history }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get cli commands history &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=477</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=477"/>
		<updated>2022-11-25T09:26:52Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show log messages }}&lt;br /&gt;
|operational&lt;br /&gt;
| Dump system logs &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=476</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=476"/>
		<updated>2022-11-25T09:23:26Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show system uptime }}&lt;br /&gt;
|operational&lt;br /&gt;
| Get uptime &amp;amp; date of all fpc &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=475</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=475"/>
		<updated>2022-11-25T08:10:13Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Command Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show lacp interfaces '''ae'''''xx'' [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get bond LACP interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=474</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=474"/>
		<updated>2022-11-24T18:17:36Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
|Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE description}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds a description to an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit NUMBER family inet address …}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Configures an IPv4 address&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE disable}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Disables an interface&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set vlans NAME vlan-id ID}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Defines a VLAN&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show vlans}}&lt;br /&gt;
|operational&lt;br /&gt;
|Shows a list of configured VLANs&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching interface-mode &amp;lt;access/trunk&amp;gt;}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Sets a layer-2 port type (trunk port or access port)&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds VLANs to the port&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set interfaces INTERFACE vlan-tagging}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables VLAN tagging, which enables the use of units as subinterfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set poe interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables PoE on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|set protocols lldp-med interface all}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Enables LLDP-MED on all interfaces&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|rename}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Renames some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|deactivate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Deactivates any part of the config&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|copy}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Copy some configuration from one place to another&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|replace}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Replace some configuration&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|annotate}}&lt;br /&gt;
|configuration&lt;br /&gt;
|Adds annotations into the config, like comments in code&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Additional References =&lt;br /&gt;
&lt;br /&gt;
Explanation of “ifd” and “ifl” indexes  https://kb.juniper.net/InfoCenter/index?page=content&amp;amp;id=KB2820&lt;br /&gt;
&lt;br /&gt;
Router Interfaces Overview  https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html&lt;br /&gt;
&lt;br /&gt;
Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html&lt;br /&gt;
&lt;br /&gt;
Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=473</id>
		<title>Network/Juniper/Survival guide</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper/Survival_guide&amp;diff=473"/>
		<updated>2022-11-24T18:08:14Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec « {{MediaWiki}} &amp;lt;br&amp;gt; {{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}   = Sites Références = * [https://www.juniper.net/documentation/us/en/software/j… »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{FOND_BLEU|Juniper- '''Petit guide de survie''' pour un newbie ...}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
* [https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/index.html  The bible ....]&lt;br /&gt;
* [https://supportportal.juniper.net/s/knowledge?language=en_US  Base de connaissance Juniper ]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
There are several acronyms for interface types and components:&lt;br /&gt;
&lt;br /&gt;
   * IFD – Interface Physical Device&lt;br /&gt;
   * IFL – Interface Logical Device&lt;br /&gt;
   * IFF – Address Family&lt;br /&gt;
   * IFA – Address Entry&lt;br /&gt;
&lt;br /&gt;
Common interface names are:&lt;br /&gt;
&lt;br /&gt;
    * ge – Gigabit ethernet&lt;br /&gt;
    * xe – 10G ethernet&lt;br /&gt;
    * et – 100G ethernet&lt;br /&gt;
    * ae – aggregated ethernet (LAG/etherchannel)&lt;br /&gt;
    * vlan or irb – Logical interface based on VLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.&lt;br /&gt;
&lt;br /&gt;
The interface naming convention is type-x/y/z&lt;br /&gt;
&lt;br /&gt;
    Type is ge, xe, etc&lt;br /&gt;
    x – FPC (aka linecard)&lt;br /&gt;
    y – module or slot&lt;br /&gt;
    z – port number&lt;br /&gt;
&lt;br /&gt;
There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.&lt;br /&gt;
&lt;br /&gt;
Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.&lt;br /&gt;
&lt;br /&gt;
An unnumbered interface does not have an IP address. This helps conserve IP addresses.&lt;br /&gt;
&lt;br /&gt;
All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.&lt;br /&gt;
&lt;br /&gt;
Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.&lt;br /&gt;
&lt;br /&gt;
Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.&lt;br /&gt;
&lt;br /&gt;
Configuring voice ports means three main steps:&lt;br /&gt;
&lt;br /&gt;
   * Configuring a voice VLAN&lt;br /&gt;
   * Configuring PoE&lt;br /&gt;
   * Configuring LLDP-MED&lt;br /&gt;
&lt;br /&gt;
Junos supports regex during configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
[user@demo project2]$ tree -F group_vars&lt;br /&gt;
group_vars/&lt;br /&gt;
├── db_servers/&lt;br /&gt;
│ ├── 3.yml&lt;br /&gt;
│ ├── a.yml&lt;br /&gt;
│ └── myvars.yml&lt;br /&gt;
├── lb_servers/&lt;br /&gt;
│ ├── 2.yml&lt;br /&gt;
│ ├── b.yml&lt;br /&gt;
│ └── something.yml&lt;br /&gt;
└── web_servers/&lt;br /&gt;
└── nothing.yml&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command Summary=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;|Juniper OS Command summary&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Command&lt;br /&gt;
! Mode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces terse}}&lt;br /&gt;
|operational&lt;br /&gt;
| Get a simplified view of all interfaces on the system&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|show interfaces [extensive]}}&lt;br /&gt;
|operational&lt;br /&gt;
| 	Get interface statistics&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_port}}&lt;br /&gt;
|Port utilisé par Ansible pour se connecter à l'hôte géré. Pour le plug-in de connexion par SSH (par défaut), la valeur par défaut est '''22'''.&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_user}}&lt;br /&gt;
|Utilisateur dont se sert Ansible pour se connecter à l'hôte géré. Le comportement par défaut d'Ansible est de se connecter à l'hôte géré à l'aide du même nom d'utilisateur que celui qui exécute le playbook Ansible sur le noeud de contrôle.&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_become_user}}&lt;br /&gt;
|Une fois qu'Ansible s'est connecté à l'hôte géré, il bascule vers cet utilisateur en utilisant absible_become_method (qui est {{CODE|sudo}} par défaut). Il se peut que vous deviez vous procurer des informations d'identification d'authentification de quelque façon que ce soit.&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_python_interpreter}}&lt;br /&gt;
|Chemin d'accès à l'exécutable Python qu'Ansible doit utiliser sur l'hôte géré. Sur Ansible 2.8 et versions ultérieures, cette valeur par défaut est {{CODE|auto}}, qui sélectionne automatiquement un interpréteur Python sur l'hôte exécutant le playbook en fonction du système d'exploitation qu'il exécute. Ainsi, il n'est plus autant nécessaire d'utiliser ce paramètre que dans les versions antérieures d'Ansible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Variables utilisées lors d'exécution de playbooks ===&lt;br /&gt;
&lt;br /&gt;
Lorsqu'un play est en cours d'exécution, un certain nombre de variables et de faits peuvent être utilisés pour identifier le nom de l'hôte géré actuel qui exécute une tâche :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Variables Ansible spécifiques à l'exécution&lt;br /&gt;
|-&lt;br /&gt;
! class=&amp;quot;wikitable&amp;quot; | Variable&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|inventory_hostname}}&lt;br /&gt;
|Nom de l'hôte géré en cours de traitement, extrait de l'inventaire. &lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_host}}&lt;br /&gt;
|Adresse IP ou nom d'hôte réel qui a été utilisé pour se connecter à l'hôte géré, comme indiqué&lt;br /&gt;
précédemment.&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_facts ['nom d'hôte']}}&lt;br /&gt;
|Nom court (non qualifié) de l'hôte collecté comme un fait de l'hôte géré.&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_facts ['fqdn']}}&lt;br /&gt;
|Nom de domaine complet de l'hôte collecté comme un fait de l'hôte géré.&lt;br /&gt;
|-&lt;br /&gt;
|{{CODE|ansible_play_hosts}}&lt;br /&gt;
|liste de tous les hôtes qui n'ont pas encore échoué au cours du play actuel (et qui, par conséquent, sera utilisée&lt;br /&gt;
pour les tâches restantes du play).|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Penser ré-utilisabilité ! ==&lt;br /&gt;
&lt;br /&gt;
Les rôles permettent de créer des playbooks simples et de réutiliser du code commun à plusieurs projets.  Un '''role''' doit porter sur un objectif ou une fonction spécifique.&lt;br /&gt;
Idéalement, il est préférable de créer des rôles génériques configurables par le biais de variables. Ces variables sont le plus souvent définies par défaut dans le fichier YAML &amp;lt;code&amp;gt;roles/[nom_role]/default/main.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
De cette façon, un rôle disposant de son propre paramétrage et ensemble de tâches peut facillement être intégré dans un autre playbook. &lt;br /&gt;
&lt;br /&gt;
Si un playbook doit modifier le contenu d'une variable définie par un rôle, il suffit :&lt;br /&gt;
* soit inclure un fichier de définition de variables au niveau du playbook (cf &amp;lt;code&amp;gt;[https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#defining-variables-in-files var_files]&amp;lt;/code&amp;gt;)&lt;br /&gt;
* soit définir une zone tasks &amp;lt;code&amp;gt;vars:&amp;lt;/code&amp;gt; qui remplace le contenu de cette variable. (cf [https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable Ordre de précédence des variables dans un playbook ansible])&lt;br /&gt;
&lt;br /&gt;
Exemple&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
- hosts: webservers&lt;br /&gt;
  vars:&lt;br /&gt;
    apache2_config: true&lt;br /&gt;
    apache2_default_port: 8000&lt;br /&gt;
  roles:&lt;br /&gt;
    ansible-apache2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ce playbook utilise le rôle &amp;lt;code&amp;gt;ansible-apache2&amp;lt;/code&amp;gt; en modifiant 2 variables utilisées par ce rôle : &amp;lt;code&amp;gt;apache2_config&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;apache2_default_port&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A l'éxécution de ce playbook, le service apache2 sera installé sur les serveurs &amp;lt;code&amp;gt;webservers&amp;lt;/code&amp;gt; pour écouter sur le port 8000/tcp.&lt;br /&gt;
&lt;br /&gt;
== Exécution centralisée des playbooks ==&lt;br /&gt;
&lt;br /&gt;
Pour contrôler l'accès aux systèmes et auditer l'activité d'Ansible, il est nécessaire d'envisagez l'utilsiation d'un serveur de contrôle dédié à partir duquel tous les playbooks Ansible sont exécutés.&lt;br /&gt;
Les administrateurs système doivent toujours disposer de leurs propres comptes sur le système, ainsi que des informations d'identification permettant de se connecter aux hôtes gérés et d'augmenter les privilèges, si nécessaire. &lt;br /&gt;
Lorsqu'un administrateur système cesse de travailler sur le projet, sa clé SSH peut être supprimée du fichier &amp;lt;code&amp;gt;authorized_keys&amp;lt;/code&amp;gt; de l'hôte géré et ses privilèges de commande &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; peuvent être révoqués, sans répercussion sur les autres administrateurs.&lt;br /&gt;
&lt;br /&gt;
Ce serveur central peut avantageusement héberger les services &amp;lt;code&amp;gt;[https://www.ansible.com/products/awx-project/faq awx]&amp;lt;/code&amp;gt; ou la version supportée par Red Hat &amp;lt;code&amp;gt;[https://www.ansible.com/products/tower Ansible Tower]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tester régulièrement =&lt;br /&gt;
&lt;br /&gt;
Il est bien évident qu'il faut tester les playbooks aussi bien au cours de la phase de développement que pendant l'exécution des playbooks eux-même.  En effet, Ansible offre cette possibilité de s'auto-valider en définissant des tâches spécifiques permettant de vérifier une étape précédente d'un playbook.&lt;br /&gt;
&lt;br /&gt;
== Test des résultats des tâches ==&lt;br /&gt;
Si on a besoin de confirmer la réussite d'une tâche, vérifiez le résultat de la tâche au lieu de faire confiance au code de retour du module.&lt;br /&gt;
Il existe plusieurs moyens de valider une tâche, en fonction du module concerné.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exemple : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
- Start web server&lt;br /&gt;
  service:&lt;br /&gt;
    name: httpd&lt;br /&gt;
    status: started&lt;br /&gt;
- name: Check web site from web server&lt;br /&gt;
  uri:&lt;br /&gt;
    url: http://{{ ansible_fqdn }}&lt;br /&gt;
    return_content: yes&lt;br /&gt;
  register: example_webpage&lt;br /&gt;
  failed_when: example_webpage.status != 200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Utilisation de block/rescue pour effectuer une récupération ou une restauration  ==&lt;br /&gt;
&lt;br /&gt;
La directive &amp;lt;code&amp;gt;block&amp;lt;/code&amp;gt; est utile pour regrouper des tâches ; lorsqu'elle est associée à la directive&lt;br /&gt;
&amp;lt;code&amp;gt;rescue&amp;lt;/code&amp;gt;, elle est utile lorsqu'il s'agit d'effectuer une récupération après des erreurs ou des pannes.&lt;br /&gt;
&lt;br /&gt;
Exemple : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
- block:&lt;br /&gt;
  - name: Check web site from web server&lt;br /&gt;
    uri:&lt;br /&gt;
      url: http://{{ ansible_fqdn }}&lt;br /&gt;
      return_content: yes&lt;br /&gt;
    register: example_webpage&lt;br /&gt;
    failed_when: example_webpage.status != 200&lt;br /&gt;
  rescue:&lt;br /&gt;
    - name: Restart web server&lt;br /&gt;
      service:&lt;br /&gt;
        name: httpd&lt;br /&gt;
        status: restarted&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Outils de test ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ansible-playbook --syntax-check&amp;lt;/code&amp;gt; : pour vérifier la syntaxe d'un playbook (sans l'exécuter)&lt;br /&gt;
* &amp;lt;code&amp;gt;ansible-playbook --check&amp;lt;/code&amp;gt; : Exécute un playbook en mode &amp;quot;vérification&amp;quot;&lt;br /&gt;
{{NOTE&lt;br /&gt;
|contenu=&lt;br /&gt;
Cette vérification ne garantit pas une précision parfaite, étant donné que le playbook peut avoir besoin d'exécuter réellement certaines tâches avant que les tâches ultérieures du playbook ne fonctionnent correctement. Certaines tâches peuvent être marquées avec la directive check_mode: no. Ces tâches s'exécutent même en mode vérification.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{NOTE&lt;br /&gt;
|contenu=&lt;br /&gt;
Il existe d'autres outils. Par exemple :&lt;br /&gt;
L'outil &amp;lt;code&amp;gt;ansible-lint&amp;lt;/code&amp;gt; analyse un playbook et recherche les problèmes éventuels. Tous les problèmes signalés n'interrompront pas forcément le fonctionnement du playbook, mais les problèmes signalés peuvent indiquer la présence d'une erreur.&lt;br /&gt;
L'outil &amp;lt;code&amp;gt;yamllint&amp;lt;/code&amp;gt; analyse un fichier YAML et tente d'identifier les problèmes liés à la syntaxe YAML. Cet outil n'a pas une connaissance directe d'Ansible, mais il peut intercepter des problèmes potentiels de syntaxe YAML.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Network/Juniper&amp;diff=472</id>
		<title>Network/Juniper</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Network/Juniper&amp;diff=472"/>
		<updated>2022-11-24T17:57:48Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec « {{MediaWiki}} &amp;lt;br&amp;gt; *  Petit guide de survie - '''Juniper'''  »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Network/Juniper/Survival_guide| Petit guide de survie - '''Juniper''' ]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:Bo%C3%AEte_%C3%A0_Outils&amp;diff=471</id>
		<title>Modèle:Boîte à Outils</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:Bo%C3%AEte_%C3%A0_Outils&amp;diff=471"/>
		<updated>2022-11-24T17:53:46Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[Tools/Ansible|Ansible]]&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[Tools/Gitlab|Gitlab]]&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span class=&amp;quot;foo&amp;quot;&amp;gt;[[Network/Juniper|Commandes utiles sous Juniper]]&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=470</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Initiator</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=470"/>
		<updated>2022-08-31T08:33:08Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9 systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet article est une transposition sous MediaWiki de ces 2 adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI is an acronym that stands for Internet Small Computer Systems Interface. It is a Storage Area Network (SAN) Protocol that enables block-level SCSI data transport from Storage arrays to client computers that are not directly connected to them. iSCSI SAN consists of iSCSI Initiators which are the clients and iSCSI targets which are the servers on Storage Array controllers. They are connected by an iSCSI protocol and represented by a unique string known as iSCSI Qualified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
In iSCSI technology, the iSCSI initiator or commonly known as the iSCSI client needs to be installed on your system. It is then added to an initiator group or what is also known as the Client definition. These groups help identify which clients are allowed to connect with the storage server (the iSCSI targets). Logical Unit Numbers (LUNs) are created and assigned to a group or client definition. LUNs are representations of devices that are part of the physical iSCSI target. If the Client and server are on the same IP network, The initiator can automatically discover the target. Once connected, the LUN is available for use.&lt;br /&gt;
&lt;br /&gt;
=iSCSI Initiator=&lt;br /&gt;
&lt;br /&gt;
=Setup pre-reqs=&lt;br /&gt;
An IP of the Target needs to be known. I will use the iSCSI target from the  [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target|Configure iSCSI target]] guide. You can also follow the steps in that guide to create a target.&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9 systems=&lt;br /&gt;
- Update your system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or &lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install iSCSI initiator utilities with the following command.&lt;br /&gt;
 sudo dnf -y install iscsi-initiator-utils&lt;br /&gt;
&lt;br /&gt;
- Check the initiator name using the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
InitiatorName=iqn.1994-05.com.redhat:4e8ff68af729&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you changed the name while setting up iSCSI target ACLs. You will have to configure the initiator file to the new name.&lt;br /&gt;
 sudo vi /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
&lt;br /&gt;
- Change the initiator’s name to match the one set on the target server.&lt;br /&gt;
 InitiatorName=iqn.1994-05.com.redhat:4e8ff68af729&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file.&lt;br /&gt;
- [OPTIONAL] Edit the iSCSI configuration file to add the authentication details.&lt;br /&gt;
 sudo vi /etc/iscsi/iscsid.conf&lt;br /&gt;
- Uncomment the following lines and edit as shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
node.session.auth.authmethod = CHAP&lt;br /&gt;
node.session.auth.username = technix&lt;br /&gt;
node.session.auth.password = technix_passwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file, then start the iSCSI daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl start iscsid.service&lt;br /&gt;
sudo systemctl enable iscsid.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Discover the target by using the target’s IP address as shown below. The response will be the target’s IP address and iQN address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m discovery -t st -p 192.168.200.40&lt;br /&gt;
192.168.200.40:3260,1 iqn.2022-06.com.redhat:technixleo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm its status after discovery.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -o show&lt;br /&gt;
&lt;br /&gt;
##Sample Outpout ##&lt;br /&gt;
# BEGIN RECORD 2.1.4&lt;br /&gt;
node.name = iqn.2022-06.com.redhat:technixleo&lt;br /&gt;
node.tpgt = 1&lt;br /&gt;
node.startup = automatic&lt;br /&gt;
node.leading_login = No&lt;br /&gt;
iface.iscsi_ifacename = default&lt;br /&gt;
.....&lt;br /&gt;
.....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- You can log in to the server using the iQN&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -T iqn.2022-06.com.redhat:technixleo -l&lt;br /&gt;
Logging in to [iface: default, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260]&lt;br /&gt;
Login to [iface: default, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260] successful.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm the established session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m session -o show&lt;br /&gt;
tcp: [2] 192.168.200.40:3260,1 iqn.2022-06.com.redhat:technixleo (non-flash)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm the partitions with the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /proc/partitions&lt;br /&gt;
&lt;br /&gt;
major minor  #blocks  name&lt;br /&gt;
&lt;br /&gt;
   8        0   33554432 sda&lt;br /&gt;
   8        1    1048576 sda1&lt;br /&gt;
   8        2   32504832 sda2&lt;br /&gt;
  11        0    8519680 sr0&lt;br /&gt;
 253        0   29143040 dm-0&lt;br /&gt;
 253        1    3358720 dm-1&lt;br /&gt;
   8       16    5242880 sdb&lt;br /&gt;
   8       32   33554432 sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new partition ‘sdb‘ of size 5GB has been added from the target server.&lt;br /&gt;
To find the iSCSI disk name you can also use the following command.&lt;br /&gt;
&lt;br /&gt;
 $ sudo grep &amp;quot;Attached SCSI&amp;quot; /var/log/messages&lt;br /&gt;
 Jul 30 10:30:02 cent9 kernel: sd 3:0:0:0: [sdb] Attached SCSI disk&lt;br /&gt;
&lt;br /&gt;
Next, we are going to create a file on that disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.ext4 /dev/sdb&lt;br /&gt;
Creating filesystem with 1310720 4k blocks and 327680 inodes&lt;br /&gt;
Filesystem UUID: b0acbfbc-106d-41aa-9446-b26182841ac8&lt;br /&gt;
Superblock backups stored on blocks: &lt;br /&gt;
	32768, 98304, 163840, 229376, 294912, 819200, 884736&lt;br /&gt;
&lt;br /&gt;
Allocating group tables: done                            &lt;br /&gt;
Writing inode tables: done                            &lt;br /&gt;
Creating journal (16384 blocks): done&lt;br /&gt;
Writing superblocks and filesystem accounting information: done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the file system. This is done by first creating a directory to mount the file and then mounting the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /mnt/iscsi&lt;br /&gt;
sudo mount /dev/sdb /mnt/iscsi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the file system has been mounted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ df -hT&lt;br /&gt;
Filesystem          Type      Size  Used Avail Use% Mounted on&lt;br /&gt;
devtmpfs            devtmpfs  4.0M     0  4.0M   0% /dev&lt;br /&gt;
tmpfs               tmpfs     3.8G     0  3.8G   0% /dev/shm&lt;br /&gt;
tmpfs               tmpfs     1.6G  9.2M  1.5G   1% /run&lt;br /&gt;
/dev/mapper/cs-root xfs        28G  4.6G   24G  17% /&lt;br /&gt;
/dev/sda1           xfs      1014M  466M  549M  46% /boot&lt;br /&gt;
tmpfs               tmpfs     769M   96K  768M   1% /run/user/1000&lt;br /&gt;
/dev/sr0            iso9660   8.2G  8.2G     0 100% /run/media/technixleo/CentOS-Stream-9-BaseOS-x86_64&lt;br /&gt;
/dev/sdb            ext4      4.9G   24K  4.6G   1% /mnt/iscsi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Automount ISCSI storage=&lt;br /&gt;
&lt;br /&gt;
To make the file persistent even on boot, edit the fstab file. But first Identify the UUID of the ISCSI disk.&lt;br /&gt;
 $ sudo blkid /dev/sdb&lt;br /&gt;
 /dev/sdb: UUID=&amp;quot;b0acbfbc-106d-41aa-9446-b26182841ac8&amp;quot; BLOCK_SIZE=&amp;quot;4096&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
- Open the fstab file and add the UUID of the ISCSI disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo vi /etc/fstab&lt;br /&gt;
UUID=b0acbfbc-106d-41aa-9446-b26182841ac8 /mnt/iscsi      ext4         _netdev                      0 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file.&lt;br /&gt;
&lt;br /&gt;
You can verify the disk has been mounted.&lt;br /&gt;
 $ mount&lt;br /&gt;
 ....&lt;br /&gt;
 /dev/sdb on /mnt/iscsi type ext4 (rw,relatime,seclabel,stripe=2048)&lt;br /&gt;
&lt;br /&gt;
To unmount a disk&lt;br /&gt;
&lt;br /&gt;
 sudo umount /mnt/iscsi&lt;br /&gt;
&lt;br /&gt;
To log out of a session, use the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -T  iqn.2022-06.com.redhat:technixleo -u&lt;br /&gt;
Logging out of session [sid: 1, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260]&lt;br /&gt;
Logout of [sid: 1, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260] successful.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=469</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Initiator</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=469"/>
		<updated>2022-08-31T08:32:37Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec « {{MediaWiki}} {{FOND_BLEU|QEMU - '''Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9'''}}  = Sites Références =  Cet article est une transposition sous MediaWiki… »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet article est une transposition sous MediaWiki de ces 2 adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI is an acronym that stands for Internet Small Computer Systems Interface. It is a Storage Area Network (SAN) Protocol that enables block-level SCSI data transport from Storage arrays to client computers that are not directly connected to them. iSCSI SAN consists of iSCSI Initiators which are the clients and iSCSI targets which are the servers on Storage Array controllers. They are connected by an iSCSI protocol and represented by a unique string known as iSCSI Qualified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
In iSCSI technology, the iSCSI initiator or commonly known as the iSCSI client needs to be installed on your system. It is then added to an initiator group or what is also known as the Client definition. These groups help identify which clients are allowed to connect with the storage server (the iSCSI targets). Logical Unit Numbers (LUNs) are created and assigned to a group or client definition. LUNs are representations of devices that are part of the physical iSCSI target. If the Client and server are on the same IP network, The initiator can automatically discover the target. Once connected, the LUN is available for use.&lt;br /&gt;
&lt;br /&gt;
=iSCSI Initiator=&lt;br /&gt;
&lt;br /&gt;
=Setup pre-reqs=&lt;br /&gt;
An IP of the Target needs to be known. I will use the iSCSI target from the  [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target|Configure iSCSI target]] guide. You can also follow the steps in that guide to create a target.&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9 systems=&lt;br /&gt;
- Update your system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or &lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install iSCSI initiator utilities with the following command.&lt;br /&gt;
 sudo dnf -y install iscsi-initiator-utils&lt;br /&gt;
&lt;br /&gt;
- Check the initiator name using the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
InitiatorName=iqn.1994-05.com.redhat:4e8ff68af729&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you changed the name while setting up iSCSI target ACLs. You will have to configure the initiator file to the new name.&lt;br /&gt;
 sudo vi /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
&lt;br /&gt;
- Change the initiator’s name to match the one set on the target server.&lt;br /&gt;
 InitiatorName=iqn.1994-05.com.redhat:4e8ff68af729&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file.&lt;br /&gt;
- [OPTIONAL] Edit the iSCSI configuration file to add the authentication details.&lt;br /&gt;
 sudo vi /etc/iscsi/iscsid.conf&lt;br /&gt;
- Uncomment the following lines and edit as shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
node.session.auth.authmethod = CHAP&lt;br /&gt;
node.session.auth.username = technix&lt;br /&gt;
node.session.auth.password = technix_passwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file, then start the iSCSI daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl start iscsid.service&lt;br /&gt;
sudo systemctl enable iscsid.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Discover the target by using the target’s IP address as shown below. The response will be the target’s IP address and iQN address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m discovery -t st -p 192.168.200.40&lt;br /&gt;
192.168.200.40:3260,1 iqn.2022-06.com.redhat:technixleo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm its status after discovery.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -o show&lt;br /&gt;
&lt;br /&gt;
##Sample Outpout ##&lt;br /&gt;
# BEGIN RECORD 2.1.4&lt;br /&gt;
node.name = iqn.2022-06.com.redhat:technixleo&lt;br /&gt;
node.tpgt = 1&lt;br /&gt;
node.startup = automatic&lt;br /&gt;
node.leading_login = No&lt;br /&gt;
iface.iscsi_ifacename = default&lt;br /&gt;
.....&lt;br /&gt;
.....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- You can log in to the server using the iQN&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -T iqn.2022-06.com.redhat:technixleo -l&lt;br /&gt;
Logging in to [iface: default, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260]&lt;br /&gt;
Login to [iface: default, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260] successful.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm the established session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m session -o show&lt;br /&gt;
tcp: [2] 192.168.200.40:3260,1 iqn.2022-06.com.redhat:technixleo (non-flash)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm the partitions with the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /proc/partitions&lt;br /&gt;
&lt;br /&gt;
major minor  #blocks  name&lt;br /&gt;
&lt;br /&gt;
   8        0   33554432 sda&lt;br /&gt;
   8        1    1048576 sda1&lt;br /&gt;
   8        2   32504832 sda2&lt;br /&gt;
  11        0    8519680 sr0&lt;br /&gt;
 253        0   29143040 dm-0&lt;br /&gt;
 253        1    3358720 dm-1&lt;br /&gt;
   ''8       16    5242880 sdb''&lt;br /&gt;
   8       32   33554432 sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new partition ‘sdb‘ of size 5GB has been added from the target server.&lt;br /&gt;
To find the iSCSI disk name you can also use the following command.&lt;br /&gt;
&lt;br /&gt;
 $ sudo grep &amp;quot;Attached SCSI&amp;quot; /var/log/messages&lt;br /&gt;
 Jul 30 10:30:02 cent9 kernel: sd 3:0:0:0: [sdb] Attached SCSI disk&lt;br /&gt;
&lt;br /&gt;
Next, we are going to create a file on that disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.ext4 /dev/sdb&lt;br /&gt;
Creating filesystem with 1310720 4k blocks and 327680 inodes&lt;br /&gt;
Filesystem UUID: b0acbfbc-106d-41aa-9446-b26182841ac8&lt;br /&gt;
Superblock backups stored on blocks: &lt;br /&gt;
	32768, 98304, 163840, 229376, 294912, 819200, 884736&lt;br /&gt;
&lt;br /&gt;
Allocating group tables: done                            &lt;br /&gt;
Writing inode tables: done                            &lt;br /&gt;
Creating journal (16384 blocks): done&lt;br /&gt;
Writing superblocks and filesystem accounting information: done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the file system. This is done by first creating a directory to mount the file and then mounting the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /mnt/iscsi&lt;br /&gt;
sudo mount /dev/sdb /mnt/iscsi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the file system has been mounted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ df -hT&lt;br /&gt;
Filesystem          Type      Size  Used Avail Use% Mounted on&lt;br /&gt;
devtmpfs            devtmpfs  4.0M     0  4.0M   0% /dev&lt;br /&gt;
tmpfs               tmpfs     3.8G     0  3.8G   0% /dev/shm&lt;br /&gt;
tmpfs               tmpfs     1.6G  9.2M  1.5G   1% /run&lt;br /&gt;
/dev/mapper/cs-root xfs        28G  4.6G   24G  17% /&lt;br /&gt;
/dev/sda1           xfs      1014M  466M  549M  46% /boot&lt;br /&gt;
tmpfs               tmpfs     769M   96K  768M   1% /run/user/1000&lt;br /&gt;
/dev/sr0            iso9660   8.2G  8.2G     0 100% /run/media/technixleo/CentOS-Stream-9-BaseOS-x86_64&lt;br /&gt;
/dev/sdb            ext4      4.9G   24K  4.6G   1% /mnt/iscsi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Automount ISCSI storage=&lt;br /&gt;
&lt;br /&gt;
To make the file persistent even on boot, edit the fstab file. But first Identify the UUID of the ISCSI disk.&lt;br /&gt;
 $ sudo blkid /dev/sdb&lt;br /&gt;
 /dev/sdb: UUID=&amp;quot;b0acbfbc-106d-41aa-9446-b26182841ac8&amp;quot; BLOCK_SIZE=&amp;quot;4096&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
- Open the fstab file and add the UUID of the ISCSI disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo vi /etc/fstab&lt;br /&gt;
UUID=b0acbfbc-106d-41aa-9446-b26182841ac8 /mnt/iscsi      ext4         _netdev                      0 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file.&lt;br /&gt;
&lt;br /&gt;
You can verify the disk has been mounted.&lt;br /&gt;
 $ mount&lt;br /&gt;
 ....&lt;br /&gt;
 /dev/sdb on /mnt/iscsi type ext4 (rw,relatime,seclabel,stripe=2048)&lt;br /&gt;
&lt;br /&gt;
To unmount a disk&lt;br /&gt;
&lt;br /&gt;
 sudo umount /mnt/iscsi&lt;br /&gt;
&lt;br /&gt;
To log out of a session, use the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -T  iqn.2022-06.com.redhat:technixleo -u&lt;br /&gt;
Logging out of session [sid: 1, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260]&lt;br /&gt;
Logout of [sid: 1, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260] successful.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=468</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=468"/>
		<updated>2022-08-31T08:15:57Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Sites Références */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet article est une transposition sous MediaWiki de ces 2 adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&lt;br /&gt;
An iSCSI Portal adds an IP address and a port to the target that keeps the target enabled.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the Portals directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/portals&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, The iSCSI portal is set to listen to all IP addresses with the default port number that is: 0.0.0.0:3260. Delete the default portal with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; delete ip_address=0.0.0.0 ip_port=3260&lt;br /&gt;
Deleted network portal 0.0.0.0:3260&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create the new portal and specify the IP address to enable the target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; create 192.168.200.47&lt;br /&gt;
Using default IP port 3260&lt;br /&gt;
Created network portal 192.168.200.47:3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the portal created.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; ls&lt;br /&gt;
o- portals ........................................................ [Portals: 1]&lt;br /&gt;
  o- 192.168.200.47:3260 .................................................. [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
- Create LUN of the create storage object above. Navigate to the iSCSI target directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/luns&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Set the LUN for the created backstores with the following commands.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/fileio/disk1&lt;br /&gt;
Created LUN 0.&lt;br /&gt;
&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/block/block1&lt;br /&gt;
Created LUN 1.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the creates LUN&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; ls&lt;br /&gt;
o- luns .............................................................. [LUNs: 2]&lt;br /&gt;
  o- lun0 ................... [fileio/disk1 (/tmp/disk1.img) (default_tg_pt_gp)]&lt;br /&gt;
  o- lun1 ......................... [block/block1 (/dev/vdb) (default_tg_pt_gp)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&lt;br /&gt;
Access Control Lists are used to configure access rules that each initiator has access to LUNs. To configure an ACL you should have the unique identifier for an initiator.&lt;br /&gt;
&lt;br /&gt;
If you have installed an initiator, you can check its name with the following command on the client machine. I am using the initiator name installed on my client machine on the [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator|Configure an iSCSI Initiator]] guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
InitiatorName=iqn.1994-05.com.redhat:1cf224abfeb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Once you have the initiator name, navigate to your iSCSI target and then to the ACL directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/acls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create an ACL using the initiator name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; create &amp;lt;initiator name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can create an initiator name that is easy to remember with the iQN format as shown below. You will also have to change the initiator name on the client machine to match.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; create iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
Created Node ACL for iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
Created mapped LUN 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Set the user-created ACL within the TPG node on the target server.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1&amp;gt; set attribute generate_node_acls=1&lt;br /&gt;
 Parameter generate_node_acls is now '1'.&lt;br /&gt;
&lt;br /&gt;
- Verify the created ACL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; ls&lt;br /&gt;
o- acls .............................................................. [ACLs: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.initiator:initiator1 ............. [Mapped LUNs: 1]&lt;br /&gt;
    o- mapped_lun0 .................................... [lun0 fileio/disk1 (rw)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
You can use the Challenge-Handshake Authentication Protocol (CHAP) to protect the target server with a password. The initiator should also be configured with the password to be able to connect to the target.&lt;br /&gt;
&lt;br /&gt;
- Set the attribute authentication with the following command.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1&amp;gt; set attribute authentication=1&lt;br /&gt;
 Parameter authentication is now '1'.&lt;br /&gt;
&lt;br /&gt;
- Change directory to the newly created initiator.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1/acls&amp;gt; cd iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
&lt;br /&gt;
- Then set the user-id and Password.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...or:initiator1&amp;gt; set auth userid=technix&lt;br /&gt;
Parameter userid is now 'technix'.&lt;br /&gt;
&lt;br /&gt;
/iscsi/iqn.20...or:initiator1&amp;gt; set auth password=technix_passwd&lt;br /&gt;
Parameter password is now 'technix_passwd'.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...or:initiator1&amp;gt; exit&lt;br /&gt;
lobal pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Check where the target port is listening using the following command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ netstat -tnlp | grep 3260&lt;br /&gt;
tcp        0      0 192.168.200.47:3260     0.0.0.0:*               LISTEN&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next read through our guide on how to configure iSCSI Initiator:&lt;br /&gt;
&lt;br /&gt;
[[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator|Configure an iSCSI Initiator on CentOS 9/AlmaLinux 9/RHEL 9]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=467</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=467"/>
		<updated>2022-08-31T08:15:16Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Setup CHAP for the target */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&lt;br /&gt;
An iSCSI Portal adds an IP address and a port to the target that keeps the target enabled.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the Portals directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/portals&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, The iSCSI portal is set to listen to all IP addresses with the default port number that is: 0.0.0.0:3260. Delete the default portal with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; delete ip_address=0.0.0.0 ip_port=3260&lt;br /&gt;
Deleted network portal 0.0.0.0:3260&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create the new portal and specify the IP address to enable the target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; create 192.168.200.47&lt;br /&gt;
Using default IP port 3260&lt;br /&gt;
Created network portal 192.168.200.47:3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the portal created.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; ls&lt;br /&gt;
o- portals ........................................................ [Portals: 1]&lt;br /&gt;
  o- 192.168.200.47:3260 .................................................. [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
- Create LUN of the create storage object above. Navigate to the iSCSI target directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/luns&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Set the LUN for the created backstores with the following commands.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/fileio/disk1&lt;br /&gt;
Created LUN 0.&lt;br /&gt;
&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/block/block1&lt;br /&gt;
Created LUN 1.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the creates LUN&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; ls&lt;br /&gt;
o- luns .............................................................. [LUNs: 2]&lt;br /&gt;
  o- lun0 ................... [fileio/disk1 (/tmp/disk1.img) (default_tg_pt_gp)]&lt;br /&gt;
  o- lun1 ......................... [block/block1 (/dev/vdb) (default_tg_pt_gp)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&lt;br /&gt;
Access Control Lists are used to configure access rules that each initiator has access to LUNs. To configure an ACL you should have the unique identifier for an initiator.&lt;br /&gt;
&lt;br /&gt;
If you have installed an initiator, you can check its name with the following command on the client machine. I am using the initiator name installed on my client machine on the [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator|Configure an iSCSI Initiator]] guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
InitiatorName=iqn.1994-05.com.redhat:1cf224abfeb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Once you have the initiator name, navigate to your iSCSI target and then to the ACL directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/acls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create an ACL using the initiator name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; create &amp;lt;initiator name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can create an initiator name that is easy to remember with the iQN format as shown below. You will also have to change the initiator name on the client machine to match.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; create iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
Created Node ACL for iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
Created mapped LUN 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Set the user-created ACL within the TPG node on the target server.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1&amp;gt; set attribute generate_node_acls=1&lt;br /&gt;
 Parameter generate_node_acls is now '1'.&lt;br /&gt;
&lt;br /&gt;
- Verify the created ACL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; ls&lt;br /&gt;
o- acls .............................................................. [ACLs: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.initiator:initiator1 ............. [Mapped LUNs: 1]&lt;br /&gt;
    o- mapped_lun0 .................................... [lun0 fileio/disk1 (rw)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
You can use the Challenge-Handshake Authentication Protocol (CHAP) to protect the target server with a password. The initiator should also be configured with the password to be able to connect to the target.&lt;br /&gt;
&lt;br /&gt;
- Set the attribute authentication with the following command.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1&amp;gt; set attribute authentication=1&lt;br /&gt;
 Parameter authentication is now '1'.&lt;br /&gt;
&lt;br /&gt;
- Change directory to the newly created initiator.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1/acls&amp;gt; cd iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
&lt;br /&gt;
- Then set the user-id and Password.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...or:initiator1&amp;gt; set auth userid=technix&lt;br /&gt;
Parameter userid is now 'technix'.&lt;br /&gt;
&lt;br /&gt;
/iscsi/iqn.20...or:initiator1&amp;gt; set auth password=technix_passwd&lt;br /&gt;
Parameter password is now 'technix_passwd'.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...or:initiator1&amp;gt; exit&lt;br /&gt;
lobal pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Check where the target port is listening using the following command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ netstat -tnlp | grep 3260&lt;br /&gt;
tcp        0      0 192.168.200.47:3260     0.0.0.0:*               LISTEN&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next read through our guide on how to configure iSCSI Initiator:&lt;br /&gt;
&lt;br /&gt;
[[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator|Configure an iSCSI Initiator on CentOS 9/AlmaLinux 9/RHEL 9]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=466</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=466"/>
		<updated>2022-08-31T08:12:00Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Creating an iSCSI ACL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&lt;br /&gt;
An iSCSI Portal adds an IP address and a port to the target that keeps the target enabled.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the Portals directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/portals&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, The iSCSI portal is set to listen to all IP addresses with the default port number that is: 0.0.0.0:3260. Delete the default portal with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; delete ip_address=0.0.0.0 ip_port=3260&lt;br /&gt;
Deleted network portal 0.0.0.0:3260&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create the new portal and specify the IP address to enable the target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; create 192.168.200.47&lt;br /&gt;
Using default IP port 3260&lt;br /&gt;
Created network portal 192.168.200.47:3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the portal created.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; ls&lt;br /&gt;
o- portals ........................................................ [Portals: 1]&lt;br /&gt;
  o- 192.168.200.47:3260 .................................................. [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
- Create LUN of the create storage object above. Navigate to the iSCSI target directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/luns&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Set the LUN for the created backstores with the following commands.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/fileio/disk1&lt;br /&gt;
Created LUN 0.&lt;br /&gt;
&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/block/block1&lt;br /&gt;
Created LUN 1.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the creates LUN&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; ls&lt;br /&gt;
o- luns .............................................................. [LUNs: 2]&lt;br /&gt;
  o- lun0 ................... [fileio/disk1 (/tmp/disk1.img) (default_tg_pt_gp)]&lt;br /&gt;
  o- lun1 ......................... [block/block1 (/dev/vdb) (default_tg_pt_gp)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&lt;br /&gt;
Access Control Lists are used to configure access rules that each initiator has access to LUNs. To configure an ACL you should have the unique identifier for an initiator.&lt;br /&gt;
&lt;br /&gt;
If you have installed an initiator, you can check its name with the following command on the client machine. I am using the initiator name installed on my client machine on the [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator|Configure an iSCSI Initiator]] guide.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
InitiatorName=iqn.1994-05.com.redhat:1cf224abfeb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Once you have the initiator name, navigate to your iSCSI target and then to the ACL directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/acls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create an ACL using the initiator name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; create &amp;lt;initiator name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can create an initiator name that is easy to remember with the iQN format as shown below. You will also have to change the initiator name on the client machine to match.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; create iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
Created Node ACL for iqn.2022-06.com.example.initiator:initiator1&lt;br /&gt;
Created mapped LUN 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Set the user-created ACL within the TPG node on the target server.&lt;br /&gt;
 /iscsi/iqn.20...leo/tpg1&amp;gt; set attribute generate_node_acls=1&lt;br /&gt;
 Parameter generate_node_acls is now '1'.&lt;br /&gt;
&lt;br /&gt;
- Verify the created ACL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/acls&amp;gt; ls&lt;br /&gt;
o- acls .............................................................. [ACLs: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.initiator:initiator1 ............. [Mapped LUNs: 1]&lt;br /&gt;
    o- mapped_lun0 .................................... [lun0 fileio/disk1 (rw)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=465</id>
		<title>DOCS/UNIX/RHEL</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=465"/>
		<updated>2022-08-31T08:09:10Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Stockage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}} &lt;br /&gt;
&lt;br /&gt;
{{FOND_BLEU|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9}}&lt;br /&gt;
&lt;br /&gt;
=Réseau=&lt;br /&gt;
==Bonding/Bridges/VLAN==&lt;br /&gt;
* [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
=Stockage=&lt;br /&gt;
* [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target|Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9]]&lt;br /&gt;
* [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator|Configure iSCSI Initiator on CentOS 9/AlmaLinux 9:RHEL 9]]&lt;br /&gt;
&lt;br /&gt;
=Mises à jour OS=&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=464</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=464"/>
		<updated>2022-08-31T08:07:06Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Creating an iSCSI LUN */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&lt;br /&gt;
An iSCSI Portal adds an IP address and a port to the target that keeps the target enabled.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the Portals directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/portals&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, The iSCSI portal is set to listen to all IP addresses with the default port number that is: 0.0.0.0:3260. Delete the default portal with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; delete ip_address=0.0.0.0 ip_port=3260&lt;br /&gt;
Deleted network portal 0.0.0.0:3260&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create the new portal and specify the IP address to enable the target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; create 192.168.200.47&lt;br /&gt;
Using default IP port 3260&lt;br /&gt;
Created network portal 192.168.200.47:3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the portal created.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; ls&lt;br /&gt;
o- portals ........................................................ [Portals: 1]&lt;br /&gt;
  o- 192.168.200.47:3260 .................................................. [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
- Create LUN of the create storage object above. Navigate to the iSCSI target directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/luns&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Set the LUN for the created backstores with the following commands.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/fileio/disk1&lt;br /&gt;
Created LUN 0.&lt;br /&gt;
&lt;br /&gt;
/iscsi/iqn.20...leo/tpg1/luns&amp;gt; create /backstores/block/block1&lt;br /&gt;
Created LUN 1.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the creates LUN&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; ls&lt;br /&gt;
o- luns .............................................................. [LUNs: 2]&lt;br /&gt;
  o- lun0 ................... [fileio/disk1 (/tmp/disk1.img) (default_tg_pt_gp)]&lt;br /&gt;
  o- lun1 ......................... [block/block1 (/dev/vdb) (default_tg_pt_gp)]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=463</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=463"/>
		<updated>2022-08-31T08:05:42Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Creating an iSCSI Portal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&lt;br /&gt;
An iSCSI Portal adds an IP address and a port to the target that keeps the target enabled.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the Portals directory.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /iscsi/iqn.2022-06.com.example.target:technixleo/tpg1/portals&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, The iSCSI portal is set to listen to all IP addresses with the default port number that is: 0.0.0.0:3260. Delete the default portal with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; delete ip_address=0.0.0.0 ip_port=3260&lt;br /&gt;
Deleted network portal 0.0.0.0:3260&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then create the new portal and specify the IP address to enable the target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; create 192.168.200.47&lt;br /&gt;
Using default IP port 3260&lt;br /&gt;
Created network portal 192.168.200.47:3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the portal created.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi/iqn.20.../tpg1/portals&amp;gt; ls&lt;br /&gt;
o- portals ........................................................ [Portals: 1]&lt;br /&gt;
  o- 192.168.200.47:3260 .................................................. [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=462</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=462"/>
		<updated>2022-08-31T08:03:48Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create a block storage object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=461</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=461"/>
		<updated>2022-08-31T08:03:25Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create a block storage object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
Block devices include physical devices like HDDs, SSDs, CDs, and DVDs, and logical devices such as software or hardware RAID volumes, or LVM volumes.&lt;br /&gt;
&lt;br /&gt;
- Navigate to the block of the backstores directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/block&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a block storage object with the following command. Use a disk that is not in use.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/block&amp;gt; create name=block1 dev=/dev/vdb&lt;br /&gt;
Created block storage object block1 using /dev/vdb.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created block storage.&lt;br /&gt;
/backstores/block&amp;gt; ls&lt;br /&gt;
o- block .................................................. [Storage Objects: 1]&lt;br /&gt;
  o- block1 ........................ [/dev/vdb (10.0GiB) write-thru deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=460</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=460"/>
		<updated>2022-08-31T08:02:03Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create fileio storage object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=459</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=459"/>
		<updated>2022-08-31T08:01:49Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create fileio storage object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&lt;br /&gt;
-Navigate to the fileio on the backstore directory. The backstore is the device where the storage is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd /backstores/fileio&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create a file storage object named disk1 in a directory say /tmp/disk1.img of size 5GB. You can create a different directory to store the disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; create disk1 /tmp/disk1.img 5G&lt;br /&gt;
Created fileio disk1 with size 5368709120&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the created storage object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/backstores/fileio&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- fileio ................................................. [Storage Objects: 1]&lt;br /&gt;
  o- disk1 .................... [/tmp/disk1.img (5.0GiB) write-back deactivated]&lt;br /&gt;
    o- alua ................................................... [ALUA Groups: 1]&lt;br /&gt;
      o- default_tg_pt_gp ....................... [ALUA state: Active/optimized]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=458</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=458"/>
		<updated>2022-08-31T08:00:32Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create a block storage object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a block storage object===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=457</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=457"/>
		<updated>2022-08-31T08:00:09Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create fileio storage object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create fileio storage object===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create a block storage object==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=456</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=456"/>
		<updated>2022-08-31T07:59:51Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Create iSCSI Backstore */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&lt;br /&gt;
You can create backstore devices of any of the following 4 types&lt;br /&gt;
&lt;br /&gt;
*fileio backstore for files&lt;br /&gt;
*block backstore for block devices.&lt;br /&gt;
*pscsi backstore for direct pass-through of SCSI commands.&lt;br /&gt;
*ramdisk backstore for a temporary RAM-backed device.&lt;br /&gt;
&lt;br /&gt;
For this guide, I will create one for fileio and block backstores&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create fileio storage object==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create a block storage object==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=455</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=455"/>
		<updated>2022-08-31T07:58:01Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
To configure an iSCSI Target, we will use the following details&lt;br /&gt;
&lt;br /&gt;
* iSCSI target with a unique iQN.&lt;br /&gt;
* iSCSI Backstore – is a storage object that defines the resources that the backstore uses.&lt;br /&gt;
* Create iSCSI Portal.&lt;br /&gt;
* Setup iSCSI LUN.&lt;br /&gt;
* Creating an iSCSI ACL.&lt;br /&gt;
* Setup CHAP Authentication.&lt;br /&gt;
&lt;br /&gt;
==Create an iSCSI target==&lt;br /&gt;
&lt;br /&gt;
The target name is in the iQN format. iQN format is as follows &amp;lt;code&amp;gt;iqn.YYYY-MM.reverse.domain.name:OptionalIdentifier&amp;lt;/code&amp;gt;. Let’s say I was to name a target with an iQN unique string with the name technixleo and my domain is target.example.com the iqn name will be as &amp;lt;code&amp;gt;iqn.2022-06.com.example.target:technixleo&amp;lt;/code&amp;gt;&lt;br /&gt;
- Login to the admin console of the target CLI shell.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo targetcli&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- Navigate to the iSCSI directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; cd iscsi/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Create the iSCSI target as shown below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; create iqn.2022-06.com.example.target:technixleo&lt;br /&gt;
&lt;br /&gt;
Created target iqn.2022-06.com.example.target:technixleo.&lt;br /&gt;
Created TPG 1.&lt;br /&gt;
Global pref auto_add_default_portal=true&lt;br /&gt;
Created default portal listening on all IPs (0.0.0.0), port 3260.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Then verify the created target.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/iscsi&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
o- iscsi .......................................................... [Targets: 1]&lt;br /&gt;
  o- iqn.2022-06.com.example.target:technixleo ....................... [TPGs: 1]&lt;br /&gt;
    o- tpg1 ............................................. [no-gen-acls, no-auth]&lt;br /&gt;
      o- acls ........................................................ [ACLs: 0]&lt;br /&gt;
      o- luns ........................................................ [LUNs: 0]&lt;br /&gt;
      o- portals .................................................. [Portals: 1]&lt;br /&gt;
        o- 0.0.0.0:3260 ................................................... [OK]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create iSCSI Backstore==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create fileio storage object==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create a block storage object==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI Portal==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI LUN==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating an iSCSI ACL==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup CHAP for the target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=454</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=454"/>
		<updated>2022-08-31T07:51:29Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- List using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt; ls&lt;br /&gt;
o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- block .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- fileio ............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- pscsi .............................................. [Storage Objects: 0]&lt;br /&gt;
  | o- ramdisk ............................................ [Storage Objects: 0]&lt;br /&gt;
  o- iscsi ........................................................ [Targets: 0]&lt;br /&gt;
  o- loopback ..................................................... [Targets: 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Exit the shell using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/&amp;gt; exit&lt;br /&gt;
Global pref auto_save_on_exit=true&lt;br /&gt;
Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=453</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=453"/>
		<updated>2022-08-31T07:49:37Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Sites Références */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=452</id>
		<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Target</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target&amp;diff=452"/>
		<updated>2022-08-31T07:49:00Z</updated>

		<summary type="html">&lt;p&gt;Admin : Page créée avec «  {{MediaWiki}} {{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}  = Sites Références =  Cet articles est une transposition sous MediaWiki… »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet articles est une transposition sous MediaWiki de ces adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI stands for Internet Small Computer Systems Interface. It is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network. iSCSI components include the iSCSI target which is the server that stores and allows access to storage and iSCSI initiator which is the hardware installed on a client to send data. A basic Ethernet port or a Host Bus Adapter (HBA) is what is required to connect iSCSI targets and initiators to a network. Both components are identified by a unique name known as iSCSI Qulified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
=What is iSCSI Target?=&lt;br /&gt;
iSCSI target as discussed above is the server that stores the storage and allows access to it. It can be a dedicated physical device on a network or an iSCSI software-configured logical device on a networked storage server. It is the remote storage that appears as a local drive on a host system. The iSCSI protocol then links the host with the storage over IP networks like LAN and WAN or Internet.&lt;br /&gt;
&lt;br /&gt;
This guide shows how to configure an iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9 systems.&lt;br /&gt;
&lt;br /&gt;
=Install iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9=&lt;br /&gt;
&lt;br /&gt;
- Update the system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or&lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install the targetcli tool&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install targetcli&lt;br /&gt;
&lt;br /&gt;
- Start and enable the target service on boot time.&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable --now target&lt;br /&gt;
&lt;br /&gt;
- Open port 3260 in the firewall.&lt;br /&gt;
&lt;br /&gt;
 sudo firewall-cmd --permanent --add-port=3260/tcp&lt;br /&gt;
 sudo firewall-cmd --reload&lt;br /&gt;
&lt;br /&gt;
- To view the targetcli layout, login to the admin console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo targetcli&lt;br /&gt;
targetcli shell version 2.1.53&lt;br /&gt;
Copyright 2011-2013 by Datera, Inc and others.&lt;br /&gt;
For help on commands, type 'help'.&lt;br /&gt;
&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=451</id>
		<title>DOCS/UNIX/RHEL</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=451"/>
		<updated>2022-08-31T07:40:47Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Stockage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}} &lt;br /&gt;
&lt;br /&gt;
{{FOND_BLEU|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9}}&lt;br /&gt;
&lt;br /&gt;
=Réseau=&lt;br /&gt;
==Bonding/Bridges/VLAN==&lt;br /&gt;
* [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
=Stockage=&lt;br /&gt;
* [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target|Configure iSCSI Target on CentOS 9/AlmaLinux 9/RHEL 9]]&lt;br /&gt;
&lt;br /&gt;
=Mises à jour OS=&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=450</id>
		<title>DOCS/UNIX/RHEL</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=450"/>
		<updated>2022-08-31T07:40:19Z</updated>

		<summary type="html">&lt;p&gt;Admin : /* Stockage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}} &lt;br /&gt;
&lt;br /&gt;
{{FOND_BLEU|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9}}&lt;br /&gt;
&lt;br /&gt;
=Réseau=&lt;br /&gt;
==Bonding/Bridges/VLAN==&lt;br /&gt;
* [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
=Stockage=&lt;br /&gt;
* [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target|Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]]&lt;br /&gt;
&lt;br /&gt;
=Mises à jour OS=&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=449</id>
		<title>DOCS/UNIX/RHEL</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=449"/>
		<updated>2022-08-31T07:37:50Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}} &lt;br /&gt;
&lt;br /&gt;
{{FOND_BLEU|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9}}&lt;br /&gt;
&lt;br /&gt;
=Réseau=&lt;br /&gt;
==Bonding/Bridges/VLAN==&lt;br /&gt;
* [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
=Stockage=&lt;br /&gt;
=Mises à jour OS=&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=448</id>
		<title>DOCS/UNIX/RHEL</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=448"/>
		<updated>2022-08-31T07:37:21Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}} &lt;br /&gt;
&lt;br /&gt;
{{FOND_BLEU|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9}}&lt;br /&gt;
&lt;br /&gt;
=Réseau=&lt;br /&gt;
==Bonding/Bridges/VLAN==&lt;br /&gt;
* [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
==Stockage==&lt;br /&gt;
==Mises à jour==&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Virtualisation&amp;diff=447</id>
		<title>Virtualisation</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Virtualisation&amp;diff=447"/>
		<updated>2022-08-31T07:35:10Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Virtualisation/KVM/Intro| Virtu avec QEMU/KVM - Intro]]&lt;br /&gt;
* [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
* [[Virtualisation/DEVOPS/Automatisation| Automatiser l'infrastrucuture virtuelle avec  Packer+Terraform+Ansible]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=446</id>
		<title>DOCS/UNIX/RHEL</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL&amp;diff=446"/>
		<updated>2022-08-31T07:34:50Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MediaWiki}} &lt;br /&gt;
&lt;br /&gt;
{{FOND_BLEU|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9}}&lt;br /&gt;
&lt;br /&gt;
* Réseau&lt;br /&gt;
** [[Virtualisation/KVM/Bridges_bond_vlans| Configurer des bridges et des VLANs utilisables pour KVM/QEMU]]&lt;br /&gt;
* Stockage&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:SysAdmin&amp;diff=445</id>
		<title>Modèle:SysAdmin</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=Mod%C3%A8le:SysAdmin&amp;diff=445"/>
		<updated>2022-08-31T07:31:09Z</updated>

		<summary type="html">&lt;p&gt;Admin : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* [[DOC:UNIX:Commandes| Recettes de cuisine &amp;amp; commandes utiles]]&lt;br /&gt;
* [[DOC:UNIX:Droits| Les droits d'accès aux fichiers]]&lt;br /&gt;
* [[DOC:UNIX:Crontab| La planification de jobs via crontab  ]]&lt;br /&gt;
* [[DOCS/UNIX/Trucs et astuces|Trucs et astuces sous Unix]]&lt;br /&gt;
* [[DOCS/UNIX/Désactiver complètement IPV6|Désactiver complètement IPV6 sur une serveur]]&lt;br /&gt;
* [[DOCS/UNIX/SElinux|Petit guide de survie SElinux sous Redhat/Centos]]&lt;br /&gt;
* [[DOCS/UNIX/Hardening|Sécuriser en profondeur un serveur Redhat/Centos 8]]&lt;br /&gt;
* [[DOCS/UNIX/RHEL|Bonnes pratiques d'administration d'un Système Linux Redhat/Centos/AlmaLinux 8/9]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>