华为模拟器配置实例

2019-08-31 22:13

实验一 计算机和交换机基本设置

添加一个交换机,一个计算机,双击交换机,进入终端配置:

system

password:

[Quidway]sysname S3026 ;交换机命名 [S3026]super password 111 ;设置特权密码 [S3026]user-interface vty 0 4

[S3026-ui-vty0-4]authentication-mode password

[S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3 [S3026-ui-vty0-4]quit [S3026]quit

sys password:111

[S3026]display currect-config [S3026]dis curr

[S3026]vlan 2

[S3026-vlan2]port ethernet0/2 [S3026-vlan2]port e0/4 to et0/6 [S3026-vlan2]quit [S3026]dis vlan [S3026]int e0/3

[S3026-Ethernet1]port access vlan 2 [S3026-Ethernet1]quit [S3026]dis vlan [S3026]dis curr

[S3026]interface vlan 1

[S3026-Vlan-interface1]ip address 10.65.1.8 255.255.0.0 [S3026-Vlan-interface1]quit

[S3026]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 [S3026]ip default-gateway 10.65.1.2 [S3026]dis curr [S3026]save

双击小电脑: login:root

password:linux

[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0 [root@PCA root]#ifconfig

[root@PCA root]#route add default gw 10.65.1.2 [root@PCA root]#route

[root@PCA root]#ping 10.65.1.8 [root@PCA root]#telnet 10.65.1.8

实验二 配置端口聚合

要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。 参数:ingress:源MAC, both:源和目的MAC

对于SwitchA:

[Quidway]sysname SwitchA [SwitchA]interface ethernet0/1 [SwitchA-Ethernet0/1]duplex full [SwitchA-Ethernet0/1]speed 100

[SwitchA-Ethernet0/1]port link-type trunk

[SwitchA-Ethernet0/1]port trunk permit vlan all

[SwitchA-Ethernet0/1]int e0/2 [SwitchA-Ethernet0/2]duplex full [SwitchA-Ethernet0/2]speed 100 [SwitchA-Ethernet0/2]port link-type trunk [SwitchA-Ethernet0/2]port trunk permit vlan all

对于SwitchB:

[Quidway]sysname SwitchB [SwitchB]interface ethernet0/1 [SwitchB-Ethernet0/1]duplex full [SwitchB-Ethernet0/1]speed 100

[SwitchB-Ethernet0/1]port link-type trunk [SwitchB-Ethernet0/1]port trunk permit vlan all

[SwitchB-Ethernet0/1]int e0/2 [SwitchB-Ethernet0/2]duplex full [SwitchB-Ethernet0/2]speed 100 [SwitchB-Ethernet0/2]port link-type trunk [SwitchB-Ethernet0/2]port trunk permit vlan all

聚合操作:

[SwitchA]link-aggregation ethernet0/1 to ethernet0/2 both [SwitchB]link-aggregation ethernet0/1 to ethernet0/2 both

[SwitchA]display link-aggregation ethernet0/1 [SwitchA]undo link-aggregation all 实验三 基本VLAN设置

[SwitchA]vlan 2

[SwitchA-vlan2]port e0/2

[SwitchA-vlan2]port e0/3 to e0/4 [SwitchA-vlan2]vlan 3

[SwitchA-vlan3]port e0/5 to e0/6 [SwitchA]dis vlan all [SwitchA]dis current

[SwitchB]vlan 2

[SwitchB-vlan2]port e0/3 to e0/4 [SwitchB-vlan2]vlan 3

[SwitchB-vlan3]port e0/5 to e0/6 [SwitchB-vlan3]quit [SwitchB]dis vlan all [SwitchB]dis current

设置计算机的IP为:

PCA:10.65.1.1 PCB:10.66.1.1 PCC:10.65.1.3 PCD:10.66.1.3

[root@PCA root]#ping 10.65.1.1 通 (本机IP)

[root@PCA root]#ping 10.65.1.3 不通 (中间连接线是vlan 1) [root@PCA root]#ping 10.66.1.1 不通 (不同网络,不同vlan) [root@PCA root]#ping 10.66.1.3 不通 (不同网络,不同vlan) [root@PCB root]#ping 10.66.1.3 不通 (中间连接线是vlan 1)

将PCA改接到SwitchA E0/2 (vlan 1)

[root@PCA root]#ping 10.65.1.3 不通 (同网络,不同vlan)

将PCC改接到SwitchB E0/2 (vlan 1)

[root@PCA root]#ping 10.65.1.3 通 (同网络,同在vlan 1)

再改回来,并设置trunk:

[S3026A]interface ethernet0/8

[S3026A-Ethernet0/8]port link-type trunk [S3026A-Ethernet0/8]port trunk permit vlan all

[S3026B]interface ethernet0/1

[S3026B-Ethernet0/1]port link-type trunk

[S3026B-Ethernet0/1]port trunk permit vlan all [S3026B-Ethernet0/1]quit [S3026B]dis curr

[root@PCA root]#ping 10.65.1.3 通 [root@PCA root]#ping 10.66.1.3 不通 [root@PCB root]#ping 10.66.1.3 通

即:PCA和PCC同在vlan 2 是通的,PCB和PCD同在vlan 3是通的。 PCA和PCB是不通的。同理PCC和PCD也是不通的。

------------------------------------------------------------

再加入一个交换机switchC,将它串入switchA和switchB之间,连接方式: switchA:E0/8-->switchC:E0/3; switchC:E0/6-->switchB:E0/1

(1) 新加入的SwitchC 默认状态时,测试连通性。 从PCA->PCC,从PCB->PCD 测试: [root@PCA root]# ping 10.65.1.3 (不通) [root@PCB root]# ping 10.66.1.3 (不通)

由于新加入的交换机没有设置trunk,端口默认vlan 1,交换机的trunk 要成对出现,因为当dot1q不能和另一端交换信息时,会自动down掉。

(2) 将交换机之间的连线都设置成trunk时,再测试连通性。

[S3026C]interface ethernet0/3

[S3026C-Ethernet0/1]port link-type trunk

[S3026C-Ethernet0/1]port trunk permit vlan all

[S3026C]interface ethernet0/6

[S3026C-Ethernet0/8]port link-type trunk

[S3026C-Ethernet0/8]port trunk permit vlan all

现在有两条正确的trunk,再看一下联通情况:

[root@PCA root]# ping 10.65.1.3 (通) [root@PCB root]# ping 10.66.1.3 (通)

(3) 设置vtp

VTP是vlan 传输协议,在VTP Server上配置的vlan 在条件允许条件下,可以 从VTP Client 端看到VTP Server上的vlan,并将自己端口加入到vlan中。

[S3026C]vtp domain abc [S3026C]vtp mode server [S3026C]vtp password ok

[S3026B]vtp domain abc [S3026B]vtp mode client [S3026B]vtp password ok

[S3026A]#disp vlan [S3026B]#disp vlan [S3026C]#disp vlan

当口令和域名一致时,client端可以学习到server端的vlan,在VTP Server端还 可以有很多策略,这里只是说明最基本的问题。

VTP在企业、机关、学校的应用是很多的,在主交换机上设置好vlan以后,下级的 交换机不用再设置vlan,可以将client的某些端口添加到VTP Server中定义的vlan中 去,加强了管理。

实验四 配置primary VLAN和secondary VLAN


华为模拟器配置实例.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:市场营销学期中试卷专科

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: