Forum Discussion

Julian_Grunnell's avatar
Julian_Grunnell
Icon for Nimbostratus rankNimbostratus
Jul 11, 2008

LINK::vlan_id + tcpdump

Hi - hoping there's a simple answer to this, but I was mucking around with the iRule that "when CLIENT_ACCEPTED" logs the vlan_id via [LINK::vlan_id], this appears to work BUT why does the vlan_id get logged as:

 

 

"tag 12285" - for example?

 

 

When the 2 vlan's defined on the LTM are:

 

 

b vlan list

 

vlan external {

 

tag 4093

 

interfaces 1.1

 

}

 

vlan internal {

 

tag 4094

 

interfaces 1.2

 

}

 

 

If I run a tcpdump it shows the vlan_id as:

 

 

"12:56:06.051542 802.1Q vlan4093 P0 .... etc."

 

 

So I would have thought when the iRule is run I would see vlan_id as 4093 OR 4094, where's it get 12285 from?

 

 

Thanks in advance - Julian.

6 Replies

  • Looking at the hex:

     

     

    4093 0FFD

     

    12285 2FFD

     

     

    Unsure why that leading hex 2 is added.
  • I'm on 9.4.3 HF2, and I don't see that issue. Perhaps one of your vlanID's overlaps the vlangroupID, and that's why the locally-unique bit is being set? Anyway, you can strip that bit off:

     
     when CLIENT_ACCEPTED { 
       log local0. "VLAN ID as is: [LINK::vlan_id]" 
       log local0. "VLAN ID as desired: [expr 0x[format %x [LINK::vlan_id]] & 0xdfff]" 
     } 
      
     Here's the log output from my test box: 
      
     Jul 11 09:11:12  Rule vlanidtest-rule: VLAN ID as is: 12285 
     Jul 11 09:11:12  Rule vlanidtest-rule: VLAN ID as desired: 4093 
     
  • Hi - thanks I'll take a look at the iRule you've provided, it's a HA Pair running 9.4.4 HF 1. And the vlangroup is defined as such:

     

     

    vlangroup all {

     

    proxy excludes 192.168.10.11

     

    }

     

    vlangroup vlangroup1 {

     

    bridge in standby disable

     

    tag 1

     

    members

     

    external

     

    internal

     

    }

     

     

    Thanks - J.