网络安全类

juniper

2021-05-25  本文已影响0人  小小的小

Juniper交换机更改端口vlan的过程

先列出交换机的配置:

show configuration | display set

看到30号端口信息如下:

set interfaces ge-0/0/30 unit 0 family ethernet-switching port-mode access

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

看到30号端口是在 vlan members 100

如何更改这个呢?

首先进入交换机的编辑模式:

edit

然后先删除原有的vlan:

delete interfaces ge-0/0/30 unit 0 family ethernet-switching vlan members 100

为了避免出错,保存我们刚刚输入的命令:

commit

然后写入新的 vlan:

set interfaces ge-0/0/30 unit 0 family ethernet-switching vlan members 101

然后在保存:

commit

每一次输入保存命令之后会提示:

configuration check succeeds

commit complete

创建vlan

(1) 创建一个VLAN,指定VLAN名称和ID号

set vlans vlan vlan-id 10

(2) 将交换机端口修改为access模式加入到新创建的VLAN中

set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode access

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

(3) 创建3层VLAN子端口,并且将子端口和VLAN关联:

set interfaces vlan unit 10 family inet address 192.168.1.1/24

set vlans vlan  interface vlan.10 //vlan子端口和VLAN对应起来

wildcard range set interfaces ge-0/0/[11-13,16,23,45] unit 0 family ethernet-switching vlan members v500

wildcard range set interfaces ge-0/0/[1-45] unit 0 family ethernet-switching vlan members 10

查看mac地址和接口的对应关系

show  ethernet-switching table brief

查看vlan及接口情况  *表示物理、逻辑上可达(能ping通)

show vlan

查看路由表

show route

查看所有接口运行 状态

show interfae terse

查看系统日志

show  log messages

查看接口运行状态

show  interface ge-x/y/z detail

查看arp表

show arp

查看硬件板卡当前状态(温度等信息)

show chassis environment

查看系统启动时间

show  system uptime

查看硬件板卡和序列号

show chassis haredware

查看主控板卡(RE)资源和使用状态

show chassis routing-engine

mac地址绑定

set ethernet-switching-options secure-access-port interface ge-0/0/1.0 mac-limit 1

set ethernet-switching-options secure-access-port interface ge-0/0/1.0 mac-limit action drop

set ethernet-switching-options secure-access-port interface ge-0/0/1.0 allowed-mac

trunk

1:set vlans changzhoudaxuevlan vlan-id 1801

2:set interfaces xe-1/0/2 unit 0 family ethernet-switching port-mode trunk

3:set interfaces xe-1/0/2 unit 0 family ethernet-switching vlan members changzhoudaxuevlan

4:set interfaces vlan  unit 1801 family inet6 address 2001:da8:a3:d001::1/64

5:set vlans changzhoudaxuevlan l3-interface vlan.2001 (关联vlan和三层接口)

juniper冲突解决

1、首先show arp 找到对应的ip和mac

2、然后 show ethernet-switching table 找到对应的接口

3、接着干掉该接口

4、最后在dhcp下面去绑定ip地址和mac地址

set system services dhcp static-binding 08:ed:b9:e2:8a:89 fixed-address 192.168.1.5

输入用户名、密码

进入cli模式

进入配置模式

2月9日 重置juniper交换机,启用管理页面

设置密码后:

  set interfaces me0 unit 0 family inet address 192.168.2.200/24

  set system services telnet

  set system services web-management http

  commit

端口启用与禁用

启用  #delete interfaces ge-0/0/22 disable

禁用  #set  interfaces  ge0/0/22  disable

查看接口状态

show interaces ge-0/0/22

上一篇 下一篇

猜你喜欢

热点阅读