Assign IP Addresses to an Ethernet Interface

IP addresses can be assigned to an Ethernet interface, using Classless Interdomain Routing (CIDR) network masks.

Procedure

  1. From privileged EXEC mode, access global configuration mode.
    device# configure terminal
    
  2. Access the interface to which you are assigning the IP addresses.
    device(config)# interface ethernet 0/1
  3. Assign one or more IP addresses, with a CIDR network mask.
    device(config-if-eth-0/1)# ip address 11.1.1.11/24
    device(config-if-eth-0/1)# ip address 11.11.1.11/24
  4. To assign a secondary IP address, include the secondary keyword.
    device(config-if-eth-0/1)# ip address 10.53.5.4/24 secondary
    Note

    Note

    You can configure a secondary IP address only if the primary IP address is already configured in the same subnet.
  5. Activate the interface.
    device(config-if-eth-0/1)# no shutdown
  6. Verify that the IP addresses are assigned to the interface.
    device(config-if-eth-0/1)# do show ip interface ethernet 3/14
     Ethernet 3/14 is up protocol is up
     Primary Internet Address is 11.1.1.11/24 broadcast is 11.1.1.255
     Primary Internet Address is 11.11.1.11/24 broadcast is 11.11.1.255
     Secondary Internet Address is 11.11.1.12/24 broadcast is 11.11.1.255
     IP MTU is 1500
     Proxy Arp is Enabled
     ICMP unreachables are always sent
     ICMP mask replies are never sent
     IP fast switching is enabled
     Vrf : default-vrf