324 lines
5.3 KiB
Plaintext
324 lines
5.3 KiB
Plaintext
|
|
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
|
||
|
|
}
|
||
|
|
|