一、要求:
二、1.配接口IP
2.配rip宣告网段
3.dhcp获取地址
4.全网可达
三、配置:1.接口配ip
AR1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/24 up up
GigabitEthernet0/0/1 12.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/32 up up(s)
LoopBack1 unassigned up up(s)
NULL0 unassigned up up(s)
AR2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.1.1.2/24 up up
GigabitEthernet0/0/1 23.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 2.2.2.2/32 up up(s)
NULL0 unassigned up up(s)
AR3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 23.1.1.2/24 up up
GigabitEthernet0/0/1 192.168.2.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 3.3.3.3/32 up up(s)
NULL0 unassigned up up(s)
2.配rip
AR1
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.0.0.0/8 RIP 100 1 D 12.1.1.2 GigabitEthernet
0/0/1
3.0.0.0/8 RIP 100 2 D 12.1.1.2 GigabitEthernet
0/0/1
23.0.0.0/8 RIP 100 1 D 12.1.1.2 GigabitEthernet
0/0/1
192.168.2.0/24 RIP 100 2 D 12.1.1.2 GigabitEthernet
0/0/1AR2
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.0.0.0/8 RIP 100 1 D 12.1.1.1 GigabitEthernet
0/0/0
3.0.0.0/8 RIP 100 1 D 23.1.1.2 GigabitEthernet
0/0/1
192.168.1.0/24 RIP 100 1 D 12.1.1.1 GigabitEthernet
0/0/0
192.168.2.0/24 RIP 100 1 D 23.1.1.2 GigabitEthernet
0/0/1
AR3Destination/Mask Proto Pre Cost Flags NextHop Interface
1.0.0.0/8 RIP 100 2 D 23.1.1.1 GigabitEthernet
0/0/0
2.0.0.0/8 RIP 100 1 D 23.1.1.1 GigabitEthernet
0/0/0
12.0.0.0/8 RIP 100 1 D 23.1.1.1 GigabitEthernet
0/0/0
192.168.1.0/24 RIP 100 2 D 23.1.1.1 GigabitEthernet
0/0/0
3.dhcp开启服务
[Huawei]dhcp en
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool 1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-1]net
[Huawei-ip-pool-1]netbios-type
[Huawei-ip-pool-1]network 192.168.1.0 mask 24
[Huawei-ip-pool-1]ga
[Huawei-ip-pool-1]gateway-list 192.168.1.1
[Huawei-ip-pool-1]dns 8.8.8.8
[Huawei-ip-pool-1]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp se
[Huawei-GigabitEthernet0/0/0]dhcp select g
[Huawei-GigabitEthernet0/0/0]dhcp select global
四、结果
PC>ping 192.168.2.254
Ping 192.168.2.254: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
From 192.168.2.254: bytes=32 seq=3 ttl=125 time=62 ms
From 192.168.2.254: bytes=32 seq=4 ttl=125 time=94 ms
From 192.168.2.254: bytes=32 seq=5 ttl=125 time=78 ms
--- 192.168.2.254 ping statistics ---
5 packet(s) transmitted
3 packet(s) received
40.00% packet loss
round-trip min/avg/max = 0/78/94 ms
PC>ping 192.168.2.253
Ping 192.168.2.253: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.253: bytes=32 seq=2 ttl=125 time=62 ms
From 192.168.2.253: bytes=32 seq=3 ttl=125 time=78 ms
From 192.168.2.253: bytes=32 seq=4 ttl=125 time=79 ms
From 192.168.2.253: bytes=32 seq=5 ttl=125 time=93 ms