Search My Techie Guy

Thursday, February 11, 2016

Online Adobe Photoshop - quick fix

Summary:

Online Adobe Photoshop

Problem or Goal:

Looking for a quick photo editor online?

Cause: 

You are as lazy as me

Solution: 

Photoshop Express Editor


Problem Solved? 

Yes

Wednesday, February 10, 2016

Timeout: No Response from - Trying to SNMPWALK a Juniper Router/Switch with Routing-Instances Configured

Problem:

I was trying to snmpwalk a juniper switch (EX4500) that has routing instance configured!
The SNMP client was only reachable from a specific routing instance on the switch. However, i could successfully ping the switch OAM IP from the snmp client.

For example:

Ping from the snmp client is OK:

SNMP CLIENT:~ # ping 10.0.1.170
PING 10.0.1.170 (10.0.1.170) 56(84) bytes of data.
64 bytes from 10.0.1.170: icmp_seq=1 ttl=63 time=1.13 ms
64 bytes from 10.0.1.170: icmp_seq=2 ttl=63 time=1.12 ms
64 bytes from 10.0.1.170: icmp_seq=3 ttl=63 time=1.43 ms


Ping from the switch in the Global routing instance is NOT OK:

> ping 10.0.43.18                                                     
PING 10.0.43.18 (10.0.43.18): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host


Ping from the switch in VR-OAM routing instance is OK:

> ping routing-instance VR-OAM 10.0.43.18                             
PING 10.0.43.18 (10.0.43.18): 56 data bytes
64 bytes from 10.0.43.18: icmp_seq=0 ttl=63 time=1.235 ms
64 bytes from 10.0.43.18: icmp_seq=1 ttl=63 time=1.504 ms
64 bytes from 10.0.43.18: icmp_seq=2 ttl=63 time=1.878 ms
64 bytes from 10.0.43.18: icmp_seq=3 ttl=63 time=1.215 ms


And whenever i would run snmpwalk from my snmp server, i would get the message below:

SNMP CLIENT:~ # snmpwalk -v2c -c public 10.0.1.170
Timeout: No Response from 10.0.1.170

Solution:

In order to access MIB objects and perform SNMP operations for the routing-instances, SNMP v1 and v2c clients need to encode the routing-instance name in the community string in their SNMP requests. 


snmpwalk -v2c -c routing-instance-name@public x.x.x.x

Example:

SNMP CLIENT:~ # snmpwalk -v2c -c VR-OAM@public 10.0.1.170

SNMPv2-MIB::sysDescr.0 = STRING: afrsite1epcrtr01_switch
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2636.1.1.1.2.44
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (644286429) 74 days, 13:41:04.29
SNMPv2-MIB::sysContact.0 = STRING: 
SNMPv2-MIB::sysName.0 = STRING: VR-OAM@EPC_RTR01
SNMPv2-MIB::sysLocation.0 = STRING: 
SNMPv2-MIB::sysServices.0 = INTEGER: 6
IF-MIB::ifNumber.0 = INTEGER: 272
IF-MIB::ifIndex.6 = INTEGER: 6

Problem Solved :-) 


snmpwalk: Timeout: No Response from 10.0.46.149

Problem:

Server1:~ # snmpwalk -v2c -c public 10.0.46.149
Timeout: No Response from 10.0.46.149


Server1:~ # ifconfig -a
ens160    Link encap:Ethernet  HWaddr 00:0C:29:D1:E6:46  
          inet addr:10.0.43.18  Bcast:10.0.43.63  Mask:255.255.255.192
          inet6 addr: fe80::20c:29ff:fed1:e646/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18983282 errors:0 dropped:1223 overruns:0 frame:0
          TX packets:67797 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1646195609 (1569.9 Mb)  TX bytes:5717429 (5.4 Mb)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:630856 errors:0 dropped:0 overruns:0 frame:0
          TX packets:630856 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:56145204 (53.5 Mb)  TX bytes:56145204 (53.5 Mb)

Solution:

Make sure the server IP where you are running the snmpwalk command from has been added as an snmp client and it's IP allowed on the router/switch that you are trying to query.

for my case am trying to query a juniper switch, so i added the line below:

# set snmp community public clients 10.0.43.18/32  
# commit 
configuration check succeeds
commit complete

Trying the snmpwalk command again: problem solved

Server1:~ # snmpwalk -v2c -c public 10.0.46.149
SNMPv2-MIB::sysDescr.0 = STRING: Vodafone UG Border Gateway Router 01
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2636.1.1.1.2.43
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (3947453981) 456 days, 21:08:59.81
SNMPv2-MIB::sysContact.0 = STRING: Joshua Nomwesigwa 0723000208
SNMPv2-MIB::sysName.0 = STRING: VODAFONEUG-BGW-01
SNMPv2-MIB::sysLocation.0 = STRING: Kololo, 1 Hill Drive, Kampala
SNMPv2-MIB::sysServices.0 = INTEGER: 6

Bash: snmpwalk: command not found - Linux OpenSUSE 13.2

Problem:

Server1:~ # snmpwalk
-bash: snmpwalk: command not found

Solution:

Install net-snmp using zypper install

Server1:~ # zypper install net-snmp
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 6 NEW packages are going to be installed:
  libsensors4 libsnmp30 net-snmp perl-SNMP perl-Term-ReadKey snmp-mibs 

6 new packages to install.
Overall download size: 1.7 MiB. Already cached: 0 B  After the operation, additional 6.9 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package perl-Term-ReadKey-2.32-2.1.5.x86_64                                                                                                                      (1/6),  28.8 KiB ( 62.4 KiB unpacked)
Retrieving: perl-Term-ReadKey-2.32-2.1.5.x86_64.rpm ...........................................................................................................................................[done (5.8 KiB/s)]
Retrieving package libsensors4-3.3.5-3.3.1.x86_64                                                                                                                           (2/6),  51.4 KiB (100.7 KiB unpacked)
Retrieving: libsensors4-3.3.5-3.3.1.x86_64.rpm ............................................................................................................................................................[done]
Retrieving package snmp-mibs-5.7.3-3.1.x86_64                                                                                                                               (3/6), 245.9 KiB (  1.6 MiB unpacked)
Retrieving: snmp-mibs-5.7.3-3.1.x86_64.rpm ...................................................................................................................................................[done (96.0 KiB/s)]
Retrieving package libsnmp30-5.7.3-3.1.x86_64                                                                                                                               (4/6), 853.0 KiB (  3.4 MiB unpacked)
Retrieving: libsnmp30-5.7.3-3.1.x86_64.rpm ..................................................................................................................................................[done (657.1 KiB/s)]
Retrieving package perl-SNMP-5.7.3-3.1.x86_64                                                                                                                               (5/6), 124.5 KiB (424.4 KiB unpacked)
Retrieving: perl-SNMP-5.7.3-3.1.x86_64.rpm ................................................................................................................................................................[done]
Retrieving package net-snmp-5.7.3-3.1.x86_64                                                                                                                                (6/6), 435.2 KiB (  1.3 MiB unpacked)
Retrieving: net-snmp-5.7.3-3.1.x86_64.rpm ...................................................................................................................................................[done (343.3 KiB/s)]
Checking for file conflicts: ..............................................................................................................................................................................[done]
(1/6) Installing: perl-Term-ReadKey-2.32-2.1.5 ............................................................................................................................................................[done]
(2/6) Installing: libsensors4-3.3.5-3.3.1 .................................................................................................................................................................[done]
(3/6) Installing: snmp-mibs-5.7.3-3.1 .....................................................................................................................................................................[done]
(4/6) Installing: libsnmp30-5.7.3-3.1 .....................................................................................................................................................................[done]
(5/6) Installing: perl-SNMP-5.7.3-3.1 .....................................................................................................................................................................[done]
(6/6) Installing: net-snmp-5.7.3-3.1 ......................................................................................................................................................................[done]
Additional rpm output:
Updating /etc/sysconfig/net-snmp...

Server1:~ # snmpwalk
Created directory: /var/lib/net-snmp/mib_indexes
No hostname specified.
USAGE: snmpwalk [OPTIONS] AGENT [OID]

  Version:  5.7.3.pre5
  Web:      http://www.net-snmp.org/
  Email:    net-snmp-coders@lists.sourceforge.net

Adding Static DNS - LINUX OpenSUSE 13.2 error "ping:unknown host yahoo.com"


Problem:

Ping a domain name for example yahoo.com from the CLI and it returns the message below:

Server1:~ # ping yahoo.com
ping: unknown host yahoo.com


Server1:~ # cat /etc/*release
openSUSE 13.2 (x86_64)
VERSION = 13.2
CODENAME = Harlequin
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"

ID_LIKE="suse"

Solution:

This means that my server has no DNS set to resolve host names!

1. open YAST

Server1:~ # yast



2. Use up/down arrow keys to select "Network Devices"
3. Use right arrow key to select "Network Settings" and press Enter Key
4. Hit the "Tab" key once to highlight "Overview" on the top menu

5. Now use the right arrow key on your keyboard to select "Hostname/DNS"
6. Use the TAB key to navigate through and modify the DNS config according to your DNS servers for your network.

7. Use TAB to navigate to "OK" and hit Enter
8. Quit
9. Now test again:

Server1:~ # ping yahoo.com
PING yahoo.com (206.190.36.45) 56(84) bytes of data.
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=1 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=2 ttl=45 time=345 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=3 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=4 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=5 ttl=45 time=344 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=6 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=7 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=8 ttl=45 time=345 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=9 ttl=45 time=343 ms

Cheers :-)