Skip to content

config utility allows inteface ip configuration with invalid values for ip / mask #4120

@mkovnir

Description

@mkovnir

Description

config utility allows configuration of interfaces with invalid values :

  1. network (first address from subnet) and broadcast (last address of subnet) addresses
  2. mask lower then 8
  3. ip address from reserved special ranges (0.0.0.0/8, 127.0.0.0/8, 224.0.0.0/4, 240.0.0.0/4)
  4. values with leading zeros

Steps to reproduce the issue:

  1. configure interfaces with ip addresses
    config interface ip add Ethernet32 198.18.32.0/24
    config interface ip add Ethernet34 198.18.34.255/24
    config interface ip add Ethernet40 10.0.0.0/7
    config interface ip add Ethernet42 0.0.0.1/24
    config interface ip add Ethernet50 127.0.10.12/32
    config interface ip add Ethernet52 100.000.000.001/024
    config interface ip add Ethernet56 100.000.000.001/00000
    config interface ip add Ethernet58 240.0.0.1/4

  2. verify via show run interface

{
    "Ethernet32": {}, 
    "Ethernet34": {}, 
    "Ethernet40": {}, 
    "Ethernet42": {}, 
    "Ethernet50": {}, 
    "Ethernet52": {}, 
    "Ethernet56": {}, 
    "Ethernet58": {}, 
    "Ethernet32|198.18.32.0/24": {}, 
    "Ethernet34|198.18.34.255/24": {}, 
    "Ethernet40|10.0.0.0/7": {}, 
    "Ethernet42|0.0.0.1/24": {}, 
    "Ethernet50|127.0.10.12/32": {}, 
    "Ethernet52|100.000.000.001/024": {}, 
    "Ethernet56|10.10.10.001/00": {}, 
    "Ethernet56|100.000.000.001/00000": {}, 
    "Ethernet58|240.0.0.1/4": {}
}

Describe the results you received:
config utility insert into db invalid ip setting for interface

Describe the results you expected:
config utility should return error and doesnt update db

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions