1. 程式人生 > >1-交換通信:單臂路由實驗+DHCP

1-交換通信:單臂路由實驗+DHCP

work 技術 proc serve 通信 efault ima outer enc

一、實驗拓撲:
技術分享圖片
二、實驗要求:
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/0
R1(config-if)#no shutdown

R1(config-if)#int f0/0.10
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 192.168.10.254 255.255.255.0

R1(config-subif)#int f0/0.20
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 192.168.20.254 255.255.255.0
2、R1 DHCP部署:
R1(config)#ip dhcp pool aa
R1(dhcp-config)#network 192.168.10.254 255.255.255.0
R1(dhcp-config)#default-router 192.168.10.0
R1(dhcp-config)#dns-server 8.8.8.8
R1(dhcp-config)#lease 365

R1(config)#ip dhcp pool bb
R1(dhcp-config)#network 192.168.20.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.20.254
R1(dhcp-config)#dns-server 8.8.8.8
R1(dhcp-config)#lease 365

SW1(config)#int range f0/1 - 2
SW1(config-if-range)#spanning-tree portfast

四、驗證:
PC1#ping 192.168.20.1

Type 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

技術分享圖片

1-交換通信:單臂路由實驗+DHCP