路由器交换机综合实验
如果您对路由器设置和无线WIFI设置的操作方法不太了解,本文路由器交换机综合实验将为您提供一步一步的指导和解答。
本文目录一览:
交换机路由器配置实验
1,vlan 10 192.168.2.x/27
vlan 20 192.168.2.x/27
vlan 99 192.168.2.x/27
r1 s1 202.101.1.1/24
r1 f1 192.168.2.1/24
r2 s1 202.101.1.2/24
r2 f0 221.98.1.1/24
2,不会= =#
3,S3550-24中配置
enable
#conf t
(config)#vtp mode server
(config)#vtp domain shiyan
S2126G:
enable
#conf t
(config)#vtp mode client
(config)#vtp domian shiyan
S3550-24:
(config)#exit
#vlan database
(vlan)#vlan 10 name vlan10
(vlan)#vlan 20 name vlan20
(vlan)#vlan 99 name vlan99
(vlan)#exit
#conf t
(config)#int fa 0/23
(config-if)#switchport mode trunk
(config-if)#int fa 0/24
(config-if)#switchport mode trunk
S2126G:
(config)#int fa 0/23
(config-if)#switchport mode trunk
(config-if)#int fa 0/24
(config-if)#switchport mode trunk
(config-if)#int fa 0/1~10 (这里同时进入多个端口有的模拟器可能实现不了,可以一个一个移入VLAN 10)
(config-if)#switchport access vlan 10
(config-if)#int fa 0/11~20
(config-if)#switchport access vlan 20
S3550-24:
(config-if)#int fa 0/21
(有些版本的模拟器VTP服务器中已经把端口移入VLAN了,而客户机中还是没动静,这情况就自己再在客户
机上再把相应端口移入相应的VLAN里就好,别怕麻烦)
(config-if)#switchport access vlan 99
4,S3550-24:(忘了怎么配了。。。想到了补充给你)
5,不会~
6-7,
r1:
enable
#conf t
(config)#int s1
(config-if)#ip address 202.101.1.1 255.255.255.0
(config-if)#no shutdown
……(config-if)#encapsulation ppp
……(config-if)#ppp pap sent-username company_A password 0 star (PPP协议什么的我不会。。。)
(config-if)#int fa 1
(config-if)#ip address 192.168.2.1 255.255.255.0
(config-if)#no shutdown
(config-if)#exit
(config)#router rip
(config-xx)#version 2
(config-xx)#network 192.168.2.0
(config-xx)#network 202.101.1.0
r2:
enable
#conf t
(config)#int s1
(config-if)#ip address 202.101.1.2 255.255.255.0
(config-if)#no shutdown
……
……(这里还是那个什么PPP协议。。。)
(config-if)#int fa 0
(config-if)#ip address 221.98.1.1 255.255.255.0
(config-if)#no shutdown
(config-if)#exit
(config)#router rip
(config-xx)#version 2
(config-xx)#network 221.98.1.0
(config-xx)#network 202.101.1.0
8,不会~
用GNS3模拟器软件做路由器、交换机实验操作教程
方法/步骤
1、首先是通过百度搜索引擎搜索GNS3并下载,考虑到专用性建议去下载,当然也可以去官网上下载,下载后并安装模拟器。
2、我们以GNS3
v0.8.6
all-in-one为例,下载后解压并安装,进入到GNS3安装界面向导,我们选择下一步,接下来是使用协议是否同意,选择同意。
3、接下来是组件的选择,这个比较重要了,做什么实验需要选择相应的组件,GNS3、Dynamips和WinPCAP是必选的,根据你的需要是否选择抓包,是的话需要勾选wireshark选项等,最简便的方法就是全部选中,以免后面又需要某些组件。
4、选择下一步进行安装,会出现安装WinPCAP的界面,我们需要先安装这个软件,选择下一步,一直到完成安装WinPCAP,接下来是安装GNS3我们也选择下一步直到完成安装。
5、安装完成后打开GNS3,进入到GNS3的界面,尽管在左边可以看到路由器,交换机,防火墙的图标但仍然不可以做实验,我们还必须下载Cisco
IOS操作系统文件。
6、建议还是去百度去下载免费的IOS操作系统文件,建议用3640的IOS,一方面是文件比较小,另一方面可以做交换机的实验。
7、打开GNS3,选择编辑,选择IOS
images
and
hypervisors,在设置里面选择IOS文件的存放目录,平台选择3600,model选择3640,这样基本上就完成了基本的配置。
华为交换机配置vrrp、mstp综合实验
;
1.PC1的网关ip位于汇聚交换机A,PC2的网关IP位于汇聚交换机B,默认均为vlan 1;
2.核心交换机A 与核心交换机B 采用VRRP实现高可用,双机互联端口采用二层聚合;
3.核心交换机A 指定为Vlan 194 和 vlan 192 的根桥(bridge root),核心交换机B指定为vlan195 和vlan193的根桥(bridge root);
汇聚层交换机A:
#生成树的模式选为mstp
stp mode mstp
#进入生成树的配置模式
stp region-configuration
region-name yongfu
#创建实例1,将vlan192、194划到实例1中
instance 1 vlan 192 194
#创建实例1,将vlan193、195划到实例2中
instance 2 vlan 193 195
#激活配置
active region-configuration
interface Vlanif1
#接入层交换机的网关ip
ip address 10.12.192.254 255.255.255.128
interface Vlanif192
ip address 10.13.192.156 255.255.255.248
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#配置环回接口的IP地址
interface LoopBack0
ip address 1.1.1.1 255.255.255.0
#配置route-id 1.1.1.1
ospf 1 router-id 1.1.1.1
area 0
#宣告直连网络
network 10.13.192.0 0.0.0.255
network 10.12.192.128 0.0.0.127
汇聚层交换机B:
vlan batch 193
stp mode mstp
stp region-configuration
region-name yongfu
instance 1 vlan 192 194
instance 2 vlan 193 195
active region-configuration
interface Vlanif1
#pc2的网关ip
ip address 10.14.192.126 255.255.255.128
interface Vlanif193
ip address 10.13.193.156 255.255.255.248
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 193
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 193
#配置ospf,手动设置route-id
ospf 1 router-id 2.2.2.2
area 0
#宣告直连网段
network 10.14.192.0 0.0.0.127
network 10.13.193.152 0.0.0.7
核心交换机lsw1:
#创建vlan192-195
vlan batch 192 to 195
#指定该交换机为实例1的根网桥(即为vlan 192、194的根桥)
stp instance 1 root primary
#指定该交换机为实例2的根网桥(即为vlan 193、195的备根桥)
stp instance 2 root secondary
#配置mstp生成树协议
stp mode mstp
stp region-configuration
region-name yongfu
instance 1 vlan 192 194
instance 2 vlan 193 195
active region-configuration
interface Vlanif192
ip address 10.13.192.153 255.255.255.248
#配置vrrp协议,vrid为192,虚拟网关地址为10.13.192.155
vrrp vrid 192 virtual-ip 10.13.192.155
#默认优先级是100,现将优先级设置为120,为主网关设备
vrrp vrid 192 priority 120
interface Vlanif193
ip address 10.13.193.153 255.255.255.248
#不配置优先级,默认为100,作为备用网关
vrrp vrid 193 virtual-ip 10.13.193.155
interface Vlanif194
ip address 10.13.194.1 255.255.255.248
vrrp vrid 194 virtual-ip 10.13.194.3
vrrp vrid 194 priority 120
interface Vlanif195
ip address 10.13.195.1 255.255.255.248
vrrp vrid 195 virtual-ip 10.13.195.3
#配置聚合口
interface Eth-Trunk1
port link-type trunk
#放通所有vlan
port trunk allow-pass vlan 2 to 4094
#将接口划分为对应的vlan
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 192
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 193
#将GigabitEthernet0/0/3、GigabitEthernet0/0/4捆绑成一个聚合口
interface GigabitEthernet0/0/3
eth-trunk 1
interface GigabitEthernet0/0/4
eth-trunk 1
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#配置ospf,进程号为1,route-id为3.3.3.3
ospf 1 router-id 3.3.3.3
area 0.0.0.0
#宣告直连网段
network 10.13.192.152 0.0.0.7
network 10.13.193.152 0.0.0.7
network 10.13.194.0 0.0.0.7
network 10.13.195.0 0.0.0.7
ip route-static 19.130.107.0 255.255.255.192 10.13.194.5
核心交换机lsw2:(配置与lsw1相似)
#创建vlan192-195
vlan batch 192 to 195
stp mode mstp
stp instance 2 root primary
stp instance 1 root secondary
stp region-configuration
region-name yongfu
instance 1 vlan 192 194
instance 2 vlan 193 195
active region-configuration
#配置个接口的ip地址,配置vrrp,设置主、备网关
interface Vlanif192
ip address 10.13.192.154 255.255.255.248
vrrp vrid 192 virtual-ip 10.13.192.155
interface Vlanif193
ip address 10.13.193.154 255.255.255.248
vrrp vrid 193 virtual-ip 10.13.193.155
vrrp vrid 193 priority 120
interface Vlanif194
ip address 10.13.194.2 255.255.255.248
vrrp vrid 194 virtual-ip 10.13.194.3
interface Vlanif195
ip address 10.13.195.2 255.255.255.248
vrrp vrid 195 virtual-ip 10.13.195.3
vrrp vrid 195 priority 120
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 192
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 193
interface GigabitEthernet0/0/3
eth-trunk 1
interface GigabitEthernet0/0/4
eth-trunk 1
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
交换机lsw14:
vlan batch 194
stp mode mstp
stp region-configuration
region-name yongfu
instance 1 vlan 192 194
instance 2 vlan 193 195
active region-configuration
interface Vlanif1
ip address 10.13.192.133 255.255.255.252
interface Vlanif194
ip address 10.13.194.5 255.255.255.248
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 194
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 194
#配置ospf,进程号为1,route-id 5.5.5.5
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 10.13.194.0 0.0.0.7
network 10.13.192.132 0.0.0.3
ip route-static 19.130.107.0 255.255.255.0 10.13.192.134
交换机lsw15:
vlan batch 195
stp mode mstp
stp region-configuration
region-name yongu
instance 1 vlan 192 194
instance 2 vlan 193 195
active region-configuration
interface Vlanif1
ip address 10.13.192.149 255.255.255.252
interface Vlanif195
ip address 10.13.195.5 255.255.255.248
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 195
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 195
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 10.13.192.148 0.0.0.3
network 10.13.195.0 0.0.0.7
ip route-static 61.142.211.0 255.255.255.0 10.13.192.150
出口路由器R1:
interface Ethernet0/0/0
ip address 10.13.192.134 255.255.255.252
interface Ethernet0/0/1
ip address 19.130.107.1 255.255.255.0
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 10.13.192.132 0.0.0.3
network 19.130.107.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 10.13.192.133
出口路由器R2:
interface Ethernet0/0/0
ip address 10.13.192.150 255.255.255.252
interface Ethernet0/0/1
interface GigabitEthernet0/0/0
ip address 61.142.211.122 255.255.255.0
nat static global 61.142.211.123 inside 10.12.194.1 netmask 255.255.255.255
nat static enable
ospf 1 router-id 8.8.8.8
area 0.0.0.0
network 10.13.192.148 0.0.0.3
network 61.142.211.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 10.13.192.149
交换机路由器技术及基配置的实验
你问题不是问题啊,交换机和路由器有很多种配置,你没说清要实现什么功能。
了解这些技巧,您可以更好地控制您的网络连接,并获得更快的网络速度和更安全的连接。