DHCP实验技术案例

实验拓扑图

步骤:

路由器1:
<Huawei>sys
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysn r1
[r1]int e0/0/1
[r1-Ethernet0/0/1]int e0/0/1.10
[r1-Ethernet0/0/1.10]ip address 192.168.1.1 24 
[r1-Ethernet0/0/1.10]dot1q termination vid 10  
[r1-Ethernet0/0/1.10]arp broadcast en
[r1-Ethernet0/0/1.10]int e0/0/1.20
[r1-Ethernet0/0/1.20]ip address 192.168.2.1 24 
[r1-Ethernet0/0/1.20]dot1q termination vid 20    
[r1-Ethernet0/0/1.20]arp broadcast enable 
[r1-Ethernet0/0/1.20]int e0/0/0
[r1-Ethernet0/0/0]ip address 192.168.12.1 30


[r1]rip 
[r1-rip-1]version 2 
[r1-rip-1]undo summary   
[r1-rip-1]network 192.168.12.0
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.2.0
[r1-rip-1]q
[r1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool 10
Info:It's successful to create an IP address pool.  
[r1-ip-pool-10]network 192.168.1.0 mask 24
[r1-ip-pool-10]gateway-list 192.168.1.1
[r1-ip-pool-10]dns-list 8.8.8.8
[r1-ip-pool-10]ip pool 20
Info:It's successful to create an IP address pool.       
[r1-ip-pool-20]network 192.168.2.0 mask 24
[r1-ip-pool-20]gateway-list 192.168.2.1
[r1-ip-pool-20]dns-list 8.8.8.8
[r1-ip-pool-20]q
[r1]int e0/0/1.10   
[r1-Ethernet0/0/1.10]dhcp select global 
[r1-Ethernet0/0/1.10]int e0/0/1.20
[r1-Ethernet0/0/1.20]dhcp select global
[r1-Ethernet0/0/1.20]

 路由器2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysn r2
[r2]int e0/0/0
[r2-Ethernet0/0/0]ip address 192.168.12.2 30
[r2-Ethernet0/0/0]int e0/0/1  
[r2-Ethernet0/0/1]ip address 192.168.12.5 30
[r2]rip  
[r2-rip-1]version 2  
[r2-rip-1]undo summary    
[r2-rip-1]network 192.168.12.0

交换机1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysn s1 
[s1]vlan batch 10 20 30 40 50
Info: This operation may take a few seconds. Please wait for a moment...done.  
[s1]interface vlanif 50  
[s1-Vlanif50]ip address 192.168.12.6 30
[s1-Vlanif50]interface vlanif 30
[s1-Vlanif30]ip address 192.168.3.1 24
[s1-Vlanif30]interface vlanif 40 
[s1-Vlanif40]ip address 192.168.4.1 24
[s1-Vlanif40]q
[s1]int g0/0/1 
[s1-GigabitEthernet0/0/1]port link-type access   
[s1-GigabitEthernet0/0/1]port default vlan 50
[s1-GigabitEthernet0/0/1]int g0/0/2 
[s1-GigabitEthernet0/0/2]port link-type trunk 
[s1-GigabitEthernet0/0/2]port trunk allow-pass vlan  10 20 30 40 50
[s1-GigabitEthernet0/0/2]q
[s1]rip   
[s1-rip-1]version 2 
[s1-rip-1]undo summary 
[s1-rip-1]network 192.168.12.0
[s1-rip-1]network 192.168.3.0
[s1-rip-1]network 192.168.4.0
[s1]int vlanif 30
[s1-Vlanif30]q    
[s1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[s1]int vlanif 30     
[s1-Vlanif30]dhcp select interface 
[s1]int vlanif 40
[s1-Vlanif40]dhcp select interface

交换机2:
The device is running!

<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysn s2 
[s2]vlan batch 10 20 30 40 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[s2]int e0/0/1  
[s2-Ethernet0/0/1]port link-type trunk  
[s2-Ethernet0/0/1]port trunk allow-pass vlan 10 20 30 40 50
[s2-Ethernet0/0/1]int e0/0/2  
[s2-Ethernet0/0/2]port link-type access 
[s2-Ethernet0/0/2]port default vlan 10
[s2-Ethernet0/0/2]int e0/0/3  
[s2-Ethernet0/0/3]port link-type access 
[s2-Ethernet0/0/3]port default vlan 20
[s2-Ethernet0/0/3] User interface con0 is available

交换机3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysn s3   
[s3]vlan batch 10 20 30 40 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[s3]int e0/0/1  
[s3-Ethernet0/0/1]port link-type trunk 
[s3-Ethernet0/0/1]port trunk allow-pass vlan 10 20 30 40 50
[s3-Ethernet0/0/1]int e0/0/2
[s3-Ethernet0/0/2]port link-type access 
[s3-Ethernet0/0/2]port default vlan 30
[s3-Ethernet0/0/2]int e0/0/3 
[s3-Ethernet0/0/3]port link-type access 
[s3-Ethernet0/0/3]port default vlan 40

  • 20
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值