Compare commits
20 Commits
569e8471bf
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0475fcebae | |||
| c22e02624b | |||
| af0658cdc8 | |||
| 0766d3b581 | |||
| ff1a8b9f24 | |||
| 84549dbd4d | |||
| e7208f5ade | |||
| c3e34e9df5 | |||
| 3c703ee4f3 | |||
| 1b19a9c052 | |||
| bda5a6016f | |||
| 2513e0256c | |||
| 87565cf26c | |||
| bbb9f49737 | |||
| 0be5f67093 | |||
| d57594fc06 | |||
| 00268af4fb | |||
| 28a3871cdf | |||
| 16a1b05506 | |||
| db601c045d |
Binary file not shown.
Binary file not shown.
31
SCR2.2/TP21/Reponses.txt
Normal file
31
SCR2.2/TP21/Reponses.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
PC3:
|
||||
10.32.0.0/17 10.16.0.254
|
||||
|
||||
PC4:
|
||||
10.16.0.0/17 10.32.0.254
|
||||
10.48.0.0/17 10.32.0.255
|
||||
|
||||
PC6-5:
|
||||
0.0.0.0/0 10.48.0.6
|
||||
10.16.0.0/17 10.48.0.255
|
||||
|
||||
PC5:
|
||||
0.0.0.0/0 10.48.0.254
|
||||
|
||||
PC6:
|
||||
0.0.0.0/0 10.64.0.254
|
||||
10.16.0.0/17 10.64.0.254
|
||||
|
||||
PC7:
|
||||
0.0.0.0/0 10.80.0.255
|
||||
10.64.0.0/17 10.80.0.254
|
||||
|
||||
PC8:
|
||||
0.0.0.0/0 10.80.0.255
|
||||
10.64.0.0/17 10.80.0.254
|
||||
|
||||
Host2
|
||||
0.0.0.0/0 102.103.104.254
|
||||
|
||||
Host3
|
||||
0.0.0.0/0 202.203.204.254
|
||||
@@ -124,6 +124,8 @@ node n9 {
|
||||
ip addr add 10.80.0.254/17 dev eth3
|
||||
ip -6 addr add ::1/128 dev lo0
|
||||
|
||||
ip route add 10.16.0.0/17 via 10.48.0.255
|
||||
ip route add 0.0.0.0/0 via 10.80.0.255
|
||||
|
||||
iptables -t nat -A POSTROUTING -o eth3 -s 10.48.0.0/17 -j SNAT --to-source 10.80.0.254
|
||||
|
||||
@@ -198,6 +200,8 @@ node n11 {
|
||||
ip addr add 10.48.0.255/17 dev eth1
|
||||
ip -6 addr add ::1/128 dev lo0
|
||||
|
||||
ip route add 0.0.0.0/0 via 10.48.0.254
|
||||
ip route add 10.16.0.0/17 via 10.32.0.254
|
||||
|
||||
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 10.32.0.255
|
||||
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 10.48.0.255
|
||||
@@ -247,6 +251,8 @@ node n12 {
|
||||
ip addr add 102.103.104.255/15 dev eth1
|
||||
ip -6 addr add ::1/128 dev lo0
|
||||
|
||||
ip route add 10.64.0.0/17 via 10.80.0.254
|
||||
ip route add 0.0.0.0/0 via 102.103.104.254
|
||||
|
||||
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 102.103.104.255
|
||||
|
||||
@@ -314,6 +320,8 @@ node n14 {
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
ip route 0.0.0.0/0 102.103.104.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {384 456}
|
||||
@@ -337,6 +345,8 @@ node n15 {
|
||||
!
|
||||
!
|
||||
!
|
||||
ip route 0.0.0.0/0 202.203.204.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {408 552}
|
||||
@@ -359,6 +369,8 @@ node n19 {
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
ip route 10.32.0.0/17 10.16.0.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {264 432}
|
||||
@@ -381,6 +393,9 @@ node n20 {
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
ip route 10.16.0.0/17 10.32.0.254
|
||||
ip route 10.48.0.0/17 10.32.0.255
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {48 264}
|
||||
@@ -403,6 +418,8 @@ node n21 {
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
ip route 0.0.0.0/0 10.48.0.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {528 216}
|
||||
@@ -425,6 +442,9 @@ node n22 {
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
ip route 0.0.0.0/0 10.64.0.254
|
||||
ip route 10.16.0.0/17 10.64.0.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {768 144}
|
||||
@@ -447,6 +467,9 @@ node n23 {
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
ip route 0.0.0.0/0 10.80.0.255
|
||||
ip route 10.64.0.0/17 10.80.0.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {624 216}
|
||||
@@ -490,6 +513,9 @@ node n1 {
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
ip route 0.0.0.0/0 10.48.0.6
|
||||
ip route 10.16.0.0/17 10.48.0.255
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {456 72}
|
||||
@@ -511,6 +537,9 @@ node n8 {
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
ip route 0.0.0.0/0 10.80.0.255
|
||||
ip route 10.64.0.0/17 10.80.0.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {648 288}
|
||||
@@ -622,6 +651,10 @@ canvas c0 {
|
||||
name {Canvas0}
|
||||
}
|
||||
|
||||
canvas c1 {
|
||||
name {Canvas1}
|
||||
}
|
||||
|
||||
option show {
|
||||
interface_names yes
|
||||
ip_addresses yes
|
||||
40
SCR2.2/TP22/bind9-README.Debian
Normal file
40
SCR2.2/TP22/bind9-README.Debian
Normal file
@@ -0,0 +1,40 @@
|
||||
Configuration Schema:
|
||||
--------------------
|
||||
|
||||
The Debian BIND package ships with a config that will work for the majority
|
||||
of leaf servers with no user input required.
|
||||
|
||||
The named configuration file named.conf is located in /etc/bind, so that all
|
||||
static configuration files relating to bind are in one place. If you really
|
||||
don't want named.conf in /etc/bind, then the best way to handle it is probably
|
||||
to replace /etc/bind/named.conf with a symlink to the location you want to use.
|
||||
You could also use an option to named in the init.d script, but that only works
|
||||
for named, not for things like ndc.
|
||||
|
||||
Zone data files for the root servers, and the forward and reverse localhost
|
||||
zones are also provided in /etc/bind.
|
||||
|
||||
The working directory for named is now /var/cache/bind. Thus, any transient
|
||||
files generated by named, such as database files for zones the daemon is
|
||||
secondary for, will be written to the /var filesystem, where they belong.
|
||||
|
||||
To make this work, the named.conf provided uses explicitly fully-qualified
|
||||
pathnames to reference the files in /etc/bind.
|
||||
|
||||
Unlike previous BIND packages for Debian, the named.conf and provided db.*
|
||||
files are tagged as conffiles. Thus, if you just want a "caching mostly"
|
||||
server configuration for a server that does not need to be authoritative for
|
||||
anything else, you can run the provided configuration as-is. If you want to
|
||||
hack on named.conf, or even the init.d fragment, you can feel free to. Future
|
||||
package upgrades will treat your configuration changes sanely, as all Debian
|
||||
packages should.
|
||||
|
||||
While you are free to craft whatever structure you wish for servers which need
|
||||
to be authoritative for additional zones, what we suggest is that you put the
|
||||
db files for any zones you are master for in /etc/bind (perhaps even in a
|
||||
subdirectory structure depending on complexity), using full pathnames in the
|
||||
named.conf file. Any zones you are secondary for should be configured in
|
||||
named.conf with simple filenames (relative to /var/cache/bind), so the data
|
||||
files will be stored in BIND's working directory (defaults to /var/cache/bind).
|
||||
Zones subject to automatic updates (such as via DHCP and/or nsupdate) should be
|
||||
stored in /var/lib/bind, and specified with full pathnames.
|
||||
164
SCR2.2/TP22/dns1.imn
Normal file
164
SCR2.2/TP22/dns1.imn
Normal file
@@ -0,0 +1,164 @@
|
||||
node n0 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch1
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {408 96}
|
||||
labelcoords {408 119}
|
||||
interface-peer {e0 n1}
|
||||
interface-peer {e1 n2}
|
||||
interface-peer {e2 n3}
|
||||
interface-peer {e3 n5}
|
||||
interface-peer {e4 n4}
|
||||
}
|
||||
|
||||
node n1 {
|
||||
type host
|
||||
network-config {
|
||||
hostname osiris
|
||||
!
|
||||
interface eth0
|
||||
ip address 192.168.1.158/24
|
||||
mac address 42:00:aa:00:00:00
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {96 240}
|
||||
labelcoords {96 276}
|
||||
interface-peer {eth0 n0}
|
||||
}
|
||||
|
||||
node n2 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname eno
|
||||
!
|
||||
interface eth0
|
||||
ip address 192.168.1.1/24
|
||||
mac address 42:00:aa:00:00:01
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {240 360}
|
||||
labelcoords {240 391}
|
||||
interface-peer {eth0 n0}
|
||||
}
|
||||
|
||||
node n3 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname owt
|
||||
!
|
||||
interface eth0
|
||||
ip address 192.168.1.2/24
|
||||
mac address 42:00:aa:00:00:02
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {480 360}
|
||||
labelcoords {480 391}
|
||||
interface-peer {eth0 n0}
|
||||
}
|
||||
|
||||
node n4 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname eerht
|
||||
!
|
||||
interface eth0
|
||||
ip address 192.168.1.3/24
|
||||
mac address 42:00:aa:00:00:03
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {672 336}
|
||||
labelcoords {672 367}
|
||||
interface-peer {eth0 n0}
|
||||
}
|
||||
|
||||
node n5 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname ruof
|
||||
!
|
||||
interface eth0
|
||||
ip address 192.168.1.4/24
|
||||
mac address 42:00:aa:00:00:04
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {720 168}
|
||||
labelcoords {720 199}
|
||||
interface-peer {eth0 n0}
|
||||
}
|
||||
|
||||
link l0 {
|
||||
nodes {n0 n1}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l1 {
|
||||
nodes {n0 n2}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l2 {
|
||||
nodes {n3 n0}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l3 {
|
||||
nodes {n5 n0}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l4 {
|
||||
nodes {n0 n4}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
canvas c0 {
|
||||
name {Canvas0}
|
||||
}
|
||||
|
||||
option show {
|
||||
interface_names yes
|
||||
ip_addresses yes
|
||||
ipv6_addresses yes
|
||||
node_labels yes
|
||||
link_labels yes
|
||||
background_images no
|
||||
annotations yes
|
||||
hostsAutoAssign no
|
||||
grid yes
|
||||
iconSize normal
|
||||
zoom 1.0
|
||||
}
|
||||
|
||||
17
SCR2.2/TP22/osiris.db.tp.scr
Normal file
17
SCR2.2/TP22/osiris.db.tp.scr
Normal file
@@ -0,0 +1,17 @@
|
||||
;
|
||||
; BIND data file for tp.scr
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA osiris.tp.scr. root.tp.scr. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN NS osiris.tp.scr.
|
||||
osiris.tp.scr. IN A 192.168.1.158
|
||||
eno.tp.scr. IN A 192.168.1.1
|
||||
owt.tp.scr. IN A 192.168.1.2
|
||||
eerht.tp.scr. IN A 192.168.1.3
|
||||
ruof.tp.scr. IN A 192.168.1.4
|
||||
17
SCR2.2/TP22/osiris.db.tp.scr.inv
Normal file
17
SCR2.2/TP22/osiris.db.tp.scr.inv
Normal file
@@ -0,0 +1,17 @@
|
||||
;
|
||||
; BIND reverse data file for tp.scr
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA osiris.tp.scr. root.tp.scr. (
|
||||
1 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN NS osiris.tp.scr.
|
||||
158.1.168.192.in-addr.arpa IN PTR osiris.tp.scr.
|
||||
1.1.168.192.in-addr.arpa IN PTR eno.tp.scr.
|
||||
2.1.168.192.in-addr.arpa IN PTR owt.tp.scr.
|
||||
3.1.168.192.in-addr.arpa IN PTR eerht.tp.scr.
|
||||
4.1.168.192.in-addr.arpa IN PTR ruof.tp.scr.
|
||||
13
SCR2.2/TP22/osiris.db.tp.scr.inv~
Normal file
13
SCR2.2/TP22/osiris.db.tp.scr.inv~
Normal file
@@ -0,0 +1,13 @@
|
||||
;
|
||||
; BIND reverse data file for local loopback tp.scr
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA osiris.tp.scr. root.. (
|
||||
1 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN NS localhost.
|
||||
1.0.0 IN PTR localhost.
|
||||
17
SCR2.2/TP22/osiris.db.tp.scr~
Normal file
17
SCR2.2/TP22/osiris.db.tp.scr~
Normal file
@@ -0,0 +1,17 @@
|
||||
;
|
||||
; BIND data file for local loopback tp.scr
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA osiris.tp.scr. root.tp.scr. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN NS osiris.tp.scr.
|
||||
osiris.tp.scr. IN A 192.168.1.158
|
||||
eno.tp.scr. IN A 192.168.1.1
|
||||
owt.tp.scr. IN A 192.168.1.2
|
||||
eerht.tp.scr. IN A 192.168.1.3
|
||||
ruof.tp.scr. IN A 192.168.1.4
|
||||
19
SCR2.2/TP22/osiris.named.conf.local
Normal file
19
SCR2.2/TP22/osiris.named.conf.local
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Do any local configuration here
|
||||
//
|
||||
|
||||
// Consider adding the 1918 zones here, if they are not used in your
|
||||
// organization
|
||||
//include "/etc/bind/zones.rfc1918";
|
||||
|
||||
zone "tp.scr"
|
||||
{
|
||||
type master;
|
||||
file "/etc/bind/db.tp.scr";
|
||||
};
|
||||
|
||||
zone "1.168.192.in-addr.arpa"
|
||||
{
|
||||
type master;
|
||||
file "/etc/bind/db.tp.scr.inv";
|
||||
};
|
||||
BIN
SCR2.2/TP22/tp22.SCR.2.2.pdf
Normal file
BIN
SCR2.2/TP22/tp22.SCR.2.2.pdf
Normal file
Binary file not shown.
BIN
SCR2.2/TP23.tar
Normal file
BIN
SCR2.2/TP23.tar
Normal file
Binary file not shown.
18
SCR2.2/TP23/ROOT-SERV.db.root.zone
Normal file
18
SCR2.2/TP23/ROOT-SERV.db.root.zone
Normal file
@@ -0,0 +1,18 @@
|
||||
$TTL 3600
|
||||
@ IN SOA ROOT-SERV. root. (
|
||||
2025052100 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS ROOT-SERV.
|
||||
|
||||
|
||||
ROOT-SERV IN A 90.90.0.10
|
||||
mos. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
80.80.in-addr.arpa. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
sethi.mos. IN A 80.80.0.20
|
||||
kheops.mos. IN A 80.80.0.10
|
||||
4
SCR2.2/TP23/ROOT-SERV.named.conf.local
Normal file
4
SCR2.2/TP23/ROOT-SERV.named.conf.local
Normal file
@@ -0,0 +1,4 @@
|
||||
zone "." {
|
||||
type master;
|
||||
file "/etc/bind/db.root.zone";
|
||||
};
|
||||
128
SCR2.2/TP23/areponses.txt
Normal file
128
SCR2.2/TP23/areponses.txt
Normal file
@@ -0,0 +1,128 @@
|
||||
Host 10 :
|
||||
Créez un fichiers hints-file
|
||||
|
||||
3600000 NS ROOT-SERV.
|
||||
ROOT-SERV. 3600000 A 90.90.0.10.
|
||||
|
||||
|
||||
Dans named.conf.default-zones on modifie pour avoir ca :
|
||||
zone "." {
|
||||
type hint;
|
||||
file "/etc/bind/hints-file";
|
||||
};
|
||||
|
||||
sethi:
|
||||
|
||||
Créez un fichier db.mos et mettre :
|
||||
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
|
||||
|
||||
Créer fichier db.mos.inv et mettre :
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
|
||||
|
||||
Dans named.conf.local
|
||||
|
||||
zone "mos" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos";
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
};
|
||||
|
||||
Dans host1-5:
|
||||
|
||||
/etc/resolv.conf mettre :
|
||||
|
||||
domain mos
|
||||
nameserver 80.80.0.20
|
||||
|
||||
/etc/init.d/bind9 start puis ss -na pour vérifier si le port est ouvert
|
||||
|
||||
Sur host1 faire un ping "nom" pour vérifier si le pc communique
|
||||
dig -x 80.80.0.10 pour l'inverse
|
||||
|
||||
|
||||
ROOT-SERV
|
||||
|
||||
Dans named.conf.local :
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "/etc/bind/db.root.zone";
|
||||
};
|
||||
|
||||
|
||||
Dans db.root.zone :
|
||||
|
||||
$TTL 3600
|
||||
@ IN SOA ROOT-SERV. root. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS ROOT-SERV.
|
||||
|
||||
|
||||
ROOT-SERV IN A 90.90.0.10
|
||||
mos. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
80.80.in-addr.arpa. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
sethi.mos. IN A 80.80.0.20
|
||||
kheops.mos. IN A 80.80.0.10
|
||||
|
||||
|
||||
|
||||
V.Lancement et tests.
|
||||
|
||||
ROOT-SERV named -g
|
||||
host10 named -g
|
||||
sethi named -g
|
||||
Tous en même temps
|
||||
|
||||
Dans un autre terminal
|
||||
mettre dig host1.mos si sa ne fonctionne pas (problème de Clé) faire dig +cd host1.mos
|
||||
pour enlever les problème de clé allez dans le premier host10 (celui qui est en named -g) et faire nano named.conf.options et mettre en commentaire dnssec-validation auto; et refaire named -g
|
||||
et retesté dans le host10 dig host1.mos et ca devrait fonctionner.
|
||||
dig +trace host1.mos sert a voir le chemin que fait host10 pour communiquer avec host1
|
||||
126
SCR2.2/TP23/areponses.txt~
Normal file
126
SCR2.2/TP23/areponses.txt~
Normal file
@@ -0,0 +1,126 @@
|
||||
Host 10 :
|
||||
Créez un fichiers hints-file
|
||||
|
||||
3600000 NS ROOT-SERV.
|
||||
ROOT-SERV. 3600000 A 90.90.0.10.
|
||||
|
||||
|
||||
Dans named.conf.default-zones on modifie pour avoir ca :
|
||||
zone "." {
|
||||
type hint;
|
||||
file "/etc/bind/hints-file";
|
||||
};
|
||||
|
||||
sethi:
|
||||
|
||||
Créez un fichier db.mos et mettre :
|
||||
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
|
||||
|
||||
Créer fichier db.mos.inv et mettre :
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
|
||||
|
||||
Dans named.conf.local
|
||||
|
||||
zone "mos" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos";
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
};
|
||||
|
||||
/etc/resolv.conf mettre :
|
||||
|
||||
domain mos
|
||||
nameserver 80.80.0.20
|
||||
|
||||
/etc/init.d/bind9 start puis ss -na pour vérifier si le port est ouvert
|
||||
|
||||
Sur host1 faire un ping "nom" pour vérifier si le pc communique
|
||||
dig -x 80.80.0.10 pour l'inverse
|
||||
|
||||
|
||||
ROOT-SERV
|
||||
|
||||
Dans named.conf.local :
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "/etc/bind/db.root.zone";
|
||||
};
|
||||
|
||||
|
||||
Dans db.root.zone :
|
||||
|
||||
$TTL 3600
|
||||
@ IN SOA ROOT-SERV. root. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS ROOT-SERV.
|
||||
|
||||
|
||||
ROOT-SERV IN A 90.90.0.10
|
||||
mos. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
80.80.in-addr.arpa. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
sethi.mos. IN A 80.80.0.20
|
||||
kheops.mos. IN A 80.80.0.10
|
||||
|
||||
|
||||
|
||||
V.Lancement et tests.
|
||||
|
||||
ROOT-SERV named -g
|
||||
host10 named -g
|
||||
sethi named -g
|
||||
Tous en même temps
|
||||
|
||||
Dans un autre terminal
|
||||
mettre dig host1.mos si sa ne fonctionne pas (problème de Clé) faire dig +cd host1.mos
|
||||
pour enlever les problème de clé allez dans le premier host10 (celui qui est en named -g) et faire nano named.conf.options et mettre en commentaire dnssec-validation auto; et refaire named -g
|
||||
et retesté dans le host10 dig host1.mos et ca devrait fonctionner.
|
||||
dig +trace host1.mos sert a voir le chemin que fait host10 pour communiquer avec host1
|
||||
518
SCR2.2/TP23/dns2.imn
Normal file
518
SCR2.2/TP23/dns2.imn
Normal file
File diff suppressed because it is too large
Load Diff
2
SCR2.2/TP23/host.resolv.conf
Normal file
2
SCR2.2/TP23/host.resolv.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
domain mos
|
||||
nameserver 80.80.0.20
|
||||
2
SCR2.2/TP23/host.resolv.conf~
Normal file
2
SCR2.2/TP23/host.resolv.conf~
Normal file
@@ -0,0 +1,2 @@
|
||||
nameserver 80.80.0.20
|
||||
search sethi
|
||||
2
SCR2.2/TP23/host10.hints-file
Normal file
2
SCR2.2/TP23/host10.hints-file
Normal file
@@ -0,0 +1,2 @@
|
||||
3600000 NS ROOT-SERV.
|
||||
ROOT-SERV. 3600000 A 90.90.0.10.
|
||||
4
SCR2.2/TP23/host10.named.conf.default-zones
Normal file
4
SCR2.2/TP23/host10.named.conf.default-zones
Normal file
@@ -0,0 +1,4 @@
|
||||
zone "." {
|
||||
type hint;
|
||||
file "/etc/bind/hints-file";
|
||||
};
|
||||
17
SCR2.2/TP23/kheops.db.mos.inv.txt
Normal file
17
SCR2.2/TP23/kheops.db.mos.inv.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
$TTL 3600
|
||||
@ IN SOA kheops.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS kheops.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
17
SCR2.2/TP23/kheops.db.mos.inv.txt~
Normal file
17
SCR2.2/TP23/kheops.db.mos.inv.txt~
Normal file
@@ -0,0 +1,17 @@
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
18
SCR2.2/TP23/kheops.db.mos.txt
Normal file
18
SCR2.2/TP23/kheops.db.mos.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
$TTL 3600
|
||||
@ IN SOA kheops.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS kheops.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
18
SCR2.2/TP23/kheops.db.mos.txt~
Normal file
18
SCR2.2/TP23/kheops.db.mos.txt~
Normal file
@@ -0,0 +1,18 @@
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
12
SCR2.2/TP23/kheops.named.conf.local
Normal file
12
SCR2.2/TP23/kheops.named.conf.local
Normal file
@@ -0,0 +1,12 @@
|
||||
zone "mos" {
|
||||
|
||||
type slave;
|
||||
file "/etc/bind/db.mos";
|
||||
master{80.80.80.20};
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type slave;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
master{80.80.80.20};
|
||||
};
|
||||
111
SCR2.2/TP23/reponses.txt~
Normal file
111
SCR2.2/TP23/reponses.txt~
Normal file
@@ -0,0 +1,111 @@
|
||||
Host 10 :
|
||||
Créez un fichiers hints-file
|
||||
|
||||
3600000 NS ROOT-SERV.
|
||||
ROOT-SERV. 3600000 A 90.90.0.10.
|
||||
|
||||
|
||||
Dans named.conf.default-zones on modifie pour avoir ca :
|
||||
zone "." {
|
||||
type hint;
|
||||
file "/etc/bind/hints-file";
|
||||
};
|
||||
|
||||
sethi:
|
||||
|
||||
Créez un fichier db.mos et mettre :
|
||||
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
|
||||
|
||||
Créer fichier db.mos.inv et mettre :
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
|
||||
|
||||
Dans named.conf.local
|
||||
|
||||
zone "mos" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos";
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
};
|
||||
|
||||
/etc/resolv.conf mettre :
|
||||
|
||||
domain mos
|
||||
nameserver 80.80.0.20
|
||||
|
||||
/etc/init.d/bind9 start puis ss -na pour vérifier si le port est ouvert
|
||||
|
||||
Sur host1 faire un ping "nom" pour vérifier si le pc communique
|
||||
dig -x 80.80.0.10 pour l'inverse
|
||||
|
||||
|
||||
ROOT-SERV
|
||||
|
||||
Dans named.conf.local :
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "/etc/bind/db.root.zone";
|
||||
};
|
||||
|
||||
|
||||
Dans db.root.zone :
|
||||
|
||||
$TTL 3600
|
||||
@ IN SOA ROOT-SERV. root. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS ROOT-SERV.
|
||||
|
||||
|
||||
ROOT-SERV IN A 90.90.0.10
|
||||
mos. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
80.80.in-addr.arpa. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
sethi.mos. IN A 80.80.0.20
|
||||
kheops.mos. IN A 80.80.0.10
|
||||
100
SCR2.2/TP23/scr_réponses.txt~
Normal file
100
SCR2.2/TP23/scr_réponses.txt~
Normal file
@@ -0,0 +1,100 @@
|
||||
zone "." {
|
||||
type hint;
|
||||
file "/etc/bind/hints-file";
|
||||
};
|
||||
pour la b.1) mettre dans le fichier named.conf.default-zoneszone
|
||||
a.1) creer fichier hints-file
|
||||
3600000 NS ROOT-SERV.
|
||||
ROOT-SERV. 3600000 A 90.90.0.10.
|
||||
|
||||
|
||||
2) Créér fichier db.mos et mettre
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
|
||||
|
||||
|
||||
Créer fichier db.mos.inv et mettre :
|
||||
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0 IN PTR kheops.mos.
|
||||
20.0 IN PTR sethi.mos.
|
||||
1.0 IN PTR host1.mos.
|
||||
2.0 IN PTR host2.mos.
|
||||
3.0 IN PTR host3.mos.
|
||||
4.0 IN PTR host4.mos.
|
||||
5.0 IN PTR host5.mos.
|
||||
Dans named.conf.local est mettre : permet de vérifier les deux db
|
||||
|
||||
zone "mos" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos";
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
};
|
||||
/etc/resolv.conf mettre :
|
||||
|
||||
domain mos
|
||||
nameserver 80.80.0.20
|
||||
Dans sethi :
|
||||
/etc/init.d/bind9 start
|
||||
puis ss -na pour vérifier si le port est ouvert
|
||||
|
||||
|
||||
Sur host1 faire un ping "nom" pour vérifier si le pc communique
|
||||
dig -x 80.80.0.10 pour l'inverse
|
||||
|
||||
|
||||
ROOT-SERV :
|
||||
1) named.conf.local :
|
||||
zone "." {
|
||||
type master;
|
||||
file "/etc/bind/db.root.zone";
|
||||
};
|
||||
2) db.root.zone :
|
||||
$TTL 3600
|
||||
@ IN SOA ROOT-SERV. root. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS ROOT-SERV.
|
||||
|
||||
|
||||
ROOT-SERV IN A 90.90.0.10
|
||||
mos. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
80.80.in-addr.arpa. IN NS sethi.mos.
|
||||
IN NS kheops.mos.
|
||||
sethi.mos. IN A 80.80.0.20
|
||||
kheops.mos. IN A 80.80.0.10
|
||||
17
SCR2.2/TP23/sethi.db.mos.inv.txt
Normal file
17
SCR2.2/TP23/sethi.db.mos.inv.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
18
SCR2.2/TP23/sethi.db.mos.txt
Normal file
18
SCR2.2/TP23/sethi.db.mos.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
10
SCR2.2/TP23/sethi.named.conf.local
Normal file
10
SCR2.2/TP23/sethi.named.conf.local
Normal file
@@ -0,0 +1,10 @@
|
||||
zone "mos" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos";
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
};
|
||||
BIN
SCR2.2/TP23/solar-5-mos.zone.tar
Normal file
BIN
SCR2.2/TP23/solar-5-mos.zone.tar
Normal file
Binary file not shown.
18
SCR2.2/TP23/solar-5-tp23/sethi.db.mos
Normal file
18
SCR2.2/TP23/solar-5-tp23/sethi.db.mos
Normal file
@@ -0,0 +1,18 @@
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
|
||||
sethi IN A 80.80.0.20
|
||||
kheops IN A 80.80.0.10
|
||||
host1 IN A 80.80.0.1
|
||||
host2 IN A 80.80.0.2
|
||||
host3 IN A 80.80.0.3
|
||||
host4 IN A 80.80.0.4
|
||||
host5 IN A 80.80.0.5
|
||||
17
SCR2.2/TP23/solar-5-tp23/sethi.db.mos.inv
Normal file
17
SCR2.2/TP23/solar-5-tp23/sethi.db.mos.inv
Normal file
@@ -0,0 +1,17 @@
|
||||
$TTL 3600
|
||||
@ IN SOA sethi.mos. root.mos. (
|
||||
2007010401 ; Serial
|
||||
3600 ; Refresh [1h]
|
||||
600 ; Retry [10m]
|
||||
86400 ; Expire [1d]
|
||||
600 ) ; Negative Cache TTL [1h]
|
||||
;
|
||||
@ IN NS sethi.mos.
|
||||
|
||||
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
||||
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
||||
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
||||
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
||||
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
||||
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
||||
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
||||
10
SCR2.2/TP23/solar-5-tp23/sethi.named.conf.local
Normal file
10
SCR2.2/TP23/solar-5-tp23/sethi.named.conf.local
Normal file
@@ -0,0 +1,10 @@
|
||||
zone "mos" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos";
|
||||
};
|
||||
zone "80.80.in-addr.arpa" {
|
||||
|
||||
type master;
|
||||
file "/etc/bind/db.mos.inv";
|
||||
};
|
||||
BIN
SCR2.2/TP23/tp23.SCR.2.2.pdf
Normal file
BIN
SCR2.2/TP23/tp23.SCR.2.2.pdf
Normal file
Binary file not shown.
BIN
SCR2.2/TP24.tar
Normal file
BIN
SCR2.2/TP24.tar
Normal file
Binary file not shown.
84
SCR2.2/TP24/dhcpd.conf
Normal file
84
SCR2.2/TP24/dhcpd.conf
Normal file
@@ -0,0 +1,84 @@
|
||||
# dhcpd.conf
|
||||
#
|
||||
# Sample configuration file for ISC dhcpd
|
||||
#
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
#option domain-name "example.org";
|
||||
#option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 600;
|
||||
max-lease-time 7200;
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
#ddns-update-style none;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
#log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
#subnet 10.254.239.0 netmask 255.255.255.224 {
|
||||
# range 10.254.239.10 10.254.239.20;
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
#}
|
||||
|
||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
||||
# which we don't really recommend.
|
||||
|
||||
#subnet 10.254.239.32 netmask 255.255.255.224 {
|
||||
# range dynamic-bootp 10.254.239.40 10.254.239.60;
|
||||
# option broadcast-address 10.254.239.31;
|
||||
# option routers rtr-239-32-1.example.org;
|
||||
#}
|
||||
|
||||
# A slightly different configuration for an internal subnet.
|
||||
#subnet 10.5.5.0 netmask 255.255.255.224 {
|
||||
# range 10.5.5.26 10.5.5.30;
|
||||
# option domain-name-servers ns1.internal.example.org;
|
||||
# option domain-name "internal.example.org";
|
||||
# option routers 10.5.5.1;
|
||||
# option broadcast-address 10.5.5.31;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in
|
||||
# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration.
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.example.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
#host fantasia {
|
||||
# hardware ethernet 08:00:07:26:c0:a5;
|
||||
option RFC-3442-classless-static-routes code 121=array of unsigned 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 172,16,2,192,168,10,254,0,192,168,10,253;
|
||||
}
|
||||
84
SCR2.2/TP24/dhcpd.conf~
Normal file
84
SCR2.2/TP24/dhcpd.conf~
Normal file
@@ -0,0 +1,84 @@
|
||||
# dhcpd.conf
|
||||
#
|
||||
# Sample configuration file for ISC dhcpd
|
||||
#
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
#option domain-name "example.org";
|
||||
#option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 600;
|
||||
max-lease-time 7200;
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
#ddns-update-style none;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
#log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
#subnet 10.254.239.0 netmask 255.255.255.224 {
|
||||
# range 10.254.239.10 10.254.239.20;
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
#}
|
||||
|
||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
||||
# which we don't really recommend.
|
||||
|
||||
#subnet 10.254.239.32 netmask 255.255.255.224 {
|
||||
# range dynamic-bootp 10.254.239.40 10.254.239.60;
|
||||
# option broadcast-address 10.254.239.31;
|
||||
# option routers rtr-239-32-1.example.org;
|
||||
#}
|
||||
|
||||
# A slightly different configuration for an internal subnet.
|
||||
#subnet 10.5.5.0 netmask 255.255.255.224 {
|
||||
# range 10.5.5.26 10.5.5.30;
|
||||
# option domain-name-servers ns1.internal.example.org;
|
||||
# option domain-name "internal.example.org";
|
||||
# option routers 10.5.5.1;
|
||||
# option broadcast-address 10.5.5.31;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in
|
||||
# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration.
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.example.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
#host fantasia {
|
||||
# hardware ethernet 08:00:07:26:c0:a5;
|
||||
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 172,16,2,192,168,10,254,0,192,168,10,253;
|
||||
}
|
||||
option RFC-3442-classless-static-routes code 121=array of unsigned interger = 8;
|
||||
294
SCR2.2/TP24/dhcpv4-serv.imn
Normal file
294
SCR2.2/TP24/dhcpv4-serv.imn
Normal file
@@ -0,0 +1,294 @@
|
||||
node n0 {
|
||||
type host
|
||||
network-config {
|
||||
hostname DHCPsrv
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:03
|
||||
ip address 192.168.10.10/20
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {144 168}
|
||||
labelcoords {130 130}
|
||||
interface-peer {eth0 n6}
|
||||
}
|
||||
|
||||
node n1 {
|
||||
type host
|
||||
network-config {
|
||||
hostname GW1
|
||||
!
|
||||
interface eth1
|
||||
mac address 42:00:aa:00:00:06
|
||||
ip address 172.16.2.254/24
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:02
|
||||
ip address 192.168.10.254/20
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {432 264}
|
||||
labelcoords {427 222}
|
||||
interface-peer {eth0 n6}
|
||||
interface-peer {eth1 n7}
|
||||
custom-configs {
|
||||
custom-config-id default {
|
||||
custom-command /bin/sh
|
||||
config {
|
||||
i
|
||||
}
|
||||
}
|
||||
}
|
||||
custom-selected default
|
||||
}
|
||||
|
||||
node n2 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc1-1
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:00
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {96 480}
|
||||
labelcoords {96 511}
|
||||
interface-peer {eth0 n6}
|
||||
}
|
||||
|
||||
node n3 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc1-2
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:01
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {288 480}
|
||||
labelcoords {288 511}
|
||||
interface-peer {eth0 n6}
|
||||
}
|
||||
|
||||
node n4 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc2-1
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:04
|
||||
ip address 172.16.2.1/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {576 504}
|
||||
labelcoords {576 535}
|
||||
interface-peer {eth0 n7}
|
||||
}
|
||||
|
||||
node n5 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc2-2
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:05
|
||||
ip address 172.16.2.2/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {792 504}
|
||||
labelcoords {792 535}
|
||||
interface-peer {eth0 n7}
|
||||
}
|
||||
|
||||
node n6 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch1
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {192 336}
|
||||
labelcoords {136 318}
|
||||
interface-peer {e0 n2}
|
||||
interface-peer {e1 n3}
|
||||
interface-peer {e2 n1}
|
||||
interface-peer {e3 n0}
|
||||
interface-peer {e4 n8}
|
||||
}
|
||||
|
||||
node n7 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch2
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {648 312}
|
||||
labelcoords {704 287}
|
||||
interface-peer {e0 n4}
|
||||
interface-peer {e1 n5}
|
||||
interface-peer {e2 n1}
|
||||
}
|
||||
|
||||
node n8 {
|
||||
type host
|
||||
network-config {
|
||||
hostname GW2
|
||||
!
|
||||
interface eth1
|
||||
mac address 42:00:aa:00:00:09
|
||||
ip address 163.63.63.253/22
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:07
|
||||
ip address 192.168.10.253/20
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
!
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {432 96}
|
||||
labelcoords {387 68}
|
||||
interface-peer {eth0 n6}
|
||||
interface-peer {eth1 n9}
|
||||
}
|
||||
|
||||
node n9 {
|
||||
type router
|
||||
model quagga
|
||||
network-config {
|
||||
hostname router1
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:08
|
||||
ip address 163.63.63.254/22
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
ipv6 address ::1/128
|
||||
!
|
||||
router rip
|
||||
redistribute static
|
||||
redistribute connected
|
||||
redistribute ospf
|
||||
network 0.0.0.0/0
|
||||
!
|
||||
router ripng
|
||||
redistribute static
|
||||
redistribute connected
|
||||
redistribute ospf6
|
||||
network ::/0
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {744 168}
|
||||
labelcoords {744 193}
|
||||
interface-peer {eth0 n8}
|
||||
}
|
||||
|
||||
link l0 {
|
||||
nodes {n2 n6}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l1 {
|
||||
nodes {n3 n6}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l2 {
|
||||
nodes {n1 n6}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l3 {
|
||||
nodes {n0 n6}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l4 {
|
||||
nodes {n7 n4}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l5 {
|
||||
nodes {n5 n7}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l6 {
|
||||
nodes {n7 n1}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l7 {
|
||||
nodes {n8 n6}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l8 {
|
||||
nodes {n9 n8}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
canvas c0 {
|
||||
name {Canvas0}
|
||||
}
|
||||
|
||||
option show {
|
||||
interface_names yes
|
||||
ip_addresses yes
|
||||
ipv6_addresses yes
|
||||
node_labels yes
|
||||
link_labels yes
|
||||
background_images no
|
||||
annotations yes
|
||||
hostsAutoAssign no
|
||||
grid yes
|
||||
iconSize normal
|
||||
zoom 1.0
|
||||
}
|
||||
|
||||
138
SCR2.2/TP24/solar-5-tp24-reponses.txt
Normal file
138
SCR2.2/TP24/solar-5-tp24-reponses.txt
Normal file
@@ -0,0 +1,138 @@
|
||||
I.
|
||||
|
||||
1)
|
||||
apt list --installed "*dhcp*"
|
||||
|
||||
isc-dhcp-client/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed]
|
||||
isc-dhcp-common/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed,automatic]
|
||||
isc-dhcp-relay/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed]
|
||||
isc-dhcp-server/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed]
|
||||
udhcpd/oldoldstable,now 1:1.22.0-19+b3 amd64 [installed]
|
||||
|
||||
2)
|
||||
ls /etc/init.d/
|
||||
Le service sera isc-dhcp-server
|
||||
|
||||
3)
|
||||
less /etc/init.d/isc-dhcp-server
|
||||
Sur la ligne start daemon on a -exec /usr/sbin/dhcpd
|
||||
Grace a la commande which dhcpd on a une confirmation.
|
||||
|
||||
4)
|
||||
man dhcpd
|
||||
On constate que le fichier est dhcpd.conf se trouvant dans /etc/dhcp/
|
||||
|
||||
III.
|
||||
1)
|
||||
Je sais que CIDR signifie Classless Inter-Domain Routing.
|
||||
Je vais sur le site donné pour connaitre le code (Tag) et le RFC (Reference).
|
||||
Ctrl + F puis j'écrit Classless.
|
||||
J'obtiens les ligne suivant:
|
||||
|
||||
Tag Name Data Length Meaning Reference
|
||||
121 Classless Static Route Option N Classless Static Route Option [RFC3442]
|
||||
|
||||
Je peux donc répondre à la question en disant que le code est 121 et le RFC3442.
|
||||
|
||||
|
||||
2)
|
||||
Je vais sur le 2ème site puis je vais dans DEFINING NWE OPTIONS à droite.
|
||||
Je constate que la commande doit ressemblé à quelque chose comme au minimum a option new-name code new-code ;
|
||||
Je décide donc ce faire:
|
||||
option RFC3442_Classless_Inter-Domain_Routing code 121=arrays interger 8;
|
||||
|
||||
A notifier que :
|
||||
Le nom peut être un autre, mais que j'ai mis la RFC3442 pour plus d'information et le Classless Inter-Domain Routing car on cherche l'option pour communiquer aux clients une route CIDR.
|
||||
Le code j'ai mis le même donc le numéro 121.
|
||||
Puis interger 8 afin de donner des information sur le nombre de bits qui sera utilisé à ne pas oublié qu'il y a plusieurs 8 , 16 , 32 tout dépend du besoin.
|
||||
|
||||
|
||||
IV.
|
||||
Exemple:
|
||||
|
||||
Code Len Destination 1 Router 1
|
||||
+-----+---+----+-----+----+----+----+----+----+
|
||||
| 121 | n | d1 | ... | dN | r1 | r2 | r3 | r4 |
|
||||
+-----+---+----+-----+----+----+----+----+----+
|
||||
|
||||
Destination 2 Router 2
|
||||
+----+-----+----+----+----+----+----+
|
||||
| d1 | ... | dN | r1 | r2 | r3 | r4 |
|
||||
+----+-----+----+----+----+----+----+
|
||||
|
||||
code lenght d1 d2 d3 d4| Router1 | d1
|
||||
121 13 24 172 16 2 192 168 10 254 0 192 168 10 253
|
||||
|
||||
|
||||
1)
|
||||
Regardez dhcpd.conf
|
||||
|
||||
2)
|
||||
Commande pour tester dhcpd -t
|
||||
|
||||
3)
|
||||
Dans /etc/default/isc-dhcp-server,
|
||||
On commente INTERFACESv6=""
|
||||
On rajoute eth0 pour avoir INTERFACESv4="eth0"
|
||||
|
||||
|
||||
V.
|
||||
|
||||
1)
|
||||
On lance avec la commande /etc/init.d/isc-dhcp-server start
|
||||
|
||||
udp UNCONN 0 0 *:67 *:*
|
||||
udp UNCONN 0 0 *:bootps *:*
|
||||
|
||||
2)
|
||||
ps -a
|
||||
92 ? 00:00:00 dhcp
|
||||
|
||||
Le PID est 92
|
||||
Aussi visible dans le man dhcpd qui dit qu'il est aussi disponible dans /var/run/dhcpd.pid
|
||||
|
||||
3)
|
||||
ps -eo pid,command
|
||||
|
||||
root@DHCPsrv:~# ps -eo pid,command
|
||||
PID COMMAND
|
||||
1 /sbin/docker-init -- /bin/bash
|
||||
7 /bin/bash
|
||||
35 rpcbind
|
||||
37 inetd
|
||||
64 /bin/bash
|
||||
92 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf eth0
|
||||
181 ps -eo pid,command
|
||||
|
||||
4)
|
||||
PC1-1
|
||||
ip r
|
||||
Rien
|
||||
Puis dhclient eth0
|
||||
ip r
|
||||
192.168.0.0/20 dev eth0 proto kernel scope link src 192.168.10.20
|
||||
|
||||
|
||||
dhclient -v
|
||||
eth0Internet Systems Consortium DHCP Client 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/eth0/42:00:aa:00:00:00
|
||||
Sending on LPF/eth0/42:00:aa:00:00:00
|
||||
Sending on Socket/fallback
|
||||
DHCPREQUEST of 192.168.10.20 on eth0 to 255.255.255.255 port 67
|
||||
DHCPACK of 192.168.10.20 from 192.168.10.10
|
||||
RTNETLINK answers: File exists
|
||||
bound to 192.168.10.20 -- renewal in 204 seconds.
|
||||
|
||||
5.
|
||||
|
||||
6.
|
||||
|
||||
7.
|
||||
|
||||
8.
|
||||
pc1-1# ping -c1 172.16.2.1
|
||||
connect: Network is unreachable
|
||||
138
SCR2.2/TP24/solar-5-tp24-reponses.txt~
Normal file
138
SCR2.2/TP24/solar-5-tp24-reponses.txt~
Normal file
@@ -0,0 +1,138 @@
|
||||
I.
|
||||
|
||||
1)
|
||||
apt list --installed "*dhcp*"
|
||||
|
||||
isc-dhcp-client/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed]
|
||||
isc-dhcp-common/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed,automatic]
|
||||
isc-dhcp-relay/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed]
|
||||
isc-dhcp-server/oldoldstable,now 4.3.5-3+deb9u1 amd64 [installed]
|
||||
udhcpd/oldoldstable,now 1:1.22.0-19+b3 amd64 [installed]
|
||||
|
||||
2)
|
||||
ls /etc/init.d/
|
||||
Le service sera isc-dhcp-server
|
||||
|
||||
3)
|
||||
less /etc/init.d/isc-dhcp-server
|
||||
Sur la ligne start daemon on a -exec /usr/sbin/dhcpd
|
||||
Grace a la commande which dhcpd on a une confirmation.
|
||||
|
||||
4)
|
||||
man dhcpd
|
||||
On constate que le fichier est dhcpd.conf se trouvant dans /etc/dhcp/
|
||||
|
||||
III.
|
||||
1)
|
||||
Je sais que CIDR signifie Classless Inter-Domain Routing.
|
||||
Je vais sur le site donné pour connaitre le code (Tag) et le RFC (Reference).
|
||||
Ctrl + F puis j'écrit Classless.
|
||||
J'obtiens les ligne suivant:
|
||||
|
||||
Tag Name Data Length Meaning Reference
|
||||
121 Classless Static Route Option N Classless Static Route Option [RFC3442]
|
||||
|
||||
Je peux donc répondre à la question en disant que le code est 121 et le RFC3442.
|
||||
|
||||
|
||||
2)
|
||||
Je vais sur le 2ème site puis je vais dans DEFINING NWE OPTIONS à droite.
|
||||
Je constate que la commande doit ressemblé à quelque chose comme au minimum a option new-name code new-code ;
|
||||
Je décide donc ce faire:
|
||||
option RFC3442_Classless_Inter-Domain_Routing code 121=arrays interger 8;
|
||||
|
||||
A notifier que :
|
||||
Le nom peut être un autre, mais que j'ai mis la RFC3442 pour plus d'information et le Classless Inter-Domain Routing car on cherche l'option pour communiquer aux clients une route CIDR.
|
||||
Le code j'ai mis le même donc le numéro 121.
|
||||
Puis interger 8 afin de donner des information sur le nombre de bits qui sera utilisé à ne pas oublié qu'il y a plusieurs 8 , 16 , 32 tout dépend du besoin.
|
||||
|
||||
|
||||
IV.
|
||||
Exemple:
|
||||
|
||||
Code Len Destination 1 Router 1
|
||||
+-----+---+----+-----+----+----+----+----+----+
|
||||
| 121 | n | d1 | ... | dN | r1 | r2 | r3 | r4 |
|
||||
+-----+---+----+-----+----+----+----+----+----+
|
||||
|
||||
Destination 2 Router 2
|
||||
+----+-----+----+----+----+----+----+
|
||||
| d1 | ... | dN | r1 | r2 | r3 | r4 |
|
||||
+----+-----+----+----+----+----+----+
|
||||
|
||||
code lenght d1 d2 d3 d4| Router1 | d1
|
||||
121 13 24 172 16 2 192 168 10 254 0 192 168 10 253
|
||||
|
||||
|
||||
1)
|
||||
Regardez dhcpd.conf
|
||||
|
||||
2)
|
||||
Commande pour tester dhcpd -t
|
||||
|
||||
3)
|
||||
Dans /etc/default/isc-dhcp-server,
|
||||
On commente INTERFACESv6=""
|
||||
On rajoute eth0 pour avoir INTERFACESv4="eth0"
|
||||
|
||||
|
||||
V.
|
||||
|
||||
1)
|
||||
On lance avec la commande /etc/init.d/isc-dhcp-server start
|
||||
|
||||
udp UNCONN 0 0 *:67 *:*
|
||||
udp UNCONN 0 0 *:bootps *:*
|
||||
|
||||
2)
|
||||
ps -a
|
||||
92 ? 00:00:00 dhcp
|
||||
|
||||
Le PID est 92
|
||||
Aussi visible dans le man dhcpd qui dit qu'il est aussi disponible dans /var/run/dhcpd.pid
|
||||
|
||||
3)
|
||||
ps -eo pid,command
|
||||
|
||||
root@DHCPsrv:~# ps -eo pid,command
|
||||
PID COMMAND
|
||||
1 /sbin/docker-init -- /bin/bash
|
||||
7 /bin/bash
|
||||
35 rpcbind
|
||||
37 inetd
|
||||
64 /bin/bash
|
||||
92 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf eth0
|
||||
181 ps -eo pid,command
|
||||
|
||||
4)
|
||||
PC1-1
|
||||
ip r
|
||||
Rien
|
||||
Puis dhclient eth0
|
||||
ip r
|
||||
192.168.0.0/20 dev eth0 proto kernel scope link src 192.168.10.20
|
||||
|
||||
|
||||
dhclient -v
|
||||
eth0Internet Systems Consortium DHCP Client 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/eth0/42:00:aa:00:00:00
|
||||
Sending on LPF/eth0/42:00:aa:00:00:00
|
||||
Sending on Socket/fallback
|
||||
DHCPREQUEST of 192.168.10.20 on eth0 to 255.255.255.255 port 67
|
||||
DHCPACK of 192.168.10.20 from 192.168.10.10
|
||||
RTNETLINK answers: File exists
|
||||
bound to 192.168.10.20 -- renewal in 204 seconds.
|
||||
|
||||
5.
|
||||
|
||||
6.
|
||||
|
||||
7.
|
||||
|
||||
8.
|
||||
pc1-1# ping -c1 172.16.2.1
|
||||
connect: Network is unreachable
|
||||
BIN
SCR2.2/TP24/tp24.SCR.2.2.pdf
Normal file
BIN
SCR2.2/TP24/tp24.SCR.2.2.pdf
Normal file
Binary file not shown.
BIN
SCR3.1/TP1/Ex1/a.out
Executable file
BIN
SCR3.1/TP1/Ex1/a.out
Executable file
Binary file not shown.
27
SCR3.1/TP1/Ex1/adresses_virtuelles.c
Normal file
27
SCR3.1/TP1/Ex1/adresses_virtuelles.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* adresses virtuelles d'un processus */
|
||||
|
||||
#include<stdio.h>
|
||||
#include<sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include<unistd.h>
|
||||
#include<stdlib.h>
|
||||
|
||||
int t[1000] = {[0 ... 999] = 2};
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
int i=3;
|
||||
static int j = 3;
|
||||
char * m = (char*)malloc(1);
|
||||
printf("je suis le pid %d\n\n",getpid());
|
||||
/* ------- Affichage des adresses --------*/
|
||||
printf("main\t\t=\t%p\n",main);
|
||||
printf("gettimeofday\t=\t%p\n",gettimeofday);
|
||||
printf("&argc\t\t=\t%p\n",&argc);
|
||||
printf("&i\t\t=\t%p\n",&i);
|
||||
printf("&j\t\t=\t%p\n",&j);
|
||||
printf("t\t\t=\t%p\n",t);
|
||||
printf("m\t\t=\t%p\n",m);
|
||||
|
||||
getchar();
|
||||
}
|
||||
17
SCR3.1/TP1/Ex2/Makefile
Normal file
17
SCR3.1/TP1/Ex2/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
CFLAGS := -Wall -g -O0
|
||||
SRC=buf.c heap.c huge.c mmap.c null.c stack.c
|
||||
|
||||
DEPENDHELPERS=helpers.o
|
||||
|
||||
BINARIES=$(SRC:%.c=%)
|
||||
|
||||
%.o : %c
|
||||
gcc -c $+
|
||||
|
||||
$(BINARIES): % : %.o $(DEPENDHELPERS)
|
||||
gcc -o $@ $+
|
||||
|
||||
all : $(BINARIES)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(BINARIES)
|
||||
BIN
SCR3.1/TP1/Ex2/buf
Executable file
BIN
SCR3.1/TP1/Ex2/buf
Executable file
Binary file not shown.
9
SCR3.1/TP1/Ex2/buf.c
Normal file
9
SCR3.1/TP1/Ex2/buf.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "helpers.h"
|
||||
|
||||
static char buffer[16 MB] = {0};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
randomize(buffer, 16 MB);
|
||||
return interlude();
|
||||
}
|
||||
BIN
SCR3.1/TP1/Ex2/buf.o
Normal file
BIN
SCR3.1/TP1/Ex2/buf.o
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user