【无标题】

在这里插入图片描述
要求
1.全网IP地址为192.168.1.0 24
2.所有IP通过DCHP获取地址
3.全网可达

分析
1.子网划分
2.DCHP配置
3.ping全网可达

1.路由器接口IP配置,dchp建立,接口dchp启用。

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 25
[Huawei-GigabitEthernet0/0/0]dhcp enable
[Huawei]ip pool 1
[Huawei-ip-pool-1]network 192.168.1.0 mask 25
[Huawei-ip-pool-1]gateway-list 192.168.1.1
[Huawei-ip-pool-1]dns-list 8.8.8.8
[Huawei-ip-pool-1]q
[Huawei]display ip pool name 1 
  Pool-name      : 1
  Pool-No        : 0
  Lease          : 1 Days 0 Hours 0 Minutes
  Domain-name    : -
  DNS-server0    : 8.8.8.8         
  NBNS-server0   : -               
  Netbios-type   : -               
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.1.1     
  Mask           : 255.255.255.128
  VPN instance   : --
 -----------------------------------------------------------------------------
         Start           End     Total  Used  Idle(Expired)  Conflict  Disable
 -----------------------------------------------------------------------------
     192.168.1.1   192.168.1.126   125     0        125(0)         0        0
 -----------------------------------------------------------------------------
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei-GigabitEthernet0/0/0]q
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.128.1 25
[Huawei-GigabitEthernet0/0/1]q
[Huawei]ip pool 2
[Huawei-ip-pool-2]gateway-list 192.168.128.1
[Huawei-ip-pool-2]dns-list 8.8.8.8
[Huawei-ip-pool-2]q
[Huawei]display ip pool 
  -----------------------------------------------------------------------
  Pool-name      : 1
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.1.1     
  Mask           : 255.255.255.128
  VPN instance   : --

  -----------------------------------------------------------------------
  Pool-name      : 2
  Pool-No        : 1
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.128.1   
  Mask           : 255.255.255.128
  VPN instance   : --


  IP address Statistic
    Total       :250   
    Used        :0          Idle        :250   
    Expired     :0          Conflict    :0          Disable   :0     
[Huawei]inter	
[Huawei]interface g	
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-GigabitEthernet0/0/1]q
<Huawei>dis i poo 
  -----------------------------------------------------------------------
  Pool-name      : 1
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.1.1     
  Mask           : 255.255.255.128
  VPN instance   : --

  -----------------------------------------------------------------------
  Pool-name      : 2
  Pool-No        : 1
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.128.1   
  Mask           : 255.255.255.128
  VPN instance   : --


  IP address Statistic
    Total       :250   
    Used        :4          Idle        :246   
    Expired     :0          Conflict    :0          Disable   :0   
3.结果全网可达:四个电脑ping网关
pc1
```bash
ping 192.168.1.1

Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
From 192.168.1.1: bytes=32 seq=1 ttl=255 time=31 ms
From 192.168.1.1: bytes=32 seq=2 ttl=255 time=47 ms
From 192.168.1.1: bytes=32 seq=3 ttl=255 time=31 ms
From 192.168.1.1: bytes=32 seq=4 ttl=255 time=31 ms
From 192.168.1.1: bytes=32 seq=5 ttl=255 time=32 ms

--- 192.168.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 31/34/47 ms

pc2

ping 192.168.1.1

Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
From 192.168.1.1: bytes=32 seq=1 ttl=255 time=31 ms
From 192.168.1.1: bytes=32 seq=2 ttl=255 time=32 ms
From 192.168.1.1: bytes=32 seq=3 ttl=255 time=31 ms
From 192.168.1.1: bytes=32 seq=4 ttl=255 time=47 ms
From 192.168.1.1: bytes=32 seq=5 ttl=255 time=31 ms

--- 192.168.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 31/34/47 ms

pc3在这里插入代码片

ping 192.168.128.1

Ping 192.168.128.1: 32 data bytes, Press Ctrl_C to break
From 192.168.128.1: bytes=32 seq=1 ttl=255 time=31 ms
From 192.168.128.1: bytes=32 seq=2 ttl=255 time=32 ms
From 192.168.128.1: bytes=32 seq=3 ttl=255 time=47 ms
From 192.168.128.1: bytes=32 seq=4 ttl=255 time=31 ms
From 192.168.128.1: bytes=32 seq=5 ttl=255 time=15 ms

--- 192.168.128.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 15/31/47 ms

pc4

ping 192.168.128.1

Ping 192.168.128.1: 32 data bytes, Press Ctrl_C to break
From 192.168.128.1: bytes=32 seq=1 ttl=255 time=31 ms
From 192.168.128.1: bytes=32 seq=2 ttl=255 time=32 ms
From 192.168.128.1: bytes=32 seq=3 ttl=255 time=47 ms
From 192.168.128.1: bytes=32 seq=4 ttl=255 time=31 ms
From 192.168.128.1: bytes=32 seq=5 ttl=255 time=15 ms

--- 192.168.128.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 15/31/47 ms
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值