4

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.

1
  • There can be a few possibilities. Typically on a router, only the routed port (WAN) can have an IP address. Sometimes the port is by default a switchport, so that it needs no switchport before you can actually add an IP address. You could try to post the full configuration and show version.
    – user36472
    Oct 31, 2018 at 8:57

2 Answers 2

3

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

0

The CG-Mech product you should pay attention, from the document:

all the port, no matter FastEthernet or GigabitEthernet if you want to configure ip address, you should set no switchport firstly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.