DHCP实验复习
实验步骤
配置R1
配置DHCP
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
Apr 22 2021 18:42:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.2.254 24
Apr 22 2021 18:42:21-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool 1
Info: It's successful to create an IP address pool.
[r1-ip-pool-1]network 192.168.1.0 mask 255.255.255.0
[r1-ip-pool-1]gateway-list 192.168.1.254
[r1-ip-pool-1]dns-list 8.8.8.8
[r1-ip-pool-1]lease day 0 hour 12
[r1-ip-pool-1]dis this
[V200R003C00]
#
ip pool 1
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0
lease day 0 hour 12 minute 0
dns-list 8.8.8.8
#
return
[r1-ip-pool-1]int g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]dhcp select interface
[r1-GigabitEthernet0/0/1]dhcp server dns-list 8.8.8.8
[r1-GigabitEthernet0/0/1]dhcp server lease day 0 hour 12
[r1-GigabitEthernet0/0/1]dhcp server static-bind ip-address 192.168.2.10 mac-add
ress 5489-98E7-22E5
Error:The static-MAC is exist in this IP-pool.
[r1-GigabitEthernet0/0/1]dhcp server static-bind ip-address 192.168.2.10 mac-add
ress 5489-98E7-22A5
配置RIP
[r1]int g0/0/2
[r1-GigabitEthernet0/0/2]ip add 10.0.0.1 24
Apr 22 2021 18:57:26-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r1-GigabitEthernet0/0/2]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 10.0.0.0
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.2.0
配置R2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 10.0.0.2 24
Apr 22 2021 19:00:27-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]: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 20.0.0.1 24
Apr 22 2021 19:00:38-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]q
[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 10.0.0.0
[r2-rip-1]network 20.0.0.0
配置R3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 20.0.0.2 24
Apr 22 2021 19:02:47-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 30.0.0.1 24
Apr 22 2021 19:02:57-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]q
[r3]rip 1
[r3-rip-1]version 2
[r3-rip-1]network 20.0.0.0
[r3-rip-1]network 30.0.0.0
配置R4
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 30.0.0.2 24
Apr 22 2021 19:04:14-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.10.254 24
Apr 22 2021 19:04:29-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r4-GigabitEthernet0/0/1]q
[r4]rip 1
[r4-rip-1]version 2
[r4-rip-1]network 30.0.0.0
[r4-rip-1]network 192.168.10.0