实训项目二
任务清单
基础配置
根据实训项目 2-拓扑图和实训项目 2-地址规划表上要求,为每一个PC配置IP地址。
VLAN配置
根据实训项目 2-拓扑图和实训项目 2-地址规划表上要求,在交换机上把VLAN划分到对应的接口上,并且更改交换机与交换机相连接口的模式。
设备名称 | 端口号 | IP地址 | VLAN |
VPC1 | Eth0 | 192.168.47.1/24 | VLAN10 |
VPC2 | Eth0 | 192.168.48.2/24 | VLAN20 |
VPC3 | Eth0 | 192.168.48.3/24 | VLAN20 |
VPC4 | Eth0 | 192.168.47.4/24 | VLAN10 |
SW1 | G0/0 | 无 | Trunk |
SW1 | G0/1 | 无 | VLAN10 |
SW1 | G0/2 | 无 | VLAN20 |
SW2 | G0/0 | 无 | Trunk |
SW2 | G0/1 | 无 | VLAN20 |
SW2 | G0/2 | 无 | VLAN10 |
下面是每个设备的配置和配置验证截图,一般第一张是配置,有"show"开始为验证截图。最后有一个验证拓扑图各功能ping通的验证。
pc1
VPCS> ip 192.168.47.1 24 192.168.47.254
Checking for duplicate address...
VPCS : 192.168.47.1 255.255.255.0 gateway 192.168.47.254
VPCS> show ip
NAME : VPCS[1]
IP/MASK : 192.168.47.1/24
GATEWAY : 192.168.47.254
DNS :
MAC : 00:50:79:66:68:0f
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU : 1500
VPCS>
pc2
VPCS> ip 192.168.48.2 24 192.168.48.254
Checking for duplicate address...
VPCS : 192.168.48.2 255.255.255.0 gateway 192.168.48.254
VPCS> show ip
NAME : VPCS[1]
IP/MASK : 192.168.48.2/24
GATEWAY : 192.168.48.254
DNS :
MAC : 00:50:79:66:68:10
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU : 1500
VPCS>
pc3
VPCS> ip 192.168.48.3 24 192.168.48.254
Checking for duplicate address...
VPCS : 192.168.48.3 255.255.255.0 gateway 192.168.48.254
VPCS> show ip
NAME : VPCS[1]
IP/MASK : 192.168.48.3/24
GATEWAY : 192.168.48.254
DNS :
MAC : 00:50:79:66:68:11
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU : 1500
VPCS>
pc4
VPCS> ip 192.168.47.4 24 192.168.47.254
Checking for duplicate address...
VPCS : 192.168.47.4 255.255.255.0 gateway 192.168.47.254
VPCS> show ip
NAME : VPCS[1]
IP/MASK : 192.168.47.4/24
GATEWAY : 192.168.47.254
DNS :
MAC : 00:50:79:66:68:12
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU : 1500
VPCS>
SW1
Ruijie>en
Password:******
User's password is too weak. Please change the password!
Ruijie#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#vlan 10
Ruijie(config-vlan)#vlan 20 //添加VLAN10,VLAN20
Ruijie(config-vlan)#exit
Ruijie(config)#int g0/0 //进入G0/0口
Ruijie(config-if-GigabitEthernet 0/0)#switchport mode trunk //设置为Trunk口
Ruijie(config-if-GigabitEthernet 0/0)#int g0/1
Ruijie(config-if-GigabitEthernet 0/1)#switchport mode access //设置为access口
Ruijie(config-if-GigabitEthernet 0/1)#switchport access vlan 10 //设置为vlan10
Ruijie(config-if-GigabitEthernet 0/1)#int g0/2
Ruijie(config-if-GigabitEthernet 0/2)#switchport mode access //设置为access口
Ruijie(config-if-GigabitEthernet 0/2)#switchport access vlan 20 //设置为vlan20
Ruijie(config-if-GigabitEthernet 0/2)#exit
Ruijie(config)#hostname SW1
SW1(config)#exit
SW1#wr
SW1#show vlan
VLAN Name Status Ports
---------- -------------------------------- --------- -----------------------------------
1 VLAN0001 STATIC Gi0/0, Gi0/3, Gi0/4, Gi0/5
Gi0/6, Gi0/7, Gi0/8
10 VLAN0010 STATIC Gi0/0, Gi0/1
20 VLAN0020 STATIC Gi0/0, Gi0/2
SW2
Ruijie>en
Password:******
User's password is too weak. Please change the password!
Ruijie#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#hostname SW2
SW2(config)#vlan 10
SW2(config-vlan)#vlan 20
SW2(config-vlan)#int g0/0
SW2(config-if-GigabitEthernet 0/0)#switchport mode trunk
SW2(config-if-GigabitEthernet 0/0)#int g0/1
SW2(config-if-GigabitEthernet 0/1)#switchport mode access
SW2(config-if-GigabitEthernet 0/1)#switchport access vlan 20
SW2(config-if-GigabitEthernet 0/1)#int g0/2
SW2(config-if-GigabitEthernet 0/2)#switchport mode access
SW2(config-if-GigabitEthernet 0/2)#switchport access vlan 10
SW2(config-if-GigabitEthernet 0/2)#exit
SW2(config)#exit
SW2#wr
SW2#show vlan
VLAN Name Status Ports
---------- -------------------------------- --------- -----------------------------------
1 VLAN0001 STATIC Gi0/0, Gi0/3, Gi0/4, Gi0/5
Gi0/6, Gi0/7, Gi0/8
10 VLAN0010 STATIC Gi0/0, Gi0/2
20 VLAN0020 STATIC Gi0/0, Gi0/1
验证截图
VPCS> show ip
NAME : VPCS[1]
IP/MASK : 192.168.47.1/24
GATEWAY : 192.168.47.254
DNS :
MAC : 00:50:79:66:68:0f
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU : 1500
VPCS> ping 192.168.47.4
84 bytes from 192.168.47.4 icmp_seq=1 ttl=64 time=3.046 ms
84 bytes from 192.168.47.4 icmp_seq=2 ttl=64 time=2.459 ms
84 bytes from 192.168.47.4 icmp_seq=3 ttl=64 time=2.569 ms
84 bytes from 192.168.47.4 icmp_seq=4 ttl=64 time=2.581 ms
84 bytes from 192.168.47.4 icmp_seq=5 ttl=64 time=2.221 ms
VPCS>
VPCS> show ip
NAME : VPCS[1]
IP/MASK : 192.168.48.2/24
GATEWAY : 192.168.48.254
DNS :
MAC : 00:50:79:66:68:10
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU : 1500
VPCS> ping 192.168.48.3
84 bytes from 192.168.48.3 icmp_seq=1 ttl=64 time=2.028 ms
84 bytes from 192.168.48.3 icmp_seq=2 ttl=64 time=2.208 ms
84 bytes from 192.168.48.3 icmp_seq=3 ttl=64 time=3.009 ms
84 bytes from 192.168.48.3 icmp_seq=4 ttl=64 time=2.236 ms
84 bytes from 192.168.48.3 icmp_seq=5 ttl=64 time=1.906 ms
VPCS>