next up previous
Next: About this document ... Up: IMUNES manual Previous: 7. Troubleshooting


8. IMUNES network configuration file

Here is the example of IMUNES network configuration file for the network topology shown in Figure 8.1

Figure 8.1: Network topology


Image topology_example

node n0 {
    type router
    model quagga
    network-config {
	hostname office-router
	!
	interface eth1
	 ipv6 address a:1::1/64
	 ip address 192.168.2.1/24
	!
	interface eth0
	 ipv6 address a:0::1/64
	 ip address 192.168.1.1/24
	!
	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 {576.0 288.0}
    labelcoords {576.0 322.0}
    interface-peer {eth0 n1}
    interface-peer {eth1 n2}
}

node n1 {
    type lanswitch
    network-config {
	hostname office-switch
	!
	interface e2
	 fair-queue
	!
	interface e1
	 fair-queue
	!
	interface e0
	 fair-queue
	!
    }
    canvas c0
    iconcoords {408.0 168.0}
    labelcoords {408.0 202.0}
    interface-peer {e0 n0}
    interface-peer {e1 n3}
    interface-peer {e2 n4}
}

node n2 {
    type host
    network-config {
	hostname office-host
	!
	interface eth0
	 ipv6 address a:1::10/64
	 ip address 192.168.2.5/24
	!
	ipv6 route ::/0 a:1::1
	!
	ip route 0.0.0.0/0 192.168.2.1
	!
    }
    canvas c0
    iconcoords {408.0 456.0}
    labelcoords {408.0 498.0}
    interface-peer {eth0 n0}
}

node n3 {
    type pc
    network-config {
	hostname office-pc1
	!
	interface eth0
	 ipv6 address a:0::20/64
	 ip address 192.168.1.5/24
	!
	ipv6 route ::/0 a:0::1
	!
	ip route 192.168.2.0/24 192.168.1.1
	!
    }
    canvas c0
    iconcoords {192.0 72.0}
    labelcoords {192.0 119.0}
    interface-peer {eth0 n1}
}

node n4 {
    type pc
    network-config {
	hostname office-pc2
	!
	interface eth0
	 ipv6 address a:0::21/64
	 ip address 192.168.1.7/24
	!
	ipv6 route ::/0 a:0::1
	!
	ip route 192.168.2.0/24 192.168.1.1
	!
    }
    canvas c0
    iconcoords {192.0 240.0}
    labelcoords {192.0 282.0}
    interface-peer {eth0 n1}
}

link l0 {
    delay 30
    nodes {n1 n0}
    bandwidth 0
}

link l1 {
    nodes {n3 n1}
    bandwidth 0
}

link l2 {
    nodes {n4 n1}
    bandwidth 0
}

link l3 {
    nodes {n2 n0}
    bandwidth 0
}

annotation a0 {
    iconcoords {59 20 445 338}
    type rectangle
    label {Office room}
    labelcolor black
    font {-family Arial -size 14 -weight bold -slant roman}
    color Gray
    width 1
    border black
    rad 25
    canvas c0
}

canvas c0 {
    name {Canvas0}
}

option show {
    interface_names yes
    ip_addresses yes
    ipv6_addresses no
    node_labels yes
    link_labels yes
    ipsec_configs yes
    background_images no
    annotations yes
    grid yes
    iconSize normal
    zoom 1.0
}


Denis Salopek 2015-04-08