Better HN
topnewbestaskshowjobs
Log inSign up

mesrik

189 karma · joined Jun 23, 2024 (2y ago) · 89 submissions

https://fi.linkedin.com/in/rikumeskanen
Submissions

comment 1w ago · link · parent

Well, mostly yes though some are less effective and may surprise time it takes to complete :)

https://en.wikipedia.org/wiki/Bogosort

"Two versions of this algorithm exist: a deterministic version that enumerates all permutations until it hits a sorted one, and a randomized version that randomly permutes its input and checks whether it is sorted.

An analogy for the working of the latter version is to sort a deck of cards by throwing the deck into the air, picking the cards up at random, and repeating the process until the deck is sorted. In a worst-case scenario with this version, the random source is of low quality and happens to make the sorted permutation unlikely to occur."

comment 1w ago · link · parent

>Ideally the management level wouldn't be on the tools, yes.

OK, I didn't get it first when writing reply, but after rereading I get it.

Then if your tools would be out of reach for those who are not expected to make changes, but just see configs etc. that would perhaps make opening to solve your unapproved modifications.

>Sure would be nice to keep the management level out of RBAC

TACACS+ and RADIUS are both full fledged AAA which can work with RBAC's. There are commercial versions which make it quite easy to implement. FOSS versions it much harder without lot of scripting, patching, programming and it's still without much more work to make it properly reliable.

So if your tools do not expect making changes to network gear, but just check, monitor etc. don't let tools have read-write (enable secret), grant read-only + some additional with IOS "parser view ...." and keep read-write with network team only.

But if that what you described is mandated by others, then set up at least a system that backups and keeps logs who did what. TACACS+ free versions are fully capable doing that.

comment 1w ago · link · parent

>That'll stop people logging in and making local changes and expecting everyone else to somehow just know about their tampering.

How about changing "enable secret" password and not sharing it with those who you do not approve making changes?

Or even setting up TACACS+ or RADIUS service and getting SSO to network gear that way. TACACS+ even free versions by default as an AAA that last A accounting makes you able to log all logins and commands being executecuted IOS cli.

Also, you can set up a management server (station) which collects all configs, checks in a db or VCS (RCS, CSV, git) which you can then build on changes monitoring, revert back configs as far as you have saved config versions. Like I had while working over 20 years backlog about half thousand switchers and other gear. RANCiD can do it for cheap, if you don't like to buy commercial solution which also can do similar things. Oh, OpenNMS and FreeNMS probably can do this also if you prefer getting those. I didn't use those as we built from mid 90's own systems and didn't bother changing at least when I was still working.

If you still need to allow other users login let other commands that enable level requires, you can use a "parser view group-name" and pick what additional commands you let them also access from exec enable level (15) without letting then become full enable 15 level users.

ps. Cisco IOS has long had service which autoloads config from TFTP server, but that isn't perhaps what you are looking for. It's mostly intended getting initial config uploaded to system enabling remote management over telnet and further making proper config automation easier.

comment 1w ago · link · parent

Do you remember which switch models it did happen to you?

I remember that SuperStack 2700 ethernet switches with ATM LEC (lan emulation client) card it did happen under prolonged heavy load heat accumulated with then caused sudden reboots. Occasionally these events switch was as factory reset was done, none of configuration made was left.

First with ATM LANE with ethernet STP (802.3D) was flimsy and buggy, so it took a while when that was fixed without STP spurious loops broadcast storms did quite easily overload edge switches and cause those sudden reboots.

We had to keep minimal ethernet management part configuration printed next to switches so that first entering primary network settings we could TFTP-load production config and get switch back to production quicker. But long without OOB management (serial port & remote telnet) it was always was hurry to get on site fixing locally these events.

I wasn't earning those occasions much after we got most often issues caused switches replaced with another other brand with did not suffer these problems.

comment 1w ago · link · parent

I remember also original EtherLink 3C501 and 3C505 with 3+Share yay!

Both were quite exiting and beautiful looking new fancy cards early -85 when I first had them on my desk. But in reality 501 was a dumb as a dodo and 505 with its dedicated 80186 (co)processor for 3+Share fileserver intended use not much better.

