实操:华为单臂路由和dhcp服务配置实验,简单有效(华为模拟器路由器dhcp配置实例)

网友投稿 601 2022-09-23


实操:华为单臂路由和dhcp服务配置实验,简单有效(华为模拟器路由器dhcp配置实例)

华为设备单臂路由实验

实验对象:一台路由器、一台交换机、两台PC机实验环境:eNSP 实验原理: interface eth-trunk 1.10dot1q termination vid 10(该接口属于vlan10)ip add 192.168.10.1 24arp broadcast enable(开启arp广播)

注意:在生产环境中,要先查看版本,保存信息,然后根据当前环境确定是否需要升级系统,这是个好习惯

The device is running! system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname R1 [R1]un in en Info: Information center is disabled. [R1]int Eth-Trunk 1 [R1-Eth-Trunk1]trunkport g 0/0/1 to 0/0/2 [R1-Eth-Trunk1]q [R1]int Eth-Trunk 1.10 [R1-Eth-Trunk1.10]dot1q termination vid 10 [R1-Eth-Trunk1.10]ip add 192.168.10.1 24 [R1-Eth-Trunk1.10]un sh Info: Interface Eth-Trunk1.10 is not shutdown. [R1-Eth-Trunk1.10]arp broadcast enable [R1-Eth-Trunk1.10]un sh Info: Interface Eth-Trunk1.10 is not shutdown. [R1-Eth-Trunk1.10]q [R1]int Eth-Trunk 1.20 [R1-Eth-Trunk1.20]dot1q termination vid 20 [R1-Eth-Trunk1.20]ip add 192.168.20.1 24 [R1-Eth-Trunk1.20]a b e [R1-Eth-Trunk1.20]un sh Info: Interface Eth-Trunk1.20 is not shutdown. [R1-Eth-Trunk1.20]q [R1]

LSW3

The device is running! system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname SW1 [SW1]un in en Info: Information center is disabled. [SW1]int e 0/0/2 [SW1-Ethernet0/0/2]q [SW1]vlan bat 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [SW1]int e 0/0/2 [SW1-Ethernet0/0/2]p l a [SW1-Ethernet0/0/2]p d v 20 [SW1-Ethernet0/0/2]un sh Info: Interface Ethernet0/0/2 is not shutdown. [SW1-Ethernet0/0/2]int e 0/0/3 [SW1-Ethernet0/0/3]p l a [SW1-Ethernet0/0/3]p d v 10 [SW1-Ethernet0/0/3]un sh Info: Interface Ethernet0/0/3 is not shutdown. [SW1-Ethernet0/0/3]q [SW1]int Eth-Trunk 1 [SW1-Eth-Trunk1]trunkport g 0/0/1 to 0/0/2 Info: This operation may take a few seconds. Please wait for a moment...done. [SW1-Eth-Trunk1]p l t [SW1-Eth-Trunk1]p t a v a [SW1-Eth-Trunk1]un sh Info: Interface Eth-Trunk1 is not shutdown. [SW1-Eth-Trunk1]

华为设备DHCP服务配置

The device is running! sys system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysn [Huawei]sysname SW1 [SW1]int e 0/0/1 [SW1-Ethernet0/0/1]p l a [SW1-Ethernet0/0/1]p d v 10 Error: The VLAN does not exist. [SW1-Ethernet0/0/1]q [SW1]vlan bat 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [SW1]int e0/0/1 [SW1-Ethernet0/0/1]p d v 10 [SW1-Ethernet0/0/1]un sh Info: Interface Ethernet0/0/1 is not shutdown. [SW1-Ethernet0/0/1]int e0/0/2 [SW1-Ethernet0/0/2]p l a [SW1-Ethernet0/0/2]p d v 20 [SW1-Ethernet0/0/2]un sh Info: Interface Ethernet0/0/2 is not shutdown. [SW1-Ethernet0/0/2]int e0/0/3 [SW1-Ethernet0/0/3]p l a [SW1-Ethernet0/0/3]p d v 10 [SW1-Ethernet0/0/3]un sh Info: Interface Ethernet0/0/3 is not shutdown. [SW1-Ethernet0/0/3]int e0/0/4 [SW1-Ethernet0/0/4]p l a [SW1-Ethernet0/0/4]p d v 20 [SW1-Ethernet0/0/4]un sh Info: Interface Ethernet0/0/4 is not shutdown. [SW1-Ethernet0/0/4]un sh Info: Interface Ethernet0/0/4 is not shutdown. [SW1-Ethernet0/0/4]int e0/0/1 [SW1-Ethernet0/0/1] p l t Error: Please renew the default configurations. [SW1-Ethernet0/0/1]dis this # interface Ethernet0/0/1 port link-type access port default vlan 10 # return [SW1-Ethernet0/0/1]int g0/0/1 [SW1-GigabitEthernet0/0/1]p l t [SW1-GigabitEthernet0/0/1]port t a v a [SW1-GigabitEthernet0/0/1]un sh Info: Interface GigabitEthernet0/0/1 is not shutdown.

R1 ————使用子接口模式配置dhcp

