D-link des-3828三层交换机入门设置
- 格式:rtf
- 大小:10.17 KB
- 文档页数:3
三层交换机与路由器的配置实例(图解)目的:学会使用三层交换与路由器让处于不同网段的网络相互通信实验步骤:一:二层交换机的配置:在三个二层交换机上分别划出两VLAN,并将二层交换机上与三层交换或路由器上的接线设置为trunk接口二:三层交换机的配置:1:首先在三层交换上划出两个VLAN,并进入VLAN为其配置IP,此IP将作为与他相连PC 的网关。
2:将与二层交换机相连的线同样设置为trunk接线,并将三层交换与路由器连接的线设置为路由接口(no switchsport)3:将路由器和下面的交换机进行单臂路由的配置实验最终结果:拓扑图下各个PC均能相互通信交换机的配置命令:SW 0:Switch>Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int f0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#no shutSwitch(config-if)#int f0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#SW 1:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/2Switch(config-if)#switchport access vlan 2% Access VLAN does not exist. Creating vlan 2Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#SW 2:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/2Switch(config-if)#switchport access vlan 2% Access VLAN does not exist. Creating vlan 2Switch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode trunkSwitch(config-if)#三层交换的配置命令:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/1Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to downSwitch(config-if)#exitSwitch(config)#int f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int vlan 1Switch(config-if)#no shut%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up Switch(config-if)#ip address 192.168.1.168 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 2%LINK-5-CHANGED: Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 192.168.2.168 255.255.255.0Switch(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#Switch(config-if)#ip address 192.168.10.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2Switch(config)#路由器的配置:Router>enRouter#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#int f0/0Router(config-if)#no shutRouter(config-if)#exitRouter(config)#int f0/0.1Router(config-subif)#encapsulation dot1Q 1Router(config-subif)#ip address 192.168.3.168 255.255.255.0Router(config-subif)#exitRouter(config)#int f0/0.2Router(config-subif)#encapsulation dot1Q 2Router(config-subif)#ip addRouter(config-subif)#ip address 192.168.4.168 255.255.255.0Router(config-subif)#exitRouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1Router(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleRouter#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/1Router(config-if)#ip addRouter(config-if)#ip address 192.168.10.2 255.255.255.0 Router(config-if)#。
D-Link交换机设备安全性功能配置手册友讯网络D-Link2012年4月目录1、风暴抑制 (2)1)广播抑制 (2)2)组播抑制 (4)3)未知单播抑制 (5)2、Safe Guide配置 (8)1)配置需求 (8)2)配置过程 (8)3)测试验证 (9)3、MAC地址绑定配置 (10)1)配置需求 (10)2)配置思路 (10)3)验证测试 (11)4、IP+MAC+PORT绑定 (12)1)组网需求 (12)2)组网图 (12)3)配置步骤 (12)5、DHCP_Snooping (17)1)功能介绍 (17)2)功能作用 (17)3)配置范例 (18)6、端口隔离配置 (21)1)配置要求 (21)2)配置实例 (21)1、风暴抑制风暴抑制是防止交换机的端口被局域网中的广播、组播或者一个物理端口上的单播风暴所破坏。
当流量在局域网中泛洪,建立的过多的流量将占用过多的带宽,并导致网络拥塞。
风暴抑制用于对进入的流量进行控制,从上面我们可以看出控制的对象可以是单播、广播和组播流量。
我们通过事先定义一个门限值(threshold),当某种流量超出了门限值,将对该流量进行控制,使其降到门限值一下,一旦流量超出门限值,所有的进入交换机的流量(无论是单播、组播还是广播)都会被丢弃!风暴抑制在交换机上默认是关闭。
D-link的交换机具有抑制广播、组播、单播三种风暴的能力,下面以DGS-3120-24TC为例,介绍如何对风暴抑制进行设置。
1)广播抑制1、进入交换机的配置界面。
2、输入以下命令:config traffic control 1:1-1:10 broadcast enable:在交换机第一个端口至第十个端口开启广播抑制。
threshold 128000 action shutdown :当交换机作用端口接收到超过每秒128000个数据包时,关闭该端口。
每秒通过的数据包数值可以自行设置,范围在0—255000之间。
新手配置交换机详细教程配置交换机的详细教程如下:一、连接交换机:1. 将电源线插入交换机的电源插口,并连接电源。
2. 使用网线将电脑与交换机的任意一个Ethernet口相连。
二、进入交换机配置界面:1. 打开电脑,并确保已经给电脑配置了IP地址。
2. 打开浏览器,输入交换机默认IP地址(通常为192.168.0.1或192.168.1.1)后敲击回车键。
3. 输入管理员用户名和密码来登录交换机。
三、配置交换机基本设置1. 在配置界面中找到交换机的基本设置选项。
2. 设置交换机的名称、主机名和设备密码。
3. 检查子网掩码、默认网关和DNS设置是否正确。
四、配置 VLAN(虚拟局域网)1. 在配置界面中找到 VLAN 设置选项。
2. 创建需要的 VLAN 号,并为每个 VLAN 配置名称和端口成员。
3. 根据需求,将端口分配到相应的 VLAN。
五、配置端口设置1. 在配置界面中找到端口设置选项。
2. 检查每个端口的状态,确保链接状态是正常的。
3. 根据需求,将端口设置为 access 或 trunk 模式。
六、配置端口安全性1. 在配置界面中找到端口安全性选项。
2. 启用端口安全性,并设置最大允许连接的MAC地址数量。
3. 允许或阻止相应的MAC地址。
七、配置交换机的链路聚合1. 在配置界面中找到链路聚合选项。
2. 创建聚合组,并将相关的端口添加到聚合组中。
八、配置交换机的QoS(服务质量)1. 在配置界面中找到 QoS 设置选项。
2. 根据需求设置端口的优先级和带宽限制。
九、保存配置并重启交换机1. 在配置界面的底部找到保存配置选项。
2. 点击保存配置,并等待配置文件保存完成。
3. 在配置界面的底部找到重启选项。
4. 点击重启,等待交换机重启完成。
以上为配置交换机的详细教程,按照以上步骤进行配置,即可完成交换机的设置。
华为三层交换机配置教程华为三层交换机是一种高性能的网络设备,用于构建大型企业网络。
配置这种交换机需要一定的技术知识和经验。
下面是一个简单的华为三层交换机配置教程,帮助您快速入门。
第一步:连接交换机首先,将交换机与电源连接,并使用网线将交换机与计算机连接。
确保连接正常后,打开计算机的网卡设置界面,将IP地址设置为和交换机同一网段的地址。
第二步:登录交换机打开计算机上的终端软件,比如SecureCRT等,通过网线连接的方式登录交换机。
在终端软件中输入交换机的IP地址,选择正确的端口,并设置登录协议为SSH。
第三步:配置基本信息成功登录交换机后,需要进行一些基本配置。
首先,设置交换机的主机名,可以使用命令“sysname [主机名]”来进行设置。
然后,设置管理接口的IP地址和子网掩码,可以使用命令“interface Vlanif1”和“ip address [IP地址] [子网掩码]”来进行配置。
第四步:配置VLAN配置VLAN是三层交换机的重要功能。
通过VLAN,可以将网络划分为几个独立的虚拟局域网。
首先,创建VLAN,使用命令“vlan [VLAN编号]”创建一个新的VLAN。
然后,将端口加入到VLAN中,使用命令“port-group [端口组号]”将端口加入到指定的VLAN中。
第五步:配置路由三层交换机可以进行路由功能的配置,实现不同子网之间的通信。
首先,创建一个静态路由表,使用命令“ip route-static [目的网络] [子网掩码] [下一跳地址]”将目的网络、子网掩码和下一跳地址添加到路由表中。
然后,启用路由功能,使用命令“ip routing”来开启路由功能。
第六步:配置接口配置接口是三层交换机的另一个重要功能。
通过配置接口,可以对接口进行管理和控制。
使用命令“interface [接口名称]”进入指定接口的配置模式。
然后,可以配置接口的IP地址、子网掩码、MTU等属性,使用命令“ip address [IP地址] [子网掩码]”、“mtu [MTU值]”来进行配置。
实验一:DES-3526的基本调试一、产品简介DES-3526 10/100Mbps可堆叠交换机应用了D-Link 的最新单一IP管理技术。
该机架安装交换机具有24个10/100BASE-TX 端口和2个组合式1000BASE-T/SFP 千兆端口,这样的设计可以提供更加安全及灵活的连接方式。
DES-3526交换机操作简便,易于管理,这些交换机组成的部门级访问层设备能和其他包括L3层核心交换机在内,支持D-Link独立IP管理技术的交换机堆叠和调试,和骨干网及中央高速服务器组成多层网络结构。
二、实验目的学习如何对DES-3526交换机进行操作和调试,重点掌握使用超级终端调试交换机的方法。
三、实验环境1、软硬件要求●DES-3526一台●PC机一台●RS-232线一条●双绞线一根2、环境示意图四、实验步骤先按照环境示意图连接实验环境,将DES-3526的配置端口用RS-232线和计算机的串口1连接起来,将计算机的网卡使用RJ-45双绞线连接到DES-3526的任意一个端口。
启动计算机,待计算机完全启动之后开始进行实验。
(一)使用超级终端进行调试 1.进入“开始-程序-附件-通讯-超级终端”i. 在“连接”画面,输入“名称(N )”:VT100,然后选择ii. 在“电话号码”画面,“连接时使用(N ):”栏目选择“直接连接到串口1”,选择iii. 在“COM1属性”画面,选择下面参数,然后确定 波特率 9600 数据位 8 停止位 1 奇偶校验 无校验流控制硬件iv. v. 在“VT100属性”画面,在“终端仿真(E ):”栏目中选择2.打开DES-3526的电源,交换机启动后将出现如下画面:默认的用户名密码为空,请连续按两下回车登入交换机进入调试页面。
如下图:输入“?”可以显示交换机的全部命令信息,输入“help”可以得到交换机当前能够使用得命令列表,使用“tab”键可以获得命令参数的提示。
在以后使用DES-3526进行实验的过程中,我们可以随时使用tab来补全当前命令行参数或获取下一项参数的信息。
UPD-LINK SWITCH通用配置手册0、设置管理员帐户#create account admin/user<username> admin/user是用户类型Enter a case-sensitive new password:***Enter the new password again for confirmation:***Success.#delete account <username>#show account1、配置交换机默认IP地址和所属VLANconfig ipif System ipaddress 192.168.0.2/24 vlan V302、配置SNMPcreate snmp community test view CommunityView read_onlycreate snmp community testw view CommunityView read_writeshow snmp community3、配置VLAN#create vlan v30 tag 30 其中,v30是VLAN Name ,30是VLAN ID (VID)#config vlan v30 add untagged 1:23-1:24 PORT 23、24添加到vlan v30中,并打上untagged标记#config vlan v30 advertisement enable4、端口配置语法:config ports [<portlist | all> [speed [auto | 10_half | 10_full | 100_half | 100_full | 1000_full {[master | slave]} ] | flow_control [enable | disable] | learning [enable | disable] state [enable | disable] description <desc 32> | clear]例:#config ports 23-24 speed 100_half learning enable state enable flow_control enable5、配置链路聚合组语法:#create link_aggregation group_id <value 1-32> {type [lacp | static]}#config link_aggregation group_id <value 1-32> {master_port <port> | ports <portlist> | state [enable |disable]例:#config link_aggregation group_id 1 master_port 1:5 ports 1:5-1:7, 1:96、端口镜像enable mirrorconfig mirror port <port> [add/delete] source ports <portlist> [rx/tx/both]<port>监控端口;source ports 被监控端口7、软件升级download firmware 10.90.90.92 升级firmwareupload configuration 172.18.192.90 <filename> 上传配置到TFTP服务器download configuration 172.18.192.90 <filename> 从TFTP服务器下载配置8、Ip Interface的配置语法:creat ipif <ipif name > <network address > <vlan name > state enable例:creat ipif test 192.168.1.1/24 vlan100 state enableconfig ipif System ipaddress 10.48.74.122/8 vlan v309、MAC绑定到交换机端口(手动添加MAC,这些MAC的终端可以使用此端口)Used to create a static entry to the unicast MAC address forwarding table (database)1、语法:create fdb <vlan_name 32> <macaddr> [port <port>] 建立静态fdb条目例:create fdb default 00-00-00-00-01-02 port 2:52、语法:config ports learning disable 关掉端口学习功能10、MAC锁定到交换机端口(设定使用端口的终端-MAC的数量,并锁定当前连接的终端-MAC为许可用户)语法:config port_security ports [<portlist>| all ] {admin_state [enable | disable] | max_learning_addr <max_lock_no 0-64> | lock_address_mode [Permanent | DeleteOnTimeout | DeleteOnReset]}例:config port_security ports 1:16 admin_state enable max_learning_addr 10 lock_address_mode DeleteOnReset11、traffic_segmentation(同一VLAN内端口隔离功能)语法:config traffic_segmentation [<portlist>| all] forward_list [null | all | <portlist>]例:config traffic_segmentation 1:1 forward_list 1:1-1:10 (Port1可以和Port1-10通讯,和Port 11-24隔离)12、带宽控制语法:config bandwidth_control [<portlist> | all] {rx_rate [no_limit | <value 1-999>] | tx_rate [no_limit | <value 1-999>]} 单位为Mbps13、创建IP interface语法:create ipif <ipif_name 12> ipaddress <network_address> vlan <vlan_name 32> state [enable | disable]例:create ipif p1 ipaddress 10.1.1.1 Trinity state enable14、设置静态路由语法:create iproute <network_address> <ipaddr> {<metric 1-65535>} {[primary | backup]}<network_address> . IP address and netmask of the IP interface that is the destination of the route.<ipaddr> . The gateway IP address for the next hop router.语法:create iproute default <ipaddr> {<metric 1-65535>}15、ACL访问控制列表1、创建access_profileDXS-3350SR:4#create access_profile ip destination_ip_mask 255.255.255.255 profile_id 12、建立access条目DXS-3350SR:4#config access_profile profile_id 1 add access_id 1 ip destination_ip 172.18.192.246 port 1:16 deny16、IP-MAC BindingThe IP-MAC Binding commands in the Command Line Interface (CLI) are listed (along with the appropriate parameters) in the following table.Commandcreate address_binding ip_mac ipaddress <ipaddr> mac_address <macaddr>config address_binding ip_mac ipaddress <ipaddr> mac_address <macaddr>config address_binding ip_mac ports [<portlist> | all] state [enable | disable]showeg:enable address_binding acl_mode Enable IP-MAC Port Binding ACL Modecreate address_binding ip_mac ipaddress 192.168.0.10 mac_address 00-15-F2-A9-0B-C2 ports 1 mode acl ⎝ To set up a IP-MAC Port Binding Rule config address_binding ip_mac ports 1-10 state enable ⎝ Enable active portshow address_binding ip_macshow address_binding ports17、策略路由create access_profile profile_id 1 ip source_ip_mask 255.255.255.0config access_profile profile_id 1 add access_id 1 ip source_ip 4.4.4.4 port 1create policy_route name 1config policy_route name 1 acl profile_id 1 access_id 1 nexthop 2.2.2.2 state enable18、DHCP Servercreate dhcp pool testconfig dhcp pool network_addr test 192.168.0.0/24config dhcp pool dns_server_address test 61.139.2.69 0.0.0.0 0.0.0.0config dhcp pool netbios_node_type test broadcastconfig dhcp pool default_router test 192.168.0.1 0.0.0.0 0.0.0.0config dhcp pool lease test 1 1 1config dhcp ping_packets 5config dhcp ping_timeout 500enable dhcp_server19、修改交换机名称config command_prompt <name>20、线缆检测diag_cable ports <portlist>21、三层组播协议enable igmp_snoopingconfig igmp_snooping all state enableconfig igmp all state enableenable DVMRPconfig DVMRP all state enable22、开启DHCP Server Screening功能config filter dhcp_server add permit server_ip 10.10.10.1 client_mac 00-90-27-e0-67-27 port 1:1-1:24 config filter dhcp_server ports <端口> state enable23、开启DHCP中继功能enable dhcp_relayconfig dhcp_relay add ipif <三层接口名称> <DHCP服务器的IP>24、保存配置文件upload cfg_toTFTP <TFTP IP地址> dest_file c:\cfg\DGS-3420.cf。
三层交换机配置步骤三层交换机配置步骤 H3C认证培训体系是中国第⼀家建⽴国际规范的完整的⽹络技术认证体系,H3C认证是中国第⼀个⾛向国际市场的IT⼚商认证,在产品和教材上都具有完全的⾃主知识产权。
下⾯是⼩编整理的关于三层交换机配置步骤,欢迎⼤家参考! 三层交换机配置: Enable //进⼊私有模式 Configure terminal //进⼊全局模式 service password-encryption //对密码进⾏加密 hostname Catalyst 3550-12T1 //给三层交换机定义名称 enable password 123456. //enable密码 Enable secret 654321 //enable的加密密码(应该是乱码⽽不是654321这样) Ip subnet-zero //允许使⽤全0⼦⽹(默认都是打开的) Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1 Service dhcp //提供DHCP服务 ip routing //启⽤三层交换机上的路由模块 Exit 三层交换机配置: Vtp mode server //定义VTP⼯作模式为sever模式 Vtp domain centervtp //定义VTP域的名称为centervtp Vlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002) Vlan 3 name vlan3 Vlan 4 name vlan4 Vlan 5 name vlan5 Vlan 6 name vlan6 Vlan 7 name vlan7 Vlan 8 name vlan8 Vlan 9 name vlan9 Exit 三层交换机配置: interface Port-channel 1 //进⼊虚拟的以太通道组1 switchport trunk encapsulation dot1q //给这个接⼝的trunk封装为802.1Q的帧格式 switchport mode trunk //定义这个接⼝的⼯作模式为trunk switchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过 Interface gigabitethernet 0/1 //进⼊模块0上的吉⽐特以太⼝1 switchport trunk encapsulation dotlq //给这个接⼝的trunk封装为802.1Q的.帧格式 switchport mode trunk //定义这个接⼝的⼯作模式为trunk switchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过 channel-group 1 mode on //把这个接⼝放到快速以太通道组1中 Interface gigabitethernet 0/2 //同上 switchport trunk encapsulation dotlq switchport mode trunk switchport trunk allowed vlan all channel-group 1 mode on 三层交换机配置: port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡⽅式(依*源和⽬的IP的⽅式) interface gigabitethernet 0/3 //进⼊模块0上的吉⽐特以太⼝3 switchport trunk encapsulation dotlq //给trunk封装为802.1Q switchport mode trunk //定义这个接⼝的⼯作模式为trunk switchport trunk allowed vlan all //允许所有vlan信息通过 interface gigabitethernet 0/4 //同上 switchport trunk encapsulation dotlq switchport mode trunk switchport trunk allowed vlan all interface gigbitethernet 0/5 //同上 switchport trunk encapsulation dotlq switchport mode trunk switchport trunk allowed vlan all interface gigbitethernet 0/6 //同上 switchport trunk encapsulation dotlq switchport mode trunk switchprot trunk allowed vlan all 三层交换机配置: interface gigbitethernet 0/7 //进⼊模块0上的吉⽐特以太⼝7 Switchport mode access //定义这个接⼝的⼯作模式为访问模式 switchport access vlan 9 //定义这个接⼝可以访问哪个vlan(实际就是分配这个接⼝到vlan) no shutdown spanning-tree vlan 6-9 cost 1000 //在⽣成树中,vlan6-9的开销定义为10000 interface range gigabitethernet 0/8 – 10 //进⼊模块0上的吉⽐特以太⼝8,9,10 switchport mode access //定义这些接⼝的⼯作模式为访问模式 switchport access vlan 8 //把这些接⼝都分配到vlan8中 no shutdown 三层交换机配置: spanning-tree portfast //在这些接⼝上使⽤portfast(使⽤portfast以后,在⽣成树的时候不参加运算,直接成为转发状态) interface gigabitethernet 0/11 //进⼊模块0上的吉⽐特以太⼝11 switchport trunk encapsulation dotlq //给这个接⼝封装为802.1Q switchport mode trunk //定义这个接⼝的⼯作模式为trunk switchport trunk allowed vlan all //允许所有vlan信息通过 interface gigabitethernet 0/12 //同上 switchport trunk encapsulation dotlq switchport mode trunk switchport trunk allowed vlan all interface vlan 1 //进⼊vlan1的逻辑接⼝(不是物理接⼝,⽤来给vlan做路由⽤) ip address 172.16.1.7 255.255.255.0 //配置IP地址和⼦⽹掩码 no shutdown 三层交换机配置: standby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9 standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是⽤来开启抢占模式 interface vlan 2 //同上 ip address 172.16.2.252 255.255.255.0 no shutdown standby 2 ip 172.16.2.254 standby 2 priority 110 preempt ip access-group 101 in //在⼊⽅向上使⽤扩展的访问控制列表101 interface vlan 3 //同上 ip address 172.16.3.252 255.255.255.0 no shutdown 三层交换机配置: standby 3 ip 172.16.3.254 standby 3 priority 110 preempt ip access-group 101 in interface vlan 4 //同上 ip address 172.16.4.252 255.255.255.0 no shutdown standby 4 ip 172.16.4.254 standby 4 priority 110 preempt ip access-group 101 in interface vlan 5 ip address 172.16.5.252 255.255.255.0 no shutdown standby 5 ip 172.16.5.254 standby 5 priority 110 preempt ip access-group 101 in interface vlan 6 ip address 172.16.6.252 255.255.255.0 no shutdown 三层交换机配置: standby 6 ip 172.16.6.254 standby 6 priority 100 preempt interface vlan 7 ip address 172.16.7.252 255.255.255.0 no shutdown standby 7 ip 172.16.7.254 standby 7 priority 100 preempt interface vlan 8 ip address 172.16.8.252 255.255.255.0 no shutdown standby 8 ip 172.16.8.254 standby 8 priority 100 preempt interface vlan 9 ip address 172.16.9.252 255.255.255.0 no shutdown 三层交换机配置: standby 9 ip 172.16.9.254 standby 9 priority 100 preempt access-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101 access-list 101 permit ip any any Interface vlan 1 //进⼊vlan1这个逻辑接⼝ Ip helper-address 172.16.8.1 //可以转发⼴播(helper-address的作⽤就是把⼴播转化为单播,然后发向172.16.8.1) Interface vlan 2 Ip helper-address 172.16.8.1 Interface vlan 3 ip helper-address 172.16.8.1 interface vlan 4 ip helper-address 172.16.8.1 interface vlan 5 ip helper-address 172.16.8.1 interface vlan 6 ip helper-address 172.16.8.1 interface vlan 7 ip helper-address 172.16.8.1 interface vlan 9 ip helper-address 172.16.8.1 router rip //启⽤路由协议RIP version 2 //使⽤的是RIPv2,如果没有这句,则是使⽤RIPv1 network 172.16.0.0 //宣告直连的⽹段 exit 三层交换机配置: ip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下⼀跳地址为172.16.9.250这个路由器 line con 0 line aux 0 line vty 0 15 //telnet线路(路由器只有5个,是0-4) password 12345678 //login密码 login end copy running-config startup-config 保存配置【三层交换机配置步骤】相关⽂章:1.2.3.4.5.6.7.8.。
d-link三层交换机vlan的配置D-Link三层交换VLAN配置实例,企业部署VLAN实例划分VLAN子网的好处VLAN(Virtual Local Area Network)称为虚拟局域网,是指在逻辑上将物理的LAN分成不同小的逻辑子网,每一个逻辑子网就是一个单独的播域。
简单地说,就是将一个大的物理的局域网(LAN)在交换机上通过软件划分成若干个小的虚拟的局域网(VLAN)。
因为交换机通信的原理就是要通过“广播”来发现通往的目的MAC地址,以便在交换机内部的MAC数据库建立MAC地址表,而广播不能跨越不同网段。
通过划分VLAN子网,能划小了广播域,避免了数据碰撞在大的物理LAN内产生严重后果的可能,也避免了广播风暴的产生。
因为各个子网产生的广播将被限制在小的虚拟局域网内。
当LAN 中的不同VLAN间进行相互通信时,由于处于不同的IP子网段,不能象原先大的LAN那样直接通信,因此需要路由来转发,这时就需要增加路由设备——要实现路由功能。
三层交换技术VLAN和路由是孪生兄弟,有VLAN就必有路由。
在没有出现三层交换机以前,VLAN间的通信需要昂贵的传统路由器来配合工作。
在企业网中,不同VLAN子网之间的通信频繁发生,而路由器是基于软件的路由选择操作,本来效率就不高,如果路由器要对每一个数据包都路由一次,也就是“每次转发,每次路由”,随着需要路由的数据量增大,传统的路由器将不堪重负,于是就成为VLAN之间通信的瓶颈。
三层交换机则把网络通信中的二层交换技术和三层路由(或称三层转发)技术结合在一起,并通过ASIC技术达到线速交换,大幅度提高了设备数据的包转发能力,消除了转发瓶颈。
同时通过VLAN划分、高效的组播控制、流策略的管理及访问控制等功能有效保证网络资源的充分利用,切实保证满足各类用户的应用需求。
三层交换机在对第一个数据流进行路由后,会产生一个MAC地址与IP地址的映射表,当同样的数据流再次通过时,将根据映射表直接进行二层交换,也就是“一次路由,多次交换”,这样大大提高了数据包转发的效率,因而提高了VLAN网络的整体性能。
D-link des-3828三层交换机入门设置
买了台dlink的des-3828三层交换,一看说明书,头有点大了,全部e文。
因为必须要用三层功能,而且dlink的中文资料还挺难找的,所以咬牙看懂了大部分。
基本上和其他设置差不多,只是语法有点差异。
基本上了解下面这几点,你的三层交换机就可以工作了。
下面的设置是使用超级终端连接到设备进行的。
1.设置三层交换机的地址
config ipif System address 10.10.10.10/255.255.555.0
注意其中system的第一个s要大写,否则他要告诉你错误接口名称
2.输入命令的时候如果你没有输全,系统会提示你,但是在命令行中你前面输入的变成了空的,你需要按up键头,
记得修改最后要使用save,否则你的交换机一旦重启,你的设置信息就没有了。
3.创建用户
create account admin web
下面提示输入密码,设置你需要的密码
记得要save一下,reboot重新启动后进入,使用show account看以下你的帐户是不是在里面.如果你不高兴,或者觉得刚才起的名字不好,就可以使用delete account web将他删除掉。
先要看看自己现在是以和身份登陆到系统的,请使用show session命令查看
如果你使用web管理,记得第一步就是创建用户(admin权限),然后logout后,使用此用户进入进行设置,否则你的所有保存都是无效的。
4.显示交换机的一些基本信息
如果你想了解交换的一些基本信息,比较方便和全一点的是使用
show switch
如果你考虑安全因素,想关闭掉web和telnet连接到交换机管理
使用disable telnet,disable web关闭掉,如果开启就使用enable
5.重置交换机的信息
作为初学,肯定会在里面乱设置,最后你希望回到出厂设置,des3824不提供硬件上的重置按钮,需要在系统中重置.
命令很简单
reset config或者reset system
6.显示交换机现在端口的情况
show ports
下面进行到交换机二层及三层属性设置
7.创建vlan
在这前,你需要对你的网络结构有清晰的思路,比如我的两个网段,192.168.0.*,192.168.2.*,mask 都是255.255.255.0
所以先使用以下命令创建vlan
create vlan vlan1 tag 11
create vlan vlan2 tag 12
注意tag 1已经被系统默认的default vlan用掉了,所以你不能再使用它了。
8.创建vlan后需要给你设置的vlan指定端口
删除default vlan的端口
假如我们将交换机的1-12个端口分配给cvlan1,13-24分配给vlan2
config vlan default delete 1-28
config vlan vlan1 add untag 1-12
config vlan vlan2 add untag 13-24
9.给各vlan设置虚拟接口
create ipif vlan2if 192.168.2.1/255.255.255.0 vlan2 state enabled
create ipif vlan1if 192.168.0.1/255.255.255.0 vlan1 state enabled
这两个地址也就是你对应网段的网关
10.现在发现你的网络线插入不同vlan的端口,就会有不同的效果。
但是你可能是需要这两个网端之间要能访问的,所以你需要设置客户端的网关.虽然从说明书上说,到这里所有vlan是可以通讯的,但是你把终端的网关设置好,从一个vlan1 ping
vlan2的终端,应该就可以了,但是注意两台终端的防火墙问题,如果你开着就可能出线虽然ping 另一个vlan的接口地址是可以的,但ping不同另一个终端哦。
11.配置路由:因为我们需要两个vlan都可以通过我们的路由器上网,我们将连接到宽带路由器的端口设置成vlan3,设置接口地址为:192.168.20.1/255.255.255.0,配置方法同上面一样。
设置路由器的lan口地址为192.168.20.2.
因为交换机中所有到外部网的数据包都要通过这个路由器上lan口发送到,所以添加一条静态路由:create iproute default 192.168.20.2
这样所有的数据包都可以发送到外面了。
12.设置回程路由,前面的设置可以保证数据冲从vlan发送到外部,但是回程数据包就遇到问题.
所以我们还需要在宽带路由器上设置两条静态路由,分别对应192.168.2.0和192.168.1.0这两个vlan
192.168.0.0 255.255.255.0 192.168.20.1
192.168.2.0 255.255.255.0 192.168.20.1
如果上面配置没有问题,你的三层交换机就可以正常工作了。