Perl Can't Locate in @inc

September 04, 2016
Recently I try to install  SmokePing (tar ball) on Centos 7, for my company to check Network latency, but  same error re-occur.

Multiple Errors:

Then I search a lot, try to install the packages but the problem still appear, then after I found  a simple solution.



Solution:

# perl -MCPAN -eshell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> install Net::OpenSSH
Reading '/root/.cpan/Metadata'
  Database was generated on Sat, 03 Sep 2016 21:53:30 GMT
Running install for module 'Net::OpenSSH'
Running make for S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Fetching with LWP:
http://cpan.communilink.net/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz
Fetching with LWP:
http://cpan.communilink.net/authors/id/S/SA/SALVA/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE

  CPAN.pm: Building S/SA/SALVA/Net-OpenSSH-0.73.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Net::OpenSSH
Could not read metadata file. Falling back to other methods to determine prerequisites
cp lib/Net/OpenSSH/ConnectionCache.pm blib/lib/Net/OpenSSH/ConnectionCache.pm
cp lib/Net/OpenSSH/ShellQuoter/fish.pm blib/lib/Net/OpenSSH/ShellQuoter/fish.pm
cp lib/Net/OpenSSH/ShellQuoter.pm blib/lib/Net/OpenSSH/ShellQuoter.pm
cp lib/Net/OpenSSH/ShellQuoter/POSIX.pm blib/lib/Net/OpenSSH/ShellQuoter/POSIX.pm
cp lib/Net/OpenSSH/ModuleLoader.pm blib/lib/Net/OpenSSH/ModuleLoader.pm
cp lib/Net/OpenSSH/ShellQuoter/Chain.pm blib/lib/Net/OpenSSH/ShellQuoter/Chain.pm
cp lib/Net/OpenSSH/SSH.pm blib/lib/Net/OpenSSH/SSH.pm
cp lib/Net/OpenSSH/Constants.pm blib/lib/Net/OpenSSH/Constants.pm
cp lib/Net/OpenSSH/ShellQuoter/MSWin.pm blib/lib/Net/OpenSSH/ShellQuoter/MSWin.pm
cp lib/Net/OpenSSH/OSTracer.pm blib/lib/Net/OpenSSH/OSTracer.pm
cp lib/Net/OpenSSH.pm blib/lib/Net/OpenSSH.pm
cp lib/Net/OpenSSH/ShellQuoter/MSCmd.pm blib/lib/Net/OpenSSH/ShellQuoter/MSCmd.pm
cp lib/Net/OpenSSH/ShellQuoter/csh.pm blib/lib/Net/OpenSSH/ShellQuoter/csh.pm
cp lib/Net/OpenSSH/ObjectRemote.pm blib/lib/Net/OpenSSH/ObjectRemote.pm
Manifying blib/man3/Net::OpenSSH::SSH.3pm
Manifying blib/man3/Net::OpenSSH::Constants.3pm
Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSWin.3pm
Manifying blib/man3/Net::OpenSSH::ConnectionCache.3pm
Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSCmd.3pm
Manifying blib/man3/Net::OpenSSH.3pm
Manifying blib/man3/Net::OpenSSH::OSTracer.3pm
  SALVA/Net-OpenSSH-0.73.tar.gz
  /usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/1_run.t .... #
# SSH client found: OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013.
# Trying to connect to localhost, timeout is 15s.
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
root@localhost's password:
t/1_run.t .... ok  
t/quoting.t .. # unable to exec csh -c echo good
# unable to exec tcsh -c echo good
# unable to exec ksh -c echo good
# unable to exec dash -c echo good
# unable to exec ash -c echo good
# unable to exec pdksh -c echo good
# unable to exec mksh -c echo good
# unable to exec zsh -c echo good
# unable to exec fish -c echo good
# running tests for shells sh bash
t/quoting.t .. ok    
t/uri.t ...... ok  
All tests successful.
Files=3, Tests=471, 16 wallclock secs ( 0.17 usr  0.01 sys +  1.63 cusr  1.06 csys =  2.87 CPU)
Result: PASS
  SALVA/Net-OpenSSH-0.73.tar.gz
  /usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl5/Net/OpenSSH.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ConnectionCache.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ModuleLoader.pm
