Mermaid Sequence Diagram with Ipv6 host as participant

#diagram #host #ipv6 #mermaid #sequence

 

Today I was messing around making a mermaid sequence diagram of an ICMPv6 ping and found that its a bit tricky to get participants with : in the name.

For example, something like this:

Host->>Router: ICMP Echo, HopLimit=64
Router->>ISPa: ICMP Echo, HopLimit=63
ISPa->> ISPb: ICMP Echo, HopLimit=62
ISPb->> 2001:4860:4860::8888: ICMP Echo, HopLimit=61  
2001:4860:4860::8888->> ISPb: ICMP Echo-Reply, HopLimit=64
ISPb->>ISPa: ICMP Echo-Reply, HopLimit=63
ISPa->>Router: ICMP Echo-Reply, HopLimit=62
Router->>Host: ICMP Echo-Reply, HopLimit=61

I first came across this post: https://stackoverflow.com/questions/28121525/mermaid-cli-how-do-you-escape-characters, however, when I tried:

Host->>Router: ICMP Echo, HopLimit=64
Router->>ISPa: ICMP Echo, HopLimit=63
ISPa->> ISPb: ICMP Echo, HopLimit=62
ISPb->> 2001#58;4860#58;4860#58;#58;8888: ICMP Echo, HopLimit=61  
2001#58;4860#58;4860#58;#58;8888->> ISPb: ICMP Echo-Reply, HopLimit=64
ISPb->>ISPa: ICMP Echo-Reply, HopLimit=63
ISPa->>Router: ICMP Echo-Reply, HopLimit=62
Router->>Host: ICMP Echo-Reply, HopLimit=61

However, I found this post: https://github.com/mermaid-js/mermaid/issues/679, where if you do something like this it works:

participant Host
participant Router
participant ISPa
participant ISPb
participant endHost as  2001#58;4860#58;4860#58;#58;8888
Host->>Router: ICMP Echo, HopLimit=64
Router->>ISPa: ICMP Echo, HopLimit=63
ISPa->> ISPb: ICMP Echo, HopLimit=62
ISPb->> endHost: ICMP Echo, HopLimit=61  
endHost->> ISPb: ICMP Echo-Reply, HopLimit=64
ISPb->>ISPa: ICMP Echo-Reply, HopLimit=63
ISPa->>Router: ICMP Echo-Reply, HopLimit=62
Router->>Host: ICMP Echo-Reply, HopLimit=61

Which results in something like this: file


Comments (0)


Leave a Comment

Log in to leave a comment.

Most Recent Post

Searching the Parts of the Internet Google Doesn't: Five Years of darksearch.xyz

There's a whole slice of the internet that's public but almost impossible to search. Content on IPFS is addressed by what it is (a content hash, the CID) rather than where it is, so there's no domain to crawl, no robots.txt, and no single server to point a search engine at. If you don't already have...