路由器服务器中继实验拓扑
含笔记
R1
<Huawei>undo t m
<Huawei>sy
[Huawei]sy R1
[R1]dhcp enable
[R1]ip pool huawei1.0
[R1-ip-pool-huawei1.0]gateway-list 10.1.1.1
[R1-ip-pool-huawei1.0]network 10.1.1.0 mask 24
[R1-ip-pool-huawei1.0]int g0/0/0
[R1-GigabitEthernet0/0/0]ip ad 12.1.1.1 24
[R1-GigabitEthernet0/0/0]dhcp select global
[R1-GigabitEthernet0/0/0]q
[R1]dhcp enable
[R1]ip pool huawei2.0
[R1-ip-pool-huawei2.0]gateway-list 10.1.2.1
[R1-ip-pool-huawei2.0]network 10.1.2.0 mask 24
[R1-ip-pool-huawei2.0]q
[R1]ip route-static 10.1.1.0 24 g0/0/0 12.1.1.2
[R1]ip route-static 10.1.2.0 24 g0/0/0 12.1.1.2
R2
<Huawei>undo t m
<Huawei>sy
[Huawei]sy R2
[R2]dhcp enable
[R2]dhcp server group bosai1.0
[R2-dhcp-server-group-bosai1.0]dhcp-server 12.1.1.1
[R2-dhcp-server-group-bosai1.0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip ad 10.1.1.1 24
[R2-GigabitEthernet0/0/1]dhcp select relay
[R2-GigabitEthernet0/0/1]dhcp relay server-select bosai1.0
[R2-GigabitEthernet0/0/1]int g0/0/0
[R2-GigabitEthernet0/0/0]ip ad 12.1.1.2 24
[R2-GigabitEthernet0/0/0]q
[R2]int g0/0/2
[R2-GigabitEthernet0/0/2]ip ad 10.1.2.1 24
[R2-GigabitEthernet0/0/2]q
[R2]dhcp server group bosai2.0
[R2-dhcp-server-group-bosai2.0]dhcp-
[R2-dhcp-server-group-bosai2.0]dhcp-server 12.1.1.1
[R2-dhcp-server-group-bosai2.0]int g0/0/2
[R2-GigabitEthernet0/0/2]dhcp select relay
[R2-GigabitEthernet0/0/2]dhcp relay server-select bosai2.0
运行结果:
服务器中继实验拓扑
R3
<Huawei>undo t m
<Huawei>sy
[Huawei]sy R3
[R3]dhcp enable
[R3]ip pool huawei
[R3-ip-pool-huawei]gateway-list 10.1.2.1
[R3-ip-pool-huawei]network 10.1.2.0 mask 24
[R3-ip-pool-huawei]int g0/0/0
[R3-GigabitEthernet0/0/0]ip ad 23.1.1.1 24
[R3-GigabitEthernet0/0/0]dhcp select global
[R3-GigabitEthernet0/0/0]q
[R3]ip route-static 10.1.2.0 24 23.1.1.2
SW3
<Huawei>undo t m
<Huawei>sy
[Huawei]sy SW3
[SW3]v b 14 12
[SW3]v b 14 23
[SW3]int v23
[SW3-Vlanif23]ip ad 23.1.1.2 24
[SW3-Vlanif23]int v14
[SW3-Vlanif14]ip ad 10.1.2.1 24
[SW3-Vlanif14]int g0/0/1
[SW3-GigabitEthernet0/0/1]port link-t a
[SW3-GigabitEthernet0/0/1]po de v 23
[SW3-GigabitEthernet0/0/1]q
[SW3]int g0/0/2
[SW3-GigabitEthernet0/0/2]port link-t t
[SW3-GigabitEthernet0/0/2]po t a v a
[SW3-GigabitEthernet0/0/2]q
[SW3]dhcp enable
[SW3]dhcp server group bosai
[SW3-dhcp-server-group-bosai]dhcp-server 23.1.1.1
[SW3-dhcp-server-group-bosai]int v14
[SW3-Vlanif14]dhcp select relay
[SW3-Vlanif14]dhcp relay server-select bosai
SW4
<Huawei>undo t m
<Huawei>sy
[Huawei]sy SW4
[SW4]v b 14
[SW4]int e0/0/1
[SW4-Ethernet0/0/1]port link-t a
[SW4-Ethernet0/0/1]port link-t t
[SW4-Ethernet0/0/1]po t a v a
[SW4-Ethernet0/0/1]int e0/0/2
[SW4-Ethernet0/0/2]port link-t a
[SW4-Ethernet0/0/2]po de v 14