HNHacker News
TopNewBestAskShowJobs

jwbensley

30 karma · joined October 18, 2017

submissionscomments
jwbensley··on Tcpdump Examples
NetEng here, I'm usually troubleshooting lower layer issues (Ethernet, MPLS, IP) than HTTP however, tcpdump is one of my go-to tools every time.

If anyone is interested I've made some notes here: https://null.53bits.co.uk/index.php?page=tcpdump-notes

For example, imagine spanning/mirroring a 10G backbone link, how many people are pinging 8.8.8.8 all the time. I can ping with a specific DSCP value set to isolate my pings from anyone elses, looking into the reported issue of 8.8.8.8 latency, then apply a filter to tcpdump on my mirrored port that matches ICMP traffic to a specific IP, with a specific DSCP value, inside specific L3 VPN (specific MPLS labels) etc.

sudo tcpdump -nlASX -s 65535 -vvv -i eth3 '(mpls 52634 and (ip and (ip[1] & 0xfc) >> 2 > 0x01) and host 11.22.33.44 and icmp)'

I love tcpdump's filtering capabilities.

jwbensley··on High Speed Networking: Open Sourcing our Kernel Bypass Work
BBC R&D gave a talk on this very project a couple of years ago at a UKNOF meeting, it was very interesting:

https://m.youtube.com/watch?v=yLL8wl8YUwA

jwbensley··on Hijack of Amazon’s domain service used to reroute web traffic for two hours
A lot of people in here are talking about securing their DNS setups but not their BGP setups.

For any BGP operators out there, you could automate your inbound/outbound BGP prefix filters using IRR/LIR databases, peeringdb.com, RADB etc. Tools like https://github.com/snar/bgpq3 can help with auto-generation. Even manual prefix lists will do, anything is better than nothing!

It would be good if operators could also use AS-SETs so that other operators can see what downstream ASNs should be seen via their peers (and which ones should not).

Also BGP RPKI (Resource Public Key Infrastructure) based ROA (Route Origin Authorisations) can also help to ensure that prefixes are announced by their true originator.

Most networks follow the Pareto rule - 20% of prefixes learnt via BGP (in some cases even less!) are the source/destination for 80% of their traffic flows. Some operators use an approach of writing explicit filters for those 20% of prefixes explicitly blocking them from all their BGP peers except the origin peer sessions.

None of these techniques are fool proof and we all need to play along to improve their impact. They cost nothing, only man hours, and we can all benefit. In metaphor - no encryption is unbreakable but we can try and make it unappealingly difficult.

jwbensley··on Ask HN: Side project you're working on?
iPerf but for Ethernet/MPLS/layer 2. This is at the more serious end of the scale and something I've been working on for a while now. I use it to test a link or device speed at different frame sizes, check that different Ether-types are parsed correctly, CoS values match into the correct QoS queue etc:

https://github.com/jwbensley/Etherate

At the less serious end of the scale an Arduino powered, life sized cardboard cut out of me with an SD-CARD full of my daily sayings, and a GPS battery backed clock. Like most people here, I like to tinker with hardware/electronics as a change from coding. My friend on the other side of the world is turning 30 soon, I can't be there, so I'm making and posting him a life size me which plays recordings of me (that are time of day relevant!) when you walk past. Not much on the GH page yet, I'll try and get some more up-to-date code and designs uploaded at the weekend:

https://github.com/jwbensley/Life-Sized-James

jwbensley··on Ask HN: What is your favourite tech talk?
A great talk, thanks!

This is a great talk from another networking legend: "Network Protocols: Myths, Missteps, and Mysteries" by Radia Perlman.

I love her personality and sense of humor, and it has tech content that is completely relevant today: https://www.youtube.com/watch?v=pfiMBegejQM

jwbensley··on Half of European flights delayed due to system failure
Are you saying humour isn't allowed on HN?
jwbensley··on Half of European flights delayed due to system failure
It's very common that someone hasn't heard of everything. It's why down votes without explanation are bad, like on StackOverflow.

It was in reference to That Mitchell and Webb Look:

https://youtu.be/AIxz6BDmTNU

https://youtu.be/THNPmhBl-8I

jwbensley··on Half of European flights delayed due to system failure
Whats with the downvotes? That guys username is and my comment are both references to a TV show.
jwbensley··on Half of European flights delayed due to system failure
Its not brain surgery!
jwbensley··on TCP Tracepoints have arrived in Linux
@brendangregg - superb work!

Do you (or anyone else here) know if something like this exists already, or is in the pipeline, for raw sockets in Linux?

jwbensley··on Troubleshooting IPv6 badness to certain hosts in a rack
Hello author, NetEng department here, good article, thanks!

