Junos OS

 View Only

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



Expand all | Collapse all

Juniper load replace command replaces everything.

This thread has been viewed 6 times
  • 1.  Juniper load replace command replaces everything.

    Posted 08-15-2022 03:11

    Hi everyone!

    I am playing around with the different load commands, and something weird is happening. I have the following config on an interface.

    [edit interfaces ge-1/0/8]
    # show

    description ***Spare-Port***;

    disable;

    unit 0 {

    family inet {

    address 192.168.20.1/30;

    }

    }

    Now I do a "load replace terminal relative" at the [edit interfaces ge-1/0/8] level using the following:

    description ***New-Port***;

    speed 1g;

    disable;

    replace:

    unit 0 {

    family inet {

    address 192.168.30.1/30;

    }

    }

    My expectation was that the description would not be changed and the speed 1g command would not be added. I was hoping that only the IP address would be changed. But the entire config is applied to the interface.
    Isn't the whole point of replace tags to specify which part of the config to change?

    Any guidance would be appreciated. What am I doing wrong here?
    Thanks.



    ------------------------------
    SHAHBAZ KHAN
    ------------------------------


  • 2.  RE: Juniper load replace command replaces everything.

    Posted 08-15-2022 07:11
    With load replace every element that is in the replace config will be written to the configuration file replacing the existing element.

    I think you are confused by the "replace tag" terminology.  This is not a tag you add to the file but just what every tag you call out in the loaded file is replaced in the existing configuration.

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
    http://puluka.com/home
    ------------------------------