1. 程式人生 > >簡單的模擬小型公司網路配置實驗

簡單的模擬小型公司網路配置實驗

實驗名稱: 簡單的模擬小型公司的構建網路配置實驗
實驗要求:
1、R1\R2\R3分別連線不同的樓宇 A\B\C
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