交换机和计算机联通的基本设置(华为)
1、配置交换机:
<Quidway>system
password:
[Quidway]sysname SA ;交换机命名
[S3026]super password 123456 ;设置特权密码

2、配置交换机:
[SA]user-interface vty 0 4 进入虚拟终端
[SA-ui-vty0-4]authentication-mode password 设置口令模式
[SA-ui-vty0-4]set authentication-mode password simple 222 设置口令
[SA-ui-vty0-4]user privilege level 3
privilege level:权限级别,3为最高级别,拥有最高权限
开启vty 0、1、2、3、4 等5个用户虚拟终端,将5个虚拟终端的登录密码都设为 222
[SA-ui-vty0-4]quit 退出
[SA]quit

3、配置交换机:
<SA>sys 进入
password:123456 输入设置好的密码
[SA]display currect-config 显示当前配置
[SA]dis curr 显示当前配置

4、设置VLAN:
[SA]vlan 2 创建VLAN
[SA-vlan2]port ethernet0/2 在VLAN中增加端口
[SA-vlan2]port e0/4 to et0/6 在VLAN中增加端
[SA-vlan2]quit
[SA]dis vlan 查看VLAN设置

5、设置VLAN:
[SA]int e0/3 进入端口模式
[SA-Ethernet1]port access vlan 2当前端口加入到VLAN
[SA-Ethernet1]quit
[SA]dis vlan 查看VLAN设置
[SA]dis curr显示当前配置


6、[SA]interface vlan 1进入接口视图
[SA-Vlan-interface1]ip address 10.65.1.8 255.255.0.0
配置VLAN的IP地址(定义此VLAN的3层IP地址为10.65.1.8,16位掩码 )
[SA-Vlan-interface1]quit返回
[SA]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2静态路由=网关,添加缺省路由,下一条为
[SA]ip default-gateway 10.65.1.2 设置缺省网关为
[SA]dis curr显示当前内存中的配置文件
[SA]save保存修改

7、配置终端PCA:
login:root 使用root用户
password:linux 口令是linux
[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0设置IP地址
[root@PCA root]#ifconfig显示IP地址
[root@PCA root]#route add default gw 10.65.1.2设置网关
[root@PCA root]#route显示网关
[root@PCA root]#ping 10.65.1.8发ECHO包
[root@PCA root]#telnet 10.65.1.8远程登录
