• 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. dkms Command Examples in Linux
  2. dumpe2fs Command Examples in Linux
  3. How to Update the hostname in Shell Prompt Once it is Changed in the Linux OS
  4. notify-send Command Examples in Linux
  5. How to Check Swap Usage Live via the ‘top’ Command in Linux
  6. ptx Command Examples in Linux
  7. CentOS / RHEL : Beginners guide to cron
  8. apm – Atom editor Package Manager (Command Examples)
  9. How to Start, Stop and Restart Zimbra Service
  10. How to Provide Credentials From a File While Mounting CIFS Share in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright