内容发布更新时间 : 2024/11/15 18:21:40星期一 下面是文章的全部内容请认真阅读。
JuniperEX3200/4200交换机
命令行配置手册
目 录
1
交换机基础知识 ........................................................................................................................................... 6 1.1 认识JUNIPER交换机 ............................................................................................................................................ 6 1.2 JUNOS操作系统基础 ........................................................................................................................................... 9 1.2.1 交换机配置模式 ......................................................................................................................................... 9 1.2.2 交换机配置结构 ....................................................................................................................................... 10 1.2.3 TAB和空格键的使用 ................................................................................................................................ 15 1.2.4 用户模式和配置模式show的区别 ......................................................................................................... 16 1.2.5 如何将配置转换成set命令 .................................................................................................................... 20 1.2.6 commit和rollback .................................................................................................................................... 21 1.3 EX交换机命令菜单结构 .................................................................................................................................. 23 2
操作指导 .................................................................................................................................................... 36 2.1 通过CONSOLE线连接交换机 ............................................................................................................................. 36 2.2 SYSTEM系统参数配置 ........................................................................................................................................ 37 2.2.1 设置root密码 .......................................................................................................................................... 38 2.2.2 设置主机名 ............................................................................................................................................... 38 2.2.3 设置DNS服务器 ...................................................................................................................................... 38 2.2.4 设置日期时间 ........................................................................................................................................... 38 2.2.5 设置NTP服务器....................................................................................................................................... 39 2.2.6 开启远程Telnet登陆服务 ....................................................................................................................... 39 2.2.7 开启远程Ftp服务 .................................................................................................................................... 40 2.2.8 开启远程ssh登陆 .................................................................................................................................... 40 2.2.9 开启远程http登陆服务 .......................................................................................................................... 40 2.2.10 添加/删除用户 ........................................................................................................................................ 41
2.2.10.1 添加用户 .......................................................................................................................................................... 41 2.2.10.2 修改用户类别 .................................................................................................................................................. 41 2.2.10.3 修改用户密码 .................................................................................................................................................. 42 2.2.10.4 删除用户 .......................................................................................................................................................... 42
2.2.11 用户权限设置 ......................................................................................................................................... 42 2.3 VLAN配置 ......................................................................................................................................................... 44 2.3.1 VLAN配置步骤 ......................................................................................................................................... 44 2.3.2 VLAN配置规范要求 ................................................................................................................................. 45 2.3.3 添加VLAN ................................................................................................................................................. 45 2.3.4 修改端口VLAN ......................................................................................................................................... 47
2
2.3.5 删除VLAN ................................................................................................................................................. 48 2.3.6 配置VLAN网关IP .................................................................................................................................... 48 2.4 TRUNK配置 ......................................................................................................................................................... 49 2.4.1 Trunk配置步骤 ......................................................................................................................................... 49 2.4.2 如何设置Trunk ......................................................................................................................................... 49 2.4.3 允许/禁止VLAN通过Trunk ..................................................................................................................... 49 2.5 端口配置 ........................................................................................................................................................... 49 2.5.1 端口配置规范要求 ................................................................................................................................... 50 2.5.2 修改端口速率 ........................................................................................................................................... 50 2.5.3 修改端口工作模式 ................................................................................................................................... 50 2.5.4 修改端口为L3模式 ................................................................................................................................. 51 2.5.5 修改端口为L2模式 ................................................................................................................................. 51 2.6 生成树配置 ....................................................................................................................................................... 51 2.6.1 STP配置实例 ............................................................................................................................................ 52 2.6.2 RSTP配置实例 .......................................................................................................................................... 53 2.6.3 MSTP配置实例 ......................................................................................................................................... 59 2.7 端口捆绑 ........................................................................................................................................................... 64 2.7.1 端口捆绑步骤 ........................................................................................................................................... 65 2.7.2 L2端口捆绑 .............................................................................................................................................. 65 2.7.3 L3端口捆绑 .............................................................................................................................................. 66 2.8 ECMP负载均衡配置......................................................................................................................................... 66 2.9 路由协议配置 ................................................................................................................................................... 68 2.9.1 静态路由配置 ........................................................................................................................................... 68
2.9.1.1 添加静态路由 ..................................................................................................................................................... 68 2.9.1.2 删除静态路由 ..................................................................................................................................................... 68 2.9.1.3 调整静态路由优先值 ......................................................................................................................................... 68 2.9.1.4 设置备份静态路由 ............................................................................................................................................. 69 2.9.1.5 指定静态路由下一跳端口 ................................................................................................................................. 69
2.9.2 OSPF配置 .................................................................................................................................................. 69
2.9.2.1 OSPF配置步骤 .................................................................................................................................................. 69 2.9.2.2 OSPF配置实例 .................................................................................................................................................. 74 2.9.2.3 OSPF路由过滤 .................................................................................................................................................. 76
2.10 端口镜像 ......................................................................................................................................................... 77 2.10.1 端口输入输出流量镜像 ......................................................................................................................... 78
3