Here are links to pictures of those wonders we got -80 and cursed them later :)

  https://theretroweb.com/expansioncards/s/3com-etherlink-3c501-assy-1248

  https://theretroweb.com/expansioncards/s/3com-etherlink-plus-3c505b-assy-2012

comment 1w ago · link · parent

Yes, bought TippingPoint[1], one of the first NGIPS makers. That were one of first very capable L2 IPS to market. I did have opportunity to test one for a while, but did not get funding for it approved.

3Com was also one of the early ATM gear vendors with CELLplex 7000 ATM switch and SuperStack 2700 ethernet switches with LEC. I would say mostly[2] reliable and working gear few years before Cisco LS1010's ATM switches, Catalyst 5000 and first 3000 series ethernet switches after acquiring Kalpana.

1) https://en.wikipedia.org/wiki/TippingPoint

2) SuperStack switches had bad habit suddenly reboot under prolong3ed heavy load and perhaps heat problems too, which then also occasionally did factory reset and lose configuration. And the menu based configuration with binary only tftp upload/download configs when better alternatives came available these were replaced any location where that ever happened causing issues.

comment 3w ago · link · parent

Agreed completely. Junos have niceties like copying parts of config, adding config even beforeinterface cards are inserted, renaming/moving parts of config, of course quickly config parts, viewing and exporting config various ways etc. etc. Cisco improved config viewing a bit with IOS-XR too, so that it's possible to scroll like Junos had ages ago.

However there are also things Junos vs Cisco was that Cisco had made bit easier. Just to mention few

1) a simple and quick way to add aliases to config file, which made life easier with long commands that could be otherwise always in hurry hard to remember. Now later versions Junos they have made this better, before it involved twiddling with XML files OS-level etc.

2) IOS TCL scripting, that proved to be quite useful automation tool.

3) OS upgrades of course with a single flash blob made it easier than upgrading or downgrading FreeBSD based Junos.

comment 3w ago · link · parent

>So was Oracle and Microsoft Windows.

Cisco did provide updates via CCO and anonymous ftp server. They quite openly told that just download new image and test in your lab, and then if feature set did require licensing, please do it before deploying production. Trust was put on customers and they did very little to check and verify if customers did comply. Which is quite contrary to what for example Oracle practise is been.

>If history has taught us anything. It’s that the measure of a successful product is usually more to do with its sales people.

As someone who worked Cisco gear over thirty years I still remember why us networking did want cisco instead of many other brand devices and it hadn't anything to do with marketing and sales people did.

The Cisco IOS text based configuration was in early days of internet which made it so popular.

Many other manufacturers like HP, 3Com, Cabletron, Madge (IBM), Bridge, etc. did not get why we wanted and complained “give us textual configuration format like IOS has”.

With a plain text based configuration it was easy to adapt configuration from one model to have ready made templates for each model, upgrades and migration to new models were easier, you could use version controls (rcs,cvs, svn,... long before git) and then when RANCiD came it was easy to automate config backups, revert and rollback changes, pass audit with human readable configs and what was in production even long time after etc. In short text based configs made it possible to build large network scale configurations management tools.

IOS has compact, but quite easy to read config snippets made it much easier emailing others, posting examples newsgroups, opening TAC at Cisco CCO, books with examples, learning and teaching etc.

It took quite long before for example HP understood and switched text formats right after turn of century. Juniper seemed to understood right from beginning. But some like Fore, Nortel, Alcatel (ATM-switch makers) and many others did not understand before going out of business. Most of these others had either menus (3Com, HP) or a lousy CLI with obscure unique for just that device model and quite often not even option to print config or if they had not just with changes from default config but printing everything and providing no means to drop showing default. This made it manually while online very hard without external version control to even know what is current status and what had been changes.

BTW, this is still an issue with some manufacturers haven't understood and makes their devices much worse than they understand. Fortigate firewalls CLI is still like this. You can select a subsection of config to print, but it will no indication what differs from default configs. And the whole firewall config is hundreds of kilobytes. Good luck finding what's been changed unless you had saved default config when you started using that device!

