Ajout des tp
This commit is contained in:
68
TP_SCR3.2/TP03/TP03-reponses.txt
Normal file
68
TP_SCR3.2/TP03/TP03-reponses.txt
Normal file
@@ -0,0 +1,68 @@
|
||||
Tp03-
|
||||
|
||||
I-
|
||||
|
||||
4.touch /var/lib/dhcp/dhcpd.leases
|
||||
|
||||
5. /etc/init.d/isc-dhcp-server start on le lance sur DHCPsrv
|
||||
|
||||
7. Le numéro de port est le :67 et son nom est :bootps
|
||||
|
||||
|
||||
|
||||
|
||||
II-
|
||||
dans le dhcp on met: 172.16.2.0/24 192.168.10.254
|
||||
|
||||
|
||||
|
||||
1- host GW-eth0{
|
||||
hardware ethernet 42:00:aa:00:00:02;
|
||||
fixed-address 172.16.2.254;
|
||||
}
|
||||
|
||||
host GW-eth1{
|
||||
hardware ethernet 42:00:aa:00:00:04;
|
||||
fixed-address 192.168.10.254;
|
||||
}
|
||||
|
||||
2-
|
||||
subnet 172.16.2.0 netmask 255.255.255.0 {
|
||||
range 172.16.2.1 172.16.2.254;
|
||||
// option routers 172.16.2.1;
|
||||
option subnet-mask 255.255.255.0;
|
||||
option broadcast-address 172.16.2.255;
|
||||
}
|
||||
|
||||
|
||||
3 et 4- sur GW:
|
||||
|
||||
root@GW:/# dhcrelay -d 192.168.10.10
|
||||
Internet Systems Consortium DHCP Relay Agent 4.3.5
|
||||
Copyright 2004-2016 Internet Systems Consortium.
|
||||
All rights reserved.
|
||||
For info, please visit https://www.isc.org/software/dhcp/
|
||||
Listening on LPF/eth1/42:00:aa:00:00:04
|
||||
Sending on LPF/eth1/42:00:aa:00:00:04
|
||||
Listening on LPF/eth0/42:00:aa:00:00:02
|
||||
Sending on LPF/eth0/42:00:aa:00:00:02
|
||||
Sending on Socket/fallback
|
||||
Forwarded BOOTREQUEST for 42:00:aa:00:00:06 to 192.168.10.10
|
||||
|
||||
|
||||
sur pc2-2 :
|
||||
|
||||
root@pc2-2:/# dhclient -r eth0
|
||||
root@pc2-2:/# dhclient eth0
|
||||
|
||||
a) Le mac qui apparait est celui du client pc2-2 (42:00:aa:00:00:06)
|
||||
|
||||
b) L'adresse est 172.16.2.254 (c'est celle de l'interface eth1 de GW sur le réseau 172.16.2.0/24 )
|
||||
|
||||
5) Le serveur reçoit des doublons car les requete dhcp sont des broadcasts, le gw peut relayer depuis plusieurs interfaces ce qui crée des double relay.
|
||||
|
||||
6) DHCPDISCOVER,DHCPREQUEST
|
||||
|
||||
7) dhcrelay -d -i eth1 192.168.10.10 (l'option -i eth1 demande à GW de ne pas remettre un message déjà traité)
|
||||
|
||||
8) plus de doublon, un seul discover, un seul request, fonctionnement normal
|
||||
@@ -69,8 +69,9 @@ node n3 {
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
ip route 172.16.2.0/24 192.168.10.254
|
||||
!
|
||||
}
|
||||
auto_default_routes enabled
|
||||
canvas c0
|
||||
iconcoords {72 96}
|
||||
labelcoords {72 132}
|
||||
|
||||
24
TP_SCR3.2/TP03/dhcpd.conf
Normal file
24
TP_SCR3.2/TP03/dhcpd.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
default-lease-time 600;
|
||||
max-lease-time 7200;
|
||||
|
||||
option rfc-3442-classless-static-routes code 121 = array of integer 8;
|
||||
|
||||
subnet 192.168.0.0 netmask 255.255.240.0 {
|
||||
range 192.168.10.20 192.168.10.40;
|
||||
option rfc-3442-classless-static-routes 24,172,16,2,192,168,10,254;
|
||||
}
|
||||
|
||||
host GW-eth0{
|
||||
hardware ethernet 42:00:aa:00:00:02;
|
||||
fixed-address 172.16.2.254;
|
||||
}
|
||||
|
||||
host GW-eth1{
|
||||
hardware ethernet 42:00:aa:00:00:04;
|
||||
fixed-address 192.168.10.254;
|
||||
}
|
||||
|
||||
subnet 172.16.2.0 netmask 255.255.255.0 {
|
||||
range 172.16.2.20 172.16.2.254;
|
||||
}
|
||||
|
||||
5
TP_SCR3.2/TP03/isc-dhcp-server
Normal file
5
TP_SCR3.2/TP03/isc-dhcp-server
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
#dans /etc/default/isc-dhcp-server
|
||||
|
||||
INTERFACESv4="eth0"
|
||||
#INTERFACESv6=""
|
||||
Reference in New Issue
Block a user