A-A+

Cisco Packet Tracert 之 三层交换机DHCP服务

2016年01月05日 电脑网络 暂无评论 阅读 3 views 次

本次的实验环境和实验目的:

1、在三层交换机划分VLAN100\VLAN200,并且把FA0/1 和FA0/2分别划分到VLAN100 \VLAN200上。

2、在三层交换机和cisco路由器上创建各VLAN的IP地址池,并创建网关的相应信息。

3、在客户端查看是否获取了相应的IP的信息。

具体的实验步骤:

1、在三层交换机划分VLAN100\VLAN200,并且把FA0/1 和FA0/2分别划分到VLAN100 \VLAN200上。

  1. Switch>enable  
  2. Switch#conf t  
  3. Enter configuration commands, one per line.  End with CNTL/Z.  
  4. Switch(config)#vlan 100  
  5. Switch(config-vlan)#exit  
  6. Switch(config)#vlan 200  
  7. Switch(config-vlan)#exit  
  8. Switch(config)#int vlan100  
  9. Switch(config-if)#  
  10. %LINK-5-CHANGED: Interface Vlan100, changed state to up  
  11. Switch(config-if)#ip add 192.168.100.254 255.255.255.0  
  12. Switch(config-if)#exit  
  13. Switch(config)#int vlan 200  
  14. Switch(config-if)#  
  15. %LINK-5-CHANGED: Interface Vlan200, changed state to up  
  16. Switch(config-if)#ip add 192.168.200.254 255.255.255.0  
  17. Switch(config-if)#exit  
  18. Switch(config)#int fa0/1  
  19. Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 100  
  20. Switch(config-if)#  
  21. %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up  
  22. Switch(config-if)#exit  
  23. Switch(config)#int fa0/2  
  24. Switch(config-if)#switchport mode access  
  25. Switch(config-if)#switchport access vlan 200  

2、在三层交换机上创建各VLAN的IP地址池,并创建网关的相应信息。

  1. Switch(config)#ip dhcp pool vlan100  
  2. Switch(dhcp-config)#network 192.168.100.0 255.255.255.0  
  3. Switch(dhcp-config)#default-router 192.168.100.254  
  4. Switch(dhcp-config)#exit  
  5. Switch(config)#ip dhcp pool vlan200  
  6. Switch(dhcp-config)#network 192.168.200.0 255.255.255.0  
  7. Switch(dhcp-config)#default-router 192.168.200.254  
  8. Switch(dhcp-config)#exit  

3、在客户端查看是否获取了相应的IP的信息。

标签:

给我留言