Cisco Router – GigabitEthernet Interface Cannot Add IP Address

ciscocisco-ios

Cisco Router GigabitEthernet interface can not add ip address?

Router(config)#interface gigabitEthernet 2/1
Router(config-if)#ip add ?
% Unrecognized command
Router(config-if)#ip add 12.12.12.1 255.255.255.0
                  ^
% Invalid input detected at '^' marker.

who can tell me where is the issue?

my device is CGR1240.

Best Answer

From Cisco documentation:

Port Configuration

The Cisco CGR 1120 has 8 Ethernet ports: 6 FE ports, and 2 GE switch ports. The Cisco CGR 1240 has 6 Ethernet ports: 4 FE ports and 2 GE switch ports. On both of the CGRs, you can configure the 2 GE ports to operate in Layer 2 mode or the default Layer 3 mode. You can convert the switch to Layer 2 mode by using the switchport command.

Note: Layer 2 switching is hardware switched. Layer 3 switching is software forwarding.

  • The FE ports are 100BaseT Layer 2. Traffic between different VLANs on a switch is routed through the router platform using the switched virtual interface (SVI). You can configure FE switch ports as Layer 3 (routed) ports by configuring the no switchport command on interface fastethernet x/y . By default, FE switch ports are Layer 2.

  • The GE ports are 1000BaseT Layer 2. Traffic between different VLANs on a switch is routed through the router platform using the switched virtual interface (SVI). You can configure GE switch ports as Layer 2 ports by configuring the switchport command on interface gigabit ethernet x/y . By default, GE ports are Layer 3 (routed ports). Any switch port can be configured as a trunking port to connect to other Cisco Ethernet switches.

Source: https://www.cisco.com/c/en/us/td/docs/routers/connectedgrid/cgr1000/ios/software/15_4_1_cg/FEvlan_switchconf.html