Skip to main content

Dig that!

Here are some handy ‘dig’ commands to verify DNS records:

Do a hostname lookup

# dig www.google.com

; <<>> DiG 9.4.1 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 76
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         84790   IN      CNAME   www.l.google.com.
www.l.google.com.       259     IN      A       209.85.148.104
www.l.google.com.       259     IN      A       209.85.148.105
www.l.google.com.       259     IN      A       209.85.148.106
www.l.google.com.       259     IN      A       209.85.148.147
www.l.google.com.       259     IN      A       209.85.148.99
www.l.google.com.       259     IN      A       209.85.148.103

;; Query time: 119 msec
;; SERVER: 10.0.0.8#53(10.0.0.8)
;; WHEN: Wed Sep 28 13:23:41 2011
;; MSG SIZE  rcvd: 148

 

Get a short answer

# dig www.google.com +short

www.l.google.com.
209.85.148.99
209.85.148.103
209.85.148.104
209.85.148.105
209.85.148.106
209.85.148.147

Get just the answer section

# dig www.google.com +noall +answer

www.google.com.         84278   IN      CNAME   www.l.google.com.
www.l.google.com.       49      IN      A       209.85.148.105
www.l.google.com.       49      IN      A       209.85.148.106
www.l.google.com.       49      IN      A       209.85.148.147
www.l.google.com.       49      IN      A       209.85.148.99
www.l.google.com.       49      IN      A       209.85.148.103
www.l.google.com.       49      IN      A       209.85.148.104

Do a reverse lookup

# dig -x 209.85.148.105 +noall +answer

105.148.85.209.in-addr.arpa. 45351 IN   PTR     fra07s07-in-f105.1e100.net.

Use your ‘search’ string from the /etc/resolv.conf

#dig www.google.com +search

Reference:

http://www.madboa.com/geek/dig/

http://linux.die.net/man/1/dig

Popular posts from this blog

Commands to restart RMC connection (t...

Commands to restart RMC connection (to HMC from LPAR) It has become very common with the IBM HMC to LPAR (logical/micro partition) communication to drop for unknown reasons.  Most of the time this is not a problem unless there is a need to do a dynamic logical partition operation (or DLAPR operation to add/remove resources on the fly).  This will become evident during the DLPAR operation when HMC complains about having no RMC connection to LPAR in operation.  When this happens run the following commands on the LPAR in question before reattemping the operation.  The DLPAR operation will still work with out this connection, but the LPAR needs a restart to see the change in the resources.  Restart the RMC connection on the LPAR: # /usr/sbin/rsct/install/bin/recfgct # /usr/sbin/rsct/bin/rmcctrl -p Verify the connection by running: lsrsrc IBM.ManagementServer This will show the HMC IP/hostname and the LPAR information.

HP-UX tape configuration

Here are few commands to configure tape drives in HP-UX 1.  Scan for new devices: # ioscan –fnC tape 2.  List tape drives currently recognized by the OS (without performing an actual hardware scan) # ioscan –fnkC tape 3.  remove all the special files used by the tape drives # rmsf  /dev/rmt/* 4.  Recreate the specil files for the tape drives # insf –C tape –e 5.  Remove a tape drive (that has a NO_HW state) # rmsf –H 0/7/1/0.1.24.255.5.5.0 Find the WWN for the HBAs: # ioscan –fnkC fc # fcmsutil /dev/fcd0 Find the WWN for the tape drives connected to the HBA: # fcmsutil /dev/fcd0 get remote all   **These are just a handful of commands to deal with the tape drives.  Not to be used as a procedure

Converting SEA on VIO from access to trunk mode

Shared Ethernet Adapters on VIO server can be configured in two different modes while accessing the external network. 1.  Simple mode 2. Trunk mode or 802.1Q mode In a Simple mode, the SEA is not aware of any VLAN information and bridges all the network packets to the external switch.  the external switch then determines the target and routes/discards it accordingly.  This is very useful when there is only one VLAN that needs to be serviced through the SEA to the LPARs using these VIO servers.  The configuration on the switch as well as the VIO (SEA) is simple and straight forward.  In a Trunk mode (802.1Q complaint), the SEA is aware of the VLANs and bridges only the packets that is part of the ‘Additional VLANs’ list.  The external switch then determines the target and routes/discards it accordingly.  This is very useful when there is a need to service multiple VLANs through the same SEA adapter.  This will provide the ability to create LPAR...