其他分享
首页 > 其他分享> > 实验八DHCP

实验八DHCP

作者:互联网

实验八DHCP
实验任务一:PCA直接通过RTA获得ip地址

  1. 建立物理连接

  2. 配置RTA作为dhcp服务器
    [RTA-GigabitEthernet0/0]ip address 172.16.0.1 24
    [RTA]dhcp enable//启动dhcp服务器
    [RTA]dhcp server forbidden-ip 172.16.0.1
    [RTA]dhcp server ip-pool 1
    [RTA -dhcp-pool-1]network 172.16.0.0 24//分配的地址池
    [RTA-dhcp-pool-1]gateway-list 172.16.0.1//分配的网关地址
  3. PCA通过dhcp获得ip地址


  1. 查看dhcp服务器相关信息
    [RTA]display dhcp server statistics
    Pool number: 1//地址池一个
    Pool utilization: 0.39%
    Bindings:
    Automatic: 1//分配的地址一个
    Manual: 0
    Expired: 0
    Conflict: 0
    Messages received: 9
    DHCPDISCOVER: 7
    DHCPREQUEST: 2
    DHCPDECLINE: 0
    DHCPRELEASE: 0
    DHCPINFORM: 0
    BOOTPREQUEST: 0
    Messages sent: 4
    DHCPOFFER: 2
    DHCPACK: 2
    DHCPNAK: 0
    BOOTPREPLY: 0
    Bad Messages: 0

[RTA]display dhcp server ip-in-use
IP address Client identifier/ Lease expiration Type
Hardware address
172.16.0.2 0036-6539-642e-3831- Apr 20 16:06:33 2018 Auto(C)
6530-2e30-3230-362d-
4745-302f-302f-31

[RTA]display dhcp server free-ip
Pool name: 1
Network: 172.16.0.0 mask 255.255.255.0
IP ranges from 172.16.0.3 to 172.16.0.254

实验任务二:PCA通过dhcp中继方式获得IP地址

  1. 建立物理连接
  2. 在设备上配置ip地址及路由

注意:vlan2要创建之后,把GE_0/2加入vlan2才能是能vlan2interface.
RTA配置静态路由:[RTA]ip route-static 172.16.1.0 24 172.16.0.1

  1. RTA配置dhcp服务器,SWA配置dhcp中继
    [SWA]dhcp enable
    [SWA]interface Vlan-interface 1
    [SWA-Vlan-interface1]dhcp select relay
    [SWA-Vlan-interface1]dhcp relay server-address 172.16.0.2

[RTA-GigabitEthernet0/0]ip address 172.16.0.2 24
[RTA]dhcp enable//启动dhcp服务器
[RTA]dhcp server forbidden-ip 172.16.1.1
[RTA]dhcp server ip-pool 1
[RTA -dhcp-pool-1]network 172.16.1.0 24//分配的地址池
[RTA-dhcp-pool-1]gateway-list 172.16.1.1//分配的网关地址
4.PCA通过dhcp中继获取ip地址

标签:RTA,ip,dhcp,地址,实验,172.16,DHCP,server
来源: https://www.cnblogs.com/akiz/p/11144480.html