Requirement
|
As previously mentioned in the precedent article, when you log into a network equipment such as a router, you tend to have some automatic reflex. You usually:
In this article, we will focus on the 3rd bullet point and will present you freeRouter available diagnosis command. They are grouped into 5 categories:
Basically these commands are accessed through freeRouter user mode. If you need to use them from config mode, please use the "do" keyword.
You would mostly be familiar with the "show" command. It is very good and can basically be used to get output from control plane object. Most of the time this can be used against static object like config. Let's assume that I would like to get BGP config from my home router:
But I can also check the status of BGP peering into VRF dn42
Check the same BGP peering but now for IPv6
Let's see some BGP prefix received in VRF dn42 bgp table: so my screen is too small for all the IPv6 BGP prefix into DN42 VRF As a last example, something we usually do as network operators is to check ongoing interface traffic level:
In the last example we repeatedly issue the "sh int sdn1" command and try to see if TX/RX packets counters increment or not. This command can be improved in order to be less chatty:
Same goes if want want interface traffic for all interface
Above was to check interface status related to software switched packet. What if I want to check hardware switched packet counters switched by P4 or DPDK ?
|
In my previous examples, the output of "show ipv4 bgp 42 unicast database" command could not fit my window. Say hello to "view" keyword then ! Let's now try to get hardware counters as above:
Then you'll be able to see READ-ONLY text buffer where you can navigate and check the output that are beyond boundaries of your screen !
|
As mentioned above, "show" gives you diagnosis instant photo of a control plane object. In order to see counter increment, you'd have to issue "show" repeatedly. In order to avoid that, let me introduce you the "watch" command Let's now try to get hardware counters as above:
It will clear the terminal session and gives you the same outout as above but with counter updated in a regular basis So in this example you'll see a live output with counter incrementing. In the screenshot it is not noticeable, but in real life this is bluffing. See watch interface pretty much like Junos "monitor" keyword. So needless to say that "watch" is applicable to every control plane object such as BGP: Amazing, don't you think ? |
In my previous examples, the output of "show ipv4 bgp 42 unicast database" command could not fit my window. Say hello to "display" keyword then !
Then you'll be able to see READ-ONLY text buffer where you can navigate and check the output that are beyond boundaries of your screen ! As a side note, you can benefit from online help by pressing <f1> You can press Ctrl+q in order to exit the editor. As the viewer is a READ-ONLY buffer
|
Last but not list. "differ" , this will split the window in 2 buffers reflecting the same output but with different version and it it signal line lines that have changed.
With this view you can easily spot the differences between 2 advertisements interval. To be honest, when i used this feature for the first time I was totally stumbled and said: Waouw ... Simply amazing ... |
show/view/watch/display/differ is pretty unique to freeRouter, and is really meant to provide you the best user experience as a network operator ! These command have proven to be helpful, especially if you deal with huge feed. However, be careful when you are working with very big output such BGP full feed. This won't crash the router of course as we used to when we issued "debug ip packet" but it will for sure imply a high CPU usage due to regular refresh at the control plane level.
In this 2nd article:
As said, these are diagnosis commands are specific to freeRouter. 2 decades of know how and network experience have been pushed into these feature codes. These have been developed for one purpose: "Provide a unique operation experience to network engineers" Feel free to try and use them according to your environment taste! Last but not least, you can play with these different mode from this sandbox:
Then issue a "diff" command:
You'll be rewarded by this diff out related to the command which means: "show me the prefix status of 10.11.160.0/20 within BGP process 65535 with rd: 65535:42" After a quick look at VRF definition indicates that rd 65535:42 is tied to VRF dn42:
In order to exit the sandbox session use the following escape sequence: Ctrl-c + Ctrl-x |