锐捷交换机路由器配置教程要点-共20页

更新时间:2023-10-09 10:39:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

锐捷交换机路由器配置教程

目 录

第一章:设备配置和文件管理 .......... .....4

1.1 通过 TELNET 方式来配置设备 ... ....4 1.2 更改 IOS 命令的特权等级 ..................4 1.3 设备时钟设置 .............................5

第二章:交换机基础配置 ............... ...5

2.1 交换机 vlan 和 trunk 的置 ..... .5 2.2 turnk 接口修剪配置 ........................6

2.3 PVLAN 配置 ............... ...7

2.4 端口汇聚配置 .... ..8 2.5 生成树配置 ..... .......9 2.6 端口镜像配置 ..... .....9 第三章:交换机防止 ARP 欺骗置 .. ......10 3.1 交换机地址绑定( address-bind )功能 ....10 3.2 交换机端口安全功能 ..................10

3.3 交换机 arp-check 功能 .... ..11 3.4 交换机ARP动态检测功能(DAI)........ ....11 第四章:访问控制列表配置(ACL).... ....... ..12 4.1 标准ACL配置..............................12 4.2 扩展ACL配置..............................13 4.3 VLAN之间的ACL配置............... ...... .13 4.4 单向ACL的配置............................15 第五章:应用协议配置..........................16 5.1 DHCP服务配置......................... ....16 5.2 交换机dot1x认证配置......................18 5.3 QOS限速配置............... ...............19 5.4 IPsec配置.............. ..................20 5.5 GRE配置................ ............... ..22 5.6 PPTP 配置 ................................22 5.7 路由器L2TP配置...........................23 5.8 路由器 NAT 配置 .........................24 第六章:路由协议配置 .........................25

6.1 默认路由配置..............................25 6.2 静态路由配置..............................25 6.3 浮动路由配置..............................25 6.4 策略路由配置 ............................25 6.5 OSPF 配置............ ...................26 6.6 OSPF 中 router ID 配置....................27

第一章:设备配置和文件管理

1.1 通过 TELNET 方式来配置设备

提问:如何通过 telnet 方式来配置设备? 回答: 步骤一:配置 VLAN1 的 IP 地址

S5750>en ---- 进入特权模式 S5750#conf ---- 进入全局配置模式 S5750(config)#int vlan 1 ---- 进入 vlan 1 接口 S5750(config-if)#ip address 192.168.0.230 255.255.255.0

- 为 vlan 1 接口上设置管理 ip

S5750(config-if)#exit ----退回到全局配置模式 步骤二:配置telnet密码

S5750(config)#line vty 0 4 ----进入telnet密码配置模式 S5750(config-line)#login ---启用需输入密码才能telnet成功 S5750(config-line)#password rscstar ---将telnet密码设置为rscstar S5750(config-line)#exit ---回到全局配置模式 S5750(config)#enable secret 0 rscstar -配置进入特权模式的密码为rscstar 步骤三:开启SSH服务(可选操作)

S5750(config)#enable service ssh-server ---开启ssh服务 S5750(config)#ip ssh version 2 -启用ssh version 2 S5750(config)#exit -- 回到特权模式 S5750#wri -保存配置 1.2 更改 IOS 命令的特权等级

提问:如何只允许dixy这个用户使用与ARP相关的命令? 回答:

S5750(config)#username dixy password dixy - 设置 dixy 用户名和密码 S5750(config)#username dixy privilege 10 --dixy 帐户的权限为 10 S5750(config)#privilege exec level 10 show arp

- 权限 10 可以使用 show arp 命令

S5750(config)#privilege config all level 10 arp

-- 权限 10 可以使用所有 arp 打头的命令

S5750(config)#line vty 0 4 ---- 配置 telnet 登陆用户 S5750(config-line)#no password S5750(config-line)#login local

注释: 15 级密码为 enable 特权密码,无法更改, 0 级密码只能支持 disable , enable , exit和 help , 1 级密码无法进行配置。 1.3 设备时钟设置

提问:如何设置设备时钟? 回答:

S5750#clock set 12:45:55 11 25 2019

- ---设置时间为2008年11月25日12点45分55秒 S5750#clock update-calendar ---设置日历更新

S5750(config)#clock timezone CN 8 22 -时间名字为中国,东8区22分

第二章:交换机基础配置

2.1 交换机vlan和trunk的配置

提问:如何在交换机上划分 vlan ,配置 trunk 接口? 回答: 步骤一:给交换机配置IP地址 S2724G#conf