I'm sad to say this problem affects IPv4 too and its not that uncommon when using layer 3 switches. The TCAM allocation for IPv4/6 is usually a fraction of the size allocated for MAC addresses.

Also a big annoyance of mine is that TCAM space is something few people graph by default on their NMS system. Case in point: we have Cacti as a backup NMS because it can graph >anything< that is a number. Some L3 switches have a MIB from the vendor that reports TCAM usage, others from the same vendor use a different MIB, and others from the same vendor don't expose the stats via SNMP at all and we have to scrape them from the CLI! So the vendors don't make it easy for an operator to track a limited and critical resource of a layer 3 switch. I urge everyone to graph their switches TCAM usage however they can.

jwbensley··on How PCI express devices talk
If the author sees this message, thank you! Just the kind of tutorial I was looking for!

I'd love to see one that built on this a little and showed a packet from kernel space in one device being sent over a PCIe NIC and then bring received by another device, and DMA'd from the receiving NIC into kernel space etc. I already know that whole process more or less but it would be nice to see it and have my understanding confirmed :)

jwbensley··on New Raspberry Pi Model B+
Are you referring to this?

"GbE is 1250Mbps"

1.25Gbps is the "gross" bit rate for 1000BASE-T Ethernet. This is because it uses 8b/10b encoding on the wire (meaning there is a 25% overhead): https://en.wikipedia.org/wiki/8b/10b_encoding

1000Mbps is essentially the "net" bit rate available to the Ethernet protocol.

jwbensley··on Sysadmin left finger on power button for an hour to avert SAP outage
You're not a NetEng until you've done this!

I've done it more than once, so I must be great :)

jwbensley··on The Feds Can Now Probably Unlock Every iPhone Model
Is there no chance that Apple and/or the FBI have the list of phone serial numbers and matching AES key?

(If that sounds sarcastic it's not meant to, genuine question as I don't know much a about this stuff!).

jwbensley··on What happens when you grep the file you've redirected grep to?
Self modifying code is wandering into the (very interesting IMO) realms of metamorphic and polymorphic code. I started an SO questionable here: https://stackoverflow.com/questions/10113254/metamorphic-cod...

I'll try to find some time soon to port that C+inline assembly example to Linux, I didn't know much C or ASM back when I originally asked the question.

jwbensley··on Jon Skeet earns 1mm rep on Stack Overflow
It does say quite near the start that Jon joined SO in 2008 and further on "In the near decade since then, Jon has answered over 34,000 questions, which works out to about 10 questions per day!" So I don't think he's just doing nothing and getting rep. I'm sure there is a bias, often people have a few good questions or answers that stand out and pull in the majority of their rep, like you mentioned about being idle for circa 1.5 years. However, if you read that post it seems Jon is still actively contributing.
jwbensley··on Much Assembly Required: Assembly Programming Game
A very easy assembly game to start with if you find assembly intimidating is Box256:

http://box-256.com

It has a very limited/basic instruction set do it's easy to get going and WebGL based so it runs in your browser.

Technically it probably isn't Assembly as it's such a minimal instruction set with no real target architecture etc. but I find it really fun to play!

jwbensley··on Introduction to RAW-sockets [pdf]
A good introduction but through my personal journey to learn about raw socket programming in Linux, I can't recommend just diving in and reading the kernel source code enough.

I feared this as C is a hobby for me so I assumed it would be too difficult but for me it turned out to be the best way to understand how everything works and I was able to understand the Kernel source, I wish I had done this earlier.

E.g. AF_PACKET is mentioned in this tutorial as one of the potential socket families, I wanted to learn more about the PACKET_MMAP feature AF_PACKET provides however the kernel documentation and examples weren't clear to me. I ended up reading the kernel source last because I was intimidated and should have done that first.

If anyone is going to do this I recommend you take notes. Note that features change between kernel versions. I started making notes on how v2 and v3 transmition of PACKET_MMAP works here: https://github.com/jwbensley/EtherateMT/wiki/Linux-Kernel-tr...

I actually need to upload the receive notes. But before I've had time to do that, v4 has been written and is about to drop in the latest kernel version. So making notes in relation to kernel version I have found to be very helpful. Also this site is super helpful for reading and searching the kernel source: http://elixir.free-electrons.com/linux/latest/source

jwbensley··on Comparison of trie structures used for IP address lookups
"In this web based tutorial. First we give a brief overview about the impact of addressing on lookup operations. We then present a series of different address lookup algorithms along with their advantages and disadvantages. Finally, we compare between all of them and see how they are suited in today’s networks and we also give a brief analysis about our findings based on implementing unibit trie, Patricia trie, and fixed stride multibit."
← PreviousPage 2 of 2