• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦 > 學習電腦 > 電腦入門 > 思科交換機的Line配置模式方法

    思科交換機的Line配置模式方法

    時間: 志藝942 分享

    思科交換機的Line配置模式方法

      你還在為不知道思科交換機的Line配置模式而煩惱么?接下來是小編為大家收集的思科交換機的Line配置模式教程,希望能幫到大家。

      思科交換機的Line配置模式的方法

      在全局配置模式下,執行line vty或line console命令,將進入Line配置模式。該模式主要用于對虛擬終端(vty)和控制臺端口進行配置,其配置主要是設置虛擬終端和控制臺的用戶級登錄密碼。

      Line配置模式的命令行提示符為:student1(config-line)#

      交換機有一個控制端口(console),其編號為0,通常利用該端口進行本地登錄,以實現對交換機的配置和管理。為安全起見,應為該端口的登錄設置密碼,設置方法為:

      student1#config terminal

      student1(config)#line console 0

      student1(config-line)#?

      exit exit from line configuration mode

      login Enable password checking

      password Set a password

      從幫助信息可知,設置控制臺登錄密碼的命令是password,若要啟用密碼檢查,即讓所設置的密碼生效,則還應執行login命令。退出line配置模式,執行exit命令。

      下面設置控制臺登錄密碼為654321,并啟用該密碼,則配置命令為:

      student1(config-line)#password 654321

      student1(config-line)#login

      student1(config-line)#end

      student1#write

      設置該密碼后,以后利用控制臺端口登錄訪問交換機時,就會首先詢問并要求輸入該登錄密碼,密碼校驗成功后,才能進入到交換機的用戶EXEC模式。

      交換機支持多個虛擬終端,一般為16個(0-15)。設置了密碼的虛擬終端,就允許登錄,沒有設置密碼的,則不能登錄。如果對0-4條虛擬終端線路設置了登錄密碼,則交換機就允許同時有5個telnet登錄連接,其配置命令為:

      student1(config)#line vty 0 4

      student1(config-line)#password 123456

      student1(config-line)#login

      student1(config-line)#end

      student1#write

      若要設置不允許telnet登錄,則取消對終端密碼的設置即可,為此可執行no password和no login來實現。

      在Cisco iOS命令中,若要實現某條命令的相反功能,只需在該條命令前面加no,并執行前綴有no的命令即可。

      為了防止空閑的連接長時間的存在,通常還應給通過console口的登錄連接和通過vty線路的telnet登錄連接,設置空閑超時的時間,默認空閑超時的時間是10分鐘。

      設置空閑超時時間的配置命令為:exec-timeout 分鐘數秒數

      例如,要將vty 0-4線路和Console的空閑超時時間設置為3分鐘0秒,則配置命令為:

      student1#config t

      student1(config)#line vty 0 4

      student1(config-line)#exec-timeout 3 0

      student1(config-line)#line console 0

      student1(config-line)#exec-timeout 3 0

      student1(config-line)#end

      student1#

      交換機基本狀態:

    switch: ;ROM狀態, 路由器是rommon>
    hostname> ;用戶模式
    hostname# ;特權模式
    hostname(config)# ;全局配置模式
    hostname(config-if)# ;接口狀態

      交換機口令設置:

    switch>enable ;進入特權模式
    switch#config terminal ;進入全局配置模式
    switch(config)#hostname ;設置交換機的主機名
    switch(config)#enable secret xxx ;設置特權加密口令
    switch(config)#enable password xxa ;設置特權非密口令
    switch(config)#line console 0 ;進入控制臺口
    switch(config-line)#line vty 0 4 ;進入虛擬終端
    switch(config-line)#login ;允許登錄
    switch(config-line)#password xx ;設置登錄口令xx
    switch#exit ;返回命令

      交換機VLAN設置:

    switch#vlan database ;進入VLAN設置
    switch(vlan)#vlan 2 ;建VLAN 2
    switch(vlan)#no vlan 2 ;刪vlan 2
    switch(config)#int f0/1 ;進入端口1
    switch(config-if)#switchportaccessvlan 2 ;當前端口加入vlan 2
    switch(config-if)#switchport modetrunk;設置為干線
    switch(config-if)#switchport trunk allowed vlan 1,2 ;設置允許的vlan
    switch(config-if)#switchport trunk encap dot1q ;設置vlan 中繼
    switch(config)#vtp domain ;設置發vtp域名
    switch(config)#vtp password ;設置發vtp密碼
    switch(config)#vtp modeserver;設置發vtp模式
    switch(config)#vtp mode client ;設置發vtp模式

      交換機設置IP地址:

    switch(config)#interface vlan 1 ;進入vlan 1
    switch(config-if)#ip address ;設置IP地址
    switch(config)#ip default-gateway ;設置默認網關
    switch#dir flash: ;查看閃存

      交換機顯示命令:

    switch#write ;保存配置信息
    switch#show vtp ;查看vtp配置信息
    switch#show run ;查看當前配置信息
    switch#show vlan ;查看vlan配置信息
    switch#show interface ;查看端口信息
    switch#show int f0/0 ;查看指定端口信息

      2. 路由器支持的命令:

      路由器顯示命令:

    router#show run ;顯示配置信息
    router#show interface ;顯示接口信息
    router#show ip route ;顯示路由信息
    router#show cdp nei ;顯示鄰居信息
    router#reload     ;重新起動

      路由器口令設置:

    router>enable ;進入特權模式
    router#config terminal ;進入全局配置模式
    router(config)#hostname ;設置交換機的主機名
    router(config)#enable secret xxx ;設置特權加密口令
    router(config)#enable password xxb ;設置特權非密口令
    router(config)#line console 0 ;進入控制臺口
    router(config-line)#line vty 0 4 ;進入虛擬終端
    router(config-line)#login ;要求口令驗證
    router(config-line)#password xx ;設置登錄口令xx
    router(config)#(Ctrl+z) ; 返回特權模式
    router#exit ;返回命令

      路由器配置:

    router(config)#int s0/0 ;進入Serail接口
    router(config-if)#no shutdown ;激活當前接口
    router(config-if)#clock rate 64000 ;設置同步時鐘
    router(config-if)#ip address ;設置IP地址
    router(config-if)#ip address second ;設置第二個IP
    router(config-if)#int f0/0.1 ;進入子接口
    router(config-subif.1)#ip address ;設置子接口IP
    router(config-subif.1)#encapsulation dot1q ;綁定vlan中繼協議
    router(config)#config-register 0x2142 ;跳過配置文件
    router(config)#config-register 0x2102 ;正常使用配置文件
    router#reload ;重新引導

      路由器文件操作:

    router#copy running-config startup-config ;保存配置
    router#copy running-config tftp ;保存配置到tftp
    router#copy startup-config tftp ;開機配置存到tftp
    router#copy tftp flash: ;下傳文件到flash
    router#copy tftp startup-config;下載配置文件

    ROM狀態:
    Ctrl+Break ;進入ROM監控狀態
    rommon>confreg 0x2142 ;跳過配置文件
    rommon>confreg 0x2102 ;恢復配置文件
    rommon>reset  ;重新引導
    rommon>copy xmodem: flash: ;從console傳輸文件

    rommon>IP_ADDRESS=10.65.1.2 ;設置路由器IP
    rommon>IP_SUBNET_MASK=255.255.0.0 ;設置路由器掩碼
    rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服務器IP
    rommon>TFTP_FILE=c2600.bin ;指定下載的文件
    rommon>tftpdnld ;從tftp下載
    rommon>dir flash: ;查看閃存內容
    rommon>boot ;引導IOS

      靜態路由:

    ip route ;命令格式
    router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;靜態路由舉例
    router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默認路由舉例

      動態路由:

    router(config)#ip routing ;啟動路由轉發
    router(config)#routerrip;啟動RIP路由協議
    router(config-router)#network ;設置發布路由
    router(config-router)#negihbor ;點對點幀中繼用。

      幀中繼命令:

    router(config)#frame-relay switching ;使能幀中繼交換
    router(config-s0)#encapsulation frame-relay ;使能幀中繼
    router(config-s0)#fram-relay lmi-typecisco;設置管理類型
    router(config-s0)#frame-relay intf-type DCE ;設置為DCE
    router(config-s0)#frame-relay dlci 16 ;
    router(config-s0)#frame-relay local-dlci 20 ;設置虛電路號
    router(config-s0)#frame-relay interface-dlci 16 ;
    router(config)#log-adjacency-changes ;記錄鄰接變化
    router(config)#int s0/0.1 point-to-point ;設置子接口點對點
    router#show frame pvc ;顯示永久虛電路
    router#show frame map ;顯示映射

      基本訪問控制列表:

    router(config)#access-list permit|deny
    router(config)#interface ;default:deny any
    router(config-if)#ip access-group in|out ;default:out

    例1:
    router(config)#access-list 4 permit 10.8.1.1
    router(config)#access-list 4 deny 10.8.1.0 0.0.0.255
    router(config)#access-list 4 permit 10.8.0.0 0.0.255.255
    router(config)#access-list 4 deny 10.0.0.0 0.255.255.255
    router(config)#access-list 4 permit any
    router(config)#int f0/0
    router(config-if)#ip access-group 4 in

      擴展訪問控制列表:

    access-list permit|deny icmp <DESTINATIONIP
    wild>[type]
    access-list permit|deny tcp <DESTINATIONIP
    wild>[port]
    例3:
    router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo
    router(config)#access-list 101 permit ip any any
    router(config)#int s0/0
    router(config-if)#ip access-group 101 in
    例3:
    router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80
    router(config)#access-list 102 permit ip any any
    router(config)#interface s0/1
    router(config-if)#ip access-group 102 out

      刪除訪問控制例表:

      router(config)#no access-list 102

      router(config-if)#no ip access-group 101 in

      路由器的nat配置

    Router(config-if)#ip nat inside ;當前接口指定為內部接口
    Router(config-if)#ip nat outside ;當前接口指定為外部接口
    Router(config)#ip nat inside source static [p] <私有IP><公網IP> [port]
    Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1
    Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80
    Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
    Router(config)#ip nat inside source list 1 pool p1
    Router(config)#ip nat inside destination list 2 pool p2
    Router(config)#ip nat inside source list 2 interface s0/0 overload
    Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
    Router#show ip nat translation
    rotary 參數是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。
    overload參數用于PAT 將內部IP映射到一個公網IP不同的端口上。

      外部網關協議配置:

    routerA(config)#router bgp 100
    routerA(config-router)#network 19.0.0.0
    routerA(config-router)#neighbor 8.1.1.2 remote-as 200

      配置PPP驗證:

    RouterA(config)#username password
    RouterA(config)#int s0
    RouterA(config-if)#ppp authentication {chap|pap}

      3.PIX防火墻命令

    Pix525(config)#nameif ethernet0 outside security0 ;命名接口和級別
    Pix525(config)#interface ethernet0 auto ;設置接口方式
    Pix525(config)#interface ethernet1 100full ;設置接口方式
    Pix525(config)#interface ethernet1 100full shutdown
    Pix525(config)#ip address inside 192.168.0.1 255.255.255.0
    Pix525(config)#ip address outside 133.0.0.1 255.255.255.252

    Pix525(config)#global (if_name) natid ip-ip ;定義公網IP區間
    Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句
    Pix525(config)#global (outside) 1 133.0.0.1 ;例句
    Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉設置

    Pix525(config)#nat (if_name) nat_id local_ip [netmark]
    Pix525(config)#nat (inside) 1 0 0
    內網所有主機(0代表0.0.0.0)可以訪問global 1指定的外網。
    Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0
    內網172.16.5.0/16網段的主機可以訪問global 1指定的外網。

    Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式
    Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句
    Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句

    Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8
    表示內部ip地址192.168.0.8,訪問外部時被翻譯成133.0.0.1全局地址。

    Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8
    中間區域ip地址172.16.0.8,訪問外部時被翻譯成133.0.0.1全局地址。

    看了“思科交換機的Line配置模式”還看了:

    1.Cisco交換機基本配置方法

    2.思科交換機基本配置實例講解

    3.思科交換機配置命令教程

    4.Cisco常用的路由器交換機配置命令

    5.思科交換機密碼設置方法

    6.cisco交換機安全配置設定

    2743398 主站蜘蛛池模板: www.99re| 中文字幕亚洲综合久久菠萝蜜| 四虎色姝姝影院www| 狂野欧美激情性xxxx| 一区二区三区国产最好的精华液| 亚洲国产91在线| 公交车忘穿内裤被挺进小说白| 国产欧美日产激情视频| 在线观看www日本免费网站| 日本换爱交换乱理伦片| 污污网站免费观看| 精品日韩欧美国产一区二区| 成年女人免费观看视频| 欧美成人免费观看| 男人j桶进女人p无遮挡在线观看 | 青青草偷拍视频| 2022国产精品最新在线| www视频免费| 亚洲日韩乱码久久久久久 | 国产高清在线看| 岛国免费v片在线观看完整版| 日本成人在线视频网站| 无码av岛国片在线播放| 精品一区二区三区在线观看 | 99麻豆久久久国产精品免费| 久久国产色AV免费观看| 亚洲乱亚洲乱少妇无码| 亚洲日韩中文字幕在线播放| 亚洲人成电影青青在线播放| 久久午夜无码鲁丝片直播午夜精品| 么公的好大好深视频好爽想要 | 亚洲a∨精品一区二区三区下载| 亚洲成a人片在线观看中文| 人人狠狠综合久久亚洲| 岛国片免费在线观看| 国产精品欧美福利久久| 国模吧一区二区| 国产精品久久久久影院嫩草| 国产精品自在拍一区二区不卡| 国产高清一级毛片在线不卡| 旧里番6080在线观看|