
Offset-list and distance command revealed
Offset-list basically used for altering the route metric. I have given an example to alter a route metric with the help of offset-list.
We are running EIGRP protocol in all the above routers and advertising all the associated networks.
So in the above task, we need to change the metric of a route (70.0.0.0/24) coming from R3 to R2 so what will be the commands.
On R2:-
# offset-list 1 in 170 s1/0
# access-list 1 permit 70.0.0.0 0.0.0.255
Now if you see the routing table of R2, you can see the metric of route(70.0.0.0/24) changed to a value of 170.
Offset-list can also be used to discard a route from routing table. We are using the same diagram mentioned above but the protocol running is RIP and we are advertising all the subnets in RIP. Below mentioned are the commands.
On R2:-
# offset-list 1 in 15 s1/0
# access-list 1 permit 70.0.0.0 0.0.0.255
As you know the 15 metric is unreachable for RIP so the route will not be entered in R2 routing table and hence not reached to R1.
Offset-list can also be used in out direction and workings will the same. Metric will be changed in the next hop router.
Distance command basically used for manipulating the AD of routes. Below mentioned is the task.
Refer the above mentioned diagram.
We are running EIGRP in all the routers and all subnets are advertised in EIGRP. Now we want to change the AD of 70.0.0.0/24 route to 199.
On R2
# distance 199 20.0.0.2 0.0.0.0 1
# access-list 1 permit 70.0.0.0 0.0.0.255
Above two commands states that routes coming from 20.0.0.2 address and matching the access-list 1, AD should be changed to 199. You can see the changed AD by verifying the routing table of R2.
You can also change the AD of all internal and external routes of EIGRP
# distance Eigrp 99 200
Command mentioned above states that change the AD for all internal routes to 99 and changed the AD for all external routes to 199. You can validate by verifying the routing table of R2.
Distance command also can be used to filter routes. As the AD of 255 is considered as unreachable so we will modify the AD for 70.0.0.0/24 route to 255 and route will not be installed in R2 routing table.
On R2:-
# distance 255 20.0.0.2 0.0.0.0 1
# access-list 1 permit 70.0.0.0 0.0.0.255
Now after running this command in R2, 70.0.0.0/24 route will be out of R2 routing table and you can validate it by verifying the routing table of R2.
Please let me know, if you find the post useful.
Regards
Mahi
rawatmohinder@yahoo.co.in
Offset-list basically used for altering the route metric. I have given an example to alter a route metric with the help of offset-list.
We are running EIGRP protocol in all the above routers and advertising all the associated networks.
So in the above task, we need to change the metric of a route (70.0.0.0/24) coming from R3 to R2 so what will be the commands.
On R2:-
# offset-list 1 in 170 s1/0
# access-list 1 permit 70.0.0.0 0.0.0.255
Now if you see the routing table of R2, you can see the metric of route(70.0.0.0/24) changed to a value of 170.
Offset-list can also be used to discard a route from routing table. We are using the same diagram mentioned above but the protocol running is RIP and we are advertising all the subnets in RIP. Below mentioned are the commands.
On R2:-
# offset-list 1 in 15 s1/0
# access-list 1 permit 70.0.0.0 0.0.0.255
As you know the 15 metric is unreachable for RIP so the route will not be entered in R2 routing table and hence not reached to R1.
Offset-list can also be used in out direction and workings will the same. Metric will be changed in the next hop router.
Distance command basically used for manipulating the AD of routes. Below mentioned is the task.
Refer the above mentioned diagram.
We are running EIGRP in all the routers and all subnets are advertised in EIGRP. Now we want to change the AD of 70.0.0.0/24 route to 199.
On R2
# distance 199 20.0.0.2 0.0.0.0 1
# access-list 1 permit 70.0.0.0 0.0.0.255
Above two commands states that routes coming from 20.0.0.2 address and matching the access-list 1, AD should be changed to 199. You can see the changed AD by verifying the routing table of R2.
You can also change the AD of all internal and external routes of EIGRP
# distance Eigrp 99 200
Command mentioned above states that change the AD for all internal routes to 99 and changed the AD for all external routes to 199. You can validate by verifying the routing table of R2.
Distance command also can be used to filter routes. As the AD of 255 is considered as unreachable so we will modify the AD for 70.0.0.0/24 route to 255 and route will not be installed in R2 routing table.
On R2:-
# distance 255 20.0.0.2 0.0.0.0 1
# access-list 1 permit 70.0.0.0 0.0.0.255
Now after running this command in R2, 70.0.0.0/24 route will be out of R2 routing table and you can validate it by verifying the routing table of R2.
Please let me know, if you find the post useful.
Regards
Mahi
rawatmohinder@yahoo.co.in
No comments:
Post a Comment