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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. How to kill Processes in Linux using kill, killall and pkill
  2. How to configure VNC Server on Oracle Linux 6
  3. “Abort command issued nexus” error messages in /var/log/messages file
  4. Reducing/Limiting the CPUs in CentOS/RHEL 5,6
  5. How to make ethtool settings persistent across reboots in CentOS / RHEL 6,7
  6. Downloading a Specific Version of Package and Its Dependencies from Repository for Offline Installation Using YUM
  7. 3 Ways of Increasing Swap Space on Linux
  8. CentOS / RHEL : How to rotate /var/log/wtmp and /var/log/btmp file using logrotate
  9. RHEL 7 – RHCSA Notes (Cheat Sheets)
  10. How to get Fibre Channel HBA information from Linux SOSreport

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary