no ip route destination mask gw_addressno ip route destination mask Iface
IP Interface Configuration Example
Router1> enablePassword: <enable secret>Router1# configure terminal Router1(config)# no ip routingRouter1(config)# ip routingRouter1(config)# interface Fa0/0Router1(config-if)# no shutdownRouter1(config-if)# ip address 10.0.2.1 255.255.255.0Router1(config-if)# endRouter1(config-if)# interface Fa0/1Router1(config-if)# no shutdownRouter1(config-if)# ip address 10.0.3.1 255.255.255.0Router1(config-if)# end
Adding & Deleting Routing Tables Example
Command for adding a route for the network prefix 10.21.0.0/16 with 10.11.1.4 as the next-hop address
Router1(config)# ip route 10.21.0.0 255.255.0.0 10.11.1.4
Command to add a host route to IP address 10.0.2.31 with next-hop set to 10.0.1.21
Router1(config)# ip route 10.0.2.31 255.255.255.255 10.0.1.21
Command to add the IP address 10.0.4.4 as the default gateway
Router1(config)# ip route 0.0.0.0 0.0.0.0 10.0.4.4
Commands to delete the previous entries use the no ip route command
Router1(config)# no ip route 10.21.0.0 255.255.0.0 10.11.1.4
Router1(config)# no ip route 10.0.2.31 255.255.255.255 10.0.1.21
Router1(config)# no ip route 0.0.0.0 0.0.0.0 10.0.4.4