思科模拟器-组建一个局域网

思科模拟器-组建一个局域网

【引言】

前些日子某位同学忽然给我发来一个作业,让我帮 ta 看看,我看了一下觉得这个题还是有点意思的,特此记录一下。

【题目】

一、实验环境:

某公司要搭建一个企业内部网,需对网络进行规划设计。

公司概况: 共5个部门

    财务处(5人)

    行政办公室(3人)

    科室1(12人)

    科室2(15人)

    科室3(10人)

    经理办公室(1人)

二、实验要求:

1、每个部门属于不同网段但是又能相互通信。

2、每台PC需自动获取IP地址并且经理办公室1台PC和行政办公室1台打印机IP地址固定。

3、每台PC要能利用FTP上传下载文件。

 三、...

【分析题目】

 可能可出题者不是那么严谨,也没有做限制,可以说是比较随意了。同时也未告诉我们比较详细的一些信息,还忽略了一些信息,但总的来说,还行叭。通过分析我们可以发现它的主机数共46个(未算打印机)。

我这里采用的网段是:192.168.10.0,通过 VLSM 划分。

由于采用的 2960 交换机,所以每个交换机的快速以太网接口共24个,考虑到每个每个科室、财务室、行政办公室、经理办公室应该处于不同的地理位置,故采用了多个交换机。如果现实中位于同一个地理空间内,则可划一个交换机内划分多个 valn 以节省交换机的数量从而减少浪费。

另外路由器是采用的 2911 路由器,每个路由器上面有三个光以太网接口,而我,哈哈,就比较奢侈了,其实在现实中,我们为了节省资源避免浪费采用星型拓扑结构把多个交换机连起来就完事了。但是我这里采用环型拓扑也是有它的好处,就是即便一台路由设备出错了其他的路由设备还能正常工作(除开配有dns和ftp的路由出故障)。

因为是环形拓扑图,故每个路由器之间要相连,一共5个路由器(每个接口一个)故需要10个 ip 地址。

接下来我们的配置路线如下:路由器>交换机>服务器>PC电脑以及其他设备。

【连接设备】

0.png

略(同交异直)...

【配置路由器】

这里采用了单臂路由的子接口划法加上 RIP ,下面是指令:

R0
enable
configure terminal
hostname R0
interface GigabitEthernet 0/0
ip address 192.168.10.1 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
interface GigabitEthernet 0/1.1
encapsulation dot1Q 10
ip address 192.168.10.62 255.255.255.224
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/1.2
encapsulation dot1Q 99
ip address 192.168.10.129 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/2
ip address 192.168.10.18 255.255.255.252
no shutdown
exit
router rip
version 2
no auto-summary
network 192.168.10.0
end
write

R1
enable
configure terminal
hostname R1
interface GigabitEthernet 0/0
ip address 192.168.10.2 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
interface GigabitEthernet 0/1.1
encapsulation dot1Q 20
ip address 192.168.10.78 255.255.255.240
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/1.2
encapsulation dot1Q 99
ip address 192.168.10.134 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/2
ip address 192.168.10.5 255.255.255.252
no shutdown
exit
router rip
version 2
no auto-summary
network 192.168.10.0
end
write

R2
enable
configure terminal
hostname R2
interface GigabitEthernet 0/0
ip address 192.168.10.9 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
interface GigabitEthernet 0/1.1
encapsulation dot1Q 30
ip address 192.168.10.86 255.255.255.248
no shutdown
exit
interface GigabitEthernet 0/1.2
encapsulation dot1Q 99
ip address 192.168.10.138 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/2
ip address 192.168.10.6 255.255.255.252
no shutdown
exit
router rip
version 2
no auto-summary
network 192.168.10.0
end
write

