CLI Reference Guide-R04

Table Of Contents
Chapter 31
| IP Interface Commands
IPv4 Interface
– 897 –
after the % delimiter. For example, FE80::7272%1 identifies VLAN 1 as the
interface.
Example
The following example defines a default gateway for this device:
Console(config)#ip default-gateway 192.168.2.1
Console#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
S* 0.0.0.0/0 [1/0] via 192.168.2.1, VLAN1
C 127.0.0.0/8 is directly connected, lo
C 192.168.2.0/24 is directly connected, VLAN1
Console(config)#
Related Commands
ip address (894)
ip route (948)
ipv6 default-gateway (906)
show ip interface This command displays the settings of an IPv4 interface.
Syntax
show ip interface [vlan vlan-id]
vlan-id - VLAN ID (Range: 1-4094)
Command Mode
Privileged Exec
Example
Console#show ip interface
Address is 00-E0-0C-00-00-FA
Index: 1001, MTU: 1500
Address Mode is DHCP
IP Address: 192.168.2.12 Mask: 255.255.255.0
Proxy ARP is disabled
DHCP Client Vendor Class ID (text): ECS4120-28Fv2-I
DHCP Relay Server:
Console#
Related Commands
ip address (894)
show ipv6 interface (916)