Maj du git depuis la derniere fois

This commit is contained in:
2025-11-27 13:53:52 +01:00
parent ffdd031bc1
commit 6f13bae4f8
18 changed files with 1838 additions and 74 deletions

View File

@@ -0,0 +1,8 @@
TP02-
I-
1) Les adresses réseaux correspondantes sont:
-> 45.45.40.0/21
-> 62.62.32.0/19
-> 37.37.36.0/22

View File

@@ -0,0 +1,455 @@
node n0 {
type pc
network-config {
hostname pc1
!
interface eth0
ip address 172.16.1.1/24
mac address 42:00:aa:00:00:00
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 172.16.1.253
!
}
canvas c0
iconcoords {24 288}
labelcoords {24 319}
interface-peer {eth0 n3}
}
node n1 {
type pc
network-config {
hostname pc2
!
interface eth0
mac address 42:00:aa:00:00:06
ip address 172.16.2.2/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 172.16.2.0
!
}
canvas c0
iconcoords {336 432}
labelcoords {336 463}
interface-peer {eth0 n4}
}
node n2 {
type pc
network-config {
hostname pc3
!
interface eth0
mac address 42:00:aa:00:00:07
ip address 172.16.3.3/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {864 192}
labelcoords {864 223}
interface-peer {eth0 n5}
}
node n3 {
type lanswitch
network-config {
hostname switch1
!
}
canvas c0
iconcoords {168 24}
labelcoords {168 47}
interface-peer {e0 n0}
interface-peer {e1 n6}
}
node n4 {
type lanswitch
network-config {
hostname switch2
!
}
canvas c0
iconcoords {480 48}
labelcoords {480 71}
interface-peer {e0 n1}
interface-peer {e1 n6}
interface-peer {e2 n7}
}
node n5 {
type lanswitch
network-config {
hostname switch3
!
}
canvas c0
iconcoords {768 24}
labelcoords {768 47}
interface-peer {e0 n2}
interface-peer {e1 n7}
}
node n6 {
type host
network-config {
hostname GW1
!
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.253/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 172.16.2.254
!
}
canvas c0
iconcoords {264 288}
labelcoords {264 324}
interface-peer {eth0 n3}
interface-peer {eth1 n4}
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
ip -6 addr add ::1/128 dev lo0
ip route append 0.0.0.0/0 via 172.16.2.252
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.2.253
iptables -t filter -A FORWARD -d 172.16.3.0/24 -j DROP
rpcbind
inetd
}
}
}
custom-enabled true
custom-selected default
}
node n7 {
type host
network-config {
hostname GW2
!
interface eth2
mac address 42:00:aa:00:00:05
ip address 45.45.45.254/24
!
interface eth1
mac address 42:00:aa:00:00:04
ip address 172.16.3.254/24
!
interface eth0
mac address 42:00:aa:00:00:01
ip address 172.16.2.254/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
canvas c0
iconcoords {624 240}
labelcoords {624 276}
interface-peer {eth0 n4}
interface-peer {eth1 n5}
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.2.252/24 dev eth0
ip addr add 172.16.3.251/24 dev eth1
ip addr add 10.0.0.250/8 dev eth2
ip -6 addr add ::1/128 dev lo0
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.3.254
iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to-source 45.45.45.254
ip route add 0.0.0.0/0 via 10.0.0.1
rpcbind
inetd
}
}
}
custom-enabled true
interface-peer {eth2 n8}
custom-selected default
}
node n9 {
type pc
network-config {
hostname pc
!
interface eth0
mac address 42:00:aa:00:00:0d
ip address 37.37.37.1/22
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 37.37.36.0/22 37.37.37.254
!
}
canvas c0
iconcoords {24 576}
labelcoords {24 607}
interface-peer {eth0 n13}
}
node n8 {
type lanswitch
network-config {
hostname switch4
!
}
canvas c0
iconcoords {744 528}
labelcoords {744 551}
interface-peer {e0 n7}
interface-peer {e1 n10}
interface-peer {e2 n11}
interface-peer {e3 n12}
}
node n10 {
type host
network-config {
hostname host1
!
interface eth0
mac address 42:00:aa:00:00:08
ip address 45.45.45.1/21
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {792 264}
labelcoords {792 300}
interface-peer {eth0 n8}
}
node n11 {
type host
network-config {
hostname host2
!
interface eth0
mac address 42:00:aa:00:00:09
ip address 45.45.45.2/21
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {888 384}
labelcoords {888 420}
interface-peer {eth0 n8}
}
node n12 {
type router
model quagga
network-config {
hostname router1
!
interface eth1
mac address 42:00:aa:00:00:0c
ip address 62.62.62.253/19
!
interface eth0
mac address 42:00:aa:00:00:0a
ip address 45.45.45.253/21
!
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
!
}
auto_default_routes enabled
canvas c0
iconcoords {576 576}
labelcoords {576 601}
interface-peer {eth0 n8}
interface-peer {eth1 n13}
}
node n13 {
type router
model quagga
network-config {
hostname router2
!
interface eth1
mac address 42:00:aa:00:00:0e
ip address 37.37.37.254/22
!
interface eth0
mac address 42:00:aa:00:00:0b
ip address 62.62.62.254/19
!
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
!
}
auto_default_routes enabled
canvas c0
iconcoords {288 576}
labelcoords {288 601}
interface-peer {eth0 n12}
interface-peer {eth1 n9}
}
link l0 {
nodes {n3 n0}
bandwidth 0
}
link l1 {
nodes {n4 n1}
bandwidth 0
}
link l2 {
nodes {n6 n3}
bandwidth 0
}
link l3 {
nodes {n6 n4}
bandwidth 0
}
link l4 {
nodes {n5 n2}
bandwidth 0
}
link l5 {
nodes {n7 n4}
bandwidth 0
}
link l6 {
nodes {n7 n5}
bandwidth 0
}
link l7 {
nodes {n8 n7}
bandwidth 0
}
link l8 {
nodes {n10 n8}
bandwidth 0
}
link l9 {
nodes {n11 n8}
bandwidth 0
}
link l10 {
nodes {n12 n8}
bandwidth 0
}
link l11 {
nodes {n13 n12}
bandwidth 0
}
link l12 {
nodes {n9 n13}
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
}

View File

@@ -0,0 +1,215 @@
node n0 {
type pc
network-config {
hostname pc1-1
!
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
!
}
auto_default_routes enabled
canvas c0
iconcoords {144 384}
labelcoords {144 415}
interface-peer {eth0 n2}
}
node n1 {
type pc
network-config {
hostname pc1-2
!
interface eth0
mac address 42:00:aa:00:00:02
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {288 384}
labelcoords {288 415}
interface-peer {eth0 n2}
}
node n2 {
type hub
network-config {
hostname hub1
!
}
canvas c0
iconcoords {216 240}
labelcoords {216 261}
interface-peer {e0 n3}
interface-peer {e1 n0}
interface-peer {e2 n1}
interface-peer {e3 n4}
}
node n3 {
type host
network-config {
hostname DHCPsrv
!
interface eth0
mac address 42:00:aa:00:00:00
ip address 192.168.10.10/20
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {72 96}
labelcoords {72 132}
interface-peer {eth0 n2}
}
node n4 {
type host
network-config {
hostname GW
!
interface eth0
mac address 42:00:aa:00:00:03
ip address 192.168.10.254/20
!
interface eth1
mac address 42:00:aa:00:00:04
ip address 172.16.2.254/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {456 96}
labelcoords {456 132}
interface-peer {eth0 n2}
interface-peer {eth1 n5}
}
node n5 {
type hub
network-config {
hostname hub2
!
}
canvas c0
iconcoords {624 192}
labelcoords {624 213}
interface-peer {e0 n4}
interface-peer {e1 n6}
interface-peer {e2 n7}
}
node n6 {
type pc
network-config {
hostname pc2-1
!
interface eth0
mac address 42:00:aa:00:00:05
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {504 360}
labelcoords {504 391}
interface-peer {eth0 n5}
}
node n7 {
type pc
network-config {
hostname pc2-2
!
interface eth0
mac address 42:00:aa:00:00:06
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {696 360}
labelcoords {696 391}
interface-peer {eth0 n5}
}
link l0 {
nodes {n2 n3}
bandwidth 0
}
link l1 {
nodes {n0 n2}
bandwidth 0
}
link l2 {
nodes {n1 n2}
bandwidth 0
}
link l3 {
nodes {n4 n2}
bandwidth 0
}
link l4 {
nodes {n5 n4}
bandwidth 0
}
link l5 {
nodes {n6 n5}
bandwidth 0
}
link l6 {
nodes {n7 n5}
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
}