简单的模拟小型公司网络配置实验
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了简单的模拟小型公司网络配置实验相关的知识,希望对你有一定的参考价值。
实验名称: 简单的模拟小型公司的构建网络配置实验
实验要求:
1、R1R2R3分别连接不同的楼宇 ABC
2、楼宇A 、
#存在 VLAN 10 、vlan 20 、 vlan 30 网段为: 192.168.10.0/24
192.168.20.0/24
192.168.30.0/24
#PC-1/3 属于 vlan 10 ,自动获取ip地址;
#pc-2/4 属于 vlan 20 ,自动获取ip地址;
#sw5作为 DHCP 服务器,属于 vlan 30;
#sw1与sw5 的弧线端口的模式为 hybrid;
#vlan 10 和vlan 20 的网关在R1上;
#vlan 30 的网关在sw1 上;
3、楼宇B
#存在 vlan 10 vlan 20, 网段为: 10.10.10.0/24
10.10.20.0/24
#vlan 10 / vlan 20 的网关位于sw3 上,为 10.10.x.254/24;
4、楼宇C
#存在 vlan10 ,主机自动获取ip地址,网段为: 100.1.1.0/24
#sw4 作为 DHCP-server
#vlan 10 的网关位于 R3 上面;
5、R1-R2 之间为: 192.168.12.0/24 ; R2-R3之间为 192.168.23.0/24
6、如果需要用到其他网段,可以而难以添加和设置;
7、不同网络之间,通过RIP互联,确保全网主机可以互相通信;
实验拓扑:
实验步骤:
楼A;
#sw1
vlan batch 10 20 30
interface g0/0/1
port link-type access
port de vlan 10
interface g0/0/2
port link-type access
port de vlan 20
interface g0/0/3
port link-type trunk
port trunk a vlan 10 20
interface g0/0/23
port link-type access
port de vlan 10
interface g0/0/22
port link-type access
port de vlan 30
interface g0/0/24
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#sw2
vlan batch 10 20
interface g0/0/1
port link-type access
port de vlan 10
interface g0/0/3
port link-type trunk
port trunk a vlan 10 20
port-group 1
group-member g0/0/2 g0/0/24
port link-type access
port de vlan 20
#sw5
dhcp enable
vlan 30
interface vlan 30
ip add 192.168.30.200 255.255.255.0
dhcp select global
ip pool vlan-10
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.254
ip pool vlan-20
network 192.168.20.0 mask 255.255.255.0
gateway-list 192.168.20.254
interface g0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
IP route-static 0.0.0.0 0.0.0.0 192.168.30.254
#R1
dhcp enable
interface g0/0/0
ip add 192.168.10.254 255.255.255.0
dhcp select relay
dhcp relay server-ip 192.168.30.200
interface g4/0/0
ip address 192.168.30.254 255.255.255.0
interface g0/0/1
ip add 192.168.20.254 255.255.255.0
dhcp select relay
dhcp relay server-ip 192.168.30.200
interface g0/0/2
ip add 192.168.12.1 255.255.255.0
rip
version 2
network 192.168.12.0
network 192.168.10.0
network 192.168.20.0
network 192.168.30.0
楼B:
#R2
interface g0/0/1
ip add 192.168.12.2 255.255.255.0
interface g0/0/0
ip add 192.168.23.1 255.255.255.0
interface g0/0/2
ip add 10.10.10.1 255.255.255.0
rip
version 2
network 192.168.12.0
network 192.168.23.0
network 10.0.0.0
#SW3
vlan batch 10 20
interface vlan 10
ip add 10.10.10.254 255.255.255.0
interface vlan 20
ip add 10.10.20.254 255.255.255.0
interface g0/0/1
port link-type access
port def vlan 10
interface g0/0/2
port link-type access
port def vlan 20
rip
version 2
network 10.0.0.0
#pc5
配置IP 10.10.20.2 255.255.255.0
网关 10.10.20.254
楼C
#sw4
vlan 10
dhcp enable
IP pool vlan-10
network 100.1.1.0 mask 255.255.255.0
gateway-list 100.1.1.254
excluded-ip-address 100.1.1.253
interface vlan 10
ip add 100.1.1.253 255.255.255.0
dhcp select global
port-group 1
group-member g0/0/1 g0/0/2 g0/0/3
port link-type access
port de vlan 10
#R3
dhcp enable
interface g0/0/0
ip add 192.168.23.2 255.255.255.0
interface g0/0/2
ip add 100.1.1.254 255.255.255.0
dhcp select relay
dhcp relay server-ip 100.1.1.253
dhcp enable
rip
version 2
network 192.168.23.0
network 100.0.0.0
以上是关于简单的模拟小型公司网络配置实验的主要内容,如果未能解决你的问题,请参考以下文章