Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider ee15a6bb rédigé par NilsMT's avatar NilsMT
Parcourir les fichiers

e

parent 2b61f12f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -39,12 +39,11 @@ ip link set up dev VLAN_169
Pour le Routeur
ip a add 172.20.169.3/24 dev VLAN_169
ip a add 192.168.0.169.1/24 dev jaune
ip a add 192.168.0.169/24 dev jaune
echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl -p
Pour Client et DHCP
ip r add 192.168.0.0/24 dev VLAN_169
ip r add 192.168.0.0/24 via 172.20.169.3
===================================
......
Table de routages
# Plan d'addressage
![plan d'adressage](rapport_ressources/plan_adressage.png)
# Table de routages
## Client
| Adresse/réseau | Passerelle | Interface |
......@@ -24,5 +28,60 @@ Table de routages
## DNS
| Adresse/réseau | Passerelle | Interface |
| ------ | ----- | ----- |
| 192.168.0./24 | - | jaune |
| 192.168.0.169/24 | - | jaune |
| 172.20.169.0/24 | 192.168.0.169/24 | jaune |
# Les commandes
## Client
```modprobe 8021q```
```ip link add link jaune name VLAN_169 type vlan id 169```
```ip a add 172.20.169.1/24 dev VLAN_169```
```ip link set up dev VLAN_169```
```ip r add 192.168.0.0/24 via 172.20.169.3 dev VLAN_169```
## Routeur
```modprobe 8021q```
```ip link add link jaune name VLAN_169 type vlan id 169```
```ip a add 172.20.169.1/24 dev VLAN_169```
```ip a add 172.20.169.3/24 dev VLAN_169```
```ip a add 192.168.0.169/24 dev jaune```
```echo 1 > /proc/sys/net/ipv4/ip_forward```
```sysctl -p```
## SMTP
On écrit dans /etc/resolv.conf<br>
```nameserver 192.168.0.254```<br>
On retourne dans le terminal<br>
```ip r add 172.20.169.0/24 via 192.168.0.169```
```host smtp169.mail169.com```
```ip a add [adresse que la commande d'avant a renvoyer] dev jaune```
# Analyse de trames
[Lien vers la trame](vlan.pcapng)
![capture](rapport_ressources/vlancap.png)
Nous pouvons voir que 172.20.169.2 recherche quel machine est le serveur (172.20.169.254) qui est donc trouvé à la machine 04:8d:38:c2:57:e8.
<br>
<br>
Ensuite ```172.20.169.2``` envoie un paquet à ```172.20.169.1``` grâce au protocol ICMP. Le paquet à l'id ```0x11cf``` et est le premier de la séquence de ping (premier essaie) donc ```seq``` vaut ```1/256```. C'est un envoie du ping donc l'envoie est catégorisé comme une ```request```
<br>
<br>
Ensuite ```172.20.169.1``` qui a reçu le packet de ```172.20.169.2```. Il lui renvoie alors, via le protocol ICMP, son paquet qui conserve la même id et la même séquence. C'est une réponse au ping donc l'envoie est catégorisé comme une ```reply```
<br>
<br>
Puis ces pings sont réaliser deux autres fois, ou le numéro de séquence augmente à chaque fois que ```172.20.169.2``` recupère le paquet qu'il avait envoyé à ```172.20.169.1```. Ce qui veut dire que à la deuxième séquence de ping, ```seq``` vaudra ```2/512```
<mxfile host="Electron" modified="2023-06-13T08:34:30.762Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.3.7 Chrome/112.0.5615.204 Electron/24.5.0 Safari/537.36" etag="yL3kbMRcR8t-6u-fyx_5" version="21.3.7" type="device">
<diagram name="Page-1" id="jrTMp1_7W5L_mfstuacY">
<mxGraphModel dx="1050" dy="629" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="TeqtU12kvBKKkI7tFrIF-7" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="360" width="480" height="120" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-6" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="20" width="480" height="120" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-1" value="Routeur" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="200" y="220" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-2" value="SMTP" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="400" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-3" value="DNS" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="360" y="400" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="TeqtU12kvBKKkI7tFrIF-4" target="TeqtU12kvBKKkI7tFrIF-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-4" value="Client" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="60" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-5" value="DHCP" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="360" y="60" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-10" value="LAN 192.168.0.0" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="205" y="450" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-11" value="VLAN_169 172.20.169.0" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="180" y="20" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="TeqtU12kvBKKkI7tFrIF-5" target="TeqtU12kvBKKkI7tFrIF-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="600" y="200" as="sourcePoint" />
<mxPoint x="700" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="TeqtU12kvBKKkI7tFrIF-1" target="TeqtU12kvBKKkI7tFrIF-3">
<mxGeometry relative="1" as="geometry">
<mxPoint x="560" y="210" as="sourcePoint" />
<mxPoint x="460" y="340" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="TeqtU12kvBKKkI7tFrIF-1" target="TeqtU12kvBKKkI7tFrIF-2">
<mxGeometry relative="1" as="geometry">
<mxPoint x="270" y="290" as="sourcePoint" />
<mxPoint x="370" y="440" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-16" value="192.168.0.169" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="260" y="280" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-17" value="172.20.169.3" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="260" y="190" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-18" value="172.20.169.1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="45" y="30" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-19" value="172.20.169.2" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="365" y="30" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-20" value="192.168.0.254" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="365" y="370" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="TeqtU12kvBKKkI7tFrIF-21" value="192.168.0.69" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="45" y="370" width="110" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
rapport1_ressources/plan_adressage.png

25,8 ko

rapport1_ressources/vlancap.png

61,2 ko

0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter