博达交换机配置.docx

上传人:b****7 文档编号:10440042 上传时间:2023-02-11 格式:DOCX 页数:29 大小:324.78KB
下载 相关 举报
博达交换机配置.docx_第1页
第1页 / 共29页
博达交换机配置.docx_第2页
第2页 / 共29页
博达交换机配置.docx_第3页
第3页 / 共29页
博达交换机配置.docx_第4页
第4页 / 共29页
博达交换机配置.docx_第5页
第5页 / 共29页
点击查看更多>>
下载资源
资源描述

博达交换机配置.docx

《博达交换机配置.docx》由会员分享,可在线阅读,更多相关《博达交换机配置.docx(29页珍藏版)》请在冰豆网上搜索。

博达交换机配置.docx

博达交换机配置

博达交换机测试

补充配置说明

上海博达数据通信有限公司

2004年3月24日

 

1、基本配置

1.1Console口本地配置

PC串口速率9600,数据位8,奇偶校验无,停止位1,数据流控无。

PC串口属性设置:

1.2基本配置命令

用户态:

Switch>enable

管理态:

Switch#config

全局配置态:

Switch_config#interfaceFastEthernet0/1

端口配置状态:

Switch_config_f0/1#

enable

configterminal

interfaceFastEthernet0/1

showrunning

showconfig

showversion(all)

showcpu

showmemory(mblk/dead)

……

1.3Console配置口密码设置

全局配置态下命令设置:

!

lineconsole0

passwordbdcom//设置Console口配置口令

!

servicepassword-encryption//口令MD5加密

aaaauthenticationlogindefaultline//用line密码进行认证

1.4enable密码设置

全局配置态下命令设置:

enablepasswordbdcom//设置enable密码

servicepassword-encryption//口令MD5加密

1.5Telnet用户&密码配置

全局配置态下命令设置:

linevty0

password1234

!

userbdcompasswordabcd//添加用户名bdcom,口令abcd

servicepassword-encryption//口令MD5加密

aaaauthenticationlogindefaultline//用line密码进行认证

aaaauthenticationlogindefaultlocal//用本地数据库中用户名和密码进行认证

1.6限制Telnet到交换机上来的IP地址

全局配置态下命令设置:

!

ipaccess-liststandard1//定义访问列表1

permit192.168.1.111255.255.255.255//允许192.168.1.111

!

iptelnetaccess-class1//引用访问列表1,只允许list1中的IP地址telnet上来

1.7Web管理

PC通过IE浏览器实现对交换机的Web页面管理。

全局配置态下命令设置:

iphttpserver

BDCOMS2224二层交换机Web页面管理图

BDCOMS3224三层交换机Web页面管理图

1.8SNMP网管软件管理

博达交换机配置SNMP,可以通过各种通用网管软件进行管理,如博达的BroadDirector、Cisco的Ciscoworks、HP的OpenView、SNMPc等网管软件。

通过网管软件进行管理非常直观,可以看到交换机的背板、各端口工作状态、数据统计信息等等。

全局配置态下命令设置:

!

snmp-servercommunitypublicRW

snmp-serverhost192.168.1.1public

snmp-servertrap-sourceVLAN1

!

1.9中英文提示

任意状态下命令设置:

Chinese//中文提示

English//英文提示

1.10TFTP软件升级、Zmodem协议升级

管理态下命令:

dir//看当前文件目录列表、剩余空间等

copytftpflash192.168.1.1//从TFTPServer192.168.1.1取文件到本地flash

copyflashtftp192.168.1.1//从本地flash拷贝文件到TFTPServer

1.11Syslog日志功能

全局配置态下命令设置:

logging192.168.1.1

loggingtrapwarnings

loggingsource-interfacevlan1

1.12DHCPServer功能

三层交换机支持该功能。

全局配置态下命令设置:

!

ipdhcpdpool1

network192.168.1.0255.255.255.0

range192.168.1.150192.168.1.250

default-router192.168.1.254

dns-server202.101.172.35202.101.172.36

netbios-name-server202.101.172.35202.101.172.36

!

ipdhcpdenable

!

1.13SNTP时间协议

博达交换机与网络中SNTP或NTPServer时钟源同步。

全局配置态下命令设置:

sntpserver192.168.1.1

1.14Ping&Traceroute工具

博达提供功能完善的ping功能。

Ping参数如下:

-a--一直ping,直到被中断

-d--不使用路由表,直接路由到端口

-f--在IP报头中设置DF标志位

-i--报文使用的源地址

-m--报文指定端口的地址

-j--松弛源路由

-k--严格源路由

-l--数据长度

-n--发送的echo请求报文数

-r--记录路由

-s--TOS

-t--TTL

-v--详细的输出信息

-w--等待应答的时间(秒)

-b--两个Ping报文之间的时间间隔(10ms)

WORD--目的地址或主机名

Traceroute参数如下:

-i--报文使用的源地址

-m--报文使用的指定端口的地址

-j--松弛源路由

-k--严格源路由

-p--端口号

-q--每一跳的探测帧数

-r--记录路由

-t--TTL

-w--等待应答的时间(秒)

-x--使用UDP之外的协议

WORD--目的地址或主机名

 

2、VLAN配置

VLAN的实现有基于802.1Q、端口等等之分。

从功能上,不同的厂家有不同的实现,如Cisco的PVLAN、华为的PVLAN,博达和华为的SuperVLAN等等。

Cisco和华为的PVLAN名称相同但概念含义具体有所不同。

2.1CiscoPVLAN概念及博达实现

CiscoPVLAN把端口分为了以下三种模式:

Promiscuousport:

处于PrimaryVLAN中的端口为Promiscuousport,可以和任何Communityport、Isolatedport和Promiscuousport通信。

Communityport:

处于CommunityVLAN中的端口为Communityport,只能和Communityport和Promiscuousport通信。

Isolatedport:

处于IsolatedVLAN中的端口为Isolatedport,只能和Promiscuousport通信(不能和其它任何种类的的端口通信)。

实际上PVLAN并不是一个单独的技术,而只是把一些VLAN的常规配置方法,进行了一个批处理。

让配置可以来的更简单些。

我们的交换机现在没有专门针对PVLAN的命令。

而可以通过对VLAN的一系列配置,而达到最终和PVLAN一致的效果。

(这里我们也要明确一点,处于CiscoPVLAN中的端口,向外发送数据全部是Untag的。

不能带Tag标记)

ClientA和B属于PrimaryVLAN;

ClinetC和D属于CommunityVLAN;

ClientE和F属于IsolatedVLAN;

按PrivateVLAN定义,A、B、C、D能相互交换,E和F不能相互交换;E能和A、B进行交换,F能和A、B进行交换;E不能和C、D进行交换,F也不能和C、D进行交换。

博达交换机实现CiscoPVLAN配置:

!

interfaceFastEthernet0/1

switchportmodetrunk

switchporttrunkvlan-untagged1-4

switchportshared-learning

!

interfaceFastEthernet0/2

switchportmodetrunk

switchporttrunkvlan-untagged1-4

switchportshared-learning

!

interfaceFastEthernet0/3

switchportmodetrunk

switchportpvid2

switchporttrunkvlan-untagged1-4

switchporttrunkvlan-allowed1-2

switchportshared-learning

!

interfaceFastEthernet0/4

switchportmodetrunk

switchportpvid2

switchporttrunkvlan-untagged1-4

switchporttrunkvlan-allowed1-2

switchportshared-learning

!

interfaceFastEthernet0/5

switchportmodetrunk

switchportpvid3

switchporttrunkvlan-allowed1,3

switchporttrunkvlan-untagged1-4

switchportshared-learning

!

interfaceFastEthernet0/6

switchportmodetrunk

switchportpvid4

switchporttrunkvlan-allowed1,4

switchporttrunkvlan-untagged1-4

switchportshared-learning

!

interfaceFastEthernet0/7

!

……

!

interfaceFastEthernet0/24

!

vlan1,4

2.2华为PVLAN概念及博达实现

华为PVLAN它的功能是在小区接入中,通过将用户划入不同的VLAN,实现用户之间二层报文的隔离。

PVLAN采用二层VLAN的结构,在一台以太网交换机上存在PrimaryVLAN和SecondaryVLAN。

一个PrimaryVLAN和多个SecondaryVLAN对应,PrimaryVLAN包含所对应的所有SecondaryVLAN中包含的端口和上行端口,这样对上层交换机来说,只须识别下层交换机中的PrimaryVLAN,而不必关心PrimaryVLAN中包含的SecondaryVLAN,简化了配置,节省了VLAN资源。

用户可以采用PVLAN实现二层报文的隔离,为每个用户分配一个SecondaryVLAN,每个VLAN中只包含该用户连接的端口和上行端口;如果希望实现用户之间二层报文的互通,可以将用户连接的端口划入同一个SecondaryVLAN中。

可以看出,华为PVLAN实际上也仅仅是一种VLAN划分的技巧,并不是一项专门的技术。

 

交换机F0/24口上联路由器,路由器以太网口不支持802.1Q。

F0/2、F0/3分别接PC2、PC3,要求PC2、PC3可以互访,同时都可以访问F0/24口路由器。

F0/4、F0/5分别接PC4、PC5,要求PC4、PC5可以互访,同时都可以访问F0/24口路由器。

博达实现SuperVLAN配置:

!

interfaceFastEthernet0/1

!

interfaceFastEthernet0/2

switchportmodetrunk

switchportpvid2

switchporttrunkvlan-untagged1-2

switchporttrunkvlan-allowed1-2

switchportshared-learning

!

interfaceFastEthernet0/3

switchportmodetrunk

switchportpvid2

switchporttrunkvlan-untagged1-2

switchporttrunkvlan-allowed1-2

switchportshared-learning

!

interfaceFastEthernet0/4

switchportmodetrunk

switchportpvid3

switchporttrunkvlan-untagged1,3

switchporttrunkvlan-allowed1,3

switchportshared-learning

!

interfaceFastEthernet0/5

switchportmodetrunk

switchportpvid3

switchporttrunkvlan-allowed1,3

switchporttrunkvlan-untagged1,3

switchportshared-learning

!

interfaceFastEthernet0/6

!

……

!

interfaceFastEthernet0/24

switchportmodetrunk

switchporttrunkvlan-allowed1-3

switchporttrunkvlan-untagged1-3

switchportshared-learning

!

vlan1-3

2.3博达SuperVLAN配置

VLAN1~3共享SuperVLAN1的IP地址。

!

interfaceSuperVLAN1

ipaddress192.168.1.1255.255.255.0

noipdirected-broadcast

subvlanadd2-3

!

!

vlan1-4

!

2.4ProtectedPort保护端口

ProtectedPort是交换机的一个本地功能。

如果把一个端口配置为ProtectedPort,在同一VLAN内配置成为ProtectedPort的端口,将相互直接无法通信。

配置成为ProtectedPort的端口,可以和其他常规端口通信。

博达配置:

!

interfaceFastEthernet0/1

switchportprotected

!

2.5GVRP配置

全局配置态下命令设置:

gvrp

端口状态下配置:

gvrp

验证:

showvlan

2.6生成树协议

全局配置态下命令设置:

spanning-treemode(sstp|rstp)

2.7安全端口

 

3、路由协议

3.1RIP

基本配置命令,在全局配置状态下:

interfaceVLAN2

ipaddress120.1.1.1255.255.255.0

noipdirected-broadcast

routerrip

network120.1.1.0255.255.255.0

version2

!

3.2OSPF

OSPF配置点对多点、MD5认证,全局模式下配置:

!

interfaceVLAN2

ipaddress120.1.1.1255.255.255.0

noipdirected-broadcast

ipospfnetworkpoint-to-multipointbroadcast

ipospfmessage-digest-key1md5bdcom

!

!

vlan1-5,17-20

!

!

