Skip to main content

[Cisco Network] connect by serial and usb & setup IP

Accessing the CLI via PuTTY with a Console Connection

Step 1. Connect the switch to the computer using a standard 9-pin serial cable.

The Cisco DB9 to RJ45 Console Cable also supports console connections, but only if the switch has an RJ45 Console port. An RJ45 Console port resembles an Ethernet port and is labeled CONSOLE on the back of the switch.

Newer laptops don’t have Serial ports on them, so in this case you have to use a USB to Serial adapter. When plugging that into a computer it assigns a COM port number to it that is not COM1. If this is the case for you, you need to know where to look to find the correct COM port number when setting up the connection with PuTTY. Right-click on the Windows logo/Start menu and click on Device Manager to open it.

In the Device Manager, you would look to see what COM port is given to the USB adapter. In this case you would need to use COM4 for the Serial line to make the connection.

  

Step 2. Open the PuTTY application. The PuTTY Configuration window opens:

Step 3. Under the Connection Type field, click the Serial radio button.

Step 4. In the Category navigation field, choose Serial.

The Options controlling local serial lines page opens:

Step 5. In the Serial line to connect to field, enter the COM port that your device is connected to. The default COM port is COM1.

Step 6. In the Speed (baud) field, enter the digital transmission speed that is compatible with the switch. For 300 and 500 Series Managed Switches, the speed must be set to 115200.

Step 7. In the Data bits field, enter the number of data bits used for each character. The recommended value is 8.

Step 8. In the Stop bits field, enter the number of bits to be sent at the end of every character. The stop bit informs the machine that it has reached the end of a byte. The recommended value is 1.

Step 9. In the Parity drop-down menu, select the method of detecting errors in transmission. The recommended method for detecting errors in transmission is None.

Step 10. In the Flow Control drop-down menu, select the method of preventing data overflow. The recommended method for preventing data overflow is None.

Step 11. (Optional) In order to save the connection settings for future use, go to the Category navigation pane and choose Session. If you do not wish to save the connection settings, skip to Step 14.

Step 12. Under the Saves Sessions field, enter a name for the settings to be saved as.

Step 13. Click Save.

Step 14. Click Open.

The COM1 – PuTTY console window opens.

Step 15. Hit Enter on the keyboard to activate the Command Line Interface (CLI). The log in prompt is displayed:

Step 16. Enter the User Name. The default username is cisco.

Step 14. Enter the Password. The default password is cisco.


reference

 https://www.cisco.com/c/en/us/support/docs/smb/switches/cisco-small-business-300-series-managed-switches/smb4984-access-the-cli-via-putty-using-a-console-connection-on-300-a.html


CLIλ₯Ό μ‚¬μš©ν•˜μ—¬ μŠ€μœ„μΉ˜μ—μ„œ IP μ£Όμ†Œ μ„€μ • ꡬ성


CLIλ₯Ό 톡해 μŠ€μœ„μΉ˜μ˜ IP μ£Όμ†Œ ꡬ성

μ€‘μš”: μŠ€μœ„μΉ˜κ°€ λŒ€κΈ° μŠ€μœ„μΉ˜κ°€ μžˆλŠ” μŠ€νƒœν‚Ή λͺ¨λ“œ 쀑 ν•˜λ‚˜μ— μžˆλŠ” 경우 μŠ€νƒœν‚Ή ν™œμ„± μ „ν™˜ 쀑에 λ„€νŠΈμ›Œν¬μ—μ„œ 연결을 λŠμ§€ μ•Šλ„λ‘ κ³ μ • IP μ£Όμ†Œλ₯Ό κ΅¬μ„±ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€. μŠ€νƒ λ°”μ΄ μŠ€μœ„μΉ˜κ°€ μŠ€νƒμ„ μ œμ–΄ν•  λ•Œ DHCPλ₯Ό μ‚¬μš©ν•  λ•Œ μŠ€νƒμ˜ μ›λž˜ μ•‘ν‹°λΈŒ-지원 μœ λ‹›μ—μ„œ 받은 것과 λ‹€λ₯Έ IP μ£Όμ†Œλ₯Ό 받을 수 있기 λ•Œλ¬Έμž…λ‹ˆλ‹€.

κ³ μ • IP μ£Όμ†Œ

DHCP IP μ£Όμ†Œ

κ³ μ • IP μ£Όμ†Œ ꡬ성

이 μ‹œλ‚˜λ¦¬μ˜€μ—μ„œλŠ” DHCP μ„œλ²„μ˜ κ°€μš©μ„± 없이 μŠ€μœ„μΉ˜κ°€ μ„€μ •λ©λ‹ˆλ‹€. μŠ€μœ„μΉ˜μ—μ„œ κ³ μ • IP μ£Όμ†Œλ₯Ό κ΅¬μ„±ν•˜λ €λ©΄ λ‹€μŒ 단계λ₯Ό μˆ˜ν–‰ν•©λ‹ˆλ‹€.

1단계. 직렬 케이블을 μ‚¬μš©ν•˜μ—¬ 컴퓨터λ₯Ό μŠ€μœ„μΉ˜μ— 직접 μ—°κ²°ν•©λ‹ˆλ‹€.

μŠ€μœ„μΉ˜μ— SSHλ₯Ό μΆ”κ°€ν•˜λ €λŠ” 경우 μ—¬κΈ°λ₯Ό ν΄λ¦­ν•˜μ—¬ μŠ€μœ„μΉ˜μ— λŒ€ν•œ CLI μ•‘μ„ΈμŠ€ κΆŒν•œ 뢀여에 λŒ€ν•œ λ¬Έμ„œλ₯Ό ν™•μΈν•˜μ‹­μ‹œμ˜€.

2단계. μŠ€μœ„μΉ˜ μ½˜μ†”μ— λ‘œκ·ΈμΈν•©λ‹ˆλ‹€. κΈ°λ³Έ μ‚¬μš©μž 이름 및 λΉ„λ°€λ²ˆν˜ΈλŠ” cisco/ciscoμž…λ‹ˆλ‹€. μƒˆ μ‚¬μš©μž 이름 λ˜λŠ” λΉ„λ°€λ²ˆν˜Έλ₯Ό κ΅¬μ„±ν•œ 경우 λŒ€μ‹  자격 증λͺ…을 μž…λ ₯ν•©λ‹ˆλ‹€.

 μ΄ μ˜ˆμ—μ„œλŠ” SG350X-24 24-Port Gigabit Stackable Managed Switchκ°€ μ‚¬μš©λ©λ‹ˆλ‹€.

3단계. μŠ€μœ„μΉ˜μ˜ Privileged EXEC λͺ¨λ“œμ—μ„œ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ Global Configuration λͺ¨λ“œλ‘œ λ“€μ–΄κ°‘λ‹ˆλ‹€.

SG350X#configure
 configure λͺ…λ Ή μ€ 터미널 ꡬ성에 ν•΄λ‹Ήν•©λ‹ˆλ‹€.

4단계. Global Configuration λͺ¨λ“œμ—μ„œ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ μΈν„°νŽ˜μ΄μŠ€ μ»¨ν…μŠ€νŠΈλ₯Ό μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X(config)#interface [interface-id | vlan-id
 μ΄ μ˜ˆμ—μ„œλŠ” interface vlan 1이 μ‚¬μš©λ©λ‹ˆλ‹€. VLAN 1은 μŠ€μœ„μΉ˜μ˜ κΈ°λ³Έ VLANμž…λ‹ˆλ‹€.

