目录

DHCP

案例

拓扑

配置过程

PC1、PC2

acsw

coresw

检验

ACL

案例

拓扑​

具体配置过程

PC  Server

AR1

AR2

验证


DHCP

案例

目的: 对交换机配置DHCP,实现PC自动获取IP地址。

设备概述: 设置两个vlan,分别为vlan10 和 vlan 20。然后将两个PC分别划分到两个vlan里。设置两个交换机S5700,分别为辅助交换机(acsw)和核心交换机(coresw)。

拓扑

配置过程

PC1、PC2一样:

acsw:

<Huawei>system-view //进入系统视图
[Huawei]undo info-center enable // 关闭日志通知
[Huawei]sysname acsw  //命名为acsw
[acsw]vlan batch 10 20 //批量创建vlan
[acsw] interface gigabitethernet0/0/1 // 或者 [acsw]int g0/0/1  //命令直接简写
[acsw-GigabitEthernet0/0/1]port link-type access // 配置acsw与PC1连接方式为access
[acsw-GigabitEthernet0/0/1]port default vlan 10 // 默认vlan为vlan 10
[acsw-GigabitEthernet0/0/1]quit
[acsw]interface gigabitethernet0/0/2
[acsw-GigabitEthernet0/0/2]port link-type access
[acsw-GigabitEthernet0/0/2]port default vlan 20
[acsw-GigabitEthernet0/0/2]quit
[acsw]interface gigabitethernet0/0/3
[acsw-GigabitEthernet0/0/3]port link-type trunk 
[acsw-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[acsw-GigabitEthernet0/0/3]q

coresw:

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname coresw
[coresw]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[coresw]int g0/0/1
[coresw-GigabitEthernet0/0/1]port link-type trunk
[coresw-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[coresw-GigabitEthernet0/0/1]q
[coresw]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[coresw]ip pool vlan10
Info:It's successful to create an IP address pool.
[coresw-ip-pool-vlan10]?
ip-pool view commands:
  configuration        Configuration interlock
  display              Display current system information
  dns-list             Configure DNS servers
  domain-name          Configure domain name 
  excluded-ip-address  Mark disable IP addresses 
  gateway-list         Configure the gateway
  lease                Configure the lease of the IP pool
  lock                 Lock the IP pool
  mtrace               Trace route to multicast source
  nbns-list            Configure the windows's netbios name servers 
  netbios-type         Netbios node type
  network              Add a network
  next-server          The address of the server to use in the next step of the
                       client's bootstrap process.
  option               Configure the DHCP options
  option121            DHCP option 121 
  option184            DHCP option 184
  ping                 Send echo messages
  quit                 Exit from current command view
  reset                Reset operation
  return               Exit to user view
  screen-width         Set screen width
  set                  Set
  stack                Stack 
  static-bind          Static bind
  test-aaa             Accounts test

[coresw-ip-pool-vlan10]network 192.168.10.0 mask 24 
[coresw-ip-pool-vlan10]gateway-list 192.168.10.254 // 设置vlan10的网关
[coresw-ip-pool-vlan10]excluded-ip-address 192.168.10.150 192.168.10.200 // 设置不用于分配的IP范围
[coresw-ip-pool-vlan10]lease day 3 // 也可以同时设置 hour、minute
[coresw-ip-pool-vlan10]dns-list 8.8.8.8
[coresw-ip-pool-vlan10]q
[coresw]interface vlanif 10
[coresw-Vlanif10]ip address 192.168.10.254 24
[coresw-Vlanif10]q
[coresw]interface vlanif 20
[coresw-Vlanif20]ip address 192.168.20.254 24
[coresw-Vlanif20]q
[coresw]ip pool vlan20
Info:It's successful to create an IP address pool.
[coresw-ip-pool-vlan20]network 192.168.20.0 mask 255.255.255.0
[coresw-ip-pool-vlan20]gateway-list 192.168.20.254
[coresw-ip-pool-vlan20]dns-list 8.8.8.8
[coresw-ip-pool-vlan20]excluded-ip-address 192.168.20.150 192.168.20.200
[coresw-ip-pool-vlan20]lease day 0 hour 23
[coresw-ip-pool-vlan20]quit
[coresw]int vlanif10
[coresw-Vlanif10]dhcp select global  // 选择全局地址池
[coresw-Vlanif10]q
[coresw]int vlanif20
[coresw-Vlanif20]dhcp select global
[coresw-Vlanif20]

检验

DHCP默认将最大的可分配IP分配给当前主机:192.168.10.253

ACL

案例

要求:

设备概述:

设置两台PC,分别属于不同子网,要求PC1所在子网不得访问服务器,PC2所在子网可以访问服务器。同时外界网络无法访问服务器。设置一台服务器。设置两台路由器AR2220。其中AR2220端口不够的可以自行添加:

拓扑

具体配置过程

PC  Server

 

AR1

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]undo info-center enable
Info: Information center is disabled.
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.2.254 24
[AR1-GigabitEthernet0/0/0]q
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip address 192.168.3.254 24
[AR1-GigabitEthernet0/0/1]q
[AR1]int g2/0/0
[AR1-GigabitEthernet2/0/0]ip address 10.10.10.1 24
[AR1-GigabitEthernet2/0/0]q
[AR1]acl 3000
[AR1-acl-adv-3000]rule 10 deny ip source 192.168.2.0 0.0.0.255 destination 192.1
68.4.4 0
[AR1-acl-adv-3000]rule 20 permit ip source 192.168.3.0 0.0.0.255 destination
 192.168.4.4 0
[AR1-acl-adv-3000]rule 30 deny ip source any destination 192.168.4.4 0
[AR1-acl-adv-3000]q
[AR1]int g0/0/2
[AR1-GigabitEthernet0/0/2]ip address 192.168.4.254 24
[AR1-GigabitEthernet0/0/2]traffic-filter outbound acl 3000
[AR1-GigabitEthernet0/0/2]q
[AR1]display acl all
 Total quantity of nonempty ACL number is 1

Advanced ACL 3000, 3 rules
Acl's step is 5
 rule 10 deny ip source 192.168.2.0 0.0.0.255 destination 192.168.4.4 0 
 rule 20 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.4.4 0 
 rule 30 deny ip destination 192.168.4.4 0

AR2

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname AR2
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip address 10.10.10.2 24
[AR2-GigabitEthernet0/0/0]q
[AR2]

验证

ENSP路由交换机配置相关推荐

  1. 华三1822-24路由交换机配置例子

    华三1822-24路由交换机配置例子 # sysname Quidway # super password level 3 cipher xxxxxxx # FTP server enable # w ...

  2. ENSP综合配置 实例十二 实战

    ENSP综合配置 期末究极综合配置 配置lanzouyun自取 太长了,博主比较懒 https://jiangxxx.lanzoui.com/iuudUdtiqij 密码:1234

  3. 华为 eNSP 模拟器配置动态路由(ospf)

    华为 eNSP 模拟器配置动态路由 (ospf) 文章目录 一.实验步骤 1.配置主机 2.配置路由信息 3.相关命令 4.实验资料 一.实验步骤 配置两台主机的ip地址信息 配置路由的ip信息 启动 ...

  4. 计算机网络实验-eNSP路由器配置

    计算机网络实验-eNSP路由器配置 文章目录 计算机网络实验-eNSP路由器配置 1.实验图配置 2.PC机ip地址.网关.子网掩码配置 3.全选,开启设备 设置ip地址 5.同理,对路由器AR2进行 ...

  5. 教你使用华为Ensp模拟器配置OSPF路由协议(二)

    文章目录 前言 一. OSPF的基本原理 1.1 OSPF区域化结构 1.2 OSPF报文类型 1.3 多区域OSPF网络 二. OSPF多区域配置示例 三.精彩链接 四.最后 前言 与RIP协议一样 ...

  6. 华为ensp模拟器配置无线网络

    华为ensp模拟器配置无线网络 1.拓扑图 其中的两个圈圈信号圈,得完成后使用STA连接ssid才会出现 2.cloud1配置 3.LSW2配置 sys [Huawei]sysname SW2 [SW ...

  7. 华为 eNSP 模拟器配置动态路由(RIP)

    华为 eNSP 模拟器配置动态路由 RIP 文章目录 一.实验步骤 1.配置主机 2.配置路由信息 3.配置路由(启动RIP协议) 4.测试 5.相关命令 6.实验资料 一.实验步骤 配置两台主机的i ...

  8. 教你使用华为Ensp模拟器配置RIP路由协议

    有理想,有抱负,相信在不久的将来你会成功的! 打开微信搜索[孩子上学后],关注这个不一样的程序员. 目录 一.RIP路由 1.1 RIP路由基础 1.2 根据距离向量确定路由 1.3 RIP的优缺点 ...

  9. ensp华为配置NAT

    ensp华为配置NAT 文章目录 ensp华为配置NAT 1 对PC进行地址.掩码及网关配置 2 对路由器进行初始配置 3 ART配置 3.1 静态NAT配置 3.2 动态NAT配置 3.3 端口NA ...

  10. 用华为eNSP模拟器配置Hybrid、Trunk和Access三种链路类型端口

    上一篇文章写到三层交换机实现多个VLAN之间互相通讯,有朋友提问要如何进行配置,可有案例分析.其实那天我在写的时候也有做过模拟,只是后来没有保存.今天重新模拟一次,并附上详细配置命令,希望能够帮助到大 ...

最新文章

  1. Oracle JDBC连接服务名、SID和tnsnames.ora配置的多种方式
  2. oauth2 单点登录_Spring Security Oauth2和Spring Boot实现单点登录
  3. php 列出当前目录
  4. Shiro结合Redis解决集群中session同步问题
  5. numpy 深复制 切片创建视图
  6. PuTTY 设置Serial(ubuntu)
  7. 互联网1分钟 | 0124 抖音社交产品“多闪”登顶苹果商店总排行榜;王欣或将推出新社交产品丸子视频...
  8. asp.net ajax1.0基础回顾(六):调用ASPX页面方法
  9. AptanaStudio3+PHP程序远程调试的方法和步骤
  10. via浏览器简洁主页html源码 支持搜索提示
  11. MCGS 无限配方数据存储及U盘导入导出-第二集
  12. css样式的百分比都相对于谁?
  13. 电子设计教程19:晶体管负反馈放大电路的原理设计
  14. android版本和基带版本号,安卓手机基带是什么意思?基带版本之间有什么区别?...
  15. 做时间的朋友,必须知道收益咋算
  16. 大数据基础数据之中国法定节假日API
  17. React 报错 Too many re-renders. React limits the number of renders to prevent an infini
  18. UUIDUtil获取八位UUID
  19. 使用Heartbeat实现双机热备
  20. 【实用】Visio制作坐标轴

热门文章

  1. CAD快捷键命令大全
  2. lqr算法 c语言,LQR最优控制原理介绍
  3. 电脑键盘部分按键失灵_键盘按键失灵别担心 电脑达人教你几步解决方法
  4. Maix_Bit官方烧录软件和IDE的使用
  5. Linux 并发测试工具 httpd-tools工具的安装和使用
  6. 海康萤石云硬盘录像机SDK使用
  7. mysql .pem 文件_对于https ssl中的pem文件和key 文件的理解
  8. Excel金额大小写转换公式
  9. 线性系统理论(不断更新中)
  10. DBSCAN聚类算法的实现