1、通过DHCP服务,给PC4和PC5分配IP地址、网关、掩码、DNS服务器IP地址
2、Client-1要求手工配置IP地址,为192.168.1.1,可以通过该设备使用域名成功访问HTTP服务器
3、telnet客户端可以远程登录telnet服务器进行设备管理,并成功修改telnet服务器的名称为123
telnet设备登录的账号密码为:admin/admin
4、要求DHCP服务器需要排除被手工配置的IP地址;并修改租期时间为1小时;
5、最终实现每台终端都可以相互通讯(ping成功)
6、整个拓扑图使用192.168.1.0/24网段进行分配
DHCP配置
[r1]dhcp enable --- 启动DHCP服务
//创建地址池
[r1]ip pool one
[r1-ip-pool-one]network 192.168.1.0 mask 24
[r1-ip-pool-one]gateway-list 192.168.1.254
[r1-ip-pool-one]dns-list 8.8.8.8
[r1]ip pool two
[r1-ip-pool-two]network 192.168.2.0 mask 24
[r1-ip-pool-two]gateway-list 192.168.2.254
[r1-ip-pool-two]dns-list 8.8.8.8
VLAN配置
//创建并划分vlan
[LSW1]vlan batch 2 3
[LSW1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type access
[LSW1-GigabitEthernet0/0/2]port default vlan 2
[LSW1]interface g0/0/3
[LSW1-GigabitEthernet0/0/3]port link-type access
[LSW1-GigabitEthernet0/0/3]port default vlan 3
[LSW2]vlan batch 2 3
[LSW2]interface g0/0/1
[LSW2-GigabitEthernet0/0/1]port link-type access
[LSW2-GigabitEthernet0/0/1]port default vlan 2
[LSW2]interface g0/0/2
[LSW2-GigabitEthernet0/0/2]port link-type access
[LSW2-GigabitEthernet0/0/2]port default vlan 3
配置LSW1与LSW2的通道
[LSW1]interface g0/0/4
[LSW1-GigabitEthernet0/0/4]port link-type trunk
[LSW1-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 3
[LSW2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]port link-type trunk
[LSW2-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 3
配置LSW1与R1的通道
[LSW1]interface g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
创建R1的子接口
[r1]interface g0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip address 192.168.1.254 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1]interface g0/0/0.2
[r1-GigabitEthernet0/0/0.2]ip address 192.168.2.254 24
[r1-GigabitEthernet0/0/0.2]dot1q termination vid 3
[r1-GigabitEthernet0/0/0.2]arp broadcast enable
启动DHCP
[r1-GigabitEthernet0/0/0.1]dhcp select global
[r1-GigabitEthernet0/0/0.2]dhcp select global
实验验证