Description

Error message is encountered while attempting to assign a static IP address to interface em0 due to an existing conflicting DHCP configuration to assign IP dynamically to the interface.

Symptoms

The error message "Incompatible with interface assigned with address" is displayed when trying to assign a static IP to em0.

root# set interface em0 unit 0 family inet address address/prefix-length

{master:0}[edit]

root# commit

[edit interfaces em0 unit 0 family inet]

  'dhcp'
    Incompatible with interface assigned with address

error: commit failed: (statements constraint check failed)

 


 

Solution

The error:

 

{master:0}[edit]

root# commit check

[edit interfaces vme unit 0 family inet]

'dhcp'

Incompatible with interface assigned with address

error: configuration check-out failed: (statements constraint check failed)

 

 

Refers to a problem with the interface in question, in this case the interface vme, which is observing a mix of an IP address configured along with the dhcp configuration. An interface can be configured to ask and obtain an IP address through DHCP, if you have the interface with this configuration and you add an IP address manually to it, you will receive the error observed above.

 

To correct the behavior, you must add just one of the two configurations, DHCP or STATIC IP assignment. Here are the steps to resolve this issue on a Juniper Networks device:

 

  1. Check for Conflicting DHCP Configurations:
  • Ensure that there is no existing DHCP configuration on the interface. You can check the current configuration using the show command:
show configuration interfaces em0
  • If a DHCP configuration is found, remove it to avoid conflicts:
delete interfaces em0 unit 0 family inet dhcp
  1. Verify Interface Configuration:
    • Ensure that the interface is not configured with an IP address that is already in use by another interface or device.
  • Use the show command to verify the current IP address configuration:
show interfaces em0
  1. Correct Configuration:
  • If you need to assign a static IP address to the interface, ensure that it is not conflicting with any other configuration. You can configure the IP address using the set command:
set interfaces em0 unit 0 family inet address 10.1.1.1/24
  1. Commit Changes:
  • After making the necessary changes, commit them to apply the new configuration:
commit

By following these steps, you should be able to resolve the "Incompatible with interface assigned with address" error and successfully configure your Juniper Networks device.

 

Delete the default dhcp configuration to assign IP dynamically 
   
root# delete interfaces em0 unit 0 family inet dhcp 
 

Post deletion we are able to assign the IP statically and the commit is successful.

root# set interfaces em0 unit 0 family inet address address/prefix-length

root# commit

 

Note: The same error is observed for the the interfaces having default dhcp configuration

Modification History

2024-08-13 : Article Created