Pages

Showing posts with label list. Show all posts
Showing posts with label list. Show all posts

Saturday, July 8, 2017

Distribution list

Distribution list


for this lab, we gonna use same topology and setup from previous lab Redistribution RIP Ver2 - OSPF

1. First we gonna stop route to 172.16.2.x and 172.16.3.x to be advertised into R2

on R1 create access-list to match the two address

ip access-list standard ROUTE_FILTER
 deny   172.16.3.0 0.0.0.255
 deny   172.16.4.0 0.0.0.255
 permit any //dont forget this, by default access-list deny all

then apply inside the routing protocol on specific interface, in this case, go to RIP and apply on the R1 interface serial 0/0


router rip
 version 2
 network 10.0.0.0
 network 172.16.0.0
 distribute-list ROUTE_FILTER out Serial0/0
 no auto-summary

now check on R2, R3 and R4, you should see no route to this two network


2. Now we gonna apply distribution list where the filter is applied between routing protocol, here we gonna filter network 172.16.1.x coming from RIP from being advertised into OSPF

 on R2, create access-list for this network


ip access-list standard ROUTE_FILTER
 deny   172.16.1.0 0.0.0.255
 permit any

because OSPF dont want specific network to advertise to him, we gonna configure this inside the OSPF process and specific from what routing protocol and network he dont want any update

router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 redistribute rip subnets
 network 10.0.0.0 0.255.255.255 area 0
 distribute-list ROUTE_FILTER2 out rip

check on the R3, R4. there should be no route path to 172.16.1.x


Read more »

Sunday, June 25, 2017

Displaying sorted list size wise of Files Folder on Linux

Displaying sorted list size wise of Files Folder on Linux


Even though i have a 120 GB HDD on my laptop and have dedicated a significant portion of hard disk space to Ubuntu still somehow every three or four months i run out of disk space . Also i am particularly bad at organizing stuff and well files are cluttered over my entire file system this makes tracking large files i dont need very difficult . Lots of application create a number of temporary files and these files also take significant amount of disk space and could be hard to track down if they are not created in /tmp .


The command I am discussing below helps you solve precisely this problem by giving you an ordered list (ordered in terms of size) of files and folders taking up space in your computer thus helping you find files/folder which are taking up significant amount of space :

du -sm *


Above command would display all the files and folder as well as their size as a list, however this is not a ordered list . To order the list we would need to pipe (that is send output of this command to another ) the output of the "du" command to "sort" command giving out list of files and folders sorted in ascending order according to the size.
du -sm * | sort -nr

Still there is a problem this is an entire list of files and folder in your file system , so if you have number of files and folders it will take number of screens to display . A better way would be to pipe the output of above command to "head" command to display only specified number of lines of output generated by "du -sm * | sort -nr " command .

du -sm *| sort -nr | head -15
Now the above command would display the top 15 files and folder according to their size .


Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2008 , Ambuj Varshney
Read more »