Tuesday, 12 September 2017

Errno 10060 - SSH paramiko error

Traceback (most recent call last):
  File "D:python\SSH.py", line 3, in <module>
    ssh.connect('192.168.1.100', port=22, username='test' , password='test')
  File "C:\Python27\lib\site-packages\paramiko\client.py", line 310, in connect
    retry_on_signal(lambda: sock.connect(addr))
  File "C:\Python27\lib\site-packages\paramiko\util.py", line 276, in retry_on_signal
    return function()
  File "C:\Python27\lib\site-packages\paramiko\client.py", line 310, in <lambda>
    retry_on_signal(lambda: sock.connect(addr))
  File "C:\Python27\lib\socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Remove the space from ssh connect command

    ssh.connect('192.168.1.100', port=22, username='test', password='test')

How to install Paramiko - Python

Make sure machine have direct internet access.

1. Go to Python27 folder.

C:\>cd Python27

C:\Python27>dir
 Volume in drive C is Windows
 Volume Serial Number is 7A6A-22DB

 Directory of C:\Python27

09/07/2017  04:08 PM    <DIR>          .
09/07/2017  04:08 PM    <DIR>          ..
09/07/2017  04:08 PM    <DIR>          DLLs
09/07/2017  04:08 PM    <DIR>          Doc
09/07/2017  04:08 PM    <DIR>          include
09/07/2017  04:14 PM    <DIR>          Lib
09/07/2017  04:08 PM    <DIR>          libs
12/17/2016  08:49 PM            38,591 LICENSE.txt
12/17/2016  08:34 PM           474,595 NEWS.txt
12/17/2016  08:44 PM            27,136 python.exe
12/17/2016  08:44 PM            27,648 pythonw.exe
12/03/2016  09:01 PM            56,938 README.txt
09/07/2017  04:08 PM    <DIR>          Scripts
09/07/2017  04:08 PM    <DIR>          tcl
09/07/2017  04:08 PM    <DIR>          Tools
12/17/2016  08:44 PM           111,104 w9xpopen.exe
               6 File(s)        736,012 bytes
              10 Dir(s)  19,453,014,016 bytes free

2. Go to script folder.

C:\Python27>cd Scripts

C:\Python27\Scripts>dir
 Volume in drive C is Windows
 Volume Serial Number is 7A6A-22DB

 Directory of C:\Python27\Scripts

09/07/2017  04:08 PM    <DIR>          .
09/07/2017  04:08 PM    <DIR>          ..
09/07/2017  04:08 PM            89,449 easy_install-2.7.exe
09/07/2017  04:08 PM            89,449 easy_install.exe
09/07/2017  04:08 PM            89,421 pip.exe
09/07/2017  04:08 PM            89,421 pip2.7.exe
09/07/2017  04:08 PM            89,421 pip2.exe
               5 File(s)        447,161 bytes
               2 Dir(s)  19,453,014,016 bytes free

3. Install Paramiko

C:\Python27\Scripts>pip install paramiko
Collecting paramiko
  Using cached paramiko-2.2.1-py2.py3-none-any.whl
Collecting bcrypt>=3.1.3 (from paramiko)
  Downloading bcrypt-3.1.3-cp27-cp27m-win32.whl
Collecting cryptography>=1.1 (from paramiko)
  Downloading cryptography-2.0.3-cp27-cp27m-win32.whl (1.1MB)
    100% |################################| 1.1MB 36kB/s
Collecting pyasn1>=0.1.7 (from paramiko)
  Downloading pyasn1-0.3.4-py2.py3-none-any.whl (63kB)
    100% |################################| 71kB 26kB/s
Collecting pynacl>=1.0.1 (from paramiko)
  Downloading PyNaCl-1.1.2-cp27-cp27m-win32.whl (138kB)
    100% |################################| 143kB 30kB/s
Collecting six>=1.4.1 (from bcrypt>=3.1.3->paramiko)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting cffi>=1.1 (from bcrypt>=3.1.3->paramiko)
  Downloading cffi-1.10.0-cp27-cp27m-win32.whl (147kB)
    100% |################################| 153kB 25kB/s
