IOS XR GNS3 QEMU

December 05, 2016
This time lets have tutorial on Cisco XR 9k series router image running on the GNS3. Please don't ask for the XR image. Your are smart enough to get it.

My system configuration:

Ubuntu 16.04
GNS3 1.4
RAM 8Gig
i7 processor

Used XR Image
iosxrv-k9-demo-6.0.1.qcow2

This image is VIRL extracted image.

You need to convert this image into QEMU image, follow this link

I strongly recommend you to run it on the Linux system.

Now you have converted image, then go to the GNS3>Edit>Preferences>QEMU>Qemu VMs>New
then follow the onscreen procedure.

Setting for QEMU XR Image.

RAM:- 4Gig
CPU:- 1


Adapters at lest 4. 


-enable-kvm




Here you can see I can run the XR on my system. Interface is up and system is already booted. 



I have run 3 XR router  here is my system RAM CPU usages.



RP/0/0/CPU0:XR3(config)#int gi0/0/0/0
RP/0/0/CPU0:XR3(config-if)#ip add 192.168.13.2 255.255.255.252
RP/0/0/CPU0:XR3(config-if)#commit
RP/0/0/CPU0:XR3#ping 192.168.13.1
Mon Dec  5 14:28:29.088 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.13.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/19 ms


Note: Assign IP on gi0/0/0/0 interface but connect on e1 to e/1 on your router otherwise it will not ping. 

Enjoy. 




Unit vpnagentd service not loaded.

December 01, 2016
Somebody ask me to run Cisco EPIC VPN lab test provide by the Cisco. I just try it done but Anyconnect client doesn't seems to work on ubuntu system. The error message was


How to resolved the issue?? 

First of all install the following packages.

sudo apt-get install lib32z1 lib32ncurses5

Then try to install the AnyConnect client, if its still show the same error message. Used below command....

sudo apt-get install network-manager-openconnect

Reload the changes using this command....

sudo systemctl daemon-reload

Now AnyConnect should be installed. 




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

Configuring a Basic MPLS VPN

March 08, 2016
It's been a long time I'm away from blogging due to some R&D on the network with Juniper boxes. On this tutorial I'm going to configure very basic MPLS VPN configuration in GNS3. After that we go for EoMPLS configuration.

This is the logical topology for this tutorial.
Here I only post the configuration file from PE other router configuration is almost same. Here is the points should be remember.

1. Make sure IGP with MPLS is configure on PE,P, it shouldn't be configure on customer facing interface.
2. Make sure all loopback interface is reachable. 
3. Configure VRF with RD and RT, then applied it on right interface.
4. Configure MP-BGP on PE and peer it.
5. Make sure to redistribute the CE IGP protocol into the BGP and vice versa.

Below command can be copy paste into your router. Before that make sure you had make change necessary things.

Config from PE1

PE1#sh run
Building configuration...

Current configuration : 2126 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE1
!
ip cef
ip tcp synwait-time 5
!
!
!
!
ip vrf CustA
 rd 100:1
 route-target export 1:100
 route-target import 1:100
!
no ip domain lookup
!
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.11.2 255.255.255.252
 ip ospf 1 area 0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 ip vrf forwarding CustA
 ip address 192.168.13.1 255.255.255.252
 duplex auto
 speed auto
!
!
router eigrp 1
 auto-summary
 !
 address-family ipv4 vrf CustA
 redistribute bgp 1 metric 1500 2000 200 100 15000
 network 192.168.13.0
 no auto-summary
 autonomous-system 100
 exit-address-family
!
router ospf 1
 log-adjacency-changes
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 1
 neighbor 3.3.3.3 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 3.3.3.3 activate
 neighbor 3.3.3.3 send-community both
 exit-address-family
 !
 address-family ipv4 vrf CustA
 redistribute eigrp 100
 no auto-summary
 no synchronization
 exit-address-family
 =============
CE1#ping 192.168.24.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.24.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/70/92 ms

CE1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     192.168.13.0/30 is subnetted, 1 subnets
C       192.168.13.0 is directly connected, FastEthernet0/1
     192.168.24.0/30 is subnetted, 1 subnets
D       192.168.24.0 [90/307200] via 192.168.13.1, 00:50:22, FastEthernet0/1