zoukankan      html  css  js  c++  java
  • 配置交换机管理地址和默认网关

    SW1

    Switch>en
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#no ip domain-lo
                     
    Switch(config)#line con 0
    
    Switch(config-line)#logging synchronous 
    
    Switch(config-line)#exec-timeout 00
    Switch(config-line)#exit
    
    
    Switch(config)#interface  vlan 1
    Switch(config-if)#ip add 192.168.1.1 255.255.255.0
    
    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)#exit
    
    
    #配置telnet密码登陆
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#line vty 0 4
    Switch(config-line)#password ccna518
    Switch(config-line)#exit
    
    
    
    Switch(config)#enable secret 
    % Incomplete command.
    Switch(config)#enable secret ccnp518
    
    #配置账号密码登陆
    
    Switch(config)#username ccna password ccna
    Switch(config)#line vty 0 4
    Switch(config-line)#login local 
    Switch(config-line)#end
    Switch#
    %SYS-5-CONFIG_I: Configured from console by console
    
    #配置无密码登陆
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#line vty 0 4
    
    Switch(config-line)#no login 
    
    Switch(config-line)#privilege level 15
    Switch(config-line)#end
    Switch#
    %SYS-5-CONFIG_I: Configured from console by console
    
    #配置网关
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    Switch(config)#ip default-gateway 192.168.1.254

    R1

    Router>en
    Router#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    Router(config)#hostname R1
    
    R1(config)#no ip domain-lo
    
    R1(config)#line console 0
        
    R1(config-line)#logging synchronous 
    
    R1(config-line)#exit
    
    R1(config)#interface fastEthernet 0/0
    
    R1(config-if)#ip add 192.168.1.254 255.255.255.0
    
    R1(config-if)#no shutdown 
    
    R1(config-if)#exit
    
    R1(config)#interface fa0/1
    
    R1(config-if)#ip add 192.168.2.254 255.255.255.0
    
    R1(config-if)#no shutdown 
    
    R1(config-if)#exit
    
    R1(config)#edn
     
    R1(config)#exit
    
    R1#show ip interface brief 
    Interface              IP-Address      OK? Method Status                Protocol 
    FastEthernet0/0        192.168.1.254   YES manual up                    up 
    FastEthernet0/1        192.168.2.254   YES manual up                    up 
    Vlan1                  unassigned      YES unset  administratively down down
  • 相关阅读:
    FireFox浏览器的下载和安装、借助RamDisk让你的FireFox飞起来
    XXX is not in the sudoers file. This incident will be reported 的问题解决方案
    UVA How Big Is It?
    CentOS配置smaba与Windows共享文件
    博客说明
    linux 下安装jdk及配置jdk环境图解
    swift 笔记 (十二) —— 下标
    依据先中序序列或后中序序列确定二叉树
    opencv2使用形态学滤波对图像进行边缘及角点检測
    $POST 、$HTTP_RAW_POST_DATA、php://input三者之间的差别
  • 原文地址:https://www.cnblogs.com/peter1007/p/9396961.html
Copyright © 2011-2022 走看看