Community
    • Login

    userDefinedLang IP address parsing

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 1.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Michael VincentM
      Michael Vincent
      last edited by

      I have a user defined language for Cisco IOS and using the UserDefinedLang dialog, I have a “Number Style” defined. This seems to match IPv4 addresses as well as just plain decimal numbers. However, for IPv6 addresses, the addresses contain hex letters (a-f) so they aren’t recognized as numbers.

      The UDL spec seems to indicate you can use a prefix (0x) and the use extras (A B C D E F a b c d e f) and that “does” work, but IPv6 address don’t have the 0x prefix.

      Is there someway to get an UDL to recognize IPv6 addresses?

      interface Loopback0
       ip address 10.254.254.1 255.255.255.255
       ipv6 address 2001:DB8:AFE:FE00::1/128
      

      I’d like those “middle bits” (DB8:AFE:FE00) to match the formatting of the numbers surrounding them.

      EkopalypseE 2 Replies Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @Michael Vincent
        last edited by

        @Michael-Vincent

        did you try a delimiter using : as start and :: as end?

        1 Reply Last reply Reply Quote 1
        • EkopalypseE
          Ekopalypse @Michael Vincent
          last edited by

          @Michael-Vincent

          maybe using ((EOL)) as end is better !?

          1 Reply Last reply Reply Quote 1
          • Michael VincentM
            Michael Vincent
            last edited by Michael Vincent

            @Ekopalypse said:

            did you try a delimiter using : as start and :: as end?

            NO! And that was a great help…

            I now have

            Delimiter 1
            Open = :
            Close = ((EOL :: /))

            which helps catch the case of a full address (e.g., 2001:DB8:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF/64) i.e., there is no “::”.

            I think this is workable for now!

            Cheers.

            EkopalypseE 1 Reply Last reply Reply Quote 2
            • EkopalypseE
              Ekopalypse @Michael Vincent
              last edited by Ekopalypse

              @Michael-Vincent

              hmm, not quite sure if it is expected to have one opening but three closing identifiers. A first test didn’t reveal any issues but who knows …
              And if I think about it, I assume EOL will always be true and therefore the other two won’t get into consideration at all.

              1 Reply Last reply Reply Quote 1
              • Rulber de la TorreR
                Rulber de la Torre
                last edited by

                Good morning, can you help me to register ULD with IPV4

                1 Reply Last reply Reply Quote -1
                • Rulber de la TorreR
                  Rulber de la Torre
                  last edited by

                  Hy, the problem is ok in IPV4, add config:

                  Prefix 2 : 0 1 2 3 4 5 6 7 8 9
                  Extras 1: .
                  Range: -
                  Decimal separator: Dot

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors