[Click] [click]Destination IP Annotation

Pradeep Pradeep pradeep_addada at yahoo.co.in
Sun Feb 22 05:22:13 EST 2009


Hi,

     Why/When will the destination IP annotation be zero ? I was trying a routing exrcise with two different scripts. The Lookup element would work in one case and would not work in one case. I printed out the dst_ip_anno() in the 'NOT WORKING CASE'. I do not know what went wrong.   
---------------------------------------------------------
The script in which the annotation is being printed as zero.

Fc::LinearIPLookup(
 10.1.2.2/32                 1,
 10.1.3.2/32             2 ,
 255.255.255.255/32      0.0.0.0        
 0,
 0.0.0.0/0                0,
 0.0.0.0/32               0);


FromDevice(eth2)
->Strip(14)
->Fc;

FromDevice(eth3)
->Strip(14)
->Fc;

Fc[0]->Print(T)->Discard;

Fc[1]
->EtherEncap(0x0800,00:07:E9:1F:99:95,00:02:B3:3F:7D:C7)
->q1::Queue(20000)
->ToDevice(eth2);

Fc[2]
->EtherEncap(0x0800,00:07:E9:1F:98:30,00:07:E9:1F:9A:12)
->q2::Queue(20000)
->ToDevice(eth3);
----------------------------------------------------------

******************************************
When I change the script to the one below it would work normally(correct annotation would be printed) . Is ARP doing any trick?

AddressInfo (


     10_1_2_3_mac   
 00:D0:B7:10:2D:9E,//eth0-r1
        10_1_1_3_mac    00:D0:B7:10:2D:D5,//eth1-r1



local_DOM1              10.1.2.254              10.1.2.0/24,
local_DOM1_bcast        10.1.2.255,
local_DOM1_default      10.1.2.0,

local_DOM4              10.1.1.254              10.1.1.0/24,
local_DOM4_bcast        10.1.1.255,
local_DOM4_default      10.1.1.0,


 source1                
 10.1.1.0/24,
 sink1                   10.1.2.0/24,


);



rt :: LinearIPLookup(

sink1           2 ,

 source1        1,

local_DOM1              0,
local_DOM1_bcast        0,
local_DOM1_default      0,
local_DOM4              0,
local_DOM4_bcast        0,
local_DOM4_default      0,

255.255.255.255/32      0.0.0.0        
 0,
0.0.0.0/0               0,
0.0.0.0/32              0);





elementclass CheckTimeExceeded {
input-> ttl:: DecIPTTL
ttl[0]->output
ttl[1]-> ICMPError(local_DOM1, timeexceeded)->output

}


ip :: Strip(14)
                  
-> rt;

arpt :: Tee(3);

c0 :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -);
FromDevice(eth2)->cas1::Classifier(15/0?,-);
cas1[0]->c0;
cas1[1]->c0;
out0 :: Queue(200) -> todevice0 :: ToDevice(eth2);
c0[0] -> ar0 :: ARPResponder(local_DOM1 10_1_2_3_mac) -> out0;
arpq0 :: ARPQuerier(local_DOM1, 10_1_2_3_mac) -> out0;
c0[1] -> arpt;
arpt[0] -> [1]arpq0;
c0[2] -> Paint(1)-> ip;
c0[3] -> Discard;

c1 :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -);
FromDevice(eth3)->c1;
out1 ::
 Queue(2000) ->todevice1 :: ToDevice(eth3);
c1[0] -> ar1 :: ARPResponder(local_DOM4 10_1_1_3_mac) -> out1;
arpq1 :: ARPQuerier(local_DOM4, 10_1_1_3_mac) -> out1;
c1[1] -> arpt;
arpt[1] -> [1]arpq1;
c1[2] -> Paint(2)-> ip;
c1[3] -> Discard;


arpt[2] -> Discard;
rt[0] ->EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> Discard;



rt[1]
-> DropBroadcasts
    -> cp1 :: PaintTee(2)
    -> gio1 :: IPGWOptions(local_DOM4)
    -> FixIPSrc(local_DOM4)
    -> dt1 ::
 DecIPTTL
                                                                    
   -> fr1 :: IPFragmenter(1500)
    ->[0]arpq1;
dt1[1] -> ICMPError(local_DOM4, timeexceeded) -> rt;
fr1[1] -> ICMPError(local_DOM4, unreachable, needfrag) -> rt;
gio1[1] -> ICMPError(local_DOM4, parameterproblem) -> rt;
cp1[1] -> ICMPError(local_DOM4, redirect, host) -> Discard;



rt[2]
    //->Print(U)
    -> DropBroadcasts
    -> cp6 ::
 PaintTee(1)
    -> gio6 :: IPGWOptions(local_DOM1)
    -> FixIPSrc(local_DOM1)
    -> dt6 :: DecIPTTL
    -> fr6 :: IPFragmenter(1500)
    -> [0]arpq0;
dt6[1] -> ICMPError(local_DOM1, timeexceeded) -> rt;
fr6[1] -> ICMPError(local_DOM1, unreachable, needfrag) -> rt;
gio6[1] -> ICMPError(local_DOM1, parameterproblem) -> rt;
cp6[1] -> ICMPError(local_DOM1, redirect, host) -> Discard;
******************************************
 
Regards,
Krishna.
                                                                                        
 
                                                                                                                                                               
 1,1           Top



      Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/


More information about the click mailing list