0

I am configuring a router to three different subnet as follow.

Sub1: 192.168.1.1-254
      255.255.248.0

Sub2: 192.168.2.1-254
      255.255.248.0

Sub3: 192.168.3.1-254
      255.255.248.0

In my cisco router I am doing the following.

Fa0/0

(config-if)# ip address 192.168.1.1 255.255.248.0

This works. However, when i go to configure my fa1/0. i got the following.

(config-if)# ip address 192.168.2.1 255.255.248.0
% 192.168.0.0 overlaps with FastEthernet0/0

How do i resolve this problem?

user1817081
  • 201
  • 1
  • 3
  • 9

3 Answers3

5

The router is correct, because with that subnet mask those addresses do overlap.

192.168.2.1/21, which is what your command tries to configure, is part of a subnet that includes everything from 192.168.1.1 through 192.168.7.255. What you mean to configure is 192.168.2.1/24 which is a mask of 255.255.255.0.

You may find it useful to use a subnet calculator (ex: http://www.subnet-calculator.com/ or on my Linux workstations I use the "sipcalc" package).

LapTop006
  • 6,466
  • 19
  • 26
1

You have a /21 mask (255.255.255.248)

The first interface (192.168.1.1/21) is then in this subnet:

Address:   192.168.1.1          11000000.10101000.00000 001.00000001
Netmask:   255.255.248.0 = 21   11111111.11111111.11111 000.00000000
Wildcard:  0.0.7.255            00000000.00000000.00000 111.11111111

Network:   192.168.0.0/21       11000000.10101000.00000 000.00000000
HostMin:   192.168.0.1          11000000.10101000.00000 000.00000001
HostMax:   192.168.7.254        11000000.10101000.00000 111.11111110
Broadcast: 192.168.7.255        11000000.10101000.00000 111.11111111

As can be seen from above, this network includes* the 192.168.2.x range, so the 192.168.2.1 IP on the second interface, is already within the range on the first interface.

If you need only 192.168.1.1-254 IPs, consider using /24 mask, or use 192.168.8.1/21 for the second interface, and 192.168.16.1/21 for the third.

*actually goes from 192.168.0.0 to 192.168.7.255

mulaz
  • 10,472
  • 1
  • 30
  • 37
0

yeah i got it, u have /21 that means your ip range is 192.168.1.1 - 192.168.3.254 so router understand it and when you try to enter 192.168.2.1/21 it warning you about 2 different ports that will have different IP BUT on the same subnet.

If you want to solve you will have to change into /24 or start the fa0/1 to 192.168.4.1 - 192.168.7.254

N3kos
  • 17
  • 2