架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 9629|回复: 0

[路由器] Juniper telnet防火墙基本命令

[复制链接]
发表于 2017-5-5 10:13:40 | 显示全部楼层 |阅读模式

常用查看命令 Get int

查看接口配置信息 Get int ethx/x

查看指定接口配置信息  Get mip
查看映射ip关系  Get route
查看路由表  Get policy id x
查看指定策略 Get nsrp
查看nsrp信息,后可接参数查看具体vsd组、端口监控设置等
Get per cpu de

查看cpu利用率信息   Get per session de

查看每秒新建会话信息 Get session

查看当前会话信息,后可匹配源地址、源端口、目的地址、目的端口、协议等选项
 Get session info
查看当前会话数量   Get system

查看系统信息,包括当前os版本,接口信息,设备运行时间等
Get chaiss

查看设备及板卡序列号,查看设备运行温度

Get counter stat

查看所有接口计数信息
Get counter stat ethx/x

查看指定接口计数信息
Get counter flow zone trust/untrust

查看指定区域数据流信息
Get counter screen zone untrust/trust
查看指定区域攻击防护统计信息
Get tech-support

查看设备状态命令集,一般在出现故障时,收集该信息寻求JTAC支持
常用设置命令Set int ethx/x zone trust/untrust/dmz/ha

配置指定接口进入指定区域(trust/untrust/dmz/ha等)
Set int ethx/x ip x.x.x.x/xx

配置指定接口ip地址  Set int ethx/x manage
配置指定接口管理选项,打开所有管理选项
Set int ethx/x manage web/telnet/ssl/ssh

配置指定接口指定管理选项
Set int ethx/x phy full 100mb

配置指定接口速率及双工方式
Set int ethx/x phy link-down

配置指定接口shutdown
Set nsrp vsd id 0 monitor interface ethx/x

配置ha监控端口,如此端口断开,则设备发生主/备切换
Exec nsrp vsd 0 mode backup

手工进行设备主/备切换,在当前的主设备上执行
set route 0.0.0.0/0 interface ethernet1/3 gateway 222.92.116.33

配置路由,需同时指定下一跳接口及ip地址
所有set命令,都可以通过unset命令来取消,相当于cisco中的no
所有命令都可以通过“TAB”键进行命令补全,通过“?”来查看后续支持的命令

防火墙基本配置

create account [admin | user] <username>   回车

输入密码:

再次输入密码:

configure account admin 回车

输入密码:

再次输入密码:

2.port配置

config ports <portlist> auto off {speed [10 | 100 | 1000]} duplex [half | full] auto off

3.Vlan配置

无论是核心还是接入层,都要先创建三个Vlan,并且将所有归于Default Vlan的端口删除:

config vlan default del port all

create vlan Server

create vlan User

create vlan Manger

定义802.1q标记

config vlan Server tag 10

config vlan User tag 20

config vlan Manger tag 30

设定Vlan网关地址:

config vlan Server ipa 192.168.41.1/24

config vlan User ipa 192.168.40.1/24

config vlan Manger ipa 192.168.*.*/24

Enable ipforwarding 启用ip路由转发,即vlan间路由

Trunk 配置

config vlan Server add port 1-3 t

config vlan User add port 1-3 t

config vlan manger add port 1-3 t

4.VRRP配置

enable vrrp

configure vrrp add vlan UserVlan

configure vrrp vlan UserVlan add master vrid 10 192.168.6.254

configure vrrp vlan UserVlan authentication simple-password extreme

configure vrrp vlan UserVlan vrid 10 priority 200

configure vrrp vlan UserVlan vrid 10 advertisement-interval 15

configure vrrp vlan UserVlan vrid 10 preempt

5.端口镜像配置

首先将端口从VLAN中删除

enable mirroring to port 3 #选择3作为镜像口

config mirroring add port 1 #把端口1的流量发送到3

config mirroring add port 1 vlan default #把1和vlan default的流量都发送到3

6.port-channel配置

enable sharing <port> grouping <portlist> {port-based | address-based | round-robin}

show port sharing //查看配置

7.stp配置

enable stpd //启动生成树

create stpd stp-name //创建一个生成树

configure stpd <spanning tree name> add vlan <vlan name> {ports <portlist> [dot1d | emistp | pvst-plus]}

configure stpd stpd1 priority 16384

configure vlan marketing add ports 2-3 stpd stpd1 emistp

8.DHCP 中继配置

enable bootprelay

config bootprelay add <dhcp server ip>

9.NAT配置

Enable nat #启用nat

Static NAT Rule Example

config nat add out_vlan_1 map source 192.168.1.12/32 to 216.52.8.32/32

Dynamic NAT Rule Example

config nat add out_vlan_1 map source 192.168.1.0/24 to 216.52.8.1 - 216.52.8.31

