◽ L2 Switch(Cisco, …)

[Juniper] 패스워드 변경, 시스템 기록 ( Common Command result )


Juniper

 이 글은 단순히 시스템에 접속하여 간단한 명령어의 결과값을 좀 기록할 필요가 있어 기록하는 글이라. 개인적으로 보는 글이기 때문에 참조하는 글로는 적절하지 않을 수 있음.


 

1. Command - ?

    지원하는 명령어이고 첫번째 인자값에만 올 수 있는 명령어들만 출력되고 있는 모습.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
admin@EX2300-24P-83> ?
Possible completions:
  clear                Clear information in the system
  configure            Manipulate software configuration information
  file                 Perform file operations
  help                 Provide help information
  load                 Load information from file
  monitor              Show real-time debugging information
  mtrace               Trace multicast path from source to receiver
  op                   Invoke an operation script
  ping                 Ping remote target
  quit                 Exit the management session
  request              Make system-level requests
  restart              Restart software process
  save                 Save information to file
  set                  Set CLI properties, date/time, craft interface message
  show                 Show system information
  ssh                  Start secure shell on another host
  start                Start shell
  telnet               Telnet to another host
  test                 Perform diagnostic debugging
  traceroute           Trace route to remote host
{master:0}
admin@EX2300-24P-83>
 
cs

 

 

2. Command - show configuration

시스코장비의 show running-configruation과 비슷한 명령이라고 보면 되겠다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
admin@EX2300-24P-83> show configuration
## Last commit: 2021-11-26 05:16:56 UTC by admin
version 18.2R3-S2.9;
system {
    login {
        user admin {
            uid 2001;
            class super-user;
            authentication {
                encrypted-password "hide"## SECRET-DATA
            }
        }
    }
    root-authentication {
        encrypted-password "hide"## SECRET-DATA
    }
    host-name EX2300-24P-83;
    auto-snapshot;
    services {
        ssh;
        telnet;
        web-management {
            http;
        }
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
chassis {
    alarm {
        management-ethernet {
            link-down ignore;
        }
    }
}
interfaces {
    ge-0/0/0 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/1 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/2 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/3 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/4 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/5 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/6 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/7 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/8 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/9 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/10 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/11 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/12 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/13 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/14 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/15 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/16 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/17 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/18 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/19 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/20 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/21 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/22 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/0/23 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/1/0 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    xe-0/1/0 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/1/1 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    xe-0/1/1 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/1/2 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    xe-0/1/2 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    ge-0/1/3 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    xe-0/1/3 {
        unit 0 {
            family ethernet-switching {
                storm-control default;
            }
        }
    }
    irb {
        unit 1 {
            family inet;
        }
    }
    me0 {
        unit 0 {
            family inet {
                address 192.168.5.202/22 {
                    primary;
                }
            }
        }
    }
}
forwarding-options {
    storm-control-profiles default {
        all;
    }
}
routing-options {
    static {
        route 0.0.0.0/0 next-hop 192.168.0.1;
    }
}
protocols {
    lldp {
        interface all;
    }
    lldp-med {
        interface all;
    }
    igmp-snooping {
        vlan default;
    }
    rstp {
        interface ge-0/0/0;
        interface ge-0/0/1;
        interface ge-0/0/2;
        interface ge-0/0/3;
        interface ge-0/0/4;
        interface ge-0/0/5;
        interface ge-0/0/6;
        interface ge-0/0/7;
        interface ge-0/0/8;
        interface ge-0/0/9;
        interface ge-0/0/10;
        interface ge-0/0/11;
        interface ge-0/0/12;
        interface ge-0/0/13;
        interface ge-0/0/14;
        interface ge-0/0/15;
        interface ge-0/0/16;
        interface ge-0/0/17;
        interface ge-0/0/18;
        interface ge-0/0/19;
        interface ge-0/0/20;
        interface ge-0/0/21;
        interface ge-0/0/22;
        interface ge-0/0/23;
        interface ge-0/1/0;
        interface xe-0/1/0;
        interface ge-0/1/1;
        interface xe-0/1/1;
        interface ge-0/1/2;
        interface xe-0/1/2;
        interface ge-0/1/3;
        interface xe-0/1/3;
    }
}
poe {
    interface all;
}
vlans {
    default {
        vlan-id 1;
    }
}
 
cs

 

 

3. Command - configure

에디어 모드로 진입하는 명령어이다.

1
2
3
4
5
6
7
8
9
10
{master:0}
admin@EX2300-24P-83> configure
Entering configuration mode
Users currently editing the configuration:
  root terminal u0 (pid 9264) on since 2021-11-17 17:39:27 UTC, idle 1w2d 05:32
      {master:0}[edit]
 
{master:0}[edit]
admin@EX2300-24P-83#
 
cs

 

 

4. Command - ? (edit)

에디터에 진입해서는 첫번재 인자값으로 올 수 있는 명령어들을 볼 수 있다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{master:0}[edit]
admin@EX2300-24P-83# ?
Possible completions:
  <[Enter]>            Execute this command
  activate             Remove the inactive tag from a statement
  annotate             Annotate the statement with a comment
  commit               Commit current set of changes
  copy                 Copy a statement
  deactivate           Add the inactive tag to a statement
  delete               Delete a data element
  edit                 Edit a sub-element
  exit                 Exit from this level
  extension            Extension operations
  help                 Provide help information
  insert               Insert a new ordered data element
  load                 Load configuration from ASCII file
  prompt               Prompt for an input
  protect              Protect the statement
  quit                 Quit from this level
  rename               Rename a statement
  replace              Replace character string in configuration
  rollback             Roll back to previous committed configuration
  run                  Run an operational-mode command
  save                 Save configuration to ASCII file
  set                  Set a parameter
  show                 Show a parameter
  status               Show users currently editing configuration
  top                  Exit to top level of configuration
  unprotect            Unprotect the statement
  up                   Exit one level of configuration
  wildcard             Wildcard operations
cs

 

 

5. Command - set system login user {username} authentication plain-text-password

사용자 패스워드 변경이나 사용자를 추가하면서 패스워드 설정하는 명령어이다.

1
2
3
4
5
6
7
admin@EX2300-24P-83# set system login user white authentication plain-text-password
New password:
Retype new password:
 
{master:0}[edit]
admin@EX2300-24P-83#
 
cs

 

 

 

 

6. Command - commit

보통은 설정 후에 커밋을 한 뒤 적용시키는 명령어인데 오류가 있다면 아래와 같이 나타난다.

1
2
3
4
5
6
7
{master:0}[edit]
admin@EX2300-24P-83# commit
[edit system login]
  'user white'
    Missing mandatory statement: 'class'
error: commit failed: (missing mandatory statements)
 
cs

 

 

 

 


참고 :

https://community.juniper.net/communities/community-home/digestviewer/viewthread?MID=74519


 

푸터바