华为企业组网实例:总部与子公司之间的组网实例

在这里插入图片描述

一、SW-hexin交换机的配置

vlan batch 10 20 30 99

int g0/0/1
port link-type access 
port default vlan 10
q

int g0/0/2
port link-type access 
port default vlan 20
q

int g0/0/3
port link-type access 
port default vlan 30
q

int g0/0/24
port link-type access 
port default vlan 99
q

VLAN配置IP

interface Vlanif10   
ip address 10.5.11.254 24
q

interface Vlanif20
 ip address 10.5.12.254 24
q
 
interface Vlanif30
 ip address 10.5.13.254 24
q
 
interface Vlanif99
ip address 10.5.14.2 255.255.255.0
q

检查结果

[sw-hexin]dis ip in b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 1
The number of interface that is DOWN in Physical is 6
The number of interface that is UP in Protocol is 1
The number of interface that is DOWN in Protocol is 6

Interface                         IP Address/Mask      Physical   Protocol  
MEth0/0/1                         unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Vlanif1                           unassigned           down       down      
Vlanif10                          10.5.11.254/24       down       down      
Vlanif20                          10.5.12.254/24       down       down      
Vlanif30                          10.5.13.254/24       down       down      
Vlanif99                          10.5.14.2/24         down       down      
[sw-hexin]

二、purui-route路由器配置

开启DHCP

dhcp enable                 #全局模式下开启DHCP
int g0/0/0
ip add 10.5.14.1 24
dhcp select global        #此接口选择全局的地址池给DHCP客户端使用
q

加入回执路由

ip route-static 10.5.11.0 255.255.255.0 10.5.14.2
ip route-static 10.5.12.0 255.255.255.0 10.5.14.2
ip route-static 10.5.13.0 255.255.255.0 10.5.14.2

或者可以直接写一条

ip route-static 10.5.0.0 16 10.5.14.2

创建各个vlan的地址池

ip pool vlan10
 gateway-list 10.5.11.254
 network 10.5.11.0 mask 255.255.255.0 
 dns-list 114.114.114.114
q

ip pool vlan20
 gateway-list 10.5.12.254 
 network 10.5.12.0 mask 255.255.255.0 
 dns-list 114.114.114.114
q

ip pool vlan30
 gateway-list 10.5.13.254 
 network 10.5.13.0 mask 255.255.255.0 
 dns-list 114.114.114.114
q

ip pool vlan99
 gateway-list 10.5.14.254 
 network 10.5.14.0 mask 255.255.255.0 
 dns-list 114.114.114.114
q

检查结果

[pr-route]dis ip pool 
  -----------------------------------------------------------------------
  Pool-name      : vlan10
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 10.5.11.254     
  Mask           : 255.255.255.0
  VPN instance   : --

  -----------------------------------------------------------------------
  Pool-name      : vlan20
  Pool-No        : 1
  Position       : Local           Status           : Unlocked
  Gateway-0      : 10.5.12.254     
  Mask           : 255.255.255.0
  VPN instance   : --

  -----------------------------------------------------------------------
  Pool-name      : vlan30
  Pool-No        : 2
  Position       : Local           Status           : Unlocked
  Gateway-0      : 10.5.13.254     
  Mask           : 255.255.255.0
  VPN instance   : --
-----------------------------------------------------------------------
  Pool-name      : vlan99
  Pool-No        : 3
  Position       : Local           Status           : Unlocked
  Gateway-0      : 10.5.14.254     
  Mask           : 255.255.255.0
  VPN instance   : --


  IP address Statistic
    Total       :1012  
    Used        :0          Idle        :1012  
    Expired     :0          Conflict    :0          Disable   :0     
[pr-route]

三、配置DHCP中继

sw-hexin上配置

dhcp enable

interface Vlanif10
dhcp select relay
dhcp relay server-ip 10.5.14.1
q

interface Vlanif20
dhcp select relay
dhcp relay server-ip 10.5.14.1
q

