Start TP1

This commit is contained in:
flyingscorpio@clevo 2022-04-04 16:37:49 +02:00
parent 4dd45f4395
commit d5198ead71
5 changed files with 361 additions and 0 deletions

View file

@ -0,0 +1,16 @@
filename=$(shell basename $(shell pwd))
timestamp=$(shell date +%Y-%m-%d_%H:%M)
all: snapshot
snapshot: main.tex
@latexmk -pdf main.tex
@if ! cmp --silent build/main.pdf ${filename}_*.pdf; then \
touch ${filename}_tmp.pdf; \
rm ${filename}*.pdf; \
cp build/main.pdf ${filename}_${timestamp}.pdf; \
echo "Updated"; \
fi
clean:
@rm -rf build 2>/dev/null

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

251
reseaux-locaux/tp1/main.tex Normal file
View file

@ -0,0 +1,251 @@
\documentclass[a4paper,french,12pt]{article}
\title{Réseaux locaux\\TP1~: VLAN,\\interconnexion de VLAN\\et LAN CAMPUS}
\author{}
\date{Dernière compilation~: \today{} à \currenttime}
\usepackage{styles}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\maketitle
\clearpage
\tableofcontents
\clearpage
\section{Maquette}
\begin{center}
\includegraphics[width=0.7\linewidth]{./img/maquette.png}
\end{center}
\section{Configurer les VLAN}
\begin{enumerate}
\item Configurer 3 VLAN différents pour les switchs \texttt{access}~: \texttt{VLAN10}, \texttt{VLAN20} et \texttt{VLAN30} nommés respectivement \texttt{Marketing}, \texttt{Finance} et \texttt{IT}.
\begin{enumerate}[label=\alph*.]
\item Créer les VLAN en utilisant le VTP\@.
\item Le switch de distribution doit être en mode serveur.
\begin{console}[gobble=24]
Switch> enable
Switch# configure terminal
Switch(config)# hostname Distribution-Switch
Distribution-Switch(config)# vtp version 2
Distribution-Switch(config)# vtp mode server
Distribution-Switch(config)# vtp domain tp1
Distribution-Switch(config)# int range f0/1-24
Distribution-Switch(config-if-range)# no switchport
Distribution-Switch(config-if-range)# exit
Distribution-Switch(config)# vlan 10
Distribution-Switch(config-vlan)# name Marketing
Distribution-Switch(config-vlan)# exit
Distribution-Switch(config)# vlan 20
Distribution-Switch(config-vlan)# name Finance
Distribution-Switch(config-vlan)# exit
Distribution-Switch(config)# vlan 30
Distribution-Switch(config-vlan)# name IT
Distribution-Switch(config-vlan)# exit
Distribution-Switch(config)#
\end{console}
\item Les switchs d'accès doivent être en mode client.
\begin{console}[gobble=24]
Switch> enable
Switch# configure terminal
Switch(config)# vtp mode client
Switch(config)# vtp domain tp1
\end{console}
\item Le switch des serveurs (HTTP et DHCP) doit être en mode transparent.
\begin{console}[gobble=24]
Switch> enable
Switch# configure terminal
Switch(config)# vtp mode transparent
Switch(config)# vtp domain tp1
\end{console}
\end{enumerate}
\item Suivre l'affection des PC au VLAN comme suit~:
\begin{enumerate}[label=\alph*.]
\item Marketing~: PC0, PC3, PC5
\begin{console}[gobble=24]
Switch1# configure terminal
Switch1(config)# int f0/3
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# int f0/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# end
Switch2# configure terminal
Switch2(config)# int f0/3
Switch2(config-if)# switchport mode trunk
Switch2(config-if)# int f0/2
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 10
Switch2(config-if)# end
Switch3# configure terminal
Switch3(config)# int f0/3
Switch3(config-if)# switchport mode trunk
Switch3(config)# int f0/2
Switch3(config-if)# switchport mode access
Switch3(config-if)# switchport access vlan 10
Switch3(config-if)# end
\end{console}
\item Finance~: PC1, PC2
\begin{console}[gobble=24]
Switch1# configure terminal
Switch1(config)# int f0/2
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 20
Switch1(config-if)# end
Switch2# configure terminal
Switch2(config)# int f0/1
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 20
Switch2(config-if)# end
\end{console}
\item IT~: PC4, PC6, PC7
\begin{console}[gobble=24]
Switch3# configure terminal
Switch3(config)# int f0/1
Switch3(config-if)# switchport mode access
Switch3(config-if)# switchport access vlan 30
Switch3(config-if)# end
Switch4# configure terminal
Switch4(config)# int f0/3
Switch4(config-if)# switchport mode trunk
Switch4(config-if)# int range f0/1-2
Switch4(config-if-range)# switchport mode access
Switch4(config-if-range)# switchport access vlan 30
Switch4(config-if-range)# end
\end{console}
\item Sur le switch serveur, configurer le VLAN100 et le nommer VLAN \texttt{Distribution-Switch}.
\begin{console}[gobble=24]
Switch-Server(config)# vlan 100
Switch-Server(config-vlan)# name Server
Switch-Server(config-vlan)# exit
Switch-Server(config)# int f0/1
Switch-Server(config-if)# switchport mode trunk
Switch-Server(config-if)# int range f0/2-3
Switch-Server(config-if-range)# switchport mode access
Switch-Server(config-if-range)# switchport access vlan 100
Switch-Server(config-if-range)# exit
\end{console}
\end{enumerate}
\item Sécuriser les ports des PC avec la fonctionnalité \texttt{switch port-security}.
Les addresses MAC doivent être statiques sur les switchs access.
S'il y a violation, éteindre le port.
\begin{console}[gobble=16]
Switch1(config)# int f0/1
Switch1(config-if)# switchport port-security
Switch1(config-if)# switchport port-security mac-address 0002.1624.381B
Switch1(config-if)# switchport port-security violation shutdown
Switch1(config-if)# int f0/2
Switch1(config-if)# switchport port-security
Switch1(config-if)# switchport port-security mac-address 0001.430D.0DE0
Switch1(config-if)# switchport port-security violation shutdown
Switch2(config)# int f0/1
Switch2(config-if)# switchport port-security
Switch2(config-if)# switchport port-security mac-address 0003.E455.8707
Switch2(config-if)# switchport port-security violation shutdown
Switch2(config-if)# int f0/2
Switch2(config-if)# switchport port-security
Switch2(config-if)# switchport port-security mac-address 00D0.FF50.4735
Switch2(config-if)# switchport port-security violation shutdown
Switch3(config)# int f0/1
Switch3(config-if)# switchport port-security
Switch3(config-if)# switchport port-security mac-address 0007.EC5B.5307
Switch3(config-if)# switchport port-security violation shutdown
Switch3(config-if)# int f0/2
Switch3(config-if)# switchport port-security
Switch3(config-if)# switchport port-security mac-address 0060.2F49.DC65
Switch3(config-if)# switchport port-security violation shutdown
Switch4(config)# int f0/1
Switch4(config-if)# switchport port-security
Switch4(config-if)# switchport port-security mac-address 0003.E469.70E8
Switch4(config-if)# switchport port-security violation shutdown
Switch4(config-if)# int f0/2
Switch4(config-if)# switchport port-security
Switch4(config-if)# switchport port-security mac-address 0060.7043.BC4D
Switch4(config-if)# switchport port-security violation shutdown
\end{console}
\item Vérifier si le routage est activé sur le switch de distribution.
L'activer dans le cas contraire.
\begin{console}[gobble=16]
Distribution-Switch(config)# ip routing
\end{console}
\item Le switch de distribution doit être la passerelle pour tous les VLAN (donc n'oubliez pas de configurer les interfaces VLAN).
\begin{console}[gobble=16]
Distribution-Switch(config)# ip default-gateway 192.168.1.254
Distribution-Switch(config)# int vlan 10
Distribution-Switch(config-if)# ip address 192.168.10.254 255.255.255.0
Distribution-Switch(config-f)# int vlan 20
Distribution-Switch(config-if)# ip address 192.168.20.254 255.255.255.0
Distribution-Switch(config-f)# int vlan 30
Distribution-Switch(config-if)# ip address 192.168.30.254 255.255.255.0
\end{console}
\item Tous les PC utilisateurs doivent obtenir une IP via le DHCP\@.
\begin{lstlisting}[gobble=16]
Interface: FastEthernet0
Pool Name: pool10
Default Gateway: 192.168.10.254
DNS Server: 1.1.1.1
Start IP Address: 192.168.10.1
Subnet Mask: 255.255.255.0
Maximum Number of Users: 255
--
Pool Name: pool20
Default Gateway: 192.168.20.254
DNS Server: 1.1.1.1
Start IP Address: 192.168.20.1
Subnet Mask: 255.255.255.0
Maximum Number of Users: 255
--
Pool Name: pool30
Default Gateway: 192.168.30.254
DNS Server: 1.1.1.1
Start IP Address: 192.168.30.1
Subnet Mask: 255.255.255.0
Maximum Number of Users: 255
--
Pool Name: pool100
Default Gateway: 192.168.100.254
DNS Server: 1.1.1.1
Start IP Address: 192.168.100.1
Subnet Mask: 255.255.255.0
Maximum Number of Users: 255
\end{lstlisting}
\item Les deux serveurs doivent avoir des IP statiques.
\begin{lstlisting}[gobble=16]
DHCP Server:
IP address: 192.168.100.1
Subnet mask: 255.255.255.0
Default gateway: 192.168.100.254
HTTP Server:
IP address: 192.168.100.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.100.254
\end{lstlisting}
\end{enumerate}
\end{document}

View file

@ -0,0 +1,94 @@
\ProvidesPackage{styles}
\usepackage[
%showframe,
a4paper,includeheadfoot,margin=2cm,top=1cm,bottom=1cm
]{geometry}
\setcounter{tocdepth}{2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{datetime}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amsfonts}
\everymath{\displaystyle}
\newcommand*\dif{\mathop{}\!\mathrm{d}}
\usepackage{booktabs}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{parskip}
\usepackage{microtype}
\usepackage{listingsutf8}
\lstset{%
inputencoding=utf8/latin1,
basicstyle=\small\ttfamily,
columns=flexible,
breaklines=true,
extendedchars=true,
literate=
{á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'\i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`\i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
{À}{{\`A}}1 {È}{{\`E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"\i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^\i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
{Ã}{{\~A}}1 {ã}{{\~a}}1 {Õ}{{\~O}}1 {õ}{{\~o}}1 {œ}{{\oe}}1
{Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 {ű}{{\H{u}}}1
{Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1 {ç}{{\c c}}1
{Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
{€}{{\euro}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1
{»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1
}
\let\oldlstinputlisting\lstinputlisting
% make \lstinputlisting always have frame
\renewcommand{\lstinputlisting}[2][]{\oldlstinputlisting[frame=single,#1]{#2}}
\lstnewenvironment{console}[1][]{%
\lstset{%
inputencoding=utf8/latin1,
basicstyle=\small\ttfamily\color{white},
columns=flexible,
breaklines=true,
extendedchars=true,
literate=
{á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'\i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`\i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
{À}{{\`A}}1 {È}{{\`E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"\i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^\i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
{Ã}{{\~A}}1 {ã}{{\~a}}1 {Õ}{{\~O}}1 {õ}{{\~o}}1 {œ}{{\oe}}1
{Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 {ű}{{\H{u}}}1
{Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1 {ç}{{\c c}}1
{Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
{€}{{\euro}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1
{»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1,
backgroundcolor=\color{black}, #1
}%
}{}
\usepackage{graphicx}
\usepackage[hyphens]{url}
\usepackage[colorlinks,hidelinks]{hyperref}
\usepackage{letltxmacro}
\LetLtxMacro{\normalparagraph}{\paragraph}
\renewcommand{\paragraph}[1]{\normalparagraph{#1}\mbox{}}
\sloppy

BIN
reseaux-locaux/tp1/tp1.pkt Normal file

Binary file not shown.