任务
-
按接口标记配置IP地址
-
LAN1配置接口地址池
保留地址: 192.168.1.100~200的地址,用作他用,此处不得占用。
地址租期: 2天
DNS地址: 6.6.6.6 -
LAN2配置全局地址池
地址池名字:p1
地址池IP: 10.1.1.0/24
网关IP: 10.1.1.1
地址租期: 2天
dns地址: 8.8.8.8
AR1配置LAN1
- AR1接口IP地址分配
<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.1 24
Sep 7 2020 15:11:11-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 10.1.1.1 24
Sep 7 2020 15:11:27-08:00 r2 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
- LAN1
[r2]dhcp enable
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]dhcp select interface
[r2-GigabitEthernet0/0/0]dhcp server dns-list 6.6.6.6
[r2-GigabitEthernet0/0/0]dhcp server excluded-ip-address 192.168.1.100 192.168.1.200
[r2-GigabitEthernet0/0/0]dhcp server lease day 2
AR1配置LAN2
[r2]dhcp enable
[r2]ip pool p1
Info: It's successful to create an IP address pool.
[r2-ip-pool-p1]gateway-list 10.1.1.1
[r2-ip-pool-p1]network 10.1.1.0 mask 24
[r2-ip-pool-p1]lease day 2
[r2-ip-pool-p1]dns-list 8.8.8.8
[r2-ip-pool-p1]q
[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]dhcp select global
结果展示
[r2]dis ip pool
-----------------------------------------------------------------------
Pool-name : GigabitEthernet0/0/0
Pool-No : 1
Position : Interface Status : Unlocked
Gateway-0 : 192.168.1.1
Mask : 255.255.255.0
VPN instance : --
-----------------------------------------------------------------------
Pool-name : p1
Pool-No : 2
Position : Local Status : Unlocked
Gateway-0 : 10.1.1.1
Mask : 255.255.255.0
VPN instance : --
IP address Statistic
Total :506
Used :4 Idle :401
Expired :0 Conflict :0 Disable :101
双击配置图中的PC4主机,可以看到PC4获得了分配的IP地址!
1.png
网友评论