应用层实验
1. 通用准备
1.1 交换机关闭万兆口
system-view interface Ten-GigabitEthernet1/0/25 shutdown interface Ten-GigabitEthernet1/0/26 shutdown interface Ten-GigabitEthernet1/0/27 shutdown interface Ten-GigabitEthernet1/0/28 shutdown1.2 路由器删除默认接口
system-view undo interface Vlan-interface12. DNS 实验
2.1 接口与交换机端口
<Quidway>system-view [Quidway]sysname R1 [R1]interface Ethernet0/0 [R1-Ethernet0/0]ip address 10.0.0.1 24 [R1]interface Ethernet0/1 [R1-Ethernet0/1]ip address 192.168.5.X 24system-view interface Ethernet1/0/24 undo shutdown interface Ethernet1/0/1 undo shutdown interface Ethernet1/0/2 undo shutdown interface Ethernet1/0/13 undo shutdown interface Ethernet1/0/14 undo shutdown如需显式配置二层口:
interface Ethernet1/0/24 port link-type access port default vlan 1 interface Ethernet1/0/1 port link-type access port default vlan 1 interface Ethernet1/0/2 port link-type access port default vlan 1 interface Ethernet1/0/13 port link-type access port default vlan 1 interface Ethernet1/0/14 port link-type access port default vlan 12.2 NAT
<R1>system-view [R1]acl number 2001 [R1-acl-2001]rule permit source 10.0.0.0 0.0.0.255 [R1-acl-2001]rule deny source any [R1]nat address-group 1 192.168.5.X 192.168.5.Y [R1]interface Ethernet0/1 [R1-Ethernet0/1]nat outbound 2001 [R1]ip route-static 0.0.0.0 0.0.0.0 192.168.5.1如果老师只分配给您一个外网 IP,那么 X 和 Y填同一个数字即可(如 192.168.5.105 192.168.5.105)。如果分配了一个范围,则 Y 是结束地址。
2.3 连通性测试
ping 192.168.5.12.4 PC 设置
- PCA:
10.0.0.11/24,网关10.0.0.1,DNS10.0.0.11 - PCB:
10.0.0.12/24,网关10.0.0.1,DNS10.0.0.11 - PCC:
10.0.0.13/24,网关10.0.0.1,DNS10.0.0.13 - PCD:按现场要求,DNS 指向
10.0.0.13
2.5 PC 操作
- PCA、PCC 运行
Simple DNS Plus - 执行
ipconfig /flushdns - 清空
Simple DNS Plus缓存 - 打开
Wireshark - 在客户机访问
www.buaa.edu.cn Wireshark过滤:
dns3. HTTP 实验
3.1 设备配置
- 沿用 DNS 实验的交换机、R1、NAT 配置
3.2 PC 设置
- 所有 PC 的 DNS 改为:
202.112.128.51 - 停止
Simple DNS Plus
3.3 PC 操作
- 打开
Wireshark - 访问:
http://www.buaa.edu.cn/ http://www.buaa.edu.cn/office.php- 停止抓包,保存
http-学号
4. 电子邮件实验
4.1 设备配置
- 沿用 DNS/HTTP 实验的交换机、R1、NAT 配置
4.2 PC 设置
- PCA:
10.0.0.11/24,网关10.0.0.1,DNS202.112.128.51 - PCB:
10.0.0.12/24,网关10.0.0.1,DNS202.112.128.51 - PCC:
10.0.0.13/24,网关10.0.0.1,DNS202.112.128.51 - PCD:
10.0.0.14/24,网关10.0.0.1,DNS202.112.128.51
4.3 软件角色
- PCB、PCD:运行
Winmail - PCA、PCC:运行
Foxmail - PCA 的 SMTP 服务器:
10.0.0.12 - PCC 的 SMTP 服务器:
10.0.0.14
4.4 PC 操作
- 启动
Winmail - 配置
Foxmail - 打开
Wireshark - 发送邮件,保存
SMTP-学号 - 接收邮件,过滤
POP3
4.5 记忆项
SMTP端口:25POP3端口:110
5. FTP 实验
5.1 交换机端口
system-view interface Ethernet1/0/1 undo shutdown interface Ethernet1/0/2 undo shutdown如需显式配置二层口:
interface Ethernet1/0/1 port link-type access port default vlan 1 interface Ethernet1/0/2 port link-type access port default vlan 15.2 PC 设置
- PCA:
192.168.1.22/24 - PCB:
192.168.1.21/24
5.3 软件角色
- PCA:运行
3CDaemon,配置 FTP Server - PCB:IE 访问 FTP Server
5.4 PC 操作
- 在 PCA 上配置用户名、密码、上传/下载权限
- PCA、PCB 打开
Wireshark - PCB 访问:
ftp://192.168.1.22- 输入用户名和密码登录
- 停止抓包,保存
ftp-学号
5.5 记忆项
- FTP 控制连接端口:
21 - 重点找:
USER、PASS
6. DHCP 实验
6.1 交换机端口
system-view interface Ethernet1/0/24 undo shutdown interface Ethernet1/0/1 undo shutdown interface Ethernet1/0/2 undo shutdown interface Ethernet1/0/13 undo shutdown interface Ethernet1/0/14 undo shutdown如需显式配置二层口:
interface Ethernet1/0/24 port link-type access port default vlan 1 interface Ethernet1/0/1 port link-type access port default vlan 1 interface Ethernet1/0/2 port link-type access port default vlan 1 interface Ethernet1/0/13 port link-type access port default vlan 1 interface Ethernet1/0/14 port link-type access port default vlan 16.2 PC 操作
- 各主机设为“自动获得 IP 地址”
- 打开
Wireshark - 执行“修复”本地连接
- 停止抓包,保存
dhcp-学号
6.3 记忆项
- 重点 4 条报文:
DHCP DiscoverDHCP OfferDHCP RequestDHCP ACK