# 拓撲圖

## MS1
~~~
Switch>enable
Switch#configure terminal
Switch(config)#hostname MS1
MS1(config)#ip routing
MS1(config)#interface FastEthernet0/1
MS1(config-if)#switchport mode access
MS1(config-if)#switchport access vlan 80
MS1(config)#interface FastEthernet0/2
MS1(config-if)#switchport mode access
MS1(config-if)#switchport access vlan 53
MS1(config)#interface FastEthernet0/3
MS1(config-if)#switchport mode access
MS1(config-if)#switchport access vlan 69
MS1(config)#interface FastEthernet0/5
MS1(config-if)#switchport mode access
MS1(config-if)#switchport access vlan 10
MS1(config)#ip dhcp excluded-address 192.168.10.254
MS1(config)#ip dhcp pool vlan10
MS1(dhcp-config)#network 192.168.10.0 255.255.255.0
MS1(dhcp-config)#default-router 192.168.10.254
MS1(dhcp-config)#dns-server 192.168.53.1
MS1(config)#Vlan 10
MS1(config)#interface Vlan10
MS1(config-if)#ip address 192.168.10.254 255.255.255.0
MS1(config)#Vlan 53
MS1(config)#interface Vlan53
MS1(config-if)#ip address 192.168.53.254 255.255.255.0
MS1(config)#Vlan 69
MS1(config)#interface Vlan69
MS1(config-if)#ip address 192.168.69.254 255.255.255.0
MS1(config)#Vlan 80
MS1(config)#interface Vlan80
MS1(config-if)#ip address 192.168.80.254 255.255.255.0
~~~
## S1
~~~
Switch>enable
Switch#configure terminal
Switch(config)#hostname S1
S1(config)#Vlan 10
S1(config)#interface range fastEthernet 0/1-5
S1(config-if-range)#switchport mode access
S1(config-if-range)#switchport access vlan 10
~~~
## TFTP 備份還原
~~~
MS1#write //保存配置到 startup-config 文件
Building configuration...
[OK]
MS1#copy startup-config tftp //備份配置文件到 TFTP 服務器
Address or name of remote host []? 192.168.69.1
Destination filename [MS1-confg]? MS1-config
Writing startup-config...!!
[OK - 1659 bytes]
1659 bytes copied in 0.002 secs (829500 bytes/sec)、
MS1#erase startup-config //刪除本地配置文件
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
MS1#copy tftp: startup-config //從 TFTP 服務器還原配置文件
Address or name of remote host []? 192.168.69.1
Source filename []? MS1-config
Destination filename [startup-config]?
Accessing tftp://192.168.69.1/MS1-config...
Loading MS1-config from 192.168.69.1: !
[OK - 1659 bytes]
1659 bytes copied in 0.002 secs (829500 bytes/sec)
~~~
# 實驗測試
* PC 均能通過 DHCP 獲取到 IP 地址
* PC 能通過域名 test.cisco.com 訪問 web 頁面
* 備份配置文件到 TFTP 服務器后,刪除本地配置文件并重啟,先配置與 TFTP 服務器的通信,然后從 TFTP 服務器恢復配置文件并重啟,測試與其它設備之間的通信。