视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
(完整版)JUNIPER_EX3200交换机配置
2025-09-25 23:03:31 责编:小OO
文档
JUNIPER EX3200交换机配置

1 Ex3200开机指导

 

开机后:

login: root

Last login: Fri Jan 17 22:21:55 on ttyd0

--- JUNOS 7.2R3.3 built 2002-03-23 02:44:36 UTC

Terminal type? [vt100]

root@% 

注意使用root用户登录的情况下,输入帐号/密码以后,默认是进入shell模式的(而只有root用户帐号有这个现象),要输入cli命令进入用户模式:

root@% cli

root>

2 配置模式

用户模式下输入configure命令进入配置模式,配置模式下可以对设备进行各种参数的配置

root> configure

[edit]

root#

2.1 设置root用户密码

命令:

set system root-authentication plain-text-password

路由器初始化root用户是没有密码的,在第一次进行配置的时候必须要配置root密码才能commit成功。密码采用字母+数字方式。

Example: 

lab@M7i_GZ# set system root-authentication plain-text-password    

New password:

Retype new password:

2.2 添加系统用户

命令:

set system login user juniper uid 2000   <-设置用户名为juniper用户id为2000

set system login user juniper class super-user  <-设置juniper用户为超级用户

set system login user juniper authentication plain-text-password  <-设置juniper用户的密码

2.3 设置主机名

命令:

set system host-name M7i_GZ    <-设置主机名为M7i_GZ

2.4 开启系统telnet服务

命令:

set system services telnet

说明:系统默认是没有打开telnet功能的,只有打开telnet服务之后才能从网络上登陆到路由器。

2.5 设置交换机地址

命令:

Edit system

Set name-server 192.168.17.225

Commit

删除:

Edit system

Delete name-server 192.168.17.225

2.6 开启系统ftp服务

命令:

set system services ftp

说明:系统默认是没有打开ftp功能的,只有打开ftp服务之后才能从网络上ftp到路由器。

2.7 配置SNMP

set snmp community    authorization < read-only/ read-write> clients                     # 设置SNMP字符串

set snmp trap-options source-address 192.168.1.1   #设置snmp trap的原地址为192.168.1.1

set snmp contact     #设置snmp的联系信息

set snmp engine-id local    #设置snmp v3 engine ID信息

set snmp description    #设置snmp的系统描述

2.8 配置物理端口参数

user@host#set interface ge-slot/pic/port description description

#配置端口描述

user@host#set interface ge-slot/pic/port mtu mtu-number

#配置端口MTU

user@host#set interface ge-slot/pic/port ether-options speed (10m | 100m | 1g)

#配置端口速率

user@host#set interface ge-slot/pic/port ether-options link-mode (automatic | full-duplex |

half-duplex )

#配置端口双工

user@host#set interface ge-slot/pic/port ether-options (auto-negotiation |

no-auto-negotiation )

#配置端口自动协商

Example(例如):

root@host> edit

Entering configuration mode

[edit]

root@host# set interfaces ge-3/0/0 description “to_BJ-4200-1”

[edit]

root@host# set interfaces ge-3/0/0 mtu 9216

[edit]

root@host# set interfaces ge-3/0/0 ether-options speed 1g

[edit]

root@host# set interfaces ge-3/0/0 ether-options link-mode

full-duplex

[edit]

root@host# set interfaces ge-3/0/0 ether-options auto-negotiation

2.9 配置物理端口二层接口

[edit]

root@host# set interfaces ge-0/0/16 unit 0 family ethernet-switching

port-mode access

#配置物理端口作为二层access模式的接口,端口默认情况下就是二层access端口。

[edit]

user@host # show interfaces

ge-0/0/16 {

unit 0 {

family ethernet-switching;

}

}

2.10 配置物理端口三层接口

EX交换机物理接口可以支持三层路由接口功能,直接可以在接口上配置三层地址

[edit]

root@host# set interfaces ge-0/0/17 unit 0 family inet address

192.168.20.1/24

2.11配置VLAN

初始化配置时候,所有端口属于default VLAN,default vlan 的默认ID是0

user@host# set interfaces name unit 0 family ethernet-switching port-mode access

#配置端口的access模式,默认端口就是access模式。

user@host#set vlans vlan-name vlan-id number

#配置VLAN分配vlan ID

EX支持2种方式来配置access接口分配到VLAN,采用其中一种就可以实现端口VLAN的划分。

方式一:

user@host#set vlans vlan-name interface interface_name

直接在VLAN中添加多个物理端口

方式二:

或是在物理接口下:

user@host#set interfaces interface-name unit 0 family ethernet-switching vlan members

vlan-name or vlan-id

#添加端口到特定VLAN

user@host# show vlans vlan-name detail

#查看VLAN信息

Example(例如):

root@host> edit

Entering configuration mode

[edit]

root@host# set vlans sales vlan-id 100

[edit]

root@host# set vlans sales interface ge-0/0/1

#或者可以如下配置,实现相同的配置效果

[edit]

root@host# set interfaces ge-0/0/1 unit 0 family ethernet-switching

vlan members sales

2.12配置Vlan trunk

配置端口作trunk端口,支持802.1Q的标准封装。

user@host# set interfaces name unit 0 family ethernet-switching port-mode trunk

#配置端口的VLAN模式为trunk模式

user@host# set interfaces name unit 0 family ethernet-switching vlan members

all|number

#配置trunk端口的允许通过的VLAN,9.1版本目前不支持vlan-range,预期在9.2版本支持。

Example:

root@host> edit

Entering configuration mode

[edit]

root@host#show

interfaces {

ge-0/0/3 {

unit 0 {

family ethernet-switching {

port-mode trunk;

vlan {

members [ orange blue ];

}

}

}

}

ge-0/0/4 {

unit 0 {

family ethernet-switching {

port-mode trunk;

vlan {

members [ 100 200 ];

}

}

}

}

}

2.13配置 native-vlan-id

EX在trunk端口下支持native-vlan 的配置:

root@host> edit

Entering configuration mode

[edit]

root@host# set interface ge-0/0/8 unit 0 family Ethernet-switch

native-vlan-id purple

[edit]

root@host#show interface

ge-0/0/8 {

unit 0 {

family ethernet-switching {

port-mode trunk;

vlan {

members [ orange blue purple ];

}

native-vlan-id purple;

}

}

 

2.14 静态路由协议

手工添加到路由表

下一跳必须有效

所以的配置在routing-options 级别

Syntax(语法):

[edit]

routing-options {

static {

defaults {

static-options;

}

route destination-prefix {

next-hop next-hop;

qualified-next-hop address {

metric metric;

preference preference;

}

static-options;

}

}

}

Example(例如):

[edit]

user@host# show

routing-options {

static {

route 0.0.0.0/0 next-hop 192.168.0.1;

}

}

2.15 OSPF

单区域

[edit]

user@host# set protocols ospf area 0 interface ge-0/0/0

[edit]

user@host# show protocols ospf

ospf {

area 0.0.0.0 {

interface ge-0/0/0.0;

}

}

 配置OSPF 多区域

[edit]

user@host# show protocols ospf

ospf {

area 0.0.0.0 {

interface ge-0/0/0.0;

}

}

[edit]

user@host# set protocols ospf area 1 interface at-0/1/1.100

[edit]

user@host# show protocols ospf

ospf {

area 0.0.0.0 {

interface ge-0/0/0.0;

}

area 0.0.0.1 {

interface at-0/1/1.100;

}

 

综合实例:

set system root-authentication plain-text-password

set system login user juniper uid 2000   <-设置用户名为juniper用户id为2000

set system login user juniper class super-user  <-设置juniper用户为超级用户

set system login user juniper authentication plain-text-password  <-设置juniper用户

set system services telnet

set vlans 10 vlan-id 10 

set vlans 20 vlan-id 20

set vlans 1 lan-id 1

set interfaces ge0/0/0 unit 0 family ethernet-switching port-mode trunk

set interfaces ge0/0/0 unit 0 family ethernet-switching vlan members all

set interface ge-0/0/0 unit 0 family Ethernet-switch native-vlan-id 1

set int vlan unit 10 family inet add 192.168.1.1/24  配置vlan 10的3层地址

set int vlan unit 20 family inet add 192.168.2.1/24  配置vlan 20的3层地址

set vlan 10 l3-int vlan.10  将vlan 10和int vlan 10地址邦定

set vlan 20 l3-int vlan.20  将vlan 20和int vlan 20地址邦定

set int ge-0/0/47 un 0 fa inet add 10.1.1.1/30  配置上连接口地址

set rout static route 0/0 next-hop 10.1.1.2  配置缺省路由

save config  保存配置

commit   生效配置

 load factory-default  清空配置

delete 

rolback下载本文

显示全文
专题