标签:2.0 sha lin 5.0 term res 0.0.0.0 oss blog
实验名称: 简单的模拟小型公司的构建网络配置实验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
标签:2.0 sha lin 5.0 term res 0.0.0.0 oss blog
原文地址:http://blog.51cto.com/14029008/2327943