Aleksandar's computer workshop

Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

Best way to practice and learn how to manage complex networks

Just use GNS3!

GNS3 is a graphical network simulator that allows simulation of complex networks.
To allow complete simulations, GNS3 is strongly linked with :

  • Dynamips, the core program that allows Cisco IOS emulation.
  • Dynagen, a text-based front-end for Dynamips.
  • Qemu, a generic and open source machine emulator and virtualizer.

GNS3 is an excellent complementary tool to real labs for network engineers, administrators and people wanting to pass certifications such as CCNA, CCNP, CCIP, CCIE, JNCIA, JNCIS, JNCIE.

It can also be used to experiment features of Cisco IOS, Juniper JunOS or to check configurations that need to be deployed later on real routers.

This project is an open source, free program that may be used on multiple operating systems, including Windows, Linux, and MacOS X.

Features overview

  • Design of high quality and complex network topologies.
  • Emulation of many Cisco IOS router platforms, IPS, PIX and ASA firewalls, JunOS.
  • Simulation of simple Ethernet, ATM and Frame Relay switches.
  • Connection of the simulated network to the real world!
  • Packet capture using Wireshark.

Some usefull links:

A lot of documentation and video tutorials http://www.gns3.net/documentation

Download page http://www.gns3.net/download

 

Using NSLOOKUP for DNS Server diagnosis

Nslookup.exe is a command-line administrative tool for testing and troubleshooting DNS servers (also known as name servers).

To use Nslookup.exe, please note the following: 

  • The TCP/IP protocol must be installed on the computer running Nslookup.exe 
  • At least one DNS server must be specified when you run the IPCONFIG /ALL command from a command prompt.
  • Nslookup will always devolve the name from the current context. If you fail to fully qualify a name query (that is, use trailing dot), the query will be appended to the current context. For example, the current DNS settings are att.com and a query is performed on www.microsoft.com; the first query will go out as www.microsoft.com.att.com because of the query being unqualified. This behavior may be inconsistent with other vendor's versions of Nslookup, and this article is presented to clarify the behavior of Microsoft Windows NT Nslookup.exe 
  • If you have implemented the use of the search list in the Domain Suffix Search Order defined on the DNS tab of the Microsoft TCP/IP Properties page, devolution will not occur. The query will be appended to the domain suffixes specified in the list. To avoid using the search list, always use a Fully Qualified Domain Name (that is, add the trailing dot to the name).


Nslookup.exe can be run in two modes: interactive and noninteractive. Noninteractive mode is useful when only a single piece of data needs to be returned. The syntax for noninteractive mode is:

nslookup [-option] [hostname] [server]

For example to check all MX records (email servers) for GSMBLOG.COM domain you have to type this:

nslookup -type=mx gsmblog.com

 and it will return something like this:

Server:  speedtouch.lan
Address:  192.168.0.254

Non-authoritative answer:
gsmblog.com     MX preference = 10, mail exchanger = mail.gsmblog.com

mail.gsmblog.com        internet address = 194.30.175.198

Or to validate the SPF (TXT) record you can use this command:

nslookup -type=txt gsmblog.com

it will return this:

Server:  speedtouch.lan
Address:  192.168.0.254

Non-authoritative answer:
gsmblog.com     text =

        "v=spf1 ip4:194.30.175.0/24 a mx -all"

More details:

http://support.microsoft.com/kb/200525

http://www.windowsnetworking.com/articles_tutorials/Using-NSLOOKUP-DNS-Server-diagnosis.html

How to change Name Server (DNS Client) Settings under Linux

In order to be able to use conical names you have to use name servers (also called DNS servers) which will convert some name into IP address. I will here show you where are configuration files under Linux

Edit /etc/resolv.conf which can like this:
nameserver 192.168.1.1
nameserver 10.0.0.138

Also you might hardcode some IP's in hosts file. It looks like this:
127.0.0.1 localhost.localdomain localhost
194.109.6.67 ns.xs4all.nl

To have your new settings valid you have to restart the computer or do this in command line which will restart all your network services and devices:

/etc/init.d/network restart

If you are connected with SSH be patient connection will be restored.