Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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).

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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