When you have thousands to even tens of thousands of network devices in use as many were working you need to be rely that even when you encounter device failure and you don’t have same model any more available, you are able to adapt and find working fix configuring something else doing what is needed.

Binary and any non textual configurations may fit the purpose SOHO category devices, but when network grows even bit larger and configurations more complex there isn’t anything better than text base configs as far as us humans will need to configure and maintain those devices.

Cisco have had issues with software quality for sure, but it was Cisco IOS that was the reason it became so popular and we wanted to use it.

And we did put more weigh on manageability which that IOS text based configuration provided than for example speed some manufacturers got with their devices (Madge, etc.) and even when some Cisco switches dropped some Network World tests more packets we still wanted that manageability more and relied Cisco will fix those issues with software upgrades which it often did.

Juniper when it came end of 90's did understand this and made even better configuration system for Junos than IOS was and still is. Cisco have improved things with IOS-XR, but it's still not up to what Junos is currently.

e: fixed few typos and added that manageability chapter near end. Places where I did work none were always everything Cisco places. No, but either so called ABC (Anything But Cisco) places either. Cisco was and is still popular for those reasons mentioned above.

comment 3w ago · link · parent

>With drive letters, a neat functionality in DOS/Windows command prompts (don't ask me about Powershell) is that each letter can have its own "current directory".

I remember that NT4 did not have "current directory" context for each process. But but apparently[1] windows 2000 had it already. So what you write above is per process and not per logged in user right?

Asking, because I remember that Citrix which did Terminal Server 4.0 for NT4 had to license windows source code to be enable to make changes for their product at least somehow working with NT4. Up till that time Winddows did not keep current directory per process or at least user, but it was a global state.

So if you changed with "cd" current directory it changed for all processes which was a big issue for Citrox as they did look a way to make Windows a server class system, where each user had distinct environments with distinct default directories etc.

For me as I heard that then I did not understand what was Microsoft thinking letting still with NT such misfeatures remain shipped product and especially when they had real talent Dave Cutler been working on it.

I haven't been using windows besides using Visio a separate local VM since turn of century. So is Windows been since 2000 etc. a real multitasking multiuser system or does it still suffer such handicaps it had at least before?

[1] Microsoft licensed Citrix made changes and RDP protocol they had developed, then brought Server 2000 with terminal server product to compete with Citrix Terminal Server.

comment 3w ago · link · parent

It does, and for reason I'm assuming many already know why. But if you weren't joking and were living under a rock. Look up the guy, Dave Cutler, who were mostly responsible putting together both.

  https://en.wikipedia.org/wiki/Dave_Cutler
Youtube has many of his interviews. The Computer History Museum (CHM) two part is perhaps most extensive. Links below to these.

  https://www.youtube.com/watch?v=29RkHH-psrY
  https://www.youtube.com/watch?v=SVgSLud50ss

comment 1mo ago · link · parent

Red Hat patching slowness and upgrades from major version to next were reasons I gave up after 16 years using their distributions, including RHEL.

I had to fall back patching, repackaging and maintaining multiple times while waiting sometimes weeks them to issue fixed packages. I don't know what happened to Red Hat over the years, already before IBM purchased them. But they became too slow on this kind of issues.

Debian consistently provided fixes quickly next day at least and I never had any issues upgrades since from 7 to 12, when I retired. Only reason to do complete reinstall was that ext3 and ext4 disk formats had improvements, which made life bit easier with 64bit systems.

ps. No problems from 12 to 13 any more with my own systems at home.

comment 1mo ago · link · parent

I've had since Debian 8 (2015) few helper scripts to make me remember better how to manage approved CA's. There are three of those, which have been working all Debian versions since 8 to current 13.

# cat /usr/local/sbin/ca-certificates-list-active

  #!/usr/bin/env bash
  #
  # BFMI tool to list Debian CA certificates active  - mesrik, 2015
  #
  
  CA_CONFIG=/etc/ca-certificates.conf
  CA_REPO_DEBIAN=/usr/share/ca-certificates
  
  if [ -f $CA_CONFIG ]; then
      # study any ca-certificates which have been configured active
      for i in $(egrep -v '^[#!]' /etc/ca-certificates.conf) ; do
         cert_source=$(dirname $i)
         cert_file=$(basename $i)
         openssl x509 -in $CA_REPO_DEBIAN/$cert_source/$cert_file -noout -subject |\
           sed 's/^subject=//'
      done
  
  else
      echo "$(basename $0): Ooops, was not able to access $CA_CONFIG"
  fi
  
  # eof
  
# cat /usr/local/sbin/ca-certificates-reconfigure

  #!/usr/bin/env bash
  LANG=C dpkg-reconfigure ca-certificates
# cat /usr/local/sbin/ca-certificates-invalidate-all

  #!/usr/bin/env bash
  #
  # BFMI tool to invalidate all CA certificates in Debian Jessie - mesrik, 2015
  #
  
  CA_CONFIG=/etc/ca-certificates.conf
  prog=$(basename $0)
  usage="Usage: $prog  { -commit }"
  
  if [ $# -lt 1 ]; then
      echo $usage
      exit 1
  fi
  
  if [ "$1" = "-commit" ]; then
      if [ -f $CA_CONFIG ]; then
         backup_ext=$(date -r $CA_CONFIG +".%FT%T%z")
         perl -wpi$backup_ext -e 's/^([^!#].*)$/!$1/;' $CA_CONFIG
         if [ $? -eq 0 ]; then
            echo "$prog: backup $CA_CONFIG$backup_ext was made."
            /usr/sbin/update-ca-certificates
         fi
      else
         echo "$prog: Ooops, was not able to access $CA_CONFIG"
      fi
  else
      echo "$prog: Need -commit to actually invalidate all CA's"
  fi
  
  # eof

ps. I did bit of editing, I didn't expect Tab to be ignored when pasting here.

comment 1mo ago · link · parent

So would you like to write shell commands connected with pipes like that too?

So is this better too

  $ less | find / -type f -perm /6000 -ls
than ?

  $ find / -type f -perm /6000 -ls | less
Just because shell actually starts executables right to left when using pipes. Reason to this behaviour is because it can fail early if there is problem constructing pipe first and not spend lot of time something finding later that some pipe components can't start and receive data properly.

ps. I'm fine with current notation and would not like change it.

comment 1mo ago · link · parent

That Dan Gelbart lecture where he also explains how retroreflection[0] is used to detect remote viewing, was it anything with a lens or even human eye is really good.

[0] straight link to where he explains retroflection https://youtu.be/0MtRxX0crjU?t=3019

Also many other videos where he explains how to solve hard problems are really good too.

e: There seems to be commercial product using retroreflection advertised Youtube

https://www.youtube.com/watch?v=NaXSRpTeMbU

comment 2mo ago · link · parent

>> “There are two types of people: those who have suffered a catastrophic loss of data, and those who will.”

Also "There are just two types of equipment; those which are already broken and those which will be broken".

I've found a good way to point out anyone thinking right direction not to trust their valuable data in any single entity, product, location, etc.

When I heard it decades ago IIRC 80's Nokia Data Unix courses I went. The distinction made Backups is just 1/3 of the triad Redundancy, Backups, Archives.

1) Redundancy is what you get using RAID, multiple network connectivity etc. ie. good for avoiding single point of failures and avoiding loss service or product availability.

2) Backups are for recovering lost data needed returning lost running known state right before fault or some time state before what backup schedule and used rotation cycle can provide.