Installing /usr/local/share/perl5/Net/OpenSSH/SSH.pm
Installing /usr/local/share/perl5/Net/OpenSSH/Constants.pm
Installing /usr/local/share/perl5/Net/OpenSSH/OSTracer.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ObjectRemote.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/fish.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/POSIX.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/Chain.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/MSWin.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/MSCmd.pm
Installing /usr/local/share/perl5/Net/OpenSSH/ShellQuoter/csh.pm
Installing /usr/local/share/man/man3/Net::OpenSSH::SSH.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::Constants.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ShellQuoter::MSWin.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ConnectionCache.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::ShellQuoter::MSCmd.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH.3pm
Installing /usr/local/share/man/man3/Net::OpenSSH::OSTracer.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  SALVA/Net-OpenSSH-0.73.tar.gz
  /usr/bin/make install  -- OK

No Matching Host Key Type Found. Their Offer: ssh-rsa

May 26, 2016
After upgrading the Laptop OS when I try to login to my old machine I got this error message....

jay@jay:~$ ssh -p 2222 jay@jpudasaini.com.np
Unable to negotiate with 192.168.156.101 port 2222: no matching host key type found. Their offer: ssh-dss

I can't access the system, here is the solution

jay@jay:~$ ssh -oHostKeyAlgorithms=+ssh-dss -p 2222 jay@jpudasaini.com.npThe authenticity of host '[jpudasaini.com.np]:2222 ([192.168.156.101]:2222)' can't be established.
DSA key fingerprint is SHA256:J#$/zFpzr05gdfrshufHHOQvss6NQcEpPMgKlibTc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[jpudasaini.com.np]:2222,[192.168.156.101]:2222' (DSA) to the list of known hosts.
Password:


Now Just type the password 


nslookup Command

March 21, 2016
A Network Administrator command  which help diagnosis DNS related issue. However to understand this,  you should better to know how DNS works.

How to troubleshoot DNS related issue.

1. NSLOOKUP example display "A Record" (IP Adress) of the domain




C:\Users\jpudasaini>nslookup jpudasaini.com.np 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
Name:    jpudasaini.com.np
Address:  216.239.32.21

A Non-Authoritative Answer is a response from Cache. A DNS server is
authoritative for zones actually holds it.

The above output shows "A Records" (IP Adress) of the domain
"jpudasaini.com.np". Which is actually query to the public Google DNS. If
you don't put DNS after the domain, it will used your default DNS, in my
case I have used public DNS.

2. MX Record using -query=mx

MX (Mail Exchange) record maps for the specific domain name to verify mail
exchaing servers on that domain.


C:\Users\jpudasaini>nslookup -query=mx gmail.com 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
gmail.com       MX preference = 40, mail exchanger =alt4.gmail-smtp-in.l.google
.com
gmail.com       MX preference = 20, mail exchanger =alt2.gmail-smtp-in.l.google
.com
gmail.com       MX preference = 10, mail exchanger =alt1.gmail-smtp-in.l.google
.com
gmail.com       MX preference = 30, mail exchanger =alt3.gmail-smtp-in.l.google
.com
gmail.com       MX preference = 5, mail exchanger =gmail-smtp-in.l.google.com

From the above example we can say that  4 MX records used for gmail
domain, the number associat with mx reference the preference of mail
server. Lower the number, higher the preference. So
gmail-smtp-in.l.google.com is the first server which received the mail at
first.

3. NS Record using -query=ns

NS (Name Server) records maps a domain to a list of DNS servers
authoritative for that domain. Here is example of name server which are
associated with jpudasaini.com.np doamain.

C:\Users\jpudasaini>nslookup -query=ns jpudasaini.com.np 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
jpudasaini.com.np       nameserver = ns4.afraid.org
jpudasaini.com.np       nameserver = ns2.afraid.org
jpudasaini.com.np       nameserver = ns1.afraid.org

4. SOA Record using -query=soa

 C:\Users\jpudasaini>nslookup -query=soa jpudasaini.com.np 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
jpudasaini.com.np
        primary name server = ns1.afraid.org
        responsible mail addr = dnsadmin.afraid.org
        serial  = 1511030001
        refresh = 86400 (1 day)
        retry   = 7200 (2 hours)
        expire  = 2419200 (28 days)
        default TTL = 3600 (1 hour)

SOA record (start of authority) which provides the authoritative
information, as well as e-mail address, serial no of the respective
domain.


