1// Generated by make-ip-conf.pl 2// eth0 172.16.1.2 00:00:00:00:00:02 3// eth1 172.16.2.1 00:00:00:00:00:03 4 5elementclass IPRouter { 6 $myaddr1, $myaddr_ethernet1, $myaddr2, $myaddr_ethernet2 | 7 8// Shared IP input path and routing table 9ip :: Strip(14) 10 -> CheckIPHeader2(INTERFACES 172.16.1.2/255.255.255.0 172.16.2.1/255.255.255.0) 11 -> rt :: StaticIPLookup( 12 172.16.1.2/32 0, 13 172.16.1.255/32 0, 14 172.16.1.0/32 0, 15 172.16.2.1/32 0, 16 172.16.2.255/32 0, 17 172.16.2.0/32 0, 18 172.16.1.0/255.255.255.0 1, 19 172.16.2.0/255.255.255.0 2, 20 255.255.255.255/32 0.0.0.0 0, 21 0.0.0.0/32 0, 22 0.0.0.0/0.0.0.0 18.26.4.1 1); 23 24// ARP responses are copied to each ARPQuerier and the host. 25arpt :: Tee(3); 26 27// Input and output paths for eth0 28c0 :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -); 29FromSimDevice(eth0,SNAPLEN 4096) -> c0; 30out0 :: Queue(200) -> todevice0 :: ToSimDevice(eth0); 31c0[0] -> ar0 :: ARPResponder(eth0) -> out0; 32arpq0 :: ARPQuerier(eth0) -> out0; 33c0[1] -> arpt; 34arpt[0] -> [1]arpq0; 35c0[2] -> Paint(1) -> ip; 36c0[3] -> Discard; 37 38// Input and output paths for eth1 39c1 :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -); 40FromSimDevice(eth1,SNAPLEN 4096) -> c1; 41out1 :: Queue(200) -> todevice1 :: ToSimDevice(eth1); 42c1[0] -> ar1 :: ARPResponder(eth1) -> out1; 43arpq1 :: ARPQuerier(eth1) -> out1; 44c1[1] -> arpt; 45arpt[1] -> [1]arpq1; 46c1[2] -> Paint(2) -> ip; 47c1[3] -> Discard; 48 49// Local delivery 50//toh :: ToSimDevice(tap0,IP); 51arpt[2] -> Discard; 52rt[0] -> Discard; 53 54// Forwarding path for eth0 55rt[1] -> DropBroadcasts 56 -> cp0 :: PaintTee(1) 57 -> gio0 :: IPGWOptions($myaddr1) 58 -> FixIPSrc($myaddr1) 59 -> dt0 :: DecIPTTL 60 -> fr0 :: IPFragmenter(1500) 61 -> [0]arpq0; 62dt0[1] -> ICMPError($myaddr1, timeexceeded) -> rt; 63fr0[1] -> ICMPError($myaddr1, unreachable, needfrag) -> rt; 64gio0[1] -> ICMPError($myaddr1, parameterproblem) -> rt; 65cp0[1] -> ICMPError($myaddr1, redirect, host) -> rt; 66 67// Forwarding path for eth1 68rt[2] -> DropBroadcasts 69 -> cp1 :: PaintTee(2) 70 -> gio1 :: IPGWOptions($myaddr2) 71 -> FixIPSrc($myaddr2) 72 -> dt1 :: DecIPTTL 73 -> fr1 :: IPFragmenter(1500) 74 -> [0]arpq1; 75dt1[1] -> ICMPError($myaddr2, timeexceeded) -> rt; 76fr1[1] -> ICMPError($myaddr2, unreachable, needfrag) -> rt; 77gio1[1] -> ICMPError($myaddr2, parameterproblem) -> rt; 78cp1[1] -> ICMPError($myaddr2, redirect, host) -> rt; 79 80} 81 82u :: IPRouter(eth0,eth0,eth1,eth1); 83