• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Delete Duplicate Rules in Routing Policy Database in CentOS/RHEL

by admin

Question: How to Delete Duplicate Rules in Routing Policy Database?

Use the IP Rule selector for deleting the specific IP Rule.

The syntax for the command is as follows:

# ip rule del pref [selector]

1. First, list the routing policy database:

# ip rule list 
0: from all lookup local
32760: from all to 10.0.0.10 lookup 220.  
32761: from 10.0.0.10 lookup 220.         
32762: from all to 172.16.0.0/23 lookup 210
32763: from 172.16.0.0/23 lookup 210
32764: from all to 10.0.0.10 lookup 220
32765: from 10.0.0.10 lookup 220
32766: from all lookup main
32767: from all lookup default

2. As you can see from the output above there are 2 dulicate IP rules, 32760 and 32761. Delete these IP rules using the command:

# ip rule del pref 32760
# ip rule del pref 32761

3. Verify the IP rule list again to confirm if the duplicate rules are deleted from the roputing policy database:

# ip rule list
0: from all lookup local
32762: from all to 172.16.0.0/23 lookup 210
32763: from 172.16.0.0/23 lookup 210
32764: from all to 10.0.0.10 lookup 220
32765: from 10.0.0.10 lookup 220
32766: from all lookup main
32767: from all lookup default

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. Unable to set a GRUB password on a Raspberry Pi 3 system
  2. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
  3. CentOS / RHEL : How to disable root login or root access on a system
  4. CentOS / RHEL 5 : How to Configure kdump
  5. Understanding DNS zone files
  6. How to disable avahi-daemon service in CentOS/RHEL
  7. How to enable IPv6 on CentOS / RHEL 6
  8. Beginners guide to Kernel Module Configuration in Linux
  9. How to install and configure Samba in CentOS / RHEL
  10. CentOS / RHEL 7 : How to rename the volume group for root and swap

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright