实验6企业级网络构建与配置实现
思路来源是这里
不得不说这个哥们写的是相当nice!但是可能由于笔误敲错了一个命令。
本文基于这位老哥的实验思路,将OSPF替换成RIP。(因为某师专的机器好像跑不了OSPF)
拓扑图
设备密码
交换机密码
默认登录名: admin
默认密码: admin@huawei.com
进入后根据提示强制改密(输入y)
admin@huawei.com
huawei@123
huawei@123
路由器密码
用户名huawei
密码Huawei@123
或者
用户名admin
密码Admin@huawei
(根据以前的实验,应该是admin)
各设备的Console与PC对应关系,连线
总体以拓扑图的就近原则。如果设备没有直连的PC,则按拓扑图向下寻找。
即:
L3S1 : PC1
L3S2: PC3
L2S1: PC2
L2S2: PC3
R1: PC4
R2: PC5
R3:PC6
R4:PC5
各PC配置自己的IP地址与子网掩码、网关
注意:统一用二号网卡,禁用外网网卡
掩码全是255.255.255.0(注意!在配置的时候,有时windows给出的默认掩码并不是255.255.255.0 不要跟着windows的默认掩码配置!)
第一行是IP地址,第二行是网关
PC1
192.168.10.2
192.168.10.1
PC2
192.168.100.2
192.168.100.1
PC3
192.168.100.3
192.168.100.1
PC4
115.48.0.3
115.48.0.2
PC5
172.24.0.2
172.24.0.1
PC6
172.22.0.2
172.22.0.1
各PC访问管理的设备,并给设备命名
sys name xxx
给端口设置IP地址
标*的是一台PC控制了两个设备,注意不要进错设备控制台
L3S1 (PC1)
vlan1
interface vlanif 1
ip address 192.168.1.1 255.255.255.0
L3S2(PC3*)
vlan1
interface vlanif 1
ip address 192.168.1.4 255.255.255.0
L2S1(PC2)
vlan1
interface vlanif 1
ip address 192.168.1.2 255.255.255.0
L2S2(PC3*)
vlan1
interface vlanif 1
ip address 192.168.1.3 255.255.255.0
R1(PC4)
这里所有路由器的ip address 后面要加掩码
interface g0/0/0
ip address 192.168.1.5 255.255.255.0
quit
interface g0/0/1
ip address 115.48.0.2 255.255.255.0
quit
R2(PC5*)
interface g0/0/0
ip address 192.168.1.6 255.255.255.0
quit
interface g0/0/1
ip address 172.23.0.1 255.255.255.0
quit
interface g0/0/2
ip address 172.21.0.1 255.255.255.0
quit
R3(PC6)
interface g0/0/0
ip address 172.21.0.2 255.255.255.0
quit
interface g0/0/1
ip address 172.22.0.1 255.255.255.0
quit
R4(PC5*)
interface g0/0/0
ip address 172.23.0.2 255.255.255.0
quit
interface g0/0/1
ip address 172.24.0.1 255.255.255.0
quit
交换机VLAN设置
L3S1:
vlan 10
int vlan 10
ip address 192.168.10.1 24
vlan 100
int vlan 100
ip address 192.168.100.1 24
L3S2:
vlan 10
int vlan 10
ip address 192.168.10.1 24
vlan 100
int vlan 100
ip address 192.168.100.1 24
L2S1:
vlan 10
int vlan 10
ip address 192.168.10.1 24
vlan 100
int vlan 100
ip address 192.168.100.1 24
L2S2:
vlan 10
int vlan 10
ip address 192.168.10.1 24
vlan 100
int vlan 100
ip address 192.168.100.1 24
交换机与主机之间的配置
L3S1:
int g0/0/1
port link-type access
port default vlan 10
L2S1:
int g0/0/2
port link-type access
port default vlan 100
L2S2:
int g0/0/2
port link-type access
port default vlan 100
交换机之间的配置
L3S1
int g0/0/2
port link-type trunk
port trunk allow-pass vlan all
L3S2
int g0/0/4
port link-type trunk
port trunk allow-pass vlan all
L2S1
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
L2S2
注意:这里原文写的是 g0/0/2。有可能有误,此处改为001
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
链路聚合
L3S1
int Eth-Trunk 1
int g0/0/4
eth-trunk 1
int g0/0/3
eth-trunk 1
int Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan all
L3S2
int Eth-Trunk 1
int g0/0/5
eth-trunk 1
int g0/0/1
eth-trunk 1
int Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan all
交换机与路由器之间的配置
L3S2
int g0/0/2
port link-type trunk
port trunk allow-pass vlan all
int g0/0/3
port link-type trunk
port trunk allow-pass vlan all
RIP设置
L3S1
rip
version 2
network 192.168.1.0
network 192.168.10.0
L3S2
rip
version 2
network 192.168.1.0
L2S1
rip
version 2
network 192.168.1.0
network 192.168.100.0
L2S2
rip
version 2
network 192.168.1.0
network 192.168.100.0
R1
rip
version 2
network 192.168.1.0
network 115.0.0.0
R2
rip
version 2
network 192.168.1.0
network 172.21.0.0
network 172.23.0.0
R3
rip
version 2
network 172.21.0.0
network 172.22.0.0
R4
rip
version 2
network 172.23.0.0
network 172.24.0.0
Ping测试
PC1ping任何设备 通
PC2 PC3 相互ping 通
PC2 PC3 ping PC1 通
PC1: 192.168.10.2
PC2: 192.168.100.2
PC3: 192.168.100.3
PC4: 115.48.0.3
PC5: 172.24.0.2
PC6: 172.22.0.2