应用层实验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 接口与交换机端口Quidwaysystem-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 NATR1system-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 设置PCA10.0.0.11/24网关10.0.0.1DNS10.0.0.11PCB10.0.0.12/24网关10.0.0.1DNS10.0.0.11PCC10.0.0.13/24网关10.0.0.1DNS10.0.0.13PCD按现场要求DNS 指向10.0.0.132.5 PC 操作PCA、PCC 运行Simple DNS Plus执行ipconfig /flushdns清空Simple DNS Plus缓存打开Wireshark在客户机访问www.buaa.edu.cnWireshark过滤dns3. HTTP 实验3.1 设备配置沿用 DNS 实验的交换机、R1、NAT 配置3.2 PC 设置所有 PC 的 DNS 改为202.112.128.51停止Simple DNS Plus3.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 设置PCA10.0.0.11/24网关10.0.0.1DNS202.112.128.51PCB10.0.0.12/24网关10.0.0.1DNS202.112.128.51PCC10.0.0.13/24网关10.0.0.1DNS202.112.128.51PCD10.0.0.14/24网关10.0.0.1DNS202.112.128.514.3 软件角色PCB、PCD运行WinmailPCA、PCC运行FoxmailPCA 的 SMTP 服务器10.0.0.12PCC 的 SMTP 服务器10.0.0.144.4 PC 操作启动Winmail配置Foxmail打开Wireshark发送邮件保存SMTP-学号接收邮件过滤POP34.5 记忆项SMTP端口25POP3端口1105. 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 设置PCA192.168.1.22/24PCB192.168.1.21/245.3 软件角色PCA运行3CDaemon配置 FTP ServerPCBIE 访问 FTP Server5.4 PC 操作在 PCA 上配置用户名、密码、上传/下载权限PCA、PCB 打开WiresharkPCB 访问ftp://192.168.1.22输入用户名和密码登录停止抓包保存ftp-学号5.5 记忆项FTP 控制连接端口21重点找USER、PASS6. 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