当前位置:首页 » 《随便一记》 » 正文

juniper(接入层配置二)-基本命令学习

7 人参与  2022年12月17日 15:37  分类 : 《随便一记》  评论

点击全文阅读


1. 设置root用户密码

set system root-authentication plain-text-password
New password:
Retype new password:

2. 添加系统用户

set system login user admin uid 2000     #设置用户名喂admin的id为2000
set system login user admin class super-user     #设置admin用户为超级用户
set system login user admin authentication plain-text-password     #设置admin用户密码

3. 设置主机名

set system host-name jieru_sw      

4. 开启系统telnet服务

set system services telnet 

5. 开启ftp服务

set system services ftp 

6. 配置snmp

set snmp description snmp_des        #snmp描述
set snmp contact xxx        #snmp的联系信息
set snmp engine-id local 2222        #snmp v3 engine id信息
set snmp community community_name authorization read-write        #设置snmp字符串
set snmp trap-options source-address 192.168.1.1        #设置snmp trap的原地址192.168.1.1

7. 配置物理端口参数

7.1 配置端口描述

set interfaces ge-0/0/0 description description 

7.2 配置端口mtu

set interfaces ge-0/0/0 mtu 1500 

7.3 配置端口速率

set interfaces ge-0/0/0 speed 1g 

7.4 配置端口双工

set interfaces ge-0/0/0 link-mode full-duplex 

7.5 配置端口自动协商

interface ge-0/0/0 ether-options (auto-negotiation |no-auto-negotiation )        #这个测不出来

7.6 关闭端口

set interfaces ge-0/0/0 disable 

7.7 配置物理端口的二层接口

set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access

7.8 配置物理端口的三层接口

set interfaces ge-0/0/0 unit 0 family inet address 10.0.1.1/24

8. 配置VLAN

8.1 创建二层vlan

set vlans vlan100 vlan-id 100 

8.2 创建三层vlan

set vlans vlan200 description thisisvlan200
set vlans vlan200 vlan-id 200
set vlans vlan200 l3-interface irb.200
set interfaces vlan unit 200 family inet address 172.16.1.2/24

8.3 接口划入vlan

set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members 100

8.4 配置vlan trunk

set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members all

8.5 配置native-vlan-id

set interfaces ge-0/0/2 unit 0 family ethernet-switching native-vlan-id purple        #EX在trunk端口下支持native-vlan(拆标签vlan)的配置

8.6 静态路由协议

set routing-options static route 0.0.0.0/0 next-hop 10.0.1.1

8.7 DHCP配置

set system services dhcp name-server 8.8.8.8        #主DNS
set system services dhcp name-server 114.114.114.114        #备DNS
set system services dhcp pool 10.10.10.0/24 address-range low 10.10.10.10        #地址池范围
set system services dhcp pool 10.10.10.0/24 address-range high 10.10.10.254
set system services dhcp pool 10.10.10.0/24 router 10.10.10.1        #地址池网关,同时也代表绑定网关所在vlan
set interfaces vlan unit 200 family inet address 10.10.10.1/24        #配置vlan地址
set vlans vlan200 vlan-id 200        #创建vlan
set vlans vlan200 l3-interface irb.200        #添加三层vlan接口

9 维护常用命令

9.1 查看硬件运行信息

show chassis routing-engine

9.2 查看arp表

show arp 

9.3 查看vlan信息

show vlans 
show vlans 100

9.4 查看接口

show interfaces terse

9.5 查看vlan流量

show interfaces vlan.100 

9.6 查看接口流量

show interfaces ge-0/0/2 


点击全文阅读


本文链接:http://zhangshiyu.com/post/49939.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1