R3
enable
configure terminal
hostname R3
interface GigabitEthernet 0/0
ip address 192.168.10.10 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
interface GigabitEthernet 0/1.1
encapsulation dot1Q 40
ip address 192.168.10.110 255.255.255.240
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/1.2
encapsulation dot1Q 50
ip address 192.168.10.150 255.255.255.252
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/1.3
encapsulation dot1Q 60
ip address 192.168.10.126 255.255.255.240
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/1.4
encapsulation dot1Q 99
ip address 192.168.10.142 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/1
ip address 192.168.10.10 255.255.255.240
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/2
ip address 192.168.10.13 255.255.255.252
no shutdown
exit
router rip
version 2
no auto-summary
network 192.168.10.0
end
write

R4
enable
configure terminal
hostname R4
interface GigabitEthernet 0/0
ip address 192.168.10.14 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
interface GigabitEthernet 0/1.1
encapsulation dot1Q 70
ip address 192.168.10.174 255.255.255.240
ip helper-address 192.168.10.81
no shutdown
exit
interface GigabitEthernet 0/1.2
encapsulation dot1Q 99
ip address 192.168.10.146 255.255.255.252
no shutdown
exit
interface GigabitEthernet 0/2
ip address 192.168.10.17 255.255.255.252
no shutdown
exit
router rip
version 2
no auto-summary
network 192.168.10.0
end
write

【配置交换机】

S0
enable
configure terminal
vlan 10
vlan 99
exit
hostname S0
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan 10,99
no shutdown
exit
interface vlan 99
ip address 192.168.10.129 255.255.255.252
exit
ip default-gateway 192.168.10.130
interface GigabitEthernet 0/2
shutdown
interface range FastEthernet 0/1-15
switchport mode access
switchport access vlan 10
no shutdown
interface range FastEthernet 0/16-24
shutdown
end
write

S1
enable
configure terminal
vlan 20
vlan 99
exit
hostname S0
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan 20,99
no shutdown
exit
interface vlan 99
ip address 192.168.10.133 255.255.255.252
interface GigabitEthernet 0/2
shutdown
interface range FastEthernet 0/1-12
switchport mode access
switchport access vlan 20
no shutdown
interface range FastEthernet 0/13-24
shutdown
end
write

S2
enable 
configure terminal
vlan 30
vlan 99
exit
hostname S2
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan 30,99
no shutdown
exit
interface vlan 99
ip address 192.168.10.137 255.255.255.252
exit
ip default-gateway 192.168.10.138
interface GigabitEthernet 0/2
shutdown
exit
interface range FastEthernet 0/1-2
switchport mode access
no shutdown
exit
interface range FastEthernet 0/3-24
shutdown
end
write

S3
enable 
configure terminal
vlan 40
vlan 50
vlan 60
vlan 99
exit
hostname S3
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan 40,50,60,99
no shutdown
exit
interface vlan 99
ip address 192.168.10.141 255.255.255.252
exit
ip default-gateway 192.168.10.142
interface GigabitEthernet 0/2
shutdown
exit
interface range FastEthernet 0/1-6
switchport mode access
switchport access vlan 40
no shutdown
exit
interface FastEthernet 0/7
switchport mode access
switchport access vlan 50
no shutdown
exit
interface range FastEthernet 0/8-10
switchport mode access
switchport access vlan 60
no shutdown
exit
interface range FastEthernet 0/11-24
shutdown
end
write

S4
enable 
configure terminal
vlan 70
vlan 99
exit
hostname S4
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan 70,99
exit
interface vlan 99
ip address 192.168.10.145 255.255.255.252
exit
ip default-gateway 192.168.10.146
interface GigabitEthernet 0/2
shutdown
interface range FastEthernet 0/1-10
switchport mode access
switchport access vlan 70
no shutdown
interface range FastEthernet 0/11-24
shutdown
end
write

【配置服务器】

1.png

【完结】

撒花花QAQ~


回复列表



回复操作

正在加载验证码......

请先拖动验证码到相应位置

发布时间:2020-07-19 18:29:52

修改时间:2020-07-21 20:53:42

查看次数:156

评论次数:0