3) Archives are meant to saving valuable data not expected to change or active use and but there is need saving much longer periods.

Not seeing and understanding usefulness of difference between these seem hard some people I met over decades. Which then led to confusion, not knowing what they are up to with their data and also often later disappointment when they found out that for example backup programs are not great if you expected archiving instead.

comment 2mo ago · link · parent

Also to get the mood and sense how it felt following those flights media outlets back then there is great site

https://apolloinrealtime.org/

I've listened through those flights few times and it still each time takes me back to memories still giving me goosebumps. Especially Apollo 11 when I was nine year old kid listening tiny battery radio all nights at our summer cottage attic.

comment 2mo ago · link · parent

Right, it's true that if there is an amplifier stage then it doesn't work. But some devices have had also tiny speakers used for for user interface audio feedback mechanism also used beeping error codes etc. Those SoC can drive that kind load of quite well directly and there is just a tiny speaker coil from IO-pins. That kind of speaker can function lousy microphones. That's what that PoC was all about.

comment 2mo ago · link · parent

Many common SOC's MediaTek, Realtek, and Broadcom SOC's quite often used modern audio capable devices analog pins can be software defined either input or output.

IIRC I saw already Bruce Schneider's blog some team proof of concept where they listened using laptop speakers what was spoken in that room. Audio quality wasn't perfect, but it making sense what was spoken was good enough.

