Ethernet Switching
Ethernet Switching

EX4600 Hex Encoding

[ Edited ]
‎09-16-2019 02:48 PM

(Edit: Oops this is on an EX4600)

 

Does anyone know the proper syntax to encode a string as hex on an EX4600? I am trying to configure:

 

set access address-assignment pool v202-pool family inet dhcp-attributes boot-file "smsboot\x64\wdsnbp.com" 

 

However the CLI translates \x64 as a hex-encoded character and replaces it with 'd':

access {
    address-assignment {
        pool v202-pool {
            family inet {
                dhcp-attributes {
                    boot-file "smsbootd\wdsnbp.com";
                }
            }
        }
    }
}

 

On an SRX I can just encode the whole string in hex:

set access address-assignment pool v202-pool family inet dhcp-attributes boot-file "\x73\x6d\x73\x62\x6f\x6f\x74\x5c\x78\x36\x34\x5c\x77\x64\x73\x6d\x67\x66\x77\x2e\x65\x66\x69" 
access {
    address-assignment {
        pool v202-pool {
            family inet {
                dhcp-attributes {
                boot-file "smsboot\x64\wdsnbp.com";
                }
            }
        }
    }
}

 

But on the EX it becomes somehow only partially translated:

access {
    address-assignment {
        pool v202-pool {
            family inet {
                dhcp-attributes {
                    boot-file "s\x6dsb\x6f\x6ft\x5cx64\x5cwds\x6dgfw\x2eefi";
                }
            }
        }
    }
}

 

1 REPLY 1
Ethernet Switching
Solution
Accepted by topic author smicker
‎09-17-2019 03:30 AM

Re: EX4600 Hex Encoding

‎09-17-2019 03:30 AM

To answer my own question, encoding just the 'x' worked:

 

set access address-assignment pool v202-pool family inet dhcp-attributes boot-file "smsboot\\x7864\wdsnbp.com"
    pool v202-pool {
        family inet {
            dhcp-attributes {
                boot-file "smsboot\x64\wdsnbp.com";
            }
        }
    }