Cisco CLI Error: % X.X.X.X overlaps with GigabitEthernet0/1
When does this error appear?
This error appears while attempting to configure a Layer 3 interface on a router or switch running Cisco IOS. It appears in one of the following 2 cases:
When using the ip address command; or,
When issuing the no shutdown command
Why does this error appear?
This error appears when multiple interfaces on a router are configured with IP Addresses from overlapping subnets.
Let's look at an example:
In the following scenario, there is one router connected to 2 switches.
Interface gi0/1 is enabled, connected to Switch1, and assigned the IP Address 172.20.100.1 255.255.254.0
Interface gi0/0 is enabled and connected to Switch2. There is no IP Address assigned to gi0/0.
Router1
Switch1
172.20.100.1/23
gi0/1
gi0/0
Switch2
Suppose we now try to configure an IP Address on interface gi0/0. We attempt to configure the IP Address 172.20.101.1 255.255.255.0:
Interface gi0/1 is already connected to the network 172.20.100.0/23. This network covers the range of addresses from:
172.20.100.0 to 172.20.101.255
The network 172.20.101.0/24 covers the range of addresses from:
172.20.101.0 to 172.20.101.255
When we attempt to configure int gi0/0 with the IP Address 172.20.101.1 255.255.255.0 we are essentially assigning the interface to the network 172.20.101.0 /24
We cannot assign multiple interfaces to overlapping subnets. The router outputs a message indicating that the network 172.20.101.0 overlaps with the network connected to interface gi0/1.
A second example:
Let's modify the scenario a little bit. In this scenario
Interface gi0/1 is enabled, connected to Switch1, and assigned the IP Address 172.20.100.1 255.255.254.0
Interface gi0/0 is shutdown and connected to Switch2. There is no IP Address assigned to gi0/0.
Router1
Switch1
172.20.100.1/23
gi0/1
gi0/0
Switch2
Suppose we now try to configure an IP Address on interface gi0/0. We attempt to configure the IP Address 172.20.101.1 255.255.255.0:
This time we are allowed to configure the IP Address and do not receive an error message. Why is that?
At this point gi0/0 is shutdown. Even if we configure an IP Address on it, this interface will not be involved in any routing decisions.
While the line protocol on an interface is down, we are allowed to configure an IP Address on it even if it overlaps with the network connected to another interface.
Let us now try to enable the interface. (It is already connected to an enabled interface on another device.)
When we enter the no shutdown command, the router outputs a message indicating that the network 172.20.101.0 overlaps with the network connected to interface gi0/1.
The interface remains administratively shutdown.
If we first shutdown interface gi0/1, we are then allowed to enable gi0/0 with its existing IP Address configuration:
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down
Router1(config)#interface gi0/0
Router1(config-if)#no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router1(config-if)#
Want to test your networking skills with hands-on configuration and troubleshooting questions? Try out the Workshops section of this website here: Workshops (Login required).