Thursday, August 16, 2012

Brief Intro on Link State Protocols

Link State Routing protocols


Forms different relationship rather than sending broadcasts in a periodic interval

After the exchange of initial routing table ,routers send small event based updates


Example OSPF and IS-IS

Advantages of link state protocols

Much Faster to converge

No Routing Loops

Forces you to design your network correctly


Disadvantages of Link State Routing

Takes heavy resources on routers

Requires a solid network design

Technical Complexity

Distance vector protocols and their issue of looping

Distance vector Routing Protocols send entire table at specific intervals


Distance vector protols are simple to implement but they have looping issues,count down to infinity issue

There are 5 loop prevention mechanism in Cisco Routers

1.Maximum Distances(For RIP it is 16 hops,if any network is 16 hops away it's not considered anymore,)

2.Route Poisoning(advertise that the network is down immediately,they kill the network by sending the network a maximum hop count bigger than 16 so that the maximum distance law takes the network out)


3.Triggered Updates(send the update immediately rather than waiting 30 sec like RIP generally does,poison the route,and tell the neighbour device that the network is down,triggered idea should be avoided in an unstable network where interfaces are going up and down)

4.Split Horizon(tell routers do not send updates/advertisements in the same direction you recieved them)

5.Hold Down Timer(it won't believe any other updates about a particular route for a cirtain amount of time,180 sec is typical,works great in a situation where interfaces are going up and down)

Tuesday, August 14, 2012

Playing with swap


after creating a swap partion by by Gparted tool you need to turn swapping on that partition,

swapon /dev/sdb1

swapon -s will reveal all the swap partitions

instead of free -m you need to use the free command to see the total swap and it's usage

swapon -a enables swap from /etc/fstab

we need to update the /etc/fstab to make the newly created swap partition available after reboot

in nano ctrl+k for cut and ctrl+u for uncut and by this way you can copy the existing lvm based swap line and just replace the directory,ehich in my case is /dev/sdb1

swapoff /dev/sdb1 will release the swap on the device(device and file)

swapon -a will read the /etc/fstab again and the released swap will be activated again


to create a swap from shell

fdisk /dev/sdb 


N for creating disk

T for making it swap

W for writing the partitioning table

swapon /dev/sdb1

if not succesful then try using mkswap /dev/sdb1



allocation of swap from a file

dd if=/dev/zero of=/root/swapfile bs 1024 count=524288

mkswap /root/swapfile

swapon /root/swapfile

swapon -s will show the swap

to make this parmanent modify the /etc/fstab file

it will be like

/dev/mapper/debian5-swap_1  none swap sw 0   0
/dev/sdb1                   none swap sw 0   0
/root/swapfile              swap swap defaults 0   0


swapon -a will read the /etc/fstab and show the 3 swap

swapoff -a will disable every swap in /etc/fstab

swapon -a will enable the swap in/etc/fstab


Friday, July 20, 2012

Install virtualbox Guest Additions in OpenSUSE 12.1

zypper install gcc make autoconf kernel-devel kerenl-desktop-devel kernel-source kernel-syms

Run rpm-qa | grep kernel



if you see any version mismatch add the kernel repo and then update by


zypper update kernel-****


reboot

Then 


cd / usr / src / linux 
make cloneconfig 
make modules_prepare  


reboot

and then install Guest Additions,hopefully it will work!!!!



source:http://translate.googleusercontent.com/translate_c?hl=en&prev=/search%3Fq%3Dthe%2Bheaders%2Bfor%2Bthe%2Bcurrent%2Brunning%2Bkernel%2Bwere%2Bnot%2Bfound%2BOpen%2BSUSE%26hl%3Den%26safe%3Doff%26biw%3D1024%26bih%3D636%26prmd%3Dimvnsfd&rurl=translate.google.com&sl=zh-CN&twu=1&u=http://www.douban.com/group/topic/22112329/&usg=ALkJrhjvrcLhpQjS2tvv9bEA8w63ARWi-g