一、拓扑图
二、需求
1、通过DHCP服务,给PC1和PC2分配IP地址、网关、掩码、DNS服务器IP地址
2、Client1要求手工配置IP地址,为192.168.1.1,可以通过该设备使用域名成功访问HTTP服务器
3、telnet客户端可以远程登录telnet服务器进行设备管理,并成功修改telnet服务器的名称为123telnet设备登录的账号密码为:admin/admin
4、要求DHCP服务器需要排除被手工配置的IP地址;并修改租期时间为1小时;
5、最终实现每台终端都可以相互通讯(ping成功)
6、整个拓扑图使用192.168.1.0/24网段进行分配
三、需求分析
1.把192.168.1.0/24分成两个网段
2.手动将需要配置ip地址的地方配好
3.配DHCP:IP、网关、掩码、DNS、排除手动配的IP地址、修改时间.
4.通过Client1使用的域名访问HTTP服务器
5…配telnet,telnet客户端远程登录telnet服务器进行设备管理,并修改telnet服务器的名称为123telnet设备登录的账号密码为:admin/admin
四、配置过程
1.划分网段
2.配置IP地址
[DHCP Server-GigabitEthernet0/0/0]ip address 192.168.1.100 25
[DHCP Server-GigabitEthernet0/0/1]ip address 192.168.1.200 25
[Telnet Client-GigabitEthernet0/0/0]ip address 192.168.1.1 25
[123-GigabitEthernet0/0/0]ip address 192.168.1.131 25
3.配置DHCP
[DHCP Server]dhcp enable
[DHCP Server]ip pool aa
[DHCP Server-ip-pool-aa]network 192.168.1.0 mask 25
[DHCP Server-ip-pool-aa]gateway-list 192.168.1.100
[DHCP Server-ip-pool-aa]dns-list 192.168.1.129
[DHCP Server-ip-pool-aa]excluded-ip-address 192.168.1.1 192.168.1.2
[DHCP Server-ip-pool-aa]lease day 0 hour 1 minute 0
[DHCP Server]interface GigabitEthernet 0/0/0
[DHCP Server-GigabitEthernet0/0/0]dhcp select global
[DHCP Server]dhcp enable
[DHCP Server]ip pool bb
[DHCP Server-ip-pool-bb]network 192.168.1.128 mask 25
[DHCP Server-ip-pool-bb]gateway-list 192.168.1.200
[DHCP Server-ip-pool-bb]dns-list 192.168.1.129
[DHCP Server-ip-pool-bb]excluded-ip-address 192.168.1.129 192.168.1.131
[DHCP Server-ip-pool-bb]lease day 0 hour 1 minute 0
[DHCP Server]interface GigabitEthernet 0/0/1
[DHCP Server-GigabitEthernet0/0/1]dhcp select global
4.通过Client1使用的域名访问HTTP服务器
5.配telnet
[Telnet Client]ip route-static 0.0.0.0 0 192.168.1.100
[123]ip route-static 0.0.0.0 0 192.168.1.200
[123]telnet server enable
[123]user-interface vty 0 4
[123-ui-vty0-4]authentication-mode aaa
[123-ui-vty0-4]q
[123]aaa
[123-aaa]local-user admin password cipher admin privilege level 15
[123-aaa]local-user admin service-type telnet
<Telnet Client>telnet 192.168.1.131
Press CTRL_] to quit telnet mode
Trying 192.168.1.131 ...
Connected to 192.168.1.131 ...
Login authentication
Username:admin
Password:
<123>
五、测试