Where’s My Traceroute in Ubuntu

By default if you try to use the traceroute command in Ubuntu it will suggest installing the application since there is no application by such name installed.


user@bicerin:~$ traceroute
The program 'traceroute' can be found in the following packages:
* inetutils-traceroute
* traceroute
Try: sudo apt-get install

While you could apt-get install traceroute your way out of it, you could instead use the included mtr application.

http://manpages.ubuntu.com/manpages/gutsy/man8/mtr.8.html

mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

I like the way mtr presents the output instead of the normal traceroute applications, mtr constantly pings the address in a live manner and watch the output update according to network conditions.


user@bicerin:~$ mtr linhost.info

Host Loss% Snt Last Avg Best Wrst StDev
1. OpenWrt.lan 0.0% 3 0.5 0.5 0.4 0.5 0.0
2. ???
3. te-9-2-ur01.fourhills.nm.albuq.comcast.net 0.0% 2 9.3 8.9 8.5 9.3 0.5
4. te-4-2-ar01.albuquerque.nm.albuq.comcast.net 0.0% 2 8.8 9.2 8.8 9.6 0.5
5. te-0-0-0-8-cr01.denverqwest.co.ibone.comcast.net 0.0% 2 18.0 23.1 18.0 28.3 7.2
6. he-3-12-0-0-cr01.denver.co.ibone.comcast.net 0.0% 2 21.2 21.0 20.9 21.2 0.2
7. xe-0-0-0.bbr01.cf01.den01.networklayer.com 0.0% 2 17.3 17.2 17.0 17.3 0.2
8. ae12.bbr02.eq01.dal03.networklayer.com 0.0% 2 31.8 33.0 31.8 34.2 1.7
9. po32.dsr01.dllstx3.networklayer.com 0.0% 2 31.6 31.6 31.6 31.7 0.1
10. po31.dsr01.dllstx2.networklayer.com 0.0% 2 31.9 32.4 31.9 33.0 0.8
11. po1.car14.dllstx6.networklayer.com 0.0% 2 34.8 35.1 34.8 35.3 0.4
12. gator524.hostgator.com 0.0% 2 31.9 32.8 31.9 33.7 1.3

I didn’t know about mtr which is why I decided to create this post as a reminder.

Scan a subnet with Nmap

Simple Nmap combination useful if you need to scan an entire subnet for active hosts and the IP addresses used by the same. I am not an expert on Nmap if you have a better method let me know.

1. From a command line window issue the command below.

nmap -v -sn 192.168.1.0/24
  • -v
  • Vervose

  • -sn
  • Ping scan – disable port scan

2. Nmap outputs its findings along with the IP address and MAC address of the clients on the subnet.

# nmap -v -sn 192.168.1.0/24

Starting Nmap 5.51 ( http://nmap.org ) at 2012-11-05 00:10 Mountain Standard Time
Initiating ARP Ping Scan at 00:10
Scanning 11 hosts [1 port/host]
Completed ARP Ping Scan at 00:10, 0.53s elapsed (11 total hosts)
Initiating Parallel DNS resolution of 11 hosts. at 00:10
Completed Parallel DNS resolution of 11 hosts. at 00:10, 16.50s elapsed
Nmap scan report for 192.168.1.0 [host down]
Nmap scan report for 192.168.1.1
Host is up (0.0010s latency).
MAC Address: 00:90:7F:26:3E:13 (WatchGuard Technologies)
Nmap scan report for 192.168.1.2 [host down]
Nmap scan report for 192.168.1.10 [host down]
Initiating Parallel DNS resolution of 1 host. at 00:10
Completed Parallel DNS resolution of 1 host. at 00:11, 16.50s elapsed
Nmap scan report for 192.168.1.11
Host is up.
Initiating ARP Ping Scan at 00:11
Scanning 244 hosts [1 port/host]
Completed ARP Ping Scan at 00:11, 1.96s elapsed (244 total hosts)
Initiating Parallel DNS resolution of 244 hosts. at 00:11
Completed Parallel DNS resolution of 244 hosts. at 00:11, 16.50s elapsed
Nmap scan report for 192.168.1.12 [host down]
Nmap scan report for 192.168.1.17 [host down]
Nmap scan report for 192.168.1.18
Host is up (0.0019s latency).
MAC Address: 00:0C:29:97:30:0A (VMware)
Nmap scan report for 192.168.1.19 [host down]
Nmap scan report for 192.168.1.255 [host down]
Read data files from: C:\Program Files (x86)\Nmap
Nmap done: 256 IP addresses (3 hosts up) scanned in 52.16 seconds
           Raw packets sent: 509 (14.252KB) | Rcvd: 3 (84B)

New Virtual Machines: BSD Router Project (BSDRP)

BSD Router Project (BSDRP) is an embedded free and open source router distribution based on FreeBSD with Quagga and Bird. This is a 17MB download, you will need 7-Zip to decompress the contents. Due to the small image size I will update the image accordingly as updates are released.

  • CPU: 1
  • Memory: 128MB
  • Disk Space: 8GB
  • Networking: 3 Interfaces | NAT | Sound card: Enabled
  • Compressed using 7-Zip

BSD Router Project 1.1 32-Bit 17MB
.MD5
.SHA1

BSD Router Project 1.1 64-Bit 17MB
.MD5
.SHA1

Q&A: To Auto Negotiate Or Not

It seems that IT professionals have different views on auto-negotiation, some recommend using it others prefer to not use it at all. What’s the reason behind this variation ?

The whole stigma around auto-negotiation is the result of open interpretation, at the time(90s) vendors agreed that auto-negotiation was a neat idea, but like always each vendor had its own interpretation of auto-negotiation. This lead to auto-negotiation being unable to work between vendor A and vendor B. Rather than have a malfunctioning link the solution at the time was to manually set the speed and duplex, this meant that adapters and switches from different vendors would be able to work with each other.

Despite the improvements and ratifications over the years auto-negotiation still enjoys a not so favorable reputation in the IT community, To summarize, the problem was that auto-negotiation back then was not the same standard we have today.

In the early years…

  1. 1995 IEEE802.3u released.
  2. 1998 Open / different interpretations of IEEE802.3 were ended after being ratified that year.
  3. 1999 IEEE802.3ab brought gigabit Ethernet and mandated auto-negotiation on 1000BASE-T aka gigabit Ethernet over copper.

As you can see with every sequential release auto-negotiation went from being loosely mandated to required on gigabit Ethernet.

All 1000BASE-T PHYs shall provide support for Auto-Negotiation (Clause 28) and shall be capable of operating as MASTER or SLAVE. Auto-Negotiation is performed as part of the initial set-up of the link, and allows the PHYs at each end to advertise their capabilities (speed, PHY type, half or full duplex) and to automatically select the operating mode for communication on the link.

Auto-negotiation signaling is used for the following two primary purposes for 1000BASE-T:

To negotiate that the PHY is capable of supporting 1000BASE-T half duplex or full duplex transmission.

To determine the MASTER-SLAVE relationship between the PHYs at each end of the link. 1000BASE-T MASTER PHY is c from a local source. The SLAVE PHY uses loop timing where the clock is recovered from the received data stream.

Clause 40.5.1 IEEE 802.3 standard.

The rule of thumb should be to let auto-negotiation happen unless for some reason you still have legacy equipment in the network.

Links

http://standards.ieee.org/reading/ieee/interp/IEEE802.3af-2003interp-6.pdf
http://www.sun.com/blueprints/0704/817-7526.pdf