Ok. This covers every ipv6 and ipv4 address.
“^\s*((([0-9A-Fa-f]1,4}:){7}([0-9A-Fa-f]{1,4}:)6}(:[0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2}))|:))|(([0-9A-Fa-f]1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3}))?:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))3})):)3}(((:[0-9A-Fa-f]{1,4}){1,4}))0,2}:((25[0-5]))|:))|(([0-9A-Fa-f]1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5}))0,3}:((25[0-5]))|:))|(([0-9A-Fa-f]1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6}))0,4}:((25[0-5]))|:))|(:(((:[0-9A-Fa-f]1,4}){1,7}))0,5}:((25[0-5]))|:)))(%.+)?\s*$”
deleted by creator
IPv6 was a mistake. We should have just added an addition octet
They played us for absolute fools!
That would allow for like, 2 trillion devices? Feels like a bandaid, my dude. Next you’re gonna suggest a giant ice cube in the ocean once a year to stop global warming.
And nuke the hurricanes
So add two more octets:
Moat companies will still just use something like 10.0.13.37.0.1
IPv6 is not made with internal networks in mind lol
IPv
heared of ipv5?
Plus the MAC address
I knew there would be someone with the regex.
It’s always a treat to debug a regex of that size.
You’re more of a perl programmer than network engineer :P
*exits the room*
deleted by creator
.*
Technically, this one also matches everything:
Please don’t. Use regex to find something that looks like an IP then build a real parser. This is madness, its’s extremely hard to read and a mistake is almost impossible to spot. Not to mention that it’s slow.
Just parse [0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} using regex (for v4) and then have some code check that all the octets are valid (and store the IP as a u32).
And dupe check. 0.0.0.0 and 000.000.000.000 may both be valid, but they resolve the same
0.0.0.0/0 0::0/0
You didn’t specify it couldn’t be in CIDR block notation…
Remember, when we abbreviate an ipv6 address all leading zeros are reduced to a single 0.
E.g
0003 would just become 03
When there are geoups of 4 zeros these can be represented as a single 0 or as a double colon ::
But we can only use the :: once so when summarizing an address containing multiple groups of 4 0s one after the other they can all be abbreviated to a single ::
Eg
fe80:0000:0000:0000:0210:5aff:feaa:20a2 would become fe80::210:5aff:feaa:20a2
Therefore it is perfectly valid to abbreviate an address of 0000:0000:0000:0000:0000:0000:0000:0000 /0 to just ::/0
Eh, I’ve seen some software internally prefer 0::0 instead of just ::0 or :: . Notation wise though you are correct, it is unnecessary.
::/0
0.0.0.0 /0 ::/0
SUCK MY DICK, GRU!
This is the way.
deleted by creator
Its CIDR notation. So /0 means the subnet mask has no on bits and would read as 0.0.0 0 if you had a /1 that turns 1 bit on in the subnet mask, so it would be 128.0.0.0.
If i had a /24 which is the subnet mask used for most small networks like your home router. There would be 255 minus 2 addresses available for clients (phones, pcs etc) so the subnet mask would have 24 on bits and read 255.255.255.0, which you may be familiar with.
(Assuming you dont know much, not to insult you, you might know plenty), but when writing any kind of instructions or guides, i was always told to assume the reader knows absolutely nothing and miss nothing out.
:00
-:ff
Edit: Just learnt this can be also noted as:
::
-::f
This is gonna take a while…
0.0.0.0
0.0.0.1
0.0.0.2
0.0.0.3
…
0.0.0.0/0
::/0
Winrar
Chicken dinrar?
0.0.0.0/0
1 and 0. Some assembly required.
32 or 128 of them, depending on protocol.
one of them has a 7 I’m pretty sure
I mean if I name them do I have to own the domain or…
I’ll start.
0.0.0.1: Sophie
Your turn.
0.0.0.2 is Bob
0.0.0.3 is Clarence
0.0.0.4 is Darryl
127.0.0.1 is you
127.0.0.1
Heh, you just doxxed yourself
deleted by creator
That’s 1/256th of IPv4
0/0 and ::/0
Funny. I put 0/0 first then reconsidered, but I don’t know why.
People name IPs outside of DNS, I mean is there like a Susan or a Karen, perhaps a Clark IP?