comment 3mo ago · link · parent

Yes, you are correct.

But when Turbo C with assembler (TASM) came out those were just great. And by that asm output generating feature it was often way faster way to write something first in C, translate to asm and go from there do what you wanted with that asm directly. I'm not sure which higher level compilers came with that feature, but once available it was many times just great thing to have for sure.

comment 3mo ago · link · parent

First thing came now from long time ago my former aussie colleagues (mates) in Saudi when we worked there. That when you get out plane and are asked to show passport by the border guards. And they usually ask some the usual questions and then perhaps like

Q: Do you have ever committed a crime or have criminal record?

For heavens sake even though down under they understand jokes, do not try your luck with an answer:

A: Is it still required? :)

Depending the person interviewing and how bad day have had already, they may get you some feedback and give a lesson. I don't know if this is true, but that what those colleagues then told and I think I'm gonna believe and not try joking in that situation.

comment 3mo ago · link · parent

It was released yesterday Aug. 20th. BTW in about two months they have 20th year anniversary from first production release.

22.

Netgate Released PfSense Community Edition Version 2.9.0(netgate.com ↗)

2 points · by mesrik · 3mo ago · 2 comments

comment 3mo ago · link · parent

Right, that ROM BASIC was such a waste for them for years.

Some clone makers quickly found out ways take advantage of that space adding more RAM there. Then bit later it came area where you could even map over 1MB placed memory blocks there with a config.sys loaded driver.

comment 3mo ago · link · parent

>This isn't so much a cmd thing as a fundamental Windows API thing. CreateProcess takes in the entire command line as a single string.

So is that CreateProcess much different from nix execve() which passes just a pointer to string of executable first followed by pointers to arguments *argv[], and process environment same way *envp[]?

Thus it is the shell which responsibility is to expand all wildcards before passing to that executable arguments

nix systems, which do not expand any wildcards itself before passing to executed program.

I'm no Windows programmer so, genuinely what's the difference from point of executed program and just that Windows any shells do not expand wildcards etc. ?

My previous post when I did mention that alternative c0.obj (not lib, sorry) that I for example had about 36 years ago from somewhere was a nifty modified trick which took that plain dumb MS-DOS COMMAND.COM passed string and instead just making it a char *argv[] array first expanded wildcards before your main() got control. It did work very well and saved quite bit of effort when I ported some tools to MS-DOS and I think there was another version of it for OS/2 (1.something) that I used also.

I did not have to add ported software from unix any command line expanding code myself because that alternative startup c0.obj did it for me. Shame I do not remember where I got it and who did it, but it was really good. Now thinking of it perhaps it was from Compu$erve some forum or WSMR-SIMTEL20 archive.

I remember that also Fabrice Bellards lzexe and something spawnsq() (not sure about exact name any more) library also was in use. The latter swapped (saved out file) out running most of MS-DOS program before executing like execve() and freed a lot more memory to run that other program then loading it back when called program was done. I think it used something like 8k memory while resident when other called was running. Which was often enough and no need do any horrible .BAT rewrite tricks to able to accomplish same functionality.

comment 3mo ago · link · parent

>Yes there were alternatives.

Yes, mostly proprietary third party systems which abtracted complexities away from programmers placing their trust to that often not even sure your language vendor was not belly up or with good luck purchased by someone else who then told you we do not support it any more next year. And left you to deal with that. Not fun, not even close I may add. I know who weren't so lucky and had to gather pieces at least mostly rewriting things again new toolkit.