5단계. λ‹€μŒ 쀑 ν•˜λ‚˜λ₯Ό μž…λ ₯ν•˜μ—¬ μΈν„°νŽ˜μ΄μŠ€μ˜ IP μ£Όμ†Œλ₯Ό μ •μ˜ν•˜λ €λ©΄ IP μ£Όμ†Œ μΈν„°νŽ˜μ΄μŠ€ μ»¨ν”Όκ·Έλ ˆμ΄μ…˜ λͺ…령을 μž…λ ₯ν•©λ‹ˆλ‹€.

  • ip μ£Όμ†Œ [ip-address] {{mask | prefix-length}}— reload λͺ…령을 μ‚¬μš©ν•˜μ—¬ μŠ€μœ„μΉ˜λ₯Ό μ¦‰μ‹œ λ‹€μ‹œ λ‘œλ“œν•©λ‹ˆλ‹€.
  • ip μ£Όμ†Œ [ip-address] {{mask | prefix-length}} [default-gateway-ip-address] — {{hh:mm λ‹€μ‹œ λ‘œλ“œλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. | mm | at hh:mm [day month]} λͺ…령을 μ‚¬μš©ν•˜μ—¬ μ˜ˆμ•½λœ μŠ€μœ„μΉ˜ λ‹€μ‹œ λ‘œλ“œλ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.

μ˜΅μ…˜μ€ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

  • ip address — IP μ£Όμ†Œλ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.
  • mask — IP μ£Όμ†Œμ˜ λ„€νŠΈμ›Œν¬ 마슀크λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.
  • prefix-length — IP μ£Όμ†Œ 접두사λ₯Ό κ΅¬μ„±ν•˜λŠ” λΉ„νŠΈ 수λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€. 접두사 길이 μ•žμ—λŠ” μŠ¬λž˜μ‹œ(/)κ°€ 와야 ν•©λ‹ˆλ‹€. λ²”μœ„λŠ” 8~30μž…λ‹ˆλ‹€.
SG350X(config-if)#ip address 192.168.100.201 255.255.255.0
 μ΄ μ˜ˆμ—μ„œ μ‚¬μš©λœ IP μ£Όμ†ŒλŠ” 마슀크255.255.255.0 ν¬ν•¨λœ 192.168.100.201μž…λ‹ˆλ‹€.

6단계. (선택 사항) μΈν„°νŽ˜μ΄μŠ€μ—μ„œ IP μ£Όμ†Œλ₯Ό μ œκ±°ν•˜λ €λ©΄ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ no ν˜•μ‹μ˜ IP address λͺ…령을 μ‚¬μš©ν•©λ‹ˆλ‹€.

SG350X(config-if)#no ip address

7단계. end λͺ…령을 μž…λ ₯ν•˜μ—¬ μŠ€μœ„μΉ˜μ˜ Privileged EXEC λͺ¨λ“œλ‘œ λŒμ•„κ°‘λ‹ˆλ‹€.

SG350X(config-if)#end

8단계. (선택 사항) μΈν„°νŽ˜μ΄μŠ€μ— IP μ£Όμ†Œ μ»¨ν”Όκ·Έλ ˆμ΄μ…˜ 및 정보λ₯Ό ν‘œμ‹œν•˜λ €λ©΄ Privileged EXEC λͺ¨λ“œμ—μ„œ λ‹€μŒ λͺ…령을 μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X#show ip interface
 μ΄ μ˜ˆμ—μ„œλŠ” IP μ£Όμ†Œκ°€ 192.168.100.201이고 Type이 Staticμž…λ‹ˆλ‹€.

9단계. (선택 사항) κ΅¬μ„±λœ 섀정을 μ‹œμž‘ ꡬ성 νŒŒμΌμ— μ €μž₯ν•˜λ €λ©΄ λ‹€μŒμ„ μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X#copy running-config startup-config

10단계. (선택 사항) Overwrite file [startup-config]... ν”„λ‘¬ν”„νŠΈκ°€ λ‚˜νƒ€λ‚˜λ©΄ ν‚€λ³΄λ“œμ—μ„œ Yes λ˜λŠ” N을 No둜 λˆ„λ¦…λ‹ˆλ‹€.

 μ΄ μ˜ˆμ—μ„œλŠ” Yλ₯Ό λˆ„λ¦…λ‹ˆλ‹€.

이제 μŠ€μœ„μΉ˜μ˜ κ³ μ • IP μ£Όμ†Œ 섀정을 κ΅¬μ„±ν–ˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

DHCPλ₯Ό 톡해 IP μ£Όμ†Œ ꡬ성

이 μ‹œλ‚˜λ¦¬μ˜€μ—μ„œλŠ” μŠ€μœ„μΉ˜κ°€ ν™œμ„± DHCP μ„œλ²„ 역할을 ν•˜λŠ” λΌμš°ν„°μ— μ—°κ²°λ©λ‹ˆλ‹€. DHCPλ₯Ό 톡해 μŠ€μœ„μΉ˜μ˜ IP μ£Όμ†Œλ₯Ό κ΅¬μ„±ν•˜λ €λ©΄ λ‹€μŒ 단계λ₯Ό μˆ˜ν–‰ν•©λ‹ˆλ‹€.

1단계. 직렬 케이블을 μ‚¬μš©ν•˜μ—¬ 컴퓨터λ₯Ό μŠ€μœ„μΉ˜μ— 직접 μ—°κ²°ν•©λ‹ˆλ‹€.

2단계. μŠ€μœ„μΉ˜ μ½˜μ†”μ— λ‘œκ·ΈμΈν•©λ‹ˆλ‹€. κΈ°λ³Έ μ‚¬μš©μž 이름 및 λΉ„λ°€λ²ˆν˜ΈλŠ” cisco/ciscoμž…λ‹ˆλ‹€. μƒˆ μ‚¬μš©μž 이름 λ˜λŠ” λΉ„λ°€λ²ˆν˜Έλ₯Ό κ΅¬μ„±ν•œ 경우 λŒ€μ‹  자격 증λͺ…을 μž…λ ₯ν•©λ‹ˆλ‹€.

 μ΄ μ˜ˆμ—μ„œλŠ” SG350X-24 24-Port Gigabit Stackable Managed Switchκ°€ μ‚¬μš©λ©λ‹ˆλ‹€.

3단계. μŠ€μœ„μΉ˜μ˜ Privileged EXEC λͺ¨λ“œμ—μ„œ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ Global Configuration λͺ¨λ“œλ‘œ λ“€μ–΄κ°‘λ‹ˆλ‹€.

SG350X#configure

4단계. Global Configuration λͺ¨λ“œμ—μ„œ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ μΈν„°νŽ˜μ΄μŠ€ μ»¨ν…μŠ€νŠΈλ₯Ό μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X(config)#interface [interface id | vlan-id]
 μ΄ μ˜ˆμ—μ„œλŠ” interface vlan 1이 μ‚¬μš©λ©λ‹ˆλ‹€. VLAN 1은 μŠ€μœ„μΉ˜μ˜ κΈ°λ³Έ VLANμž…λ‹ˆλ‹€.

5단계. μΈν„°νŽ˜μ΄μŠ€ μ»¨ν…μŠ€νŠΈμ—μ„œ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ DHCP μ„œλ²„μ—μ„œ IP μ£Όμ†Œλ₯Ό μ–»μŠ΅λ‹ˆλ‹€.

SG350X(config-if)#interface [interface id | vlan-id]

μ§€μ •λœ μΈν„°νŽ˜μ΄μŠ€μ— λ””λ°”μ΄μŠ€κ°€ κ΅¬μ„±λ˜μ—ˆλ‹€λŠ” μ•Œλ¦Όμ΄ ν‘œμ‹œλ©λ‹ˆλ‹€.

6단계. (선택 사항) μΈν„°νŽ˜μ΄μŠ€μ—μ„œ IP μ£Όμ†Œλ₯Ό μ œκ±°ν•˜λ €λ©΄ λ‹€μŒμ„ μž…λ ₯ν•˜μ—¬ IP μ£Όμ†Œ DHCP λͺ…λ Ήμ˜ no ν˜•μ‹μ„ μ‚¬μš©ν•©λ‹ˆλ‹€.

SG350X(config-if)#no ip address dhcp

7단계. end λͺ…령을 μž…λ ₯ν•˜μ—¬ μŠ€μœ„μΉ˜μ˜ Privileged EXEC λͺ¨λ“œλ‘œ λŒμ•„κ°‘λ‹ˆλ‹€.

SG350X(config-if)#end

8단계. (선택 사항) μΈν„°νŽ˜μ΄μŠ€μ˜ IP μ£Όμ†Œ μ»¨ν”Όκ·Έλ ˆμ΄μ…˜ 및 정보λ₯Ό ν‘œμ‹œν•˜λ €λ©΄ Privileged EXEC λͺ¨λ“œμ—μ„œ λ‹€μŒ λͺ…령을 μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X#show ip interface
 μ΄ μ˜ˆμ—μ„œλŠ” IP μ£Όμ†Œκ°€ 192.168.100.103이고 Type이 DHCPμž…λ‹ˆλ‹€.

9단계. (선택 사항) DHCP ν΄λΌμ΄μ–ΈνŠΈ μΈν„°νŽ˜μ΄μŠ€μ— IP μ£Όμ†Œ μ»¨ν”Όκ·Έλ ˆμ΄μ…˜ 및 정보λ₯Ό ν‘œμ‹œν•˜λ €λ©΄ 특ꢌ EXEC λͺ¨λ“œμ—μ„œ λ‹€μŒ λͺ…령을 μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X#show ip dhcp client interface

10단계(선택 사항) κ΅¬μ„±λœ 섀정을 μ‹œμž‘ ꡬ성 νŒŒμΌμ— μ €μž₯ν•˜λ €λ©΄ λ‹€μŒμ„ μž…λ ₯ν•©λ‹ˆλ‹€.

SG350X#copy running-config startup-config

11단계. (선택 사항) Overwrite file [startup-config]... ν”„λ‘¬ν”„νŠΈκ°€ λ‚˜νƒ€λ‚˜λ©΄ ν‚€λ³΄λ“œμ—μ„œ Yes λ˜λŠ” N을 No둜 λˆ„λ¦…λ‹ˆλ‹€.

 μ΄ μ˜ˆμ—μ„œλŠ” Yλ₯Ό λˆ„λ¦…λ‹ˆλ‹€.

이제 μŠ€μœ„μΉ˜μ—μ„œ DHCP IP μ£Όμ†Œ 섀정을 κ΅¬μ„±ν–ˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

reference

https://www.cisco.com/c/ko_kr/support/docs/smb/switches/cisco-350-series-managed-switches/smb5557-configure-the-internet-protocol-ip-address-settings-on-a-swi.html

Comments

Popular posts from this blog

[Cisco] command and CDR log backup by FTP (gw-accounting file)

Below command has been tested with ISR4331 devices.  1. check Cisco device file size command :  a. show current folder dir flash:  b. show all folder and files dir flash 2. check file only start with "cdr." dir flash:cdr.* 3. Remove file (Add option [ /recursive /force]  when you delete file is not recovering free space) delete /recursive /force  flash:cdr.* 4. check subfolder file dir flash:\tracelogs 5. example for log back to ftp https://www.cisco.com/c/en/us/td/docs/ios/voice/cdr/developer/manual/cdrdev/cdrcsv.html#marker-1163166 enable conf t gw-accounting file primary ftp 192.168.1.51/cisco/cdr username cisco password xxxxx secondary sftp 192.168.1.52/cisco/cdr username cisco password xxxxx acct-template callhistory-detail maximum buffer-size  30 maximum retry-count 3 (note : if these setting is not working. check these area, FTP password can not be used @ and some of special characters for this command. Second, ftp location is case sensitive. Please...

[Synology] old file folder auto delete

1.  open your text editor 2.  Directory remove for 3 days ago at "/volume1/recording"  #!/bin/sh find "/volume1/recording"- type d -mtime +3 -exec rm -rf{} \; for 50 days ago #!/bin/sh find "/volume1/recording"- type d -mtime +50 -exec rm -rf{} \; 3. File remove for 3 days ago #!/bin/sh find "/volume1/recording"- type f -mtime +3 -exec rm -rf{} \; 4. Save file as "auto_del.sh" sh file is for script.  5. Synology control panel - job scheduler - user defined script add here. 

[SQL] How to determine SQL Server database transaction log usage

  To run this command issue the following in a query window: DBCC SQLPERF(logspace) This is sample output From here we can see the size of the transaction logs as well as how much space is being used.  The current log space used will tell you how much of the transaction log is being used.  If this percentage is high and the size of the log is quite big it is probably due to one of the items listed above.  Getting information about SQL Server virtual logs using DBCC LOGINFO The next command to look at is DBCC LOGINFO. This will give you information about your virtual logs inside your transaction log.  The primary thing to look at here is the Status column.  Since this file is written sequentially and then looped back to the beginning, you want to take a look at where the value of "2" is in the output.  This will tell you what portions of the log are in use and which are not in use Status = 0.  Another thing to keep an eye on is the FSeqNo column. T...