global { project fw101 # you need to change these: $my_dns = 128.39.89.10 $group1_addr = 128.39.73.140 $group2_addr = 128.39.73.150 $root_passwd1 = "/d23ZbIBSuPYc" $root_passwd2 = "qFxR2/RL3NOyo" } # This switch will be connected through the # bridge interface. switch external { tap tap0 group fw101 } # This superclass defines most aspects # of a gateway: superclass gateway { term screen size 1500M template sarge-thick.ext2 nameserver $my_dns # external interface: # everything but the address network eth0 { switch external netmask 255.255.255.0 broadcast 128.39.89.255 gateway 128.39.73.1 } # internal interface: # everything but the switch network eth1 { address 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255 } # Would you like to load all modules # for the students, or just some? modules { iptable_nat iptable_filter ip_conntrack ip_tables ipt_MASQUERADE } } # Definitions for the dummy host superclass dummy_host { nameserver $my_dns template Debian-3.0r0.ext2 term screen size 500MB network eth0 { netmask 255.255.255.0 gateway 10.0.0.1 broadcast 10.0.0.255 } } ############################################ # This is where I define the actual hosts and switches. # Every host and switch name will end with their group number # Group 1 host gw1 { sudo group1 superclass gateway root_password $root_passwd1 network eth0 { address $group1_addr } network eth1 { switch switch1 } mount { /fw101/gw1 /fw101 hostfs rw } } switch switch1 { sudo group1 } # first dummy host dummy1-1 { sudo group1 superclass dummy_host network eth0 { switch switch1 address 10.0.0.2 } } host dummy2-1 { sudo group1 superclass dummy_host network eth0 { switch switch1 address 10.0.0.3 } } # Group 2 host gw2 { superclass gateway sudo group2 root_password $root_passwd2 network eth0 { address $group2_addr } network eth1 { switch switch2 } mount { /fw101/gw2 /fw101 hostfs rw } } switch switch2 { sudo group2 } # first dummy host dummy1-2 { superclass dummy_host sudo group2 network eth0 { switch switch2 address 10.0.0.2 } } host dummy2-2 { superclass dummy_host sudo group2 network eth0 { switch switch2 address 10.0.0.3 } }