# 1250, Tue 31 Oct 95 rules.two-adj-routers # # Nevil Brownlee, ITSS Technology Development, University of Auckland # # # Rule specification file to tally IP packets between gaeways # # -------+-------------------+-----------------+-------- # | | | # +----+-----+ +----+-----+ +---+---+ # | g1 | | g2 | | meter | # +-+-+-+-+--+ +-+-+-+-+--+ +-------+ # # FlowClass = 3 for traffic from g1 to g2, # = 2 for other traffic through g2 # = 1 for other traffic through g1 # # The rules work as follows: # Non-IP packets are ignored # Packets from g1 to g2 are counted via the g3: rule # Packets from g2 to g1 are retried; we want them counted as # reverse-flow packets via the g3: rule # Other packets from/to g1 are counted via the g1: rule # Other packets from/to g2 are counted via the g1: rule # Packets with source other than g1 or g2 are retried via the # rule just before s3: packets which don't have g1 or g2 # as source or dest will fail on the second retry and be ignored # SET 4 # RULES SourcePeerType & 255 = IP: Pushto, ip_pkt; Null & 0 = 0: Ignore, 0; # ip_pkt: SourceAdjacentAddress & FF-FF-FF-FF-FF-FF = 00-80-48-81-0E-7C: Goto, s1; Null & 0 = 0: Goto, s2; s1: DestAdjacentAddress & FF-FF-FF-FF-FF-FF = 02-07-01-04-ED-4A: GotoAct, g3; Null & 0 = 0: GotoAct, g1; # s2: SourceAdjacentAddress & FF-FF-FF-FF-FF-FF = 02-07-01-04-ED-4A: Goto, s3; Null & 0 = 0: Retry, 0; s3: DestAdjacentAddress & FF-FF-FF-FF-FF-FF = 00-80-48-81-0E-7C: Retry, 0; Null & 0 = 0: GotoAct, g2; # g1: FlowClass & 255 = 1: PushtoAct, c_pkt; g2: FlowClass & 255 = 2: PushtoAct, c_pkt; g3: FlowClass & 255 = 3: PushtoAct, c_pkt; # c_pkt: SourceAdjacentAddress & FF-FF-FF-FF-FF-FF = 0: PushPkttoAct, Next; DestAdjacentAddress & FF-FF-FF-FF-FF-FF = 0: PushPkttoAct, Next; SourcePeerAddress & 255.255.255.255 = 0: PushPkttoAct, Next; DestPeerAddress & 255.255.255.255 = 0: PushPkttoAct, Next; Null & 0 = 0: Count, 0 # FORMAT FlowRuleSet FlowIndex FirstTime " " FlowClass " " SourceAdjacentAddress DestAdjacentAddress " " SourcePeerType SourcePeerAddress DestPeerAddress " " ToOctets FromOctets; # STATISTICS # # end of file