Modest changes to test router config

Modest changes to test router config

c0 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

FromDevice(eth0, PROMISC true, SNIFFER false) -> [0]c0;

out0 :: Queue(200)
    -> ToDevice(eth0);

//This packet goes to linux stack
tol :: ToHost(fake);

// An "ARP querier" for each interface.
arpq0 :: ARPQuerier(192.168.1.100, AC:22:0B:C6:71:96) -> out0;

// Deliver ARP responses to ARP queriers as well as Linux.
t :: Tee(2);
c0[1] -> t;

t[0] -> tol;
t[1] ->[1]arpq0

// Proxy ARP on eth0 for 18.26.8, as well as cone's IP address.
ar0 :: ARPResponder(192.168.1.100 AC:22:0B:C6:71:96);
c0[0] -> ar0 -> out0;

rt :: RangeIPLookup(192.168.1.100/32 0,
                127.0.0.1/32 0,
                0.0.0.0/0 1);

ip ::   Strip(14)
     -> CheckIPHeader(VERBOSE true)
     -> [0]rt;

c0[2] -> Paint(1) -> ip ;

// IP packets for this machine.
// ToHost expects ethernet packets, so cook up a fake header.
rt[0] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> tol;

rt[1]
    -> ToDump(FILENAME "MyDump.pcap", ENCAP IP)
    -> arpq0;

FromHost(fake, 192.168.1.100/32)
    -> fromhost_cl :: Classifier(12/0806, 12/0800);
 fromhost_cl[0] -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -> ToHost(fake);
 fromhost_cl[1] -> ip // IP packets

// Unknown ethernet type numbers.
c0[3] -> Discard;

c0 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

FromDevice(eth0) -> [0]c0;

out0 :: Queue(200) -> ToDevice(eth0);

//This packet goes to linux stack
tol :: ToHost(fake);

// An "ARP querier" for each interface.
arpq0 :: ARPQuerier(192.168.1.100, AC:22:0B:C6:71:96);

// Deliver ARP responses to ARP queriers as well as Linux.
t :: Tee(2);
c0[1] -> t;

t[0] -> tol;
t[1] ->[1]arpq0

// Connect ARP outputs to the interface queues.
arpq0 -> out0;

// Proxy ARP on eth0 for 18.26.8, as well as cone's IP address.
ar0 :: ARPResponder(192.168.1.100 AC:22:0B:C6:71:96);
c0[0] -> ar0 -> out0;

rt :: RadixIPLookup(192.168.1.100/32 0,
                127.0.0.1/32 0,
                0.0.0.0/0 1);

ip ::   Strip(14)
     -> CheckIPHeader(VERBOSE true)
     -> [0]rt;

c0[2] -> Paint(1) -> ip ;

// IP packets for this machine.
// ToHost expects ethernet packets, so cook up a fake header.
rt[0] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> tol;

rt[1] -> arpq0;

FromHost(fake, 192.168.1.1/32)
    -> fromhost_cl :: Classifier(12/0806, 12/0800);
 fromhost_cl[0] -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -> ToHost(fake);
 fromhost_cl[1] -> ip // IP packets

// Unknown ethernet type numbers.
c0[3] -> Discard;


Removed MOAR shapers

Removed MOAR shapers

// Output configuration:
//
// Packets for the network are put on output 0
// Packets for the host are put on output 1
elementclass Host {
	$address, $gateway |

	// Shared IP input path
	ip :: Strip(14)
		-> CheckIPHeader
		-> tos::RSVPToSSetter(rsvp)
		-> rsvp_cl::IPClassifier(proto 46, -)[1]
		-> rt :: StaticIPLookup(
			$address:ip/32 0,
			$address:ipnet 1,
			0.0.0.0/0 $gateway 1)
		-> [1]output;

	rt[1]
		-> ipgw :: IPGWOptions($address)
		-> FixIPSrc($address)
		-> ttl :: DecIPTTL
		-> frag :: IPFragmenter(1500)
		-> arpq :: ARPQuerier($address)
		-> qos_cl::IPClassifier(tos 0, -)
		-> beQueue::Queue
		-> [1]prio::PrioSched
		-> LinkUnqueue(LATENCY 0, BANDWIDTH 1000kbps)
		-> output;

	qos_cl[1]
		-> qosQueue::Queue
		-> [0]prio;

	rsvp_cl[0]
		-> rsvp::RSVPElement($address, AUTORESV false)
		-> rt;

	ipgw[1]	-> ICMPError($address, parameterproblem)
		-> qos_cl;

	ttl[1]	-> ICMPError($address, timeexceeded)
		-> qos_cl;

	frag[1]	-> ICMPError($address, unreachable, needfrag)
		-> qos_cl;

	// incoming packets
	input	-> HostEtherFilter($address)
		-> in_cl :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800)
		-> arp_res :: ARPResponder($address)
		-> output;

	in_cl[1]
		-> [1]arpq;

	in_cl[2]
		-> ip ;
}