S2724G(config)#int vlan 1

S2724G(config-if)#ip addess 192.168.0.100 255.255.255.0 -

- 给 VLAN 1 配置 IP 地址

S2724G(config-if)#no shutdown - 激活该 VLAN 接口 S2724G(config-if)#exit

S2724G(config)#ip default-gateway 192.168.0.1 - 指定交换机的网关地址 步骤二:创建 VLAN S2724G#conf

S2724G(config)#vlan 10 --- 创建 VLAN 10 S2724G(config-vlan)#exit

S2724G(config)# vlan 20 --- 创建 VLAN 20 S2724G(config-vlan)#exit

步骤三:把相应接口指定到相应的 VLAN 中 S2724G(config)#int gi 0/10

S2724G(config-if)#switch access vlan 10

-把交换机的第10端口划到VLAN 10中

S2724G(config-if)#exit S2724G(config)#int gi 0/20

S2724G(config-if)#switch access vlan 20

-把交换机的第20端口划到VLAN 20中

S2724G(config-if)#exit S2724G(config)#int gi 0/24

S2724G(config-if)#switch mode trunk--设置24口为Trunk模式(与三层交换机的连接口

S2724G(config-if)# 步骤四:保存配置

S2724G(config-if)#end S2724G#write

2.2 turnk接口修剪配置

提问:如何让 trunk 接口只允许部分 vlan 通过?回答: Switch(config)#int fa 0/24

Switch (config-if)#switch mode trunk

Switch (config-if)#switchport trunk allowed vlan remove 10,20,30-40 -- 不允许 VLAN10,20,30-40 通过 Trunk 口 2.3 PVLAN 配置

提问:如何实现几组用户之间的隔离,但同时又都能访问公用服务? 回答: 步骤一:创建隔离 VLAN S2724G#conf

S2724G(config)#vlan 3 ----创建VLAN3

S2724G(config-vlan)#private-vlan community --将VLAN3设为隔离VLAN S2724G(config)#vlan 4 -创建VLAN4

S2724G(config-vlan)#private-vlan community --将VLAN4设为隔离VLAN S2724G(config-vlan)#exit --退回到特权模式 步骤二:创建主VLAN

S2724G(config)#vlan 2 -进入VLAN2 S2724G(config-vlan)#private-vlan primary --VLAN2为主VLAN 步骤三:将隔离 VLAN 加到到主 VLAN 中

VLANS2724G(config-vlan)#private-vlan association add 3-4

-- 将 VLAN3 和 VLAN4 加入到公用 VLAN 中, VLAN3 和 VLAN4 的用户可以访问公用接 口

步骤四:将实际的物理接口与VLAN相对应

S2724G(config)#interface GigabitEthernet 0/1

-- --进入接口1,该接口连接服务器或者上联设备 S2724G(config-if)#switchport mode private-vlan promiscuous

-- -- 接口模式为混杂模式 S2724G(config-if)#switchport private-vlan mapping 2 add 3-4

- -- 将 VLAN3 和 VLAN4 映射到 VLAN2 上 S2724G(config)#int gi 0/10 -- 进入接口 10 S2724G(config-if)#switchport mode private-vlan host

S2724G(config-if)#switchport private-vlan host-association 2 3 -- -- 该接口划分入 VLAN3 S2724G(config)#int gi 0/20 -- 进入接口 20 S2724G(config-if)#switchport mode private-vlan host

S2724G(config-if)#switchport private-vlan host-association 2 4 - --- 该接口划分入 VLAN4 步骤五:完成 VLAN 的映射

S2724G(config)#int vlan 2 -进入VLAN2的SVI接口 S2724G(config-if)#ip address 192.168.2.1 255.255.255.0 - ---配置VLAN2的ip地址 S2724G(config-if)#private-vlan mapping add 3-4

-- - -将VLAN3和VLAN4加入到VLAN2中 注释:

1. S20、S21不支持私有VLAN,可以通过保护端口实现类似功能 2. S3250、S3750和S5750同时支持保护端口和私有VLAN 3. S3760不支持私有VLAN和保护端口 2.4 端口汇聚配置

提问:如何将交换机的端口捆绑起来使用? 回答: S5750#conf

S5750(config)#interface range gigabitEthernet 0/1 4

- 同时进入 1 到 4 号接口

S5750(config-if)#port-group 1 --设置为聚合口1

本文来源:https://www.bwwdw.com/article/6m9f.html

Top