Displaying IP Configuration Information
In this task, commands and options are shown to allow you to view the following IP configuration information statistics on Layer 3 devices:
- Enter global configuration mode.
- (Optional) To enable CIDR format for displaying network masks, entering the following
command.
By default, the CLI displays network masks in classical IP address format (example: 255.255.255.0). This command displays the network mask in CIDR format with a /prefix (for example /24).
- Use the
show ipcommand to display general IP configuration information.device# show ip Global Settings ttl: 64, arp-age: 10, bootp-relay-max-hops: 4 router-id : 10.95.11.128 enabled : UDP-Broadcast-Forwarding Source-Route Load-Sharing RARP OSPF VRRP-Extended VSRP disabled: Route-Only Directed-Broadcast-Forwarding BGP4 IRDP Proxy-ARP RIP VRRP ICMP-Redirect Static Routes Index IP Address Subnet Mask Next Hop Router Metric Distance 1 0.0.0.0 0.0.0.0 10.157.23.2 1 1 Policies Index Action Source Destination Protocol Port Operator 1 deny 10.157.22.34 10.157.22.26 tcp http = 64 permit any any
The display shows the local IP address, ARP aging timer, protocols that are enabled, static route information including the next hop address, any policies that are configured to filter the traffic, and other configurable options. - Use the
show ip interfacecommand to display IP interface information.device# show ip interface Interface IP-Address OK? Method Status Protocol Ethernet 1/1/1 10.95.6.173 YES NVRAM up up Ethernet 1/1/2 10.3.3.3 YES manual up up Loopback 1 10.2.3.4 YES NVRAM down down
The example shows IP addresses configured for specific interfaces and the status of the interface. - Use the
show ip interfacecommand with specific options to display detailed IP information for a specific interface.device# show ip interface ve 1 Interface Ve 1 members: ethe 1/1/4 to 1/1/24 ethe 1/1/27 to 1/1/48 ethe 1/2/1 to 1/2/2 ethe 2/1/1 to 2/1/2 ethe 2/1/4 to 2/1/12 ethe 2/1/15 to 2/1/24 ethe 2/2/1 to 2/2/2 ethe 3/1/1 to 3/1/2 ethe 3/1/4 to 3/1/12 ethe 3/1/14 to 3/1/24 ethe 3/2/3 to 3/2/4 ethe 4/1/1 to 4/1/12 ethe 4/1/15 to 4/1/24 ethe 4/2/3 to 4/2/4 ethe 5/1/1 to 5/1/12 ethe 5/1/14 to 5/1/24 ethe 5/2/3 active: ethe 4/2/4 port enabled port state: UP ip address: 10.66.66.66 subnet mask: 255.255.255.0 Port belongs to VRF: default-vrf encapsulation: ETHERNET, mtu: 9216, metric: 1 directed-broadcast-forwarding: disabled ICMP redirect: enabled proxy-arp: disabled ip arp-age: 10 minutes No Helper Addresses are configured. No inbound ip access-list is set No outgoing ip access-list is set
The example shows more detailed information about virtual interface 1 and its configured, or default, options. - Use the
show ip routecommand to display the IP route table.device# show ip route Total number of IP routes: 514 Start index: 1 B:BGP D:Connected R:RIP S:Static O:OSPF *:Candidate default Destination NetMask Gateway Port Cost Type 10.1.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.2.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.3.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.4.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.5.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.6.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.7.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.8.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.9.0.0 255.255.0.0 10.1.1.2 1/1/1 2 R 10.10.0.0 255.255.0.0 10.1.1.2 1/1/1 2 S
- Use the
direct option of the
show ip routecommand to display only direct routes that go to devices directly attached to the Layer 3 device.device# show ip route direct Start index: 1 B:BGP D:Connected R:RIP S:Static O:OSPF *:Candidate default Destination NetMask Gateway Port Cost Type 10.157.22.0 255.255.255.0 0.0.0.0 1/4/11 1 D
Notice that the route displayed in this example has "D" in the Type field, indicating the route is to a directly connected device. - Use the
static option of the
show ip routecommand to display configured static IP routes.device# show ip route static Start index: 1 B:BGP D:Connected R:RIP S:Static O:OSPF *:Candidate default Destination NetMask Gateway Port Cost Type 10.144.33.11 255.255.255.0 10.157.22.12 1/1/1 2 S
Notice that the route displayed in this example has "S" in the Type field, indicating the route is static. - Use the
show ip cachecommand to display the IP forwarding cache.device# show ip cache Total number of cache entries: 3 D:Dynamic P:Permanent F:Forward U:Us C:Complex Filter W:Wait ARP I:ICMP Deny K:Drop R:Fragment S:Snap Encap IP Address Next Hop MAC Type Port Vlan Pri 1 192.168.1.11 DIRECT 0000.0000.0000 PU n/a 0 2 192.168.1.255 DIRECT 0000.0000.0000 PU n/a 0 3 255.255.255.255 DIRECT 0000.0000.0000 PU n/a 0