Posts

Showing posts from July, 2011

Usage of unix tools Find,Sed and awk

Sed, Awk and Find are the excellent unix tools.Following are few problem statements where use of these tools made the work easy.Have a glimpse if these are useful to you as well. Dump only CPU usage and process of the server to a file.       Top –n 1 –d  |  sed ‘1,6d’ |   awk ‘{print  $8 $NF }’ > dump.txt Find a pattern “EMC2” which exists in multiple files under current directory and replace the pattern with “CISCO” in all the files.       Find .  –type f    | xargs sed –i ‘s/EMC2/CISCO/g’       OR find  . –type f   -exec sed –i ‘s/EMC2/CISCO/g’ {} \; Calculate the number of lines between a line containing pattern “XYZ” & a line containing pattern “ABC” in a file. Sed –n ‘/XYZ/,/ABC/p’ | wc –l List the top 3 largest files in a sub-directory.       find  /root/dir/  -type f -exec ls -las {} \; | sort -n -r | head -3 Calculate the number of Normal users created in a unix server                 last |

Basic concepts on Spanning Tree Protocol(STP)

STP (Spanning tree protocol) is very simple protocol used in LAN technology to avoid loops in the redundant network. Though it may look very simple, I read many documents to understand how it works and why it is required. However, I hardly could understand it clearly until and unless i worked on it. Yes, we can get many documents/pdfs in the internet but those mayn’t provide you sufficient information to understand it. In this article I am trying to give very clear concept on STP so that one needn’t struggle much to understand it better. Well, before we begun with STP, let me tell you some special characteristics of switches. 1.       Actual Communication at layer-2 happens based on MAC address. 2.       Switches make the forwarding decision based on the destination MAC address. 3.       Switches learn the MAC addresses of devices on their port so that data is properly forwarded to the destination. 4.       Switches use source MAC address to learn where the devices are an

Key points one needs to know about MPLS

MPLS(Multiprotocol label switching) is highly emerging network technology which makes use of existing IP technology.MPLS supports traffic engineering which ensures the quality of service and makes best of network bandwidth. MPLS cloud consists of network nodes enabled with MPLS protocols for signalling and data transfer. Label distribution protocol(LDP) & Resource reservation protocol(RSRV) are the major protocols used by most of service providers/vendors.MPLS cloud consists of nodes which are categorized as Provider edge(PE),Customer edge(CE) & Provider(P).Label switched paths(LSP) are maintained between the two PE devices.Switching and forwarding decisions are taken based on the label assigned in the node. Following are the key points which one should know about MPLS: LSPs are maintained between two PEs. LDP protocol is used for normal traffic i.e it doesn't support any protection mechanism. RSVP protocol is used for TE(Traffic engineering) i.e. it sup