• Login
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.
  • M
    Michael Vincent
    last edited by Jul 11, 2019, 2:21 PM

    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.

    E 2 Replies Last reply Jul 11, 2019, 4:12 PM Reply Quote 0
    • E
      Ekopalypse @Michael Vincent
      last edited by Jul 11, 2019, 4:12 PM

      @Michael-Vincent

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

      1 Reply Last reply Reply Quote 1
      • E
        Ekopalypse @Michael Vincent
        last edited by Jul 11, 2019, 4:23 PM

        @Michael-Vincent

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

        1 Reply Last reply Reply Quote 1
        • M
          Michael Vincent
          last edited by Michael Vincent Jul 11, 2019, 4:25 PM Jul 11, 2019, 4:24 PM

          @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.

          E 1 Reply Last reply Jul 11, 2019, 4:32 PM Reply Quote 2
          • E
            Ekopalypse @Michael Vincent
            last edited by Ekopalypse Jul 11, 2019, 4:33 PM Jul 11, 2019, 4:32 PM

            @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
            • R
              Rulber de la Torre
              last edited by Jul 24, 2019, 9:19 PM

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

              1 Reply Last reply Reply Quote -1
              • R
                Rulber de la Torre
                last edited by Jul 25, 2019, 1:37 PM

                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