interface Vlanif30
dhcp select relay
dhcp relay server-ip 10.5.14.1
q

interface Vlanif99
dhcp select relay
dhcp relay server-ip 10.5.14.1
q

检查中继

interface Vlanif10
 ip address 10.5.11.254 255.255.255.0
 dhcp select relay
 dhcp relay server-ip 10.5.14.1
 
 interface Vlanif20
 ip address 10.5.12.254 255.255.255.0
 dhcp select relay
 dhcp relay server-ip 10.5.14.1
 
 interface Vlanif30
 ip address 10.5.13.254 255.255.255.0
 dhcp select relay
 dhcp relay server-ip 10.5.14.1

四、保留部分IP地址

purui-route上配置

ip pool vlan10
excluded-ip-address 10.5.11.200 10.5.11.253
q

ip pool vlan20
excluded-ip-address 10.5.12.200 10.5.12.253
q

ip pool vlan30
excluded-ip-address 10.5.13.200 10.5.13.253
q

五、客户端测试

这里需要注意的是一定要选dhcp,然后点击应用。

六、配置外网

purui-route 加路由

ip route-static 0.0.0.0 0 20.1.1.2

jituan-route加路由

ip route-static 0.0.0.0 0 24 30.1.1.2

使得两个公网IP互通

七、配置GRE隧道

purui-route

[pr-route]interface Tunnel 0/0/1             #新建隧道
[pr-route-Tunnel0/0/1]description to_jituan	 #隧道描述
[pr-route-Tunnel0/0/1]tunnel-protocol gre	 #隧道协议
[pr-route-Tunnel0/0/1]source 20.1.1.1#源地址
[pr-route-Tunnel0/0/1]destination 30.1.1.1   #目标地址
[pr-route-Tunnel0/0/1]ip add 50.1.1.1 24     #给隧道配置地址

jituan-route

[jituan-route]interface Tunnel 0/0/0
[jituan-route-Tunnel0/0/0]description to_purui	
[jituan-route-Tunnel0/0/0]tunnel-protocol gre 
[jituan-route-Tunnel0/0/0]source 30.1.1.1
[jituan-route-Tunnel0/0/0]destination 20.1.1.1
[jituan-route-Tunnel0/0/0]ip add 50.1.1.2 24

八、给隧道配置静态路由

purui-route 加路由

ip route-static 192.168.0.0 24 50.1.1.2

jituan-route加路由

ip route-static 10.5.0.0 16 50.1.1.1
  • 0
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
华为企业网络模拟平台(ENSP)是华为公司开发的一款网络设备模拟软件,用于帮助用户进行网络设备的组网实例。通过ENSP,用户可以模拟并配置华为设备,进行网络拓扑的搭建和各种网络应用的测试。 用户可以使用ENSP实现各种网络场景,如局域网(LAN)和广域网(WAN)的建立,多个子网之间的通信,静态路由和动态路由的配置等。ENSP提供了丰富的华为设备模板,用户可以根据自己的需求选择不同型号的设备进行模拟和配置。 在ENSP中,用户可以通过拖拽的方式将设备放置在工作区中,并通过连接线将设备进行连线。通过设备的属性配置,用户可以设置设备的IP地址、子网掩码、MAC地址等参数,也可以进行路由协议的配置。在网络拓扑搭建完成后,用户可以进行网络连接的测试,检验网络的通信能力。 在ENSP中,用户还可以进行网络故障的模拟和排除。如配置不正确的IP地址、配置故障的路由,通过ENSP可以模拟并观察网络故障对整个网络的影响,帮助用户更好地了解网络运行状态并进行故障排除。 总的来说,ENSP是一款功能强大的网络设备模拟软件,可以帮助用户进行华为设备的组网实例,实现网络拓扑的搭建和各种网络应用的测试。它提供了丰富的设备模板和配置选项,能够满足用户对于网络建设和故障排除的需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值