基本的な構成およびスイッチモードスイッチにtelnet接続を使用して

スイッチを管理するには、2つの方法

バンド管理

ベアラサービス情報管理ネットワーク制御情報と同一の論理チャネルを介してユーザのネットワーク、すなわち消費帯域幅。

例:

telnetの道を介してスイッチを管理します。リモート管理スイッチを実現します。

バンド管理

サービス情報管理ネットワーク制御情報及びユーザネットワークベアラ異なる論理チャネル、スイッチは、ブロードバンドを提供管理するように設計されています。

例:

スイッチコンソールポートに接続され、PCのシリアルポート接続スイッチと、PC上のハイパーターミナルを介してスイッチに接続されてもよいです。

基本的なスイッチの設定情報

コマンドラインスイッチは、次のとおりです。

Switch> #用户模式
Switch# #特权模式
Switch(config)# #全局配置模式
Switch(config-if)# #端口模式 if是interface的缩写;

コマンドラインスイッチ:

进入特权模式(en/enable)
进入全局配置模式(conf t)config terminal
进入交换机端口视图模式int f 0/1
返回到上级模式(exit)
从全局以下模式返回到特权模式(end)

使用のtelnetウェイ構成スイッチ関連実験

技術的な原則

  • スイッチ構成管理IPアドレス(コンピュータと同じネットワークセグメント内のスイッチの管理IPアドレス用のIPアドレスの設定)
  • いかなるIPアドレスが存在しない場合、スイッチャにおいて、のみログイン管理のためのスイッチのIPアドレス、構成管理は、スイッチは、ローカル制御コンソールポートの構成および管理のために使用することができます。
  • デフォルトでは、VLAN1属しスイッチのすべてのポートは、それが自動的に作成され、職員が切り替わります。各VLANつのみアクティブ管理アドレスは、そう管理アドレスレイヤを設定する前に、2つのスイッチは最初のインターフェイスをVLAN1選択し、IPアドレス管理を設定するIPアドレス設定コマンドを使用しなければなりません。
  • Telnetのユーザーは、ユーザー名とログインパスワードを設定します。
  • スイッチモード、特権モードパスワードとログインパスワードを設定すると、安全スイッチを向上させることができます。
siwtch(config)#line vty 0 4 配置远程登陆的线路;

siwtch(config-line)#login 用于打开登录认证

siwtch(config-line)#password  ** //设置远程登陆的密码

ステップ

新しいパケットトレーサトポロジ

スイッチのIPアドレス管理を設定します

Switch(config)# int vlan 1  #登录到vlan1的接口模式
Switch(config)# ip address **IP** **submask** #ip地址后面加子网掩码

ユーザーのログオンパスワードを設定

Switch(config)# enable password ****** //设置进入特权模式的密码
Switch(config)# line vty 0 4
Switch(config-line)# password ******   #远程登录密码
Switch(config-line)# login

オペレーティング

  1. オープンパケットトレーサ、選択スイッチ2960、PCマシン。

  2. まず、選択線の設定、「RS-232」ポートスイッチの設定ライン「コンソール」ポートは、直接接続のPCを経由してルータに接続されています

QQのスクリーンショット20200229113210

  1. PC端子を介してスイッチを設定します。

ターミナル設定ウィンドウを探します:

QQのスクリーンショット20200229113549

  1. コンフィギュレーション・コマンド:
Switch>enable       #进特权模式
Switch#conf t       #进入全局配置模式
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface vlan 1     #设置默认接口
Switch(config-if)#ip address 192.168.1.1 255.255.255.0  #配置管理ip地址
Switch(config-if)#no shutdown       #开启端口

Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Switch(config-if)#exit 
Switch(config)#enable password 123456
Switch(config)#line vty 0 4
Switch(config-line)#password lhy
Switch(config-line)#login
Switch(config-line)#end

Switch#show run
Building configuration...

Current configuration : 1089 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password 123456      #特权模式密码
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!

......

interface Vlan1
 ip address 192.168.1.1 255.255.255.0
!
!
line con 0
!
line vty 0 4
 password lhy   #远程登录密码
 login
line vty 5 15
 login
!
!
end
  1. PC側に設定し、静的IPを

設定IP、サブネットマスク、ゲートウェイ、

QQ截图20200229160622

  1. PCの使い方コマンドライン(コマンドpromnt PCのを見つける。)の接続を:
PC>ping 192.168.1.1     #首先ping一下交换机

Pinging 192.168.1.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.1.1: bytes=32 time=0ms TTL=255
Reply from 192.168.1.1: bytes=32 time=0ms TTL=255
Reply from 192.168.1.1: bytes=32 time=1ms TTL=255

Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms

PC>telnet 192.168.1.1       #使用telnet连接交换机
Trying 192.168.1.1 ...Open

User Access Verification    #用户接入验证,输入远程登录的密码

Password: 
Switch>enable       #进入特权模式
Password: 
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#end

Switch#show run
Building configuration...

Current configuration : 1089 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password 123456
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
......
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
 ip address 192.168.1.1 255.255.255.0
!
!
line con 0
!
line vty 0 4
 password lhy
 login
line vty 5 15
 login
!
!
end

おすすめ

転載: www.cnblogs.com/thegarden/p/12388260.html