Collecting ipaddress (from cryptography>=1.1->paramiko)
  Downloading ipaddress-1.0.18-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.1->paramiko)
  Using cached asn1crypto-0.22.0-py2.py3-none-any.whl
Collecting enum34 (from cryptography>=1.1->paramiko)
  Downloading enum34-1.1.6-py2-none-any.whl
Collecting idna>=2.1 (from cryptography>=1.1->paramiko)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |################################| 61kB 38kB/s
Collecting pycparser (from cffi>=1.1->bcrypt>=3.1.3->paramiko)
  Downloading pycparser-2.18.tar.gz (245kB)
    100% |################################| 256kB 42kB/s
Installing collected packages: six, pycparser, cffi, bcrypt, ipaddress, asn1cryp
to, enum34, idna, cryptography, pyasn1, pynacl, paramiko
  Running setup.py install for pycparser ... done
Successfully installed asn1crypto-0.22.0 bcrypt-3.1.3 cffi-1.10.0 cryptography-2
.0.3 enum34-1.1.6 idna-2.6 ipaddress-1.0.18 paramiko-2.2.1 pyasn1-0.3.4 pycparse
r-2.18 pynacl-1.1.2 six-1.10.0

4. Import Paramiko in the common shell

>>> run import paramiko

>>> import paramiko
>>> import time

Thursday, 31 August 2017

Benefits of segment Routing


Benefits of segment Routing are as follows:-

1. SDN ready
      a) Foundation for Application engineered routing( AER)
      b) Can provide strict performance guarantees
      c) Efficient use of network resources
      d) Router can inject traffic with the segment list without any additional need of signaling protocol in the network.

2. Simplified
        a) Simple operation without any separate protocols like LDP and RSVP.
        b) No complex LDP or IGP synchronization issues to troubleshoot.

3. Support Fast rerouting
a) Convergence time in sub seconds (50msec)

4. Scalable
a) Due to simplified behavior
        b) Avoid thousands of labels in LDP database unlike MPLS
c) Avoid thousands of TE LSP’s
d) Avoid complex configuration of TE(traffic Engineering)

5. Efficient 
a) Support ECMP (equal cost multipath)
b) Better utilization of installed infrastructure

6. Plug and Play
a) Segment routing is inter operatable with existing MPLS control and dataplanes. 
b) It can be implemented in existing MPLS deployment.

7. Centralized TE
a) Controllers and orchestration platform can interact with segment routing to optimize the TE centrally.
        b) Network changes such as congestion can trigger an application to optimize the placement of segment routing traffic engineering tunnels and will re route the traffic to path with available bandwidth.

Segment Routing – Important Points


Segment Routing is the new generation source based routing and simplified version of MPLS. Instead of using label for each prefix, segment routing are identifying the segments. Below are few important points about segment routing.


Segment Routing – Important Points
1. Flexible and simple version of MPLS
2. Scalable
3. Source Choose the path- Source based routing
4. Every pacckets has a ordered list of segments
5. Network devices now will not calculate the path but will follow the instruction provided in the packet.
6. Doesn’t require LDP or RSVP
7. Relies on small extensions on IS-IS and OSPF
8. Can operate with IS-IS
9. Utilizes more effective use of bandwidth
10. Lower Latency
11. Each segment is identify by segment ID(32- bit) integer rather than using labels for each prefix.

Wednesday, 30 August 2017

PFR version 1 Vs 2 Vs 3


PFR stands for performance routing which is the building block for the iWAN. Intelligent WAN can reroute traffic not only based on the link up/down but also based on the performance of the link. You can route traffic based on application based performance as well.

Below is the difference between PFR version 1, 2 and 3.



Sunday, 20 August 2017

APIC to factory default reset configuration

Login to APIC using admin credentials

apic1:~> eraseconfig  setup


Monday, 14 August 2017

Blackout Vs Brownout network failure

Blackout:-  When the data plane is down whereas the control plan is up. Routing protocol neighborship is establish but for some reason, like routing loop issues, source is not able to reach the destinations.

Brownout:-  High packet loss in the path or very high latency WAN issues.