Software development invests in that written code and you learn to appreciate that when you got a lot of it understanding how large and costly task it would be to rewrite another language. Especially then it was that. Now LLM's, much better IDE's etc help a lot with that. Today standards thinking you do not make fair comparison what it was back then.

>...have you ever tried to write portable C code in K&R C without it being full of #ifdefs?

Yes I have done it, not just tried. It wasn't too bad after all when you knew how to do it. Most of systems dependent were hidden away by ourselves to .h files and some to libraries we did. That time it was common thing to teach even, and if not learn from others code how to do it.

That way we knew we had better chance easier to port it something even remotely close existing kind of platforms and OS's. Investment in written software as too great to ignore.

But, did you lately or when did last time write software without relying those abstractions being hidden away either device vendor language libraries or third parties modules?

While you think of it, let me tell you that this situation where we are now is so much much less diversity with our target systems and plenty of programming languages with multitude of good libraries and ready made modules do not compare at all to what situation was end of 80's. Comparing software development effort today's languages and tools by then doesn't make sense at all. Everything was so much slower and time consuming.

That area where C-language is still relevant is now much narrower, but there still are niches where I understand it fairly well. I also understand that you don't get it but that is not a my problem, it's more of a you problem if that irritates you from my point of viewing this matter.

But whatever written here for before above, I see no value continuing this argument with you any more. If you haven't this far understood what I tried conveying there is no hope with me you will eventually get what I try to explain.

So by that I'm wishing you a nice day, cheers.

comment 3mo ago · link · parent

Sure, it wasn't uncommon feature at all, but many fellows I knew had not noticed it before I suggested using it when a colleague or a friend was wondering how he would write that function assembler and try to make it faster.

It tells me more about some people not being curious enough to read documents and explore environment they work than others apparently.

Assembler generating was long time a standard feature of compilers simply because writing the assembler code was easier than directly runnable or linkable object code. And for language designer and compiler programmer it was easier to read verifying correct code generating that way. Why bother writing assembly compiler, linker etc. when you usually already had them in the system that time.

Then later it changed bit as vendors did not any more ship any or just some crippled compliers to compile just a new kernel with the base system to curb their language competition. Which made third party compilers had to either provide with complete set their own creating executables or ask buyer also licensing system vendor compiler toolkit which they would not otherwise need. That then caused prospect third party compiler customer add that licensing fee top of offering and compared which option they would buy if any. That was time when developement toolkits started changing. Under MS-DOS there never was compiler shipped with it that was a situation all the time, but with the minis and larger systems more what described here above.

ps. I think you get much too wound up about C-language. For a long time there was no real alternative use to cross environments compatible way developing thing without major rewrite each platform. That what mattered more than anything else then and in some sense also to some these days also. And no language needs to be put on pedestal like you wrote message you already changed or deleted so that I did not get to answer.

comment 3mo ago · link · parent

I think I did have some time early -90's someone did alternative C0.lib which actually when you linked it with your programs it made much easier porting some *nix software to MS-DOS. No need to make modifications command line handler, as that modified startup-library as I think it's or was called, did what was needed.

It was then COMMAND.COM ie. Dos command line did not do that. And there were alternatives like something called 4DOS which I did never use, but those could have done it. Or did they?

I have't used Windows for quite long time. And I do not know if CMD.EXE or PowerShell whatever its name are any better. Maybe someone knowing would like to comment this.

comment 3mo ago · link · parent

>Why do you think Windows is currently such a mess?

There have been some writings and posts here about Microsoft. Here is one from last spring, from a guy that was long time Windows core developer and moved to Azure group. It's well worth reading, what he writes about challenges they have had and most likely still have if not even worse now.

https://isolveproblems.substack.com/p/how-microsoft-vaporize...

and the related HN thread

https://news.ycombinator.com/item?id=47616242

And from what I've understood old chaps like Dave Cutler are involved much less than they were for a very long time.

comment 3mo ago · link · parent

Oh my, I'm sorry how many typos I made and forgot to fix.

s/ARAIC/AFAIC/g s/70kb/720kB/g

comment 3mo ago · link · parent

It is, but some tools like Turbo C did provide asm generating switch (-S AFAIK) directly you to use and saved you from using debug.com or any better disassembler.
123