// Output configuration:
//
// Packets for the network are put on output 0
// Packets for the host are put on output 1
elementclass Host {
	$address, $gateway |

	// Shared IP input path
	ip :: Strip(14)
		-> CheckIPHeader
		-> tos::RSVPToSSetter(rsvp)
		-> rsvp_cl::IPClassifier(proto 46, -)[1]
		-> rt :: StaticIPLookup(
			$address:ip/32 0,
			$address:ipnet 1,
			0.0.0.0/0 $gateway 1)
		-> [1]output;

	rt[1]
		-> ipgw :: IPGWOptions($address)
		-> FixIPSrc($address)
		-> ttl :: DecIPTTL
		-> frag :: IPFragmenter(1500)
		-> arpq :: ARPQuerier($address)
		-> qos_cl::IPClassifier(tos 0, -)
		-> beQueue::Queue
		-> Shaper(87500)
		-> [1]prio::PrioSched
		-> LinkUnqueue(LATENCY 0, BANDWIDTH 1000kbps)
		-> output;

	qos_cl[1]
		-> qosQueue::Queue
		-> Shaper(37500)
		-> [0]prio;

	rsvp_cl[0]
		-> rsvp::RSVPElement($address, AUTORESV false)
		-> rt;

	ipgw[1]	-> ICMPError($address, parameterproblem)
		-> qos_cl;

	ttl[1]	-> ICMPError($address, timeexceeded)
		-> qos_cl;

	frag[1]	-> ICMPError($address, unreachable, needfrag)
		-> qos_cl;

	// incoming packets
	input	-> HostEtherFilter($address)
		-> in_cl :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800)
		-> arp_res :: ARPResponder($address)
		-> output;

	in_cl[1]
		-> [1]arpq;

	in_cl[2]
		-> ip ;
}


Fixed config to actually route packets

Fixed config to actually route packets

require(package "stream_manager")

c0 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

c1 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

FromDevice(eth0, PROMISC true) -> c0 ;

FromDevice(eth1, PROMISC true) -> c1 ;

out0 :: Queue(5000)
//    -> ARPPrint(TIMESTAMP false, ETHER true)
    -> ToDevice(eth0)
    -> Discard ;
out1 :: Queue(5000)
//    -> ARPPrint(TIMESTAMP false, ETHER true)
    -> ToDevice(eth1)
    -> Discard ;

arpq0 :: ARPQuerier(169.254.9.88, 94:57:A5:8E:12:F4) -> out0 ;
arpq1 :: ARPQuerier(169.254.9.93, 94:57:A5:8E:12:F5) -> out1 ;

ar0 :: ARPResponder(169.254.9.88/16 94:57:A5:8E:12:F4) ;

ar1 :: ARPResponder(169.254.9.93/16 94:57:A5:8E:12:F5) ;
c1[0] -> ar0 -> out1;
c0[0] -> ar1 -> out0;

c0[1] ->[1]arpq0 ;
c1[1] ->[1]arpq1 ;

stream :: StreamManager;
stream[0] -> arpq1 ;
stream[1] -> SetTCPChecksum -> SetIPChecksum-> arpq1 ;

cl :: IPClassifier(dst tcp port 9876, tcp and syn and not ack, tcp and (fin or rst), tcp and ack, -);
//cl :: IPClassifier(src host 10.42.0.0/24, tcp and syn and not ack, tcp and (fin or rst), tcp and ack, -);
cl[0]->[0]arpq1 ;
cl[1]->[0]stream;// add stream
cl[2]->[2]stream;// remove stream
cl[3]->[1]stream;// update stream
cl[4]->[3]stream;// do nothing, pass packets along

//p:: PullTee(2);
//p[0]->Discard;
//p[1]->cl;

ip0 :: Strip(14)
    -> CheckIPHeader(VERBOSE true)
//    -> IPPrint(TIMESTAMP false,  CONTENTS NONE)
    ->  cl ;

c0[2]-> ip0;

ip1 :: Strip(14)
    -> CheckIPHeader(VERBOSE true)
//    -> IPPrint(TIMESTAMP false, TOS true, CONTENTS NONE)
    -> arpq0 ;