The device is running! sys system-view Enter system view, return user view with Ctrl+Z. [Huawei]sys [Huawei]sysname R1 [R1]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [R1]vlan bat 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [R1] [R1]int g0/0/1.10 [R1-GigabitEthernet0/0/1.10] [R1-GigabitEthernet0/0/1.10]dot1q termination vid 10 [R1-GigabitEthernet0/0/1.10]ip address 192.168.10.1 24 [R1-GigabitEthernet0/0/1.10] Dec 10 2019 17:09:57-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/1.10 has entered the UP state. [R1-GigabitEthernet0/0/1.10]display this # interface GigabitEthernet0/0/1.10 dot1q termination vid 10 ip address 192.168.10.1 255.255.255.0 # return [R1-GigabitEthernet0/0/1.10]a b e [R1-GigabitEthernet0/0/1.10]dis this # interface GigabitEthernet0/0/1.10 dot1q termination vid 10 ip address 192.168.10.1 255.255.255.0 arp broadcast enable # return [R1-GigabitEthernet0/0/1.10] [R1-GigabitEthernet0/0/1.10]un sh Info: Interface GigabitEthernet0/0/1.10 is not shutdown. [R1-GigabitEthernet0/0/1.10]int g0/0/1.20 [R1-GigabitEthernet0/0/1.20]dot1q te vid 20 [R1-GigabitEthernet0/0/1.20]ip address 192.168.20.1 24 [R1-GigabitEthernet0/0/1.20] Dec 10 2019 17:11:21-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1.20 has entered the UP state. [R1-GigabitEthernet0/0/1.20]a b e [R1-GigabitEthernet0/0/1.20]un sh Info: Interface GigabitEthernet0/0/1.20 is not shutdown. [R1-GigabitEthernet0/0/1.20]q [R1]int g0/0/1.10 [R1-GigabitEthernet0/0/1.10]dhcp select interface [R1-GigabitEthernet0/0/1.10]dhcp server dns-list 2.2.2.2 8.8.8.8 [R1-GigabitEthernet0/0/1.10]q [R1]int g0/0/1.20 [R1-GigabitEthernet0/0/1.20]dhcp select interface [R1-GigabitEthernet0/0/1.20]dhcp server dns-list 2.2.2.2 8.8.8.8 [R1-GigabitEthernet0/0/1.20]q [R1]int g0/0/3 [R1-GigabitEthernet0/0/3]ip add 12.0.0.1 24 Dec 10 2019 17:14:41-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface GigabitEthernet0/0/3 has entered the UP state. [R1-GigabitEthernet0/0/3]un sh Info: Interface GigabitEthernet0/0/3 is not shutdown. [R1-GigabitEthernet0/0/3]q [R1]ip route-static 0.0.0.0 0.0.0.0 12.0.0.2

R2 ————全局配置模式配置pool dhcp地址池

The device is running! sys system-view Enter system view, return user view with Ctrl+Z. [Huawei]sys [Huawei]sysname R2 [R2]int g 0/0/3 [R2-GigabitEthernet0/0/3]ip add 12.0.0.2 24 [R2-GigabitEthernet0/0/3] Dec 10 2019 17:18:53-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/3 has entered the UP state. [R2-GigabitEthernet0/0/3]un sh Info: Interface GigabitEthernet0/0/3 is not shutdown. [R2-GigabitEthernet0/0/3]int g 0/0/0 [R2-GigabitEthernet0/0/0]ip add 15.0.0.1 24 [R2-GigabitEthernet0/0/0]un sh Info: Interface GigabitEthernet0/0/0 is not shutdown. [R2]ip pool 15 Info:It's successful to create an IP address pool. [R2-ip-pool-15]network 15.0.0.0 mask 24 [R2-ip-pool-15]gateway-list 15.0.0.1 [R2-ip-pool-15]dns-list 8.8.8.8 2.2.2.2 [R2-ip-pool-15]q [R2]int e0/0/0 [R2-Ethernet0/0/0]dis this # interface Ethernet0/0/0 # return [R2-Ethernet0/0/0]int g 0/0/0 [R2-GigabitEthernet0/0/0]dis this # interface GigabitEthernet0/0/0 ip address 15.0.0.1 255.255.255.0 # return [R2-GigabitEthernet0/0/0]undo ip address 15.0.0.1 255.255.255.0 dis this # interface GigabitEthernet0/0/0 # return [R2-GigabitEthernet0/0/0]int e0/0/0 [R2-Ethernet0/0/0]ip add 15.0.0.1 24 Dec 10 2019 17:25:03-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface Ethernet0/0/0 has entered the UP state. [R2-Ethernet0/0/0]un sh Info: Interface Ethernet0/0/0 is not shutdown. [R2-Ethernet0/0/0]dhcp select global Error: Please enable DHCP in the global view first. [R2-Ethernet0/0/0]q Info: The operation may take a few seconds. Please wait for a moment.done. [R2]dhcp enable [R2]int e0/0/0 [R2-Ethernet0/0/0]dhcp select global [R2-Ethernet0/0/0]q [R2]ip route-static 192.168.0.0 16 12.0.0.1


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:网工 别再最能吃苦的年纪.选择安逸(网工是什么专业)
下一篇:Java编程 多态
相关文章

 发表评论

暂时没有评论,来抢沙发吧~