Portmap NAT Rule Example

config nat add out_vlan_2 map source 192.168.2.0/25 to 216.52.8.32 /28 both portmap

Portmap Min-Max Example

config nat add out_vlan_2 map source 192.168.2.128/25 to 216.52.8.64/28 tcp portmap 1024 - 8192



10.OSPF配置

enable ospf 启用OSPF进程

create ospf area <area identifier> 创建OSPF区域

configure ospf routerid [automatic | <routerid>] 配置Routerid

configure ospf add vlan [<vlan name> | all] area <area identifier> {passive} 把某个vlan加到某个Area中去,相当于Cisco中的

network的作用

configure ospf area <area identifier> add range <ipaddress> <mask> [advertise | noadvertise] {type-3 | type-7} 把某个网段加到

某个Area中去,相当于Cisco中的network的作用

configure ospf vlan <vlan name> neighbor add <ipaddress>

OSPF中路由重发布配置

enable ospf export direct [cost <metric> [ase-type-1 | ase-type-2] {tag <number>} | <route map>]

enable ospf export static [cost <metric> [ase-type-1 | ase-type-2] {tag <number>} | <route map>]

enable ospf originate-default {always} cost <metric> [ase-type-1 | ase-type-2] {tag <number>}

enable ospf originate-router-id

11.SNMP配置

enable snmp access

enable snmp traps

create access-profile <access profile> type [ipaddress | vlan]

config snmp access-profile readonly [<access_profile> | none]配置snmp的只读访问列表,none是去除

config snmp access-profile readwrite [<access_profile> | none] 这是控制读写控制

config snmp add trapreceiver <ip address> {port <udp_port>} community <communitystring> {from <source ip address>} 配置snmp接

收host和团体字符串

12.安全配置

disable ip-option loose-source-route

disable ip-option strict-source-route

disable ip-option record-route

disable ip-option record-timestamp

disable ipforwarding broadcast

disable udp-echo-server

disable irdp vlan <vlan name>

disable icmp redirect

disable web 关闭web方式访问交换机

enable cpu-dos-protect

13.Access-Lists配置

create access-list icmp destination source

create access-list ip destination source ports

create access-list tcp destination source ports

create access-list udp destination source ports



14.默认路由配置

config iproute add default <gateway>

15.恢复出厂值,但不包括用户改的时间和用户帐号信息

unconfig switch {all}



16.检查配置

show version

show config

show session

show management 查看管理信息,以及snmp信息

show banner

show ports configuration

show ports utilization ?

show memory/show cpu-monitoring

show ospf

show access-list {<name> | port <portlist>}

show access-list-monitor

show ospf area <area identifier>

show ospf area detail

show ospf ase-summary

show ospf interfaces {vlan <vlan name> | area <area identifier>}

unconfigure ospf {vlan <vlan name> | area <area identifier>}



switch

show switch

show config

show diag

show iparp

show iproute

show ipstat

show log

show tech all

show version detail

17.备份和升级软件

download image [<hostname> | <ipaddress>] <filename> {primary | secondary}

upload image [<hostname> | <ipaddress>] <filename> {primary | secondary}

use image [primary | secondary]

18.密码恢复。

Extreme交换机在你丢失或忘记密码后,需要重新启动交换机,常按空格键,进入Bootrom模式,输入“h”,

选择“d: Force Factory default configuration”清除配置文件,最后选择“f: Boot on board flash”

重新启动后密码会被清除掉。注意:恢复密码后,以前的配置文件将会被清空。

对于extreme x450e-48p 进入bootrom 后 输入h,然后boot 1 回车即可

19.switch licese 的添加:

enable   licese   xxxx-xxxx-xxxx-xxxx-xxxx

会提示添加成功,显示Advanced Edge为成功

HN-HUAIHUA-ANQUAN-LS1.33 # show licenses

Enabled License Level:

       Advanced Edge

Enabled Feature Packs:

            None

步骤:a,HN-HUAIHUA-ANQUAN-LS1.34 # show version

Switch : 800190-00-04 0804G-80211 Rev 4.0 BootROM: 1.0.2.2 IMG: 11.6.1.9

XGM2-1 :

Image : ExtremeXOS version 11.6.1.9 v1161b9 by release-manager

      on Wed Nov 29 22:40:47 PST 2006

BootROM : 1.0.2.2

其中 0804G-80211 为交换机的serial number

b然后在装有licese的信封里找到voucher serial number

c根据这两个serial number 在指定网站上查找liceses 的key 共16位,

d然后 enable   licese 输入key值即可





上一篇:vs2017 关于DCOM 遇到错误“依存服务或组无法启动。 ”,试图以参数“”启动服务 B...
下一篇:Juniper 路由器漏洞后门
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2024-4-19 13:10

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表