Juniper基础配置命令
juniper之常用命令
OSPF中路由重发布配置
enable ospf export direct [cost <metric> [ase-type-1 | ase-type-2] {tag <number>} | <route map>]
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
13.Access-Lists配置
create access-list icmp destination source
create access-list ip destination source ports
create access-list tcp destination source ports
6.port-channel配置
enable sharing <port> grouping <portlist> {port-based | address-based | round-robin}
show port sharing //查看配置
7.stp配置
enable stpd //启动生成树
show diag
show iparp
Juniper防火墙基本命令
Juniper防火墙基本命令Juniper防火墙基本命令常用查看命令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配置指定接口shutdownSet 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 off3.Vlan配置无论是核心还是接入层,都要先创建三个Vlan,并且将所有归于Default Vlan的端口删除:config vlan default del port allcreate vlan Servercreate vlan Usercreate vlan Manger定义802.1q标记config vlan Server tag 10config vlan User tag 20config vlan Manger tag 30设定Vlan网关地址:config vlan Server ipa 192.168.41.1/24config vlan User ipa 192.168.40.1/24config vlan Manger ipa 192.168.*.*/24Enable ipforwarding 启用ip路由转发,即vlan间路由Trunk 配置config vlan Server add port 1-3 tconfig vlan User add port 1-3 tconfig vlan manger add port 1-3 t4.VRRP配置enable vrrpconfigure vrrp add vlan UserVlanconfigure vrrp vlan UserVlan add master vrid 10 192.168.6.254configure vrrp vlan UserVlan authentication simple-password extremeconfigure vrrp vlan UserVlan vrid 10 priority 200configure vrrp vlan UserVlan vrid 10 advertisement-interval 15configure vrrp vlan UserVlan vrid 10 preempt5.端口镜像配置首先将端口从VLAN中删除enable mirroring to port 3 #选择3作为镜像口config mirroring add port 1 #把端口1的流量发送到3config mirroring add port 1 vlan default #把1和vlan default的流量都发送到36.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 16384configure vlan marketing add ports 2-3 stpd stpd1 emistp8.DHCP 中继配置enable bootprelayconfig bootprelay add <dhcp server ip>9.NA T配置Enable nat #启用natStatic NA T Rule Exampleconfig nat add out_vlan_1 map source 192.168.1.12/32 to 216.52.8.32/32Dynamic NA T Rule Exampleconfig nat add out_vlan_1 map source 192.168.1.0/24 to 216.52.8.1 - 216.52.8.31Portmap NA T Rule Exampleconfig nat add out_vlan_2 map source 192.168.2.0/25 to 216.52.8.32 /28 both portmapPortmap Min-Max Exampleconfig nat add out_vlan_2 map source 192.168.2.128/25 to 216.52.8.64/28 tcp portmap 1024 - 819210.OSPF配置enable ospf 启用OSPF进程create ospf area <area identifier> 创建OSPF区域configure ospf routerid [automatic | <routerid>] 配置Routeridconfigure 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-id11.SNMP配置enable snmp accessenable snmp trapscreate 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-routedisable ip-option strict-source-routedisable ip-option record-routedisable ip-option record-timestampdisable ipforwarding broadcastdisable udp-echo-serverdisable irdp vlan <vlan name>disable icmp redirectdisable web 关闭web方式访问交换机enable cpu-dos-protect13.Access-Lists配置create access-list icmp destination sourcecreate access-list ip destination source portscreate access-list tcp destination source portscreate access-list udp destination source ports14.默认路由配置config iproute add default <gateway>15.恢复出厂值,但不包括用户改的时间和用户帐号信息unconfig switch {all}16.检查配置show versionshow configshow sessionshow management 查看管理信息,以及snmp信息show bannershow ports configurationshow ports utilization ?show memory/show cpu-monitoringshow ospfshow access-list {<name> | port <portlist>}show access-list-monitorshow ospf area <area identifier>show ospf area detailshow ospf ase-summaryshow ospf interfaces {vlan <vlan name> | area <area identifier>} unconfigure ospf {vlan <vlan name> | area <area identifier>}switchshow switchshow configshow diagshow iparpshow iprouteshow ipstatshow logshow tech allshow version detail17.备份和升级软件download image [<hostname> | <ipaddress>] <filename> {primary | secondary}upload image [<hostname> | <ipaddress>] <filename> {primary | secondary}use image [primary | secondary]18.密码恢复。
juniper防火墙基本配置文档
防火墙基本配置步骤
防火墙的基本配置分三个步骤:
1、配置接口的IP地址和接口模式。
2、配置默认路由!
3、配置允许策略,TRUST到UNTRUST的策略!
这个是接口栏的截图:单击EDIT即可进行编辑!这里需要编辑trust口和untrust口!
这是点击trust口的edit后进入的配置界面,您只要输入IP地址和掩码位即可!注意:Manage ip* 对应的空白框一定不要填入内容,截图里的是自动生成的!其他保持默认,单击下面的OK即可完成!
下图是点击untrust口的edit进入编辑,选择static ip ,填入IP地址和掩码位,这里的IP是公网IP地址,manage ip那依然保持空白,模式为route,然后在service options选项栏中,将web ui,telnet,ping;三处打勾,如图!
然后点击OK即可完成!
点击左栏的Destination选项即可出现路由界面:新建点击NEW即可!
下图为点击NEW后出现的画面:如图填入内容,ip address/netmask填入0.0.0.0/0,
Next hop处选择gateway,在interface 处的下拉菜单中选择出口,gateway ip address填入UNTRUST口IP地址的下一跳网关即可!其他默认单击OK完成!
trust,TO处选择untrust,然后点击NEW!
点击new后的配置界面,如图配置即可!source address,destination address,service三处都选择ANY,action选permit, 在logging处打勾,其他保持默认,点击OK即可!
下图为蓝影标出的这条策略就是如上图配置完成后看到的结果!。
Juniper的基本配置
Juniper的基本配置:root# cli#相当于cisco的enroot@>cli> configure#相当于cisco的configure terminal[edit]root@# set system host-name router1#配置路由器的名字为router1root@# set system domain-name #配置路由器所在域为root@# set interfaces fxp0 unit 0 family inet address 192.168.15.1/24#配置fxp0 unit 0的接口地址,fxp0代表管理接口,unit 0代表子接口,inet代表是ipv4地址。
root@# set system backup-router 192.168.15.2#backup-router是本路由器的直连路由器,在路由器启动的时候,#JUNOS路由软件(routing protocol process, RPD)没有立即启动,#路由器将自动生成一条到back-up router的缺省路由,当路由器启动完成后再自动删除这条路由。
root@# set system name-server 192.168.15.3#DNS的地址root@# set system root-authentication plain-text-password#设置明文密码New password:Retype password:#输入并且确认密码,要求字母和数字。
root@# commit#确认配置,在没有确认配置的时候所有配置都是不生效的!root@router1# exitroot@router1>#保存配置用save命令[edit]aviva@router1# save configuration-march02Wrote 433 lines of configuration to configuration-march02#察看保存过的文件用run file list命令aviva@router1# run file list/var/home/aviva:.ssh/configuration-march02#用保存的文件载入配置用load replace命令。
Juniper常用配置
Juniper常用配置Juniper 常用配置一、基本操作1、登录设备系统初始化用户名是roo t,密码是空。
在用户模式下输入configure或者是edit可以进入配置模式。
2、设置用户名:set host-name EX4200。
3、配置模式下运行用户模式命令,则需要在命令前面加一个run,如:run show interface 。
4、在show 后面使用管道符号加上display set将其转换成set 格式命令show protocols ospf | display set 。
5、在需要让配置生效需要使用commit命令,在commit之前使用commit check来对配置进行语法检查。
如果提交之后,可以使用rollback进行回滚,rollback 1回滚上一次提前之前的配置,rollback 2则是回滚上 2 次提交之前的配置。
6、交换机重启:request system reboot7、交换机关机:request system halt二、交换机基本操作2.1 设置root密码交换机初始化用户名是root 是没有密码的,在进行commit 之前必须修改root 密码。
明文修改方式只是输入的时候是明文,在交换机中还是以密文的方式存放的。
实例:明文修改方式:lab@EX4200-1# top[edit]lab@EX4200-1# edit system[edit system]lab@EX4200-1# set root-authentication plain-text-password2.2 设置删除主机名实例:#"设置主机名为EX4200"lab@EX4200-1# edit system[edit system]lab@EX4200-1# set host-name EX4200#”删除命令”#lab@EX4200-1# edit system[edit system]lab@EX4200-1# delete host-name EX42002.3 开启Telnet登陆服务说明:在默认缺省配置下,EX 交换机只是开放了http 远程登陆方式,因此如果想通过telnet登陆到交换机上,必须在系统中打开telnet 服务。
Juniper CLI 基本操作
juniper CLI 基本操作系统基本配置:cliconfigureedit systemset host-name xiaoxiaoset domain-name set time-zone Asia/Shanghaiset login class xiaoxiaogroup idle-timeout 30 permissions allset login user xiaoxiao full-name fuxiaoxiaouid 2002 class xiaoxiaogroup authentication plain-text-passwordcommitWEB管理:set services web-management http port 80set services web-management https port 80set services web-management session idle-timeout 30 set services web-management session session-limit 30 Telnet配置:edit systemset services telnetset services telnet rate-limit 10set services telnet connection-limit 30日志管理:edit systemset syslog file messages any noticeset syslog archive size 1m files 20set syslog host 202.15.26.156.158 any anyset syslog console any noticeset syslog file messages archive size 2M files 20juniper os可以把syslog发送到console(控制台口)日志服务器,本地硬盘默认是存放到本地硬盘:/var/log 下set syslog console any notice 可以指定日志输出到控制台set syslog host 202.15.26.156.158 any any 可以指定日志输出到远程主机关闭日志从控制台输出delete syslog console any noticeSSH配置:edit systemset services sshset services ssh rate-limit 10set services ssh connection-limit 30SNMP配置:set snmp community key-string authorization read-only clients ipaddressset snmp community key-string authorization read-only clients default restrict set snmp community key-string authorization read-write clients ipaddressset snmp community key-string authorization read-only clients default restrict set snmp interface interfacelistset snmp trap-group groupname version [v1|v2|all] destination-port portnumber targets ipaddressset snmp trap-options source-address lo0例子:setsnmp community xiao3 authorization read-writeset snmp community xiao3 authorization read-write clients 192.168.1.200set snmp trap-group xiao5 version allset snmp trap-group xiao5 targets 192.168.1.200FTP:edit systemset services ftpset services ftp rate-limit 10set services ftp connection-limit 30 set name-server 192.168.1.1。
Juniper路由器配置命令介绍
Juniper路由器配置命令介绍Juniper路由器配置命令介绍⒈系统配置命令⑴ `set system hostname`:设置设备的主机名。
⑵ `set system domn-name`:设置设备的域名。
⑶ `set system login user`:设置设备的登录用户信息。
⒉接口配置命令⑴ `set interfaces interface-name unit logical-unit-number family inet address ip-address/subnet-mask`:配置接口的IP地址和子网掩码。
⑵ `set interfaces interface-name unit logical-unit-number family inet6 address ipv6-address/prefix-length`:配置接口的IPv6地址和前缀长度。
⑶ `set interfaces interface-name unit logical-unit-number vlan-id vlan-tagged`:配置接口的VLAN标签。
⒊路由配置命令⑴ `set routing-options static route destination next-hop`:配置静态路由。
⑵ `set protocols ospf area area-id`:配置OSPF路由协议。
⒋安全配置命令⑴ `set security zones security-zone zone-nameinterfaces interface-name`:将接口分配给安全区域。
⑵ `set security policies from-zone source-zone to-zone destination-zone policy policy-name then permit`:配置安全策略以允许数据流动。
⒌ VPN配置命令⑴ `set security ike proposal proposal-name authentication-method pre-shared-keys`:配置IKE提议的预共享密钥认证方法。
Juniper路由器配置命令介绍
Juniper路由器配置命令介绍Juniper路由器配置命令介绍目录1、简介2、配置基础命令2.1 进入操作模式2.2 配置系统参数2.3 设置管理接口2.4 配置路由表3、高级配置命令3.1 OSPF配置3.2 BGP配置3.3 VRF配置3.4 MPLS配置4、安全配置命令4.1 配置防火墙4.2 配置安全策略4.3 配置VPN4.4 配置ACL5、故障排查命令5.1 显示命令5.2 路由故障排查5.3 硬件故障排查5.4 访问控制故障排查6、性能优化命令6.1 接口配置6.2 QoS配置6.3 缓存配置6.4 动态路由配置1、简介Juniper路由器是一种支持多种网络协议的高性能路由器。
本文档介绍了Juniper路由器的配置命令,并根据功能分类进行了细化。
2、配置基础命令2.1 进入操作模式- login:登录路由器- cli:进入命令行操作模式- configure:进入配置操作模式2.2 配置系统参数- set system hostname <hostname>:设置路由器主机名- set system domn-name <domn-name>:设置路由器域名- set system time-zone <time-zone>:设置时区- set system name-server <ip-address>:设置DNS服务器2.3 设置管理接口- set interfaces <interface> unit <unit> family inet address <ip-address/mask>:配置管理接口的IP地质- set interfaces <interface> unit <unit> family inet address dhcp:使用DHCP分配管理接口的IP地质2.4 配置路由表- set routing-options static route <destination> next-hop <next-hop>:配置静态路由- set routing-options router-id <id>:配置路由器ID- set protocols ospf area <area> interface <interface>:配置接口与OSPF区域的关联3、高级配置命令3.1 OSPF配置- set protocols ospf area <area> interface <interface>:配置接口与OSPF区域的关联- show ospf neighbor:显示OSPF邻居信息- show ospf route:显示OSPF路由表3.2 BGP配置- set protocols bgp group <group-name> neighbor<neighbor-address>:配置BGP邻居- set protocols bgp group <group-name> family <family>:配置BGP邻居的地质族- show bgp neighbor:显示BGP邻居信息- show bgp summary:显示BGP邻居摘要信息3.3 VRF配置- set routing-instances <instance-name> interface<interface>:配置接口与VRF的关联- set routing-instances <instance-name> routing-options static route <destination> next-hop <next-hop>:配置静态路由3.4 MPLS配置- set protocols mpls interface <interface>:启用接口的MPLS功能- set protocols mpls label-switched-path <LSP-name> to <destination-address> : 配置LSP的路径4、安全配置命令4.1 配置防火墙- set security policies from-zone <from-zone> to-zone <to-zone> policy <policy-name> match <match-conditions> then permit/deny:配置安全策略4.2 配置安全策略- set security zones security-zone <zone-name> address-book address <address-name> <ip-address>:配置地质对象- set security zones security-zone <zone-name> host-inbound-traffic system-services <services>:配置允许进入防火墙的服务4.3 配置VPN- set security ike proposal <proposal-name> authentication-method <method>:配置IKE提议- set security ike gateway <gateway-name> ike-policy <policy-name>:配置IKE网关- set security ipsec vpn <vpn-name> bind-interface<interface>:绑定VPN到接口4.4 配置ACL- set firewall family inet filter <filter-name> term <term-name> from protocol <protocol>:配置ACL规则- set firewall family inet filter <filter-name> term <term-name> then accept/discard:配置ACL规则动作5、故障排查命令5.1 显示命令- show interfaces <interface> detl:显示接口详细信息- show route <destination> : 显示路由信息- show chassis hardware:显示硬件信息5.2 路由故障排查- show bgp summary:显示BGP邻居摘要信息- show ospf neighbor:显示OSPF邻居信息- show route protocol <protocol>:显示指定协议的路由5.3 硬件故障排查- show chassis hardware:显示硬件信息- show log messages:显示系统日志消息- request support information:收集支持信息文件5.4 访问控制故障排查- show security policies from-zone <from-zone> to-zone <to-zone> policy <policy-name>:显示安全策略信息- show security zones interfaces:显示接口与安全域的关联信息6、性能优化命令6.1 接口配置- set interfaces <interface> mtu <mtu-size>:设置接口MTU大小- set interfaces <interface> description <description>:设置接口描述6.2 QoS配置- set class-of-service interfaces <interface> unit<unit> scheduler-map <map-name>:为接口配置调度器映射- set class-of-service scheduler-maps <map-name> forwarding-class <forwarding-class> scheduler <scheduler-name>:配置调度器映射6.3 缓存配置- set forwarding-options cache hit-cache-size <size>:设置缓存大小- set forwarding-options cache timeout <timeout-value>:设置缓存超时时间6.4 动态路由配置- set protocols ospf area <area> interface <interface> passive:将接口设置为OSPF被动接口- set routing-instances <instance-name> interface <interface> passive:将接口设置为VRF被动接口附件:无法律名词及注释:无。
Juniper的简单配置
Juniper的简单配置注:必须设置root密码,配置才能够提交,配置必须commit提交才会生效、、console(通过超级终端)连接SRX,root用户登录,密码为空cli------进入操作模式configure---进入配置模式、、配置root用户登录口令2.1设置root用户口令Set system root-authentication plain-text-password注:root用户仅用户console连接本地管理,不能通过远程登录管理,必须成功设置root口令后,才能执行commit提交继续配置命令。
2.2设置远程登录:Set system login user (name)class super-user authentication plain-text-passwordNew password:root123Retype new password:root123注:此用户拥有超级管理员权限,可用于console和远程及web,另也可以自行灵活定义其他管理权限用户。
2.3远程管理的相关配置:Run set date ----- 设置系统时钟Set system time-zone ------设置时区Set system host-name ------设置主机名Set system services ftpSet system services telnetSet system service web-management http ---在系统中开启ftp、远程和web管理、、接口配置Ip地址必须配置在逻辑接口下,接口必须加入zone例如:Set security zones security-zone untrust host-inbound-traffic system-service ping Set security zones security-zone untrust host-inbound-traffic system-service http Set security zones security-zone untrust host-inbound-traffic system-service telnet 基于untrust zone打开允许 ping、远程和telnet、、NATNAT 共分为3中基于目的地址的NAT:包括目的地址及端口的转换基于源地址的NAT:包括源IP地址及端口的转换Static—静态地址转换这次是基于source 做的;源地址池转换公网地址Set secu nat sou pool pool-1 add 192.168.1.50 to 192.168.1.80Set sec nat sou rule-set from zone trusSet sec nat sou rule-set 1 to zone untSet sec nat sour rule-set 1 rule rule-1 match source-add 0.0.0.0/0 destination-add0.0.0.0/0Set sec nat sou rule-set 1 rule rule1 then source-nat pool pool-1Set sec nat proxy-arp inter ge-0/0/0 address 192.168.1.50 to 192.168.1.80策略方行—策略是写在zone中的Set sec poli from-zone trust to-zone untrust policy 1 match soures-add pc-1 Set sec poli from-zone trust to-zone untrust policy 1 match destination-add any Set sec poli from-zone trust to-zone untrust policy 1 match addplication anySet sec policies from-zone trust to-zone untrust poli 1 then permit。
juniper 常用配置命令
1.〉模式进入#模式:configure2.配置静态路由:>set route 10.1.10.0/24 int e1 gateway 10.1.1.2543.查看接口的配置:>get interface4.查看静态路由:>get route >get route ip 10.1.10.55.Ping 测试:>ping 10.1.10.56.Traceroute 测试:>trace 10.1.10.57.配置接口的模式(nat和route):>set interface e1 nat8.保存:>save9.配置文件备份:>save config from flash to tftp 1.1.7.250 15june03.cfg10.配置文件恢复:>save config from tftp 1.1.3.250 15june03.cfg to flash11.IOS备份:>save software from flash to tftp 1.1.7.250 ns208image.bin12.IOS升级:>save software from tftp 1.1.7.250 newimage to flash13.透明模式的配置:A.建立2层的安全区(在没有使用缺省安全区的情况下):>set zonename L2-Demo L2 1 // set zone name <name> L2 <vlan_tag>B.分配接口给2层安全区:>set int e3 zone L2-DemoC.为vlan1配置管理地址:>set int vlan1 manage-ip 1.1.7.100/24a.配置IP地址:>set int vlan1 ip 1.1.7.1/24b.选择广播的方法:>set vlan1 broadcast floodc.配置管理服务:(允许所有的管理服务)>set int vlan1 manageD.(可选项)配置每个安全区的管理服务:>set zone v1-dmz manage webE.在不同的安全区之间配置策略:14.透明模式的检查工具:>get int>get arp ,>get mac-learn,>get session15.透明模式是一个非常灵活的防火墙部署解决方案,可以快速实现防火墙和VPN的功能,不需要修改网络结构,建立虚拟地址(NAT),就可以实现访问控制。
JUNIPER路由器中常用命令总结
JUNIPER路由器中常⽤命令总结前些⽇⼦认真看了⼀下Juniper路由器的⼀些命令。
在这⾥总结⼀下。
⽅便以后使⽤Juniper路由器的命令主要分为两个部分,⼀个是operational,主要是复杂查看⽬前⽹络的配置情况(只能查看,不能修改。
感觉权限⽐较低);另⼀个是configuration,主要⽤来查看和修改配置(感觉权限⾼⼀些)。
刚进⼊到Juniper路由器时,默认进⼊的是operation,输⼊edit命令之后,就进⼊到了[edit]⽬录下,也就是进⼊了configuration。
基础配置命令(如未说明则在[edit]⽬录下)1、配置主机名字:set system host-name router12、配置域名: set system domain-name 3、配置fxp0接⼝(以太⽹中通过这个接⼝进⾏路由器的配置)。
Set interfaces fxp0 unit 0 family inet address 192.168.15.1/2 44、配置备份路由器:set system backup-router 192.168.15.25、配置DNS服务器:set system name-server 192.168.15.36、配置root⽤户的密码:set system root-authentication plain-text-password(密码中不可以全是⼤写、全是⼩写、全是数字)7、设置ntp服务器: set system ntp server 192.168.2.28、提交修改:commit9、查看提交是否合法: commit check10、在当天特定时间进⾏提交 commit at 22:4511、在特定⽇期的特定时间提交: commit at “2005-02-26 10:45”12、取消commit的操作 clear system commit13、为了避免提交带来意外的损害采⽤:commit confirmed,会在10分钟以后⾃动回滚14、与14相同,但在⼀分钟以后⾃动回滚:commit confirmed 115、提交信息,并同步到备份路由器上: commit synchronize配置服务:1、设置ssh服务:set system services ssh2、配置ftp服务: set system services ftp3、删除ftp服务: delete system services ftp权限设置:1、设置root⽤户ssh登录的密码:set system root-authentication ssh password2、禁⽌root⽤户使⽤ssh登录:[edit system ] set services ssh root-login deny3、设置密码要求:[edit system login] set password maximun-length 20 set password minimum-length 8 set password mi nimum-changes 24、设置密码加密算法:set system login password formate md55、查看⾃⼰的权限,以及可以设置的权限: show cli authorization进⼊与退出命令:1、Edit2、修改root的配置:configure3、避免多⼈修改导致设置丢失采⽤ configure exclusive4、查看⽬前修改区域有谁在线:[edit]status(只能看见⽐你先登录的⼈,后⾯登录的信息看不见)5、强制要求别⼈下线:request system logout user mike6、进⼊到根⽬录 top7、退出configuration 模块:quit8、退出configuration模块:exit configuration-mode9、提交并退出:commit and-quit10、退出当前⽬录:exit11、进⼊到某⽬录 edit ⽬录名字查看命令:1、查看当前⽬录地下的设置 [edit]show2、查看你设置的命令 show | display set3、查看你新增的命令 show | compare(+表⽰你增加的命令,-表⽰你删除的命令。
经典-Juniper路由器的日常基本配置
Juniper路由器的日常基本配置为测试OSPF路由协议,需要三个路由器,其拓扑图及接口连接情况如下:∙JUNOS1, interface em0 <-> JUNOS2, interface em0∙JUNOS1, interface em1 <-> JUNOS2, interface em1∙JUNOS1, interface em4 <-> JUNOS3, interface em4∙JUNOS2, interface em3 <-> JUNOS3, interface em3确保你的路由器是出厂初始设置(使用命令 load factory-default 可以恢复到出厂初始配置).为每个路由器配置主机名、Root密码及IP地址,为节省时间,你可以直接粘贴如下命令到Putty终端窗口的配置提示符下执行(最后不要忘记执行commit 命令):JUNOS1set system host-name JUNOS1set interfaces em0 unit 0 family inet address 172.30.25.2/30set interfaces em1 unit 0 family inet address 172.30.25.6/30set interfaces em3 unit 0 family inet address 192.168.1.1/24set interfaces em4 unit 0 family inet address 172.30.25.9/30set interfaces lo0 unit 0 family inet address 10.1.1.1/24set system root-authentication plain-text-passwordJUNOS2set system host-name JUNOS2set interfaces em0 unit 0 family inet address 172.30.25.1/30set interfaces em1 unit 0 family inet address 172.30.25.5/30set interfaces em3 unit 0 family inet address 172.30.25.13/30set interfaces lo0 unit 0 family inet address 10.2.2.2/24set system root-authentication plain-text-passwordJUNOS3set system host-name JUNOS3set interfaces lo0 unit 0 family inet address 10.3.3.3/24set interfaces em3 unit 0 family inet address 172.30.25.14/30set interfaces em4 unit 0 family inet address 172.30.25.10/30set system root-authentication plain-text-password实验1 –静态路由要求1:在JUNOS1上, 配置一个缺省静态路由(0.0.0.0/0) 到下一跳172.30.25.1.方法[edit]root@JUNOS1# set routing-options static route 0.0.0.0/0 next-hop 172.30.25.1要求2:用优先级为7添加第二条缺省静态路由到下一跳172.30.25.5 以便作为一个路由备份(浮动静态路由) 并commit.方法[edit]root@JUNOS1# set routing-options static route 0.0.0.0/0qualified-next-hop 172.30.25.5 preference 7[edit]root@JUNOS1# commitcommit complete检查一下设置的工作情况:root@JUNOS1# run show route 查看路由表inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both0.0.0.0/0 *[Static/5] 00:01:54> to 172.30.25.1 via em0.0[Static/7] 00:00:13> to 172.30.25.5 via em1.0...[edit]root@JUNOS1# run ping 10.2.2.2PING 10.2.2.2 (10.2.2.2): 56 data bytes64 bytes from 10.2.2.2: icmp_seq=0 ttl=64 time=1.650 ms64 bytes from 10.2.2.2: icmp_seq=1 ttl=64 time=1.272 msroot@JUNOS2# run monitor traffic interface em0...19:33:03.526742 172.30.25.2 > 10.2.2.2: ICMP echo request, id 16648, seq 0, length 64[edit]root@JUNOS1# deactivate interfaces em0 // 暂时关闭接口em0[edit]root@JUNOS1# commitcommit complete[edit]root@JUNOS1# run ping 10.2.2.2PING 10.2.2.2 (10.2.2.2): 56 data bytes64 bytes from 10.2.2.2: icmp_seq=0 ttl=64 time=3.247 ms64 bytes from 10.2.2.2: icmp_seq=1 ttl=64 time=0.658 ms[edit]root@JUNOS2# run monitor traffic interface em1...19:35:30.376370 172.30.25.6 > 10.2.2.2:ICMP echo request, id 14090, seq 7, length 64实验 2 – OSPF路由要求:对连接路由器的所有接口与环回接口配置OSPF路由,但对连接到子网172.30.25.0/30的接口(172.30.25.1 和172.30.25.2)不形成邻接关系.SolutionJUNOS1set protocols ospf area 0.0.0.0 interface em0.0 passiveset protocols ospf area 0.0.0.0 interface em1.0set protocols ospf area 0.0.0.0 interface lo0.0set protocols ospf area 0.0.0.0 interface em3.0set protocols ospf area 0.0.0.0 interface em4.0JUNOS2set protocols ospf area 0.0.0.0 interface em0.0 passiveset protocols ospf area 0.0.0.0 interface em1.0set protocols ospf area 0.0.0.0 interface lo0.0set protocols ospf area 0.0.0.0 interface em3.0JUNOS3set protocols ospf area 0.0.0.0 interface em3.0set protocols ospf area 0.0.0.0 interface em4.0set protocols ospf area 0.0.0.0 interface lo0.0检查一下配置情况:[edit]root@JUNOS1# run show ospf neighborAddress Interface State ID Pr i Dead172.30.25.5 em1.0 Full 10.2.2.2 12 8 34172.30.25.10 em4.0 Full 10.3.3.3 12 8 32[edit]root@JUNOS2# run show ospf neighborAddress Interface State ID Pr i Dead172.30.25.6 em1.0 Full 10.1.1.1 12 8 36172.30.25.14 em3.0 Full 10.3.3.3 12 8 38[edit]root@JUNOS3# run show ospf neighborAddress Interface State ID Pr i Dead172.30.25.13 em3.0 Full 10.2.2.2 12 8 36172.30.25.9 em4.0 Full 10.1.1.1 12 8 35root@JUNOS3# run show route protocol ospf...10.1.1.1/32 *[OSPF/10] 00:04:11, metric 1...10.2.2.2/32 *[OSPF/10] 00:04:11, metric 1...192.168.1.0/24 *[OSPF/10] 00:00:02, metric 2> to 172.30.25.9 via em4.0root@JUNOS3# run traceroute 192.168.1.1traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets 1 192.168.1.1 (192.168.1.1) 1.611 ms 0.588 ms 1.362 ms[edit]root@JUNOS3# deactivate interfaces em4[edit]root@JUNOS3# commitcommit complete[edit]root@JUNOS3# run traceroute 192.168.1.1traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets1 172.30.25.13 (172.30.25.13) 2.316 ms 1.479 ms 0.882 ms2 192.168.1.1 (192.168.1.1) 1.283 ms 1.300 ms 1.129 ms最后,不要忘记再激活接口em4 并commit:[edit]root@JUNOS3# activate interfaces em4[edit]root@JUNOS3# commitcommit complete。
Juniper路由器常用命令表
Juniper路由器常用命令表Juniper路由器常用命令表:1·登录与基本操作1·1 连接与登录1·2 登录后的基本操作1·3 退出登录2·系统操作与管理2·1 系统状态与信息查看2·2 系统配置与修改2·3 系统重启与关机2·4 用户管理3·接口配置3·1 物理接口3·1·1 接口状态查看与设置3·1·2 接口带宽与速率限制设置3·2 逻辑接口3·2·1 VLAN接口配置3·2·2 Loopback接口配置4·路由配置4·1 静态路由配置4·2 动态路由配置4·2·1 OSPF配置4·2·2 BGP配置4·2·3 RIP配置5·安全配置5·1 防火墙配置5·1·1 基本防火墙规则配置5·1·2 会话表与连接追踪配置5·1·3 防火墙日志配置5·2 虚拟专用网络(VPN)配置5·2·1 IPsec VPN配置5·2·2 SSL VPN配置6·网络服务配置6·1 DHCP服务配置6·2 DNS服务配置6·3 NAT配置7·系统诊断与故障处理7·1 接口故障排查7·2 路由故障排查7·3 防火墙故障排查7·4 网络连通性测试7·5 系统日志与告警查看附:本文档涉及附件附件:无注释:本文所涉及的法律名词及注释1·路由器:一种计算机网络设备,用于在局域网或广域网之间转发数据包。
2·VLAN:虚拟局域网,将一组逻辑上的设备或用户分组,形成一个局域网。
Juniper路由器常用命令表
user id为2001;
class为high
设置telnet和ftp服务
Line vty 0 4
#set services telnet
设置telnet服务
ip ftp
# set services ftp
设置ftp服务
#set system services telnet connection-limit 5
client的配置
# set ntp boot-server202.96.103.37
ntp server配置
此处只能写ip不能为主机名
SNMP配置
#set snmp community keepalive authorization read-only
SNMP配置
端口数据设置
Interface
#edit interfaces
限制telnet的最大连接数5
syslog服务配置
# set syslog user * any emergency
#set system syslog host202.96.103.73any any
所有syslog信息都写到远程主机
#set system syslog file messages any notice
>show chassis alarms
查看设备告警信息
sh environment all
>show chassis environment
查看详细的硬件温度及状态信息
# run show chassis fpc pic-status
查看办卡信息
show controller intfc
juniper基本配置
作者:红盟过客CCIE理论RHCEQQ:369136929时间:2007年夏天地点:浙江杭州软件:Visio2003CorelDRAW12WPS2007SecureCRT5.1Juniper常用命令设置用用户名密码juniper->set admin user redhat password redhat设置防火墙名juniper->set host ccieccie->更改用户密码ccie->set admin password123456设置密码长度,必需自己也满足设置长度ccie->set admin password restrict length6重置设备到出厂缺省设置如果丢失了admin密码,可以使用下列步骤将NetScreen设备重置为其缺省设置。
此时将会丢失配置内容,但会恢复设备访问。
要执行此操作,需要建立控制台连接.1.出现登录提示时,键入设备的序列号。
2.出现密码提示时,再次键入该序列号。
将显示以下消息:!!!!Lost Password Reset!!!!You have initiated a command to reset the device to factory defaults,clearing allcurrent configuration,keys and settings.Would you like to continue?y/n3.按Y键。
将显示以下消息:!!Reconfirm Lost Password Reset!!If you continue,the entire configuration of the device will be erased.Inaddition,a permanent counter will be incremented to signify that this device has been reset.This is your lastchance to cancel this command.If you proceed,the device will return to factory default configuration,whichis:System IP:192.168.1.1;username:netscreen;password:netscreen.Would you like to continue?y/n4.按Y键重置设备。
Cisco和Juniper路由器基本命令指南说明书
CISCO COMMANDJUNIPER COMMANDBASIC COMMANDSPing Pingping destping dest rapid (for cisco like output)ping dest (for unix like output)Traceroute tracerouteshow clockshow system uptimeshow interface [intfc]show interfaces [intfc]detail show controller intfcshow interfaces intfc extensive show interface | incl (proto|Desc)show interfaces description show historyshow cli historyshow environment show chassis environment show version show versionshow ip traffic show system statisticsshow tech-support request support information show loggingshow logshow running config show configuration show processesshow system processes show ip interface brief show interfaces terse show ip route summary show route summary show ip route show routeshow tcpshow system connections show route-map name show policy name clear arp-cache clear arpclear counters clear interface statistics show run sh configurationsh versh ver (show version)show diagsshow chasis hardwareBelow is list of commands generally used in Cisco platforms and their equivalent Juniper CLI command set . This is quite helpful especially for Cisco networking Engineers who face challenge when introduced to a new Juniper device for configuration –CISCO JUNIPER EQUIVALENT COMMANDS –CLI CHEATSHEETCISCO COMMANDJUNIPER COMMANDIS -IS COMMANDSshow clns neighbor show isis adjacency show isis database show isis database show isis spf-log show isis spf log show isis route show isis routes show isis topology show isis routes clear isisclear isis database clear clns neighborclear isis adjacencyBGP –COMMANDSshow ip bgp summary show bgp summaryshow ip bgpshow route protocol bgp show ip bgp regexp show route aspath-regex show ip bgp community show route community show ip bgp peer-groupshow ip bgp groupshow ip bgp dampened paths show route damping decayed show ip bgp neighborsshow bgp neighbourshow ip bgp neighbors address received-routesshow route receive-protocol bgp address show ip bgp neighbors address advertised-routesshow route advertising-protocol bgp addressOSPF COMMANDSshow ip ospf neighbor show ospf neighbour show ip ospf database show ospf database show ip ospf interfaceshow ospf interface (An Initiative By )。
Juniper路由器配置命令介绍
Juniper路由器配置命令介绍本文档是关于Juniper路由器配置命令的介绍,旨在帮助用户快速了解和使用Juniper路由器的各种命令。
以下是文档的详细内容。
第一章:登录和基本配置1.登录Juniper路由器- 进入路由器的命令行界面- 输入用户名和密码进行登录2.基本配置命令- 配置路由器的主机名- 配置管理接口的IP地质- 设置路由器的时钟- 保存配置更改第二章:接口配置1.配置物理接口- 激活和禁用接口- 配置接口IP地质- 配置接口子网掩码- 配置接口速率和双工模式- 配置接口上的ACL(访问控制列表)2.配置逻辑接口- 配置VLAN接口- 配置子接口- 配置隧道接口第三章:路由配置1.配置静态路由- 添加静态路由- 删除静态路由- 配置默认路由- 查看路由表2.配置动态路由- 配置OSPF(开放最短路径优先)协议 - 配置BGP(边界网关协议)协议- 配置RIP(路由信息协议)协议第四章:安全配置1.配置防火墙规则- 添加入站规则- 添加出站规则- 配置地质转换(NAT)2.配置VPN- 配置IPSec VPN- 配置SSL VPN第五章:监控和故障排除1.监控命令- 查看接口状态- 查看路由器 CPU 和内存使用情况 - 查看硬盘使用情况2.故障排除命令- 执行连通性测试- 查看日志信息- 跟踪路由本文档涉及附件:附件1:Juniper路由器配置示例文件(示例配置文件,供参考使用)本文所涉及的法律名词及注释:1.ACL(访问控制列表):用于控制网络流量的一种机制,可以限制特定源IP地质或目的IP地质的访问权限。
2.OSPF(开放最短路径优先):一种用于动态路由选择的内部网关协议,使用最短路径优先算法确定最佳路由。
3.BGP(边界网关协议):一种用于在互联网自治系统之间交换路由信息的外部网关协议。
4.RIP(路由信息协议):一种用于在小型网络中交换路由信息的距离矢量路由协议。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1、查看设备的硬件及引擎情况
引擎数?有哪些板卡?
从上信息可以得出:双引擎设备,RE0是主,RE1是备。
2、查看版本
从上可看出:
re0的版本是【12.3R4.6】re1的版本是【12.3R4.6】
3、引擎切换
4、查看当前引擎运行状态
设备配置管理
Juniper的配置存在2个地方:
第一个:
其中,juniper.conf.gz是当前的配置第二个:
可以查看文件的实际配置内容:
查看全局配置:
或
查看接口
查看接口匹配信息
查看路由协议信息
或
查看系统方面的信息
查看之前的历史配置信息
查看运行的文件
回滚载入之前的某一个配置文件
批量导入配置命令:
带外管理口配置:set groups re0 interfaces fxp0 unit 0 family inet address 172.18.18.30/24
set system time-zone Asia/Shanghai
set system root-authentication encrypted-password "$5$hmy2W7ar$TR/KP7qIckZ37QbfzSKJWpFW1QS70m1zAPQCsK4jth0" set system login user lab uid 2000
set system login user lab class super-user
set system login user lab authentication encrypted-password "$5$.Us1Dtb0$dIi5e/6/xp3IAUS/EXkntfTk3fDqESpZBNBLxrWVLHB"
set system services ftp
set system services ssh
set system services telnet
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set logical-systems vr101
set logical-systems vr102
set interfaces ge-2/0/0 description link_to_Serv1
set interfaces ge-2/0/0 unit 0 family inet address 11.1.1.1/24 deactivate interfaces ge-2/0/0 unit 0
set interfaces ge-2/0/1 description link_to_Serv2
set interfaces ge-2/0/1 unit 0 family inet address 11.1.2.1/24 deactivate interfaces ge-2/0/1 unit 0
set routing-options static route 172.0.0.0/8 next-hop 172.18.18.254
set routing-options static route 10.0.0.0/8 next-hop 172.18.18.254
show configuration | display set |match traceoption
show bgp summary
show configuration | display set | match 100.125.154.9
set protocols bgp group HZ-OOB2IN75 neighbor 100.125.154.9 export rpFW-ADCN2FW-POP
show bgp neighbor
show route forwarding-table
show configuration interfaces
show configuration policy-options
show configuration interfaces gr-0/0/0
show configuration protocols bgp
ping 100.125.154.126 count 100
ping 14.143.27.242 rapid count 300
show configuration | display set | compare rollback 5 show version detail no-forwarding
show system core-dumps no-forwarding
show chassis alarms no-forwarding
show chassis hardware detail no-forwarding show system processes extensive no-forwarding show pfe statistics error
show pfe statistics traffic
show chassis routing-engine no-forwarding show chassis environment no-forwarding show chassis firmware no-forwarding
show chassis fpc detail
show system boot-messages no-forwarding show system storage no-forwarding
show system virtual-memory no-forwarding
show system buffer no-forwarding
show system queues no-forwarding
show system statistics no-forwarding
show configuration | except SECRET-DATA | display omit show interfaces extensive no-forwarding
show network-access aaa statistics accounting
show route forwarding-table summary
show ppp statistics extensive
show accounting server statistics
show system resource-monitor summary
show shm-ipc statistics
show interfaces diagnostics optics et-0/1/1。