Ping tool : How to learn some new stuff

We always can learn some useful new thing in reading manual. This is what I have done and lear an interesting features by means of ping -R.
What we can read in ping(8) on a Linux System :

-R     Record route.  Includes the RECORD_ROUTE option in the ECHO_REQUEST
       packet and displays the  route  buffer  on returned  packets.
       Note  that the IP header is only large enough for nine such routes.
       Many hosts ignore or discard this option.

It can be really useful such as :

plop:~# traceroute -n 217.169.240.154
traceroute to 217.169.240.154 (217.169.240.154), 30 hops max, 40 byte packets
 1  217.169.242.252  0.628 ms  0.845 ms  1.091 ms
 2  217.169.240.105  0.419 ms  0.455 ms  0.490 ms
 3  217.169.240.90  0.802 ms  0.851 ms  0.890 ms
 4  217.169.240.154  11.720 ms * *
plop:~# ping -n -R 217.169.240.154
PING 217.169.240.154 (217.169.240.154) 56(124) bytes of data.
64 bytes from 217.169.240.154: icmp_seq=1 ttl=252 time=12.3 ms
NOP
RR:     217.169.242.220
        217.169.240.106
        217.169.240.89
        217.169.240.153
        217.169.240.154
        217.169.240.114
        217.169.240.85
        217.169.240.105
        217.169.242.252

You can discover by which routers your packet are routed 🙂 In my case, you can see that my packets don’t take the same path.

Altitude Telecom/Completel



Il y a de grandes chances que si vous lisez ces lignes, soit vous êtes déjà au courant, soit maintenant vous l’êtes qu’Altitude Telecom a été racheté par Completel/Numéricable.
Altitude est (ou était d’ailleurs vu que sa marque va bien entendu s’éteindre) un opérateur de services de télécommunications national. Il était bien connu pour ses services Wimax, VPN/MPLS et sa proximité vis à vis de ses clients.
En soit, cela est une très bonne opération pour les dirigeants de cette société. Néanmoins, j’espère sincèrement que les 200 salariés seront repris voire que ce chiffre croît comme l’a dit son dirigeant/fondateur dans l’article du Paris-Normandie du 15 novembre 2010.

Pour ma part, je regrette la disparation d’une entreprise de cette ampleur dans le milieu en Haute-Normandie, car ne nous voilons pas la face, cette entreprise est reprise par des fonds d’investissements. C’est une belle prise en terme de carnet d’adresses et de clients pour Completel. Les 200 salariés resteront-ils longtemps dans les effectifs de Completel, d’autant plus que le réseau d’Altitude Telecom en fait pas parti du deal ? Nous ne le saurons sans doute jamais (quoique).

Cloudshark


Pour ceux qui connaissent déjà Wireshark, peut-être que l’existence (d’ailleurs) de Cloudshark ne vous est pas inconnue. Si ce n’était pas le cas, cloudshark est un outil vous permettant de visualiser vos traces pcap via une page web. Vous vous retrouverez avec le même type d’interface que Wireshark, vous permettant de plonger dans les headers des différentes couches réseaux de vos paquets IP.
Ceci peut être particulièrement utilise lorsque vous ne disposez que d’un tcpdump sur une machine distance (-s 0 -w out.cap).

Vous pouvez “uploader” vos traces pcap par trois moyens :

  • Upload via HTTP
  • Upload via une URL distance (type une dedibox, kimsufi, …)
  • Via e-mail : cap@cloudshark.org

Voici un petit exemple : Concernant une session TCP MD5 / BGP.

HSRP and track object

HSRP track object is a really cool stuff to modulate behaviour of HSRP.
This kind of object is usually used by means of ‘line-protocol’ feature. You can change Active Virtual Router, if an upstream interface comes down.
Such as :

DWS1(config)# track 20 interface FastEthernet 1/13 line-protocol
DWS1(config)# interface fa 1/13
DSW1(config-if)#standby 10 track FastEthernet 1/13 60

If FastEthernet 1/23 comes down. HSRP priority is decremented by 60.

But, you can use track object with condition on routes. Object reacts when it is and is not between some values.
These values are scaled because of different kinds of metric. Imagine EIGRP and RIP metrics. It is so different. It is due to this, we seed metric in redistribution and here we scale it to be able to make condition on routes.

Imagine we want to change HSRP state if default route learned from gw becomes lower than 111.
Now imagine (it is purely imagination and not really in production useful, but …) your serial link is downgraded so your EIGRP metric will downside and your HSRP track object is under 111! Then HSRP state will become ‘standby’ on R1, and R2 HSRP state will become ‘active’.

DSW1#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "eigrp 10", distance 170, metric 284160, candidate default path
  Tag 10, type external
  Redistributing via eigrp 10
  Last update from 10.1.4.5 on FastEthernet0/0, 00:40:24 ago
  Routing Descriptor Blocks:
  * 10.1.4.5, from 10.1.4.5, 00:40:24 ago, via FastEthernet0/0
      Route metric is 284160, traffic share count is 1
      Total delay is 10100 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 128/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
      Route tag 10