c1[2]-> ip1;
c0[3] -> Discard;
c1[3] -> Discard;

require(package "stream_manager")

c0 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

c1 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

FromDevice(eth0, PROMISC true) -> c0 ;

FromDevice(eth1, PROMISC true) -> c1 ;

out0 :: Queue(5000)
//    -> ARPPrint(TIMESTAMP false, ETHER true)
    -> ToDevice(eth0)
    -> Discard ;
out1 :: Queue(5000)
//    -> ARPPrint(TIMESTAMP false, ETHER true)
    -> ToDevice(eth1)
    -> Discard ;

arpq0 :: ARPQuerier(169.254.9.88, 94:57:A5:8E:12:F4) -> out0 ;
arpq1 :: ARPQuerier(169.254.9.93, 94:57:A5:8E:12:F5) -> out1 ;

ar0 :: ARPResponder(169.254.9.88/16 94:57:A5:8E:12:F4) ;

ar1 :: ARPResponder(169.254.9.93/16 94:57:A5:8E:12:F5) ;
c1[0] -> ar0 -> out1;
c0[0] -> ar1 -> out0;

c0[1] ->[1]arpq0 ;
c1[1] ->[1]arpq1 ;

stream :: StreamManager;
stream[0] -> arpq0 ;
stream[1] -> SetTCPChecksum -> SetIPChecksum-> arpq0 ;

cl :: IPClassifier(dst tcp port 9876, tcp and syn and not ack, tcp and (fin or rst), tcp and ack, -);
//cl :: IPClassifier(src host 10.42.0.0/24, tcp and syn and not ack, tcp and (fin or rst), tcp and ack, -);
cl[0]->[0]arpq0 ;
cl[1]->[0]stream;// add stream
cl[2]->[2]stream;// remove stream
cl[3]->[1]stream;// update stream
cl[4]->[3]stream;// do nothing, pass packets along

p:: PullTee(2);
p[0]->Discard;
p[1]->cl;

ip0 :: Strip(14)
    -> CheckIPHeader(VERBOSE true)
//    -> IPPrint(TIMESTAMP false,  CONTENTS NONE)
    ->  cl ;

c0[2]-> ip0;

ip1 :: Strip(14)
    -> CheckIPHeader(VERBOSE true)
//    -> IPPrint(TIMESTAMP false, TOS true, CONTENTS NONE)
    -> arpq0 ;

c1[2]-> ip1;
c0[3] -> Discard;
c1[3] -> Discard;


More tweaks

More tweaks

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/matthicksj/thinkpad-fixes.git/'


added test.click

added test.click

c0 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

c1 :: Classifier(12/0806 20/0001,
                  12/0806 20/0002,
                  12/0800,
                  -);

FromDevice(eth0, PROMISC true) -> c0 ;

FromDevice(eth1, PROMISC true) -> c1 ;

out0 :: Queue(5000)
//    -> ARPPrint(TIMESTAMP false, ETHER true)
    -> ToDevice(eth0)
    -> Discard ;
out1 :: Queue(5000)
//    -> ARPPrint(TIMESTAMP false, ETHER true)
    -> ToDevice(eth1)
    -> Discard ;

arpq0 :: ARPQuerier(169.254.9.88, 94:57:A5:8E:12:F4) -> out0 ;
arpq1 :: ARPQuerier(169.254.9.93, 94:57:A5:8E:12:F5) -> out1 ;

ar0 :: ARPResponder(169.254.9.88/16 94:57:A5:8E:12:F4) ;

ar1 :: ARPResponder(169.254.9.93/16 94:57:A5:8E:12:F5) ;
c1[0] -> ar0 -> out1;
c0[0] -> ar1 -> out0;

c0[1] ->[1]arpq0 ;
c1[1] ->[1]arpq1 ;

ip0 :: Strip(14)
    -> CheckIPHeader(VERBOSE true)
//    -> IPPrint(TIMESTAMP false,  CONTENTS NONE)
    ->  arpq1 ;

c0[2]-> ip0;

ip1 :: Strip(14)
    -> CheckIPHeader(VERBOSE true)
//    -> IPPrint(TIMESTAMP false, TOS true, CONTENTS NONE)
    -> arpq0 ;

c1[2]-> ip1;
c0[3] -> Discard;
c1[3] -> Discard;

error: pathspec 'test.click' did not match any file(s) known to git


Adding click variant

Adding click variant


Added test script

Added test script

error: pathspec 'click-rsvp/scripts/test.click' did not match any file(s) known to git