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.

Note To Self: Copy Files Between Two Systems with Rsync

I needed to copy a couple hundred GBs of data as a precaution from a VPS to another location for temporary storage since I was about to mess with the file system. After reading the man pages and other blogs I guess this was the best I could come up with.

rsync -arz -e ssh /local_path/ remote_user@ip_address:/remote_path/
-a archive mode
-r recurse into directories
-z compress file during the transfer
-e ssh remote shell SSH

Other parmeters to add:

--partial keep partially transferred files
--delete delete extraneous files from destination dirs

Monitor MDADM Rebuild Progress

Just in case you find your self creating or rebuilding an MDADM array here is a simple combination that will output every two seconds the status of the array.

We combine watch and cat retrieve and update the status of the array.

watch cat /proc/mdstat
Every 2.0s: cat /proc/mdstat                            Tue Mar  5 00:34:35 2013

Personalities : [raid1]
md1 : active raid1 sdc1[1] sdb1[0]
      262011712 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  3.1% (8126080/262011712) finish=20.7min
 speed=204065K/sec

unused devices: 

Configure Trunking Between Cisco Catalyst 2960 Switches

This tutorial also applies to other Cisco switches. The Cisco Catalyst 2960 is a layer 2 switch, perhaps one of the most commonly used switches I see in the field. Trunking is a solution for connecting two switches at layer 2, trunking even allows for VLANs in both switches to communicate.

2960 Topology

For this tutorial I will create a trunk between two Cisco Catalyst 2960 switches. My Catalyst 2960 come with two gigabit uplink ports, I will use one port on each switch to establish the trunk. By default all VLANs will be able to traverse the trunk(this includes VLAN 1).

SWITCH-A Trunk Configuration

SWITCH-A# configure terminal
SWITCH-A(config)# interface gigabitEthernet 1/1
SWITCH-A(config-if)# description trunk link
SWITCH-A(config-if)# switchport mode trunk
SWITCH-A(config-if)# switchport nonegotiate

Command explanation:

  • switchport mode trunk - Configure interface for trunking mode
  • switchport nonegotiate - Since the interface was manually configure for trunking there is no need to negotiate

SWITCH-B Trunk Configuration

SWITCH-B configuration steps are identical to SWITCH-A.

SWITCH-B# configure terminal
SWITCH-B(config)# interface gigabitEthernet 1/1
SWITCH-B(config-if)# description trunk link
SWITCH-B(config-if)# switchport mode trunk
SWITCH-B(config-if)# switchport nonegotiate

Conclusion

By trunking two switches together the amount of available ports can be increased. The interfaces linking the two switches may be come bottle necks if the switches send more traffic than either the Fast Ethernet or Gigabit Ethernet port used for the trunk can handle, to increase bandwidth between the switches consider adding EtherChannel to the trunk link.

Feel free to leave a comment below, who knows I maybe able to provide some extra assistance.