routerospf100

network120.1.1.0255.255.255.0area0

area0authenticationmessage-digest

!

!

3.3EIGRP

BEIGRP全局模式下配置:

interfaceVLAN2

ipaddress120.1.1.1255.255.255.0

noipdirected-broadcast

!

vlan1-5,17-20

!

routerbeigrp200

network120.1.1.0255.255.255.0

!

3.4BGP

BEIGRP全局模式下配置:

interfaceVLAN2

ipaddress120.1.1.1255.255.255.0

noipdirected-broadcast

!

vlan1-5,17-20

!

routerbgp300

network120.1.1.0/24

!

四、网络安全

4.1端口镜像

交换机做端口镜像,然后PC上运行抓包软件如Sniffer,可以监控某个或某些端口数据,进行分析以便采取相应的措施。

镜像f0/1收发数据、f0/2发送数据、f0/3接收数据到f0/24口,全局状态下配置:

!

mirrorsession1destinationinterfacef0/24

mirrorsession1sourceinterfacef0/3rx

mirrorsession1sourceinterfacef0/2tx

mirrorsession1sourceinterfacef0/1both

!

4.2802.1X认证

相关命令:

全局模式下

dot1xenable--启动802.1x协议功能

dot1xdefault--重置全局的802.1x参数为默认值

dot1xauthen-type--设置全局的认证类型

dot1xauthen-typechap--设置认证为CHAP认证

dot1xauthen-typeeap--设置认证为EAP认证

dot1xmax-req--设置最大身份请求次数

dot1xreauth-max--设置最大认证重试次数

dot1xre-authentication--启动802.1x的周期认证

dot1xtimeout--设置802.1x超时值

端口模式下:

dot1xforbid--启动802.1x的特殊禁止功能

dot1xauthentication--选择端口下802.1x的认证属性

dot1xauthenticationtype--选择802.1x端口认证类型

dot1xauthenticationtypechap--选择端口802.1x认证类型为chap

dot1xauthenticationtypeeap--选择端口802.1x认证类型为eap

dot1xauthenticationmethod--选择802.1x端口认证方法

dot1xmultiple-hosts--启动端口下的多主机访问功能

dot1xport-control--控制端口的802.1x模式

dot1xport-controlauto配置端口为802.1x协议控制方式

dot1xport-controlforce-authorized端口强制认证通过

dot1xport-controlforce-unauthorized端口强制认证不通过

dot1xuser-permit--绑定端口下允许认证的用户

配置一(本地认证):

!

dot1xenable

!

username123password0123

aaaauthenticationdot1xdefaultlocal

!

interfaceFastEthernet0/17

dot1xauthenticationmethoddefault

dot1xmultiple-hosts

dot1xport-controlauto

dot1xforbidmulti-network-adapter

bandwidth100000

!

配置二(Radius认证):

dot1xenable

!

username123password0123

!

aaaauthenticationdot1xtestradius

!

interfaceFastEthernet0/1

bandwidth100000

!

interfaceFastEthernet0/2

bandwidth100000

!

interfaceFastEthernet0/3

interfaceFastEthernet0/22

dot1xauthenticationtypechap

dot1xauthenticationmethodtest

dot1xport-controlauto

bandwidth100000

intvlan1

ipadd192.168.0.1255.255.255.0

!

radiusserver192.168.0.110auth-port1812acct-port1813

radiuskeybdcom

4.3ACL访问控制

三层交换机、两层半交换机支持基于MAC地址、VLAN标识、源或目的IP地址、TCP/UDP端口、协议类型以及时间的访问列表控制功能。

基于IP地址的访问列表:

!

ipaccess-liststandard1

permit192.168.1.0255.255.255.0

!

ipaccess-listextended2

permittcp192.168.1.0255.255.255.0anyeqwwwtime-rangetime_1

permitudp192.168.1.0255.255.255.0anyeq0time-rangetime_1

!

ipaccess-listextended3

permitip192.168.1.0255.255.255.0120.1.1.0255.255.255.0

!

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 军事

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1