本文共 1216 字,大约阅读时间需要 4 分钟。
一、实验拓扑:
二、实验要求:1、R1部署单臂路由技术,为实现不同vlan间的通信:f0/0配置子接口f0/0.10、f0/0.20,封装dot1q(ISL:Inter-Switch Link,思科交换链路内协议,Cisco专有的Trunk封装方式);2、R1部署DHCP技术,使得PC1、PC2自动获取IP地址;3、验证PC1、PC2是否能自动获取IP地址?是否可以正常通信?三、命令部署:1、R1子接口命令部署:R1(config)#int f0/0R1(config-if)#no shutdownR1(config-if)#int f0/0.10
R1(config-subif)#encapsulation dot1Q 10R1(config-subif)#ip address 192.168.10.254 255.255.255.0R1(config-subif)#int f0/0.20
R1(config-subif)#encapsulation dot1Q 20R1(config-subif)#ip address 192.168.20.254 255.255.255.02、R1 DHCP部署:R1(config)#ip dhcp pool aaR1(dhcp-config)#network 192.168.10.254 255.255.255.0R1(dhcp-config)#default-router 192.168.10.0R1(dhcp-config)#dns-server 8.8.8.8R1(dhcp-config)#lease 365R1(config)#ip dhcp pool bb
R1(dhcp-config)#network 192.168.20.0 255.255.255.0R1(dhcp-config)#default-router 192.168.20.254R1(dhcp-config)#dns-server 8.8.8.8R1(dhcp-config)#lease 365SW1(config)#int range f0/1 - 2
SW1(config-if-range)#spanning-tree portfast四、验证:
PC1#ping 192.168.20.1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:.!!!!Success rate is 80 percent (4/5), round-trip min/avg/max = 28/38/44 ms转载于:https://blog.51cto.com/13856092/2137244