cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1014
Views
5
Helpful
4
Replies

Why ip overlaps ?

Juliusvar1
Level 1
Level 1

Hello guys, I faced with problem.

 

R1

int f0/0

ip add 192.168.100.1 255.255.255.252

int f0/0.100

encapsulate do1q 100

ip add 192.168.100.254 255.255.255.0

 

SW

vlan 100

int f0/1

switchport mode trunk

switchport trunk allow vlan 100

 

int fa0/2

switchport mode access

switchport access vlan 100

spanning tree portfast

 

Can someone explain why when I try put ip address on R1 fa0/0 192.168.100.1 and trying to encapsulate IP address 192.168.100.254 I receive that overlapsing int f0/0 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Hello,

 

192.168.100.0/22 (or 192.168.100.0 255.255.255.252) is in the same address space as 192.168.100.0/24 (or 192.168.100.0 255.255.255.0), so you get an error.

 

Basically, if you use an /24 address space on one interface, you cannot use any of the subaddresses in that address space on any other interface on the same router.

 

If you convert both IP addresses and subnet masks to binary, you can see that the last octet (all zeros) in the /24 address covers all addresses in that space:

 

192.168.100.1 255.255.255.252
11000000.10101000.01100100.00000001 11111111.11111111.11111111.11111100

 

192.168.100.254 255.255.255.0
11000000.10101000.01100100.00000001 11111111.11111111.11111111.00000000

 

Does that make sense ?

View solution in original post

Hello


@Juliusvar1 wrote:

R1

int f0/0

ip add 192.168.100.1 255.255.255.252

 

int f0/0.100

encapsulate do1q 100

ip add 192.168.100.254 255.255.255.0


Can someone explain why when I try put ip address on R1 fa0/0 192.168.100.1 and trying to encapsulate IP address 192.168.100.254 I receive that overlapsing int f0/0 

 


192.168.100.254/24  = 192.168.100.1-254 addressing

192.168.100.1/252  = 192.168.100.1-2 addressing <--- this overlaps with the above

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

4 Replies 4

Hello,

 

192.168.100.0/22 (or 192.168.100.0 255.255.255.252) is in the same address space as 192.168.100.0/24 (or 192.168.100.0 255.255.255.0), so you get an error.

 

Basically, if you use an /24 address space on one interface, you cannot use any of the subaddresses in that address space on any other interface on the same router.

 

If you convert both IP addresses and subnet masks to binary, you can see that the last octet (all zeros) in the /24 address covers all addresses in that space:

 

192.168.100.1 255.255.255.252
11000000.10101000.01100100.00000001 11111111.11111111.11111111.11111100

 

192.168.100.254 255.255.255.0
11000000.10101000.01100100.00000001 11111111.11111111.11111111.00000000

 

Does that make sense ?

I got it. Thank you !

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

int fa0/0 (/30) overlaps with the subnet assigned to fa0/0.100 (/24).

If you wanted to continue using these IP addresses then you would need to put the interfaces in separte VRFs.

Or you could reduce the subnet size for fa0/0.100 :

!
int f0/0.100
  encapsulate do1q 100
  ip add 192.168.100.254 255.255.255.128
!

cheers,

Seb,

Hello


@Juliusvar1 wrote:

R1

int f0/0

ip add 192.168.100.1 255.255.255.252

 

int f0/0.100

encapsulate do1q 100

ip add 192.168.100.254 255.255.255.0


Can someone explain why when I try put ip address on R1 fa0/0 192.168.100.1 and trying to encapsulate IP address 192.168.100.254 I receive that overlapsing int f0/0 

 


192.168.100.254/24  = 192.168.100.1-254 addressing

192.168.100.1/252  = 192.168.100.1-2 addressing <--- this overlaps with the above

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card