And track object is :

DSW1#sh track
Track 10
  IP route 0.0.0.0 0.0.0.0 metric threshold
  Metric threshold is Up (EIGRP/284160/111)
    2 changes, last change 01:01:12
  Metric threshold down 112 up 111
  First-hop interface is FastEthernet0/0
  Tracked by:
    HSRP Vlan10 10

You will ask me : Why 111 ?

This value is due to metric scaling in HSRP track object. EIGRP routes are scaled by means of 2560. It is a default value which can be modofied by : track resolution.

So, if you divide 284160 by 2560 : you have 111 !

R1 HSRP state is active. Now, imagine (not production useful and possible) that serial line between ‘gw’ and ‘R1’ is downgraded, so EIGRP metric is modified and the value of the track object become lower than 111. So HSRP state become ‘standby’ and R2 become active on the HSRP group.

The real configurations is :

interface Vlan10
 ip address 10.2.1.1 255.255.255.0
 ip helper-address 10.1.4.5
 standby 10 ip 10.2.1.254
 standby 10 priority 150
 standby 10 preempt
 standby 10 track 10 decrement 60
!
track 10 ip route 0.0.0.0 0.0.0.0 metric threshold
 threshold metric up 111 down 112

It is a great stuff. I like it.

Some source:http://www.cisco.com/en/US/docs/ios/12_2t/12_2t15/feature/guide/fthsrptk.html#wp1185135

IOS : ttcp

Voici une petite astuce à deux balles. Pour ceux qui voudrait faire un petit test de débit entre un Linux et un routeur Cisco, l’outil ttcp est à là pour vous.
Ne chercher pas à le trouver avec votre copine : la touche “Tab” 😉

nas-cde-madrillet#tt?
% Unrecognized command
nas-cde-madrillet#tt
Néanmoins :

nas-cde-madrillet#ttcp
transmit or receive [receive]:
perform tcp half close [n]:
receive buflen [8192]:
bufalign [16384]:
bufoffset [0]:
port [5001]:
sinkmode [y]:
rcvwndsize [4128]: 6250000
delayed ACK [y]:
show tcp information at end [n]:

ttcp-r: buflen=8192, align=16384/0, port=5001
rcvwndsize=6250000, delayedack=yes  tcp
ttcp-r: accept from 217.169.242.181 (mss 536, sndwnd 5888, rcvwnd 65511)
ttcp-r: 40501272 bytes in 10012 ms (10.012 real seconds) (~3950 kB/s) +++
ttcp-r: 6036 I/O calls
ttcp-r: 0 sleeps (0 ms total) (0 ms average)
nas-cde-madrillet#

Et du côté de ma station Linux :

clucas@pluton:~$ iperf -c nas-cde-madrillet -i 1
------------------------------------------------------------
Client connecting to nas-cde-madrillet, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 217.169.242.181 port 41570 connected with 217.169.240.130 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  3.80 MBytes  31.9 Mbits/sec
[  3]  1.0- 2.0 sec  3.82 MBytes  32.0 Mbits/sec
[  3]  2.0- 3.0 sec  3.84 MBytes  32.2 Mbits/sec
[  3]  3.0- 4.0 sec  3.84 MBytes  32.2 Mbits/sec
[  3]  4.0- 5.0 sec  3.85 MBytes  32.3 Mbits/sec
[  3]  5.0- 6.0 sec  3.87 MBytes  32.4 Mbits/sec
[  3]  6.0- 7.0 sec  3.90 MBytes  32.7 Mbits/sec
[  3]  7.0- 8.0 sec  3.84 MBytes  32.2 Mbits/sec
[  3]  8.0- 9.0 sec  3.94 MBytes  33.0 Mbits/sec
[  3]  9.0-10.0 sec  3.93 MBytes  33.0 Mbits/sec
[  3]  0.0-10.0 sec  38.6 MBytes  32.4 Mbits/sec

Si vous ne voulez pas être déçu sur les débits que vous mesurez, je vous conseille de positionner ‘rcvwndsize‘ à :

rcvwndsize = (BW nominale / 8) * delai

avec :
 * BW nominale en bit/s
 * délai en seconde

C’est malin, je ne sais plus lequel choisir

Avec l’arrivée du CCNP SP ops(Service Provider Operations), je ne sais plus lequel je vais faire après avoir obtenu le CCNP (Routing and Switching).
C’est malin, CCNP SP ops a l’air vraiment intéressant aussi avec :

  • Operational Foundations for Cisco Service Provider Core Networks (OFCN)
  • Maintaining Cisco Service Provider Routing Protocols (MSPRP)
  • Maintaining Cisco Service Provider VPNs and MPLS Networks (MSPVM)
  • Maintaining Cisco Service Provider Quality of Service (MSPQS)

Vous aurez plus d’informations sur le CLN : CCNP SP ops