all (flemme)
This commit is contained in:
25
SCR/SCR3.2/TP00/answer.txt
Normal file
25
SCR/SCR3.2/TP00/answer.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
S3 -> S4
|
||||
S4 -> S3
|
||||
S4 -> S5
|
||||
S5 -> S3
|
||||
S5 -> S6
|
||||
S5 -> S7
|
||||
S5 -> S8
|
||||
S5 -> S9
|
||||
S6 -> S3
|
||||
S6 -> S6
|
||||
S6 -> S7
|
||||
S6 -> S8
|
||||
S6 -> S9
|
||||
S7 -> S6
|
||||
S7 -> S8
|
||||
S7 -> S9
|
||||
|
||||
- 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
|
||||
|
||||
- PC5
|
||||
645
SCR/SCR3.2/TP00/tp00.SCR.3.2.imn
Normal file
645
SCR/SCR3.2/TP00/tp00.SCR.3.2.imn
Normal file
File diff suppressed because it is too large
Load Diff
BIN
SCR/SCR3.2/TP00/tp00.SCR.3.2.pdf
Normal file
BIN
SCR/SCR3.2/TP00/tp00.SCR.3.2.pdf
Normal file
Binary file not shown.
25
SCR/SCR3.2/TP01/answer.txt
Normal file
25
SCR/SCR3.2/TP01/answer.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
II.
|
||||
|
||||
1.
|
||||
|
||||
- Dans les machines de S1 (table de routage) :
|
||||
172.16.2.0/24 172.16.1.254
|
||||
|
||||
2.
|
||||
|
||||
Ajouter ce script dans la configuration de la passerelle :
|
||||
|
||||
ip addr add 127.0.0.1/8 dev lo0
|
||||
ip addr add 172.16.1.254/24 dev eth0
|
||||
ip addr add 172.16.2.254/24 dev eth1
|
||||
|
||||
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.2.254
|
||||
|
||||
rpcbind
|
||||
inetd
|
||||
|
||||
-> Avec ça, si une machine du S2 renvoie une information à la passerelle, on modifie l'adresse source par l'adresse de la passerelle pour que la réponse puisse arriver à la machine de destination.
|
||||
|
||||
III.
|
||||
|
||||
S3 ne peut pas ping S1, mais peut ping S2, je ne comprends pas.
|
||||
208
SCR/SCR3.2/TP01/one-gateway.imn
Normal file
208
SCR/SCR3.2/TP01/one-gateway.imn
Normal file
@@ -0,0 +1,208 @@
|
||||
node n0 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc1-1
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:02
|
||||
ip address 172.16.1.1/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
!
|
||||
ip route 172.16.2.0/24 172.16.1.254
|
||||
!
|
||||
}
|
||||
auto_default_routes enabled
|
||||
canvas c0
|
||||
iconcoords {72 528}
|
||||
labelcoords {72 559}
|
||||
interface-peer {eth0 n5}
|
||||
}
|
||||
|
||||
node n1 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc1-2
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:03
|
||||
ip address 172.16.1.2/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
ip route 172.16.2.0/24 172.16.1.254
|
||||
!
|
||||
}
|
||||
auto_default_routes enabled
|
||||
canvas c0
|
||||
iconcoords {288 528}
|
||||
labelcoords {288 559}
|
||||
interface-peer {eth0 n5}
|
||||
}
|
||||
|
||||
node n2 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc2-1
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:00
|
||||
ip address 172.16.2.1/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
}
|
||||
auto_default_routes enabled
|
||||
canvas c0
|
||||
iconcoords {600 528}
|
||||
labelcoords {600 559}
|
||||
interface-peer {eth0 n6}
|
||||
}
|
||||
|
||||
node n3 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname pc2-2
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:01
|
||||
ip address 172.16.2.2/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
}
|
||||
auto_default_routes enabled
|
||||
canvas c0
|
||||
iconcoords {816 528}
|
||||
labelcoords {816 559}
|
||||
interface-peer {eth0 n6}
|
||||
}
|
||||
|
||||
node n4 {
|
||||
type host
|
||||
network-config {
|
||||
hostname host1
|
||||
!
|
||||
interface eth1
|
||||
mac address 42:00:aa:00:00:05
|
||||
ip address 172.16.2.254/24
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:04
|
||||
ip address 172.16.1.254/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {456 96}
|
||||
labelcoords {456 132}
|
||||
interface-peer {eth0 n5}
|
||||
interface-peer {eth1 n6}
|
||||
custom-configs {
|
||||
custom-config-id default {
|
||||
custom-command /bin/sh
|
||||
config {
|
||||
ip addr add 127.0.0.1/8 dev lo0
|
||||
ip addr add 172.16.1.254/24 dev eth0
|
||||
ip addr add 172.16.2.254/24 dev eth1
|
||||
|
||||
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.2.254
|
||||
|
||||
rpcbind
|
||||
inetd
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
custom-enabled true
|
||||
custom-selected default
|
||||
}
|
||||
|
||||
node n5 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch1
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {192 312}
|
||||
labelcoords {192 335}
|
||||
interface-peer {e0 n0}
|
||||
interface-peer {e1 n1}
|
||||
interface-peer {e2 n4}
|
||||
}
|
||||
|
||||
node n6 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch2
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {720 312}
|
||||
labelcoords {720 335}
|
||||
interface-peer {e0 n2}
|
||||
interface-peer {e1 n3}
|
||||
interface-peer {e2 n4}
|
||||
}
|
||||
|
||||
link l0 {
|
||||
nodes {n6 n2}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l1 {
|
||||
nodes {n6 n3}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l2 {
|
||||
nodes {n5 n0}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l3 {
|
||||
nodes {n5 n1}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l4 {
|
||||
nodes {n4 n5}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l5 {
|
||||
nodes {n4 n6}
|
||||
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
|
||||
}
|
||||
|
||||
323
SCR/SCR3.2/TP01/two-gateway.imn
Normal file
323
SCR/SCR3.2/TP01/two-gateway.imn
Normal file
@@ -0,0 +1,323 @@
|
||||
node n0 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname A
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:00
|
||||
ip address 172.16.1.1/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
ip route 0.0.0.0/0 172.16.1.254
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {96 96}
|
||||
labelcoords {96 127}
|
||||
interface-peer {eth0 n3}
|
||||
}
|
||||
|
||||
node n1 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname B
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:01
|
||||
ip address 172.16.2.1/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
ip route 0.0.0.0/0 172.16.2.252
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {96 432}
|
||||
labelcoords {96 463}
|
||||
interface-peer {eth0 n7}
|
||||
}
|
||||
|
||||
node n2 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname C
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:05
|
||||
ip address 172.16.3.1/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
ip route 0.0.0.0/0 172.16.3.251
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {768 192}
|
||||
labelcoords {768 223}
|
||||
interface-peer {eth0 n6}
|
||||
}
|
||||
|
||||
node n3 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch1
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {288 96}
|
||||
labelcoords {288 119}
|
||||
interface-peer {e0 n0}
|
||||
interface-peer {e2 n4}
|
||||
}
|
||||
|
||||
node n4 {
|
||||
type host
|
||||
network-config {
|
||||
hostname P1
|
||||
!
|
||||
interface eth1
|
||||
mac address 42:00:aa:00:00:03
|
||||
ip address 172.16.2.253/24
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:02
|
||||
ip address 172.16.1.254/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {288 264}
|
||||
labelcoords {288 300}
|
||||
interface-peer {eth0 n3}
|
||||
interface-peer {eth1 n7}
|
||||
custom-configs {
|
||||
custom-config-id default {
|
||||
custom-command /bin/sh
|
||||
config {
|
||||
ip addr add 127.0.0.1/8 dev lo0
|
||||
ip addr add 172.16.1.254/24 dev eth0
|
||||
ip addr add 172.16.2.253/24 dev eth1
|
||||
|
||||
iptables -t nat -A POSTROUTING -j SNAT --to-source 172.16.2.253
|
||||
iptables -t filter -A FORWARD -d 172.16.3.0/24 -j DROP
|
||||
iptables -t filter -A FORWARD -d 172.16.1.0/24 -s 172.16.2.0/24 -j DROP
|
||||
|
||||
rpcbind
|
||||
inetd
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
custom-enabled true
|
||||
custom-selected default
|
||||
}
|
||||
|
||||
node n5 {
|
||||
type host
|
||||
network-config {
|
||||
hostname P2
|
||||
!
|
||||
interface eth2
|
||||
mac address 42:00:aa:00:00:08
|
||||
ip address 10.0.0.250/8
|
||||
!
|
||||
interface eth1
|
||||
mac address 42:00:aa:00:00:06
|
||||
ip address 172.16.3.251/24
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:04
|
||||
ip address 172.16.2.252/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {528 432}
|
||||
labelcoords {528 468}
|
||||
interface-peer {eth1 n6}
|
||||
interface-peer {eth0 n7}
|
||||
interface-peer {eth2 n8}
|
||||
custom-configs {
|
||||
custom-config-id default {
|
||||
custom-command /bin/sh
|
||||
config {
|
||||
ip addr add 127.0.0.1/8 dev lo0
|
||||
ip addr add 172.16.3.251/24 dev eth1
|
||||
ip addr add 172.16.2.252/24 dev eth0
|
||||
ip addr add 10.0.0.250/8 dev eth2
|
||||
|
||||
iptables -t filter -A FORWARD -d 172.16.1.0/24,172.16.2.0/24 -j DROP
|
||||
|
||||
rpcbind
|
||||
inetd
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
custom-selected default
|
||||
}
|
||||
|
||||
node n6 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch3
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {528 192}
|
||||
labelcoords {528 215}
|
||||
interface-peer {e0 n2}
|
||||
interface-peer {e1 n5}
|
||||
}
|
||||
|
||||
node n7 {
|
||||
type lanswitch
|
||||
network-config {
|
||||
hostname switch2
|
||||
!
|
||||
}
|
||||
canvas c0
|
||||
iconcoords {288 432}
|
||||
labelcoords {288 455}
|
||||
interface-peer {e0 n1}
|
||||
interface-peer {e1 n4}
|
||||
interface-peer {e2 n5}
|
||||
}
|
||||
|
||||
node n8 {
|
||||
type router
|
||||
model quagga
|
||||
network-config {
|
||||
hostname router1
|
||||
!
|
||||
interface eth1
|
||||
mac address 42:00:aa:00:00:09
|
||||
ip address 10.0.7.1/24
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:07
|
||||
ip address 10.0.0.250/8
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
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 {768 432}
|
||||
labelcoords {768 457}
|
||||
interface-peer {eth0 n5}
|
||||
interface-peer {eth1 n9}
|
||||
}
|
||||
|
||||
node n9 {
|
||||
type pc
|
||||
network-config {
|
||||
hostname D
|
||||
!
|
||||
interface eth0
|
||||
mac address 42:00:aa:00:00:0a
|
||||
ip address 10.0.7.20/24
|
||||
!
|
||||
interface lo0
|
||||
type lo
|
||||
ip address 127.0.0.1/8
|
||||
!
|
||||
ip route 0.0.0.0/0 10.0.0.250
|
||||
!
|
||||
}
|
||||
auto_default_routes enabled
|
||||
canvas c0
|
||||
iconcoords {864 576}
|
||||
labelcoords {864 607}
|
||||
interface-peer {eth0 n8}
|
||||
}
|
||||
|
||||
link l0 {
|
||||
nodes {n3 n0}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l2 {
|
||||
nodes {n4 n3}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l4 {
|
||||
nodes {n6 n2}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l5 {
|
||||
nodes {n5 n6}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l1 {
|
||||
nodes {n7 n1}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l3 {
|
||||
nodes {n4 n7}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l6 {
|
||||
nodes {n7 n5}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l7 {
|
||||
nodes {n8 n5}
|
||||
bandwidth 0
|
||||
}
|
||||
|
||||
link l8 {
|
||||
nodes {n8 n9}
|
||||
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 yes
|
||||
annotations yes
|
||||
hostsAutoAssign no
|
||||
grid yes
|
||||
iconSize normal
|
||||
zoom 1.0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user