1-交换通信:单臂路由实验+DHCP

一、实验拓扑:
1-交换通信:单臂路由实验+DHCP
二、实验要求:
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

转载于:https://blog.51cto.com/13856092/2137244

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值