IPv4 Interface Configuration - IOS

  • The following discusses the IP configuration of a network interface in IOS. 
Detailed Description
  • Consider a router with a 10 Mbps Ethernet (Ethernet) interface card with two ports that is located in slot 0 of the router, with names Ethernet0/0 and Ethernet0/1. The following sequence of IOS commands configures port 0 with IP address and port 1 with IP address In addition, the commands enable IP forwarding on the router
Router1> enable
Password: <enable secret>
Router1# configure terminal
Router1(config)# no ip routing
Router1(config)# ip routing
Router1(config)# interface Fa0/0
Router1(config-if)# no shutdown
Router1(config-if)# ip address
Router1(config-if)# interface Fa0/1
Router1(config-if)# no shutdown
Router1(config-if)# ip address
Router1(config-if)# end
  • The first two commands change to the privileged EXEC mode and, from there, to the global configuration mode. The command no ip routing, which is the command to disable IP forwarding, is used to reset the contents of the routing table and other related information. The next commandip routing, enables IP forwarding on the router. Then, the interface configuration mode is entered for interface Fa0/0. The command no shutdown enables the interface, and the command ip address sets the IP address to The commands to configure the second interface are similar. 
Configuration Commands
  • The following list summarizes the IOS commands for enabling IP forwarding and for configuring IP addresses:

ip routing                                       Enables IP forwarding.

no ip routing                                 Disables IP forwarding. This command also deletes the content of the routing table.

no shutdown                                  Enables network interface.

shutdown                                       Disables a network interface.

ip address IPaddress netmask       Sets the IP address and netmask of an interface to Ipaddress and netmask.