5. Reserve DNS lookup

The reverse DNS look-up using IP Adress as argument to nslookup
C:\Users\jpudasaini>nslookup 216.239.32.21 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Name:    any-in-2015.1e100.net
Address:  216.239.32.21


6. Using Specific DNS Server

Make query using particular name server instead of using default DNS server.


C:\Users\jpudasaini>nslookup jpudasaini.com.np ns1.afraid.org
Server:  UnKnown
Address:  50.23.197.95

Name:    jpudasaini.com.np
Address:  216.239.32.21

EoMPLS Configuration

March 08, 2016
EoMPLS is point to point L2 VPN services which is used to transport all Ethernet frame received on particular Ethernet or VLAN,  its also called Any Transport over MPLS(ATOM) means this technology can connect like Frame-Relay, PPP, Ethernet,ATM etc.

IOS used
c7200-adventerprisek9-mz.151-4.M

Logical Topology
Make sure MPLS with IGP  is confugure as shown in a diagram. I'm not going to configure MPLS here. This tutorial only show how to configure xconnect tunnel peer with other side customer faces interface in our network diagram we interconnect PE1 fa1/0 with PE2 fa0/0 interfaces.

Config of PE1

PE1#sh run
Building configuration...

Current configuration : 1337 bytes
!
upgrade fpd auto
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE1
!

ip cef

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip ospf network point-to-point
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.252
 ip ospf 1 area 0
 duplex half
 mpls ip
!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 xconnect 3.3.3.3 15 encapsulation mpls
!

router ospf 1


mpls ldp router-id Loopback0 force
======================================
PE1#sh mpls l2transport vc

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Fa1/0          Ethernet                   3.3.3.3         15         DOWN
PE1#
*Mar  8 07:49:39.887: %LDP-5-NBRCHG: LDP Neighbor 3.3.3.3:0 (2) is UP
 
PE1#sh mpls l2transport vc

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Fa1/0          Ethernet                   3.3.3.3         15         UP



PE1#sh mpls l2transport vc detail
Local interface: Fa1/0 up, line protocol up, Ethernet up
  Destination address: 3.3.3.3, VC ID: 15, VC status: up

pc1

PC1> ping 10.10.10.11
84 bytes from 10.10.10.11 icmp_seq=1 ttl=64 time=39.002 ms
84 bytes from 10.10.10.11 icmp_seq=2 ttl=64 time=39.002 ms
84 bytes from 10.10.10.11 icmp_seq=3 ttl=64 time=39.002 ms
84 bytes from 10.10.10.11 icmp_seq=4 ttl=64 time=40.002 ms
84 bytes from 10.10.10.11 icmp_seq=5 ttl=64 time=31.001 ms

PC1> sh ip

NAME        : PC1[1]
IP/MASK     : 10.10.10.10/24
===============================================================

pc2
====
PC2> ping 10.10.10.10
84 bytes from 10.10.10.10 icmp_seq=1 ttl=64 time=40.002 ms
84 bytes from 10.10.10.10 icmp_seq=2 ttl=64 time=40.002 ms
84 bytes from 10.10.10.10 icmp_seq=3 ttl=64 time=41.002 ms
84 bytes from 10.10.10.10 icmp_seq=4 ttl=64 time=59.003 ms
84 bytes from 10.10.10.10 icmp_seq=5 ttl=64 time=41.003 ms

PC2> sh ip

NAME        : PC2[1]
IP/MASK     : 10.10.10.11/24

=================================================================

PE1#sh mpls ldp neighbor all
    Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0
        TCP connection: 1.1.1.1.646 - 2.2.2.2.47031
        State: Oper; Msgs sent/rcvd: 36/35; Downstream
        Up time: 00:24:20
        LDP discovery sources:
          FastEthernet0/0, Src IP addr: 192.168.12.1
        Addresses bound to peer LDP Ident:
          192.168.12.1    1.1.1.1         192.168.13.1
    Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
        TCP connection: 3.3.3.3.61604 - 2.2.2.2.646
        State: Oper; Msgs sent/rcvd: 21/22; Downstream
        Up time: 00:11:25
        LDP discovery sources:
          Targeted Hello 2.2.2.2 -> 3.3.3.3, active, passive
        Addresses bound to peer LDP Ident:
          3.3.3.3         192.168.13.2