ospf、rip、nat多實驗綜合項目

1、實驗目的:
將動態路由的rip和ospf、單臂路由、多鏈路聚合、nat地址轉換等知識綜合,學習其中的原理,和數據轉發過程。
2、實驗步驟:
在這裏插入圖片描述
第一步:在ar10上:
(-interface GigabitEthernet0/0/0
-ip address 10.1.100.1 255.255.255.0
-interface GigabitEthernet0/0/2
-ip address 10.1.135.2 255.255.255.0
-interface LoopBack0
-ip address 5.5.5.5 255.255.255.255
-rip 1
-version 2
-network 10.0.0.0
-network 5.0.0.0

第二步:在ar9上:
(-interface GigabitEthernet0/0/0.21
-dot1q termination vid 21
-ip address 10.1.21.1 255.255.255.0
-arp broadcast enable
-interface GigabitEthernet0/0/0.22
-dot1q termination vid 22
-ip address 10.1.22.1 255.255.255.0
-arp broadcast enable
-interface GigabitEthernet0/0/1
-ip address 10.1.134.2 255.255.255.0
-interface GigabitEthernet0/0/2
-ip address 10.1.135.1 255.255.255.0
-interface LoopBack0
-ip address 4.4.4.4 255.255.255.255
-rip 1
-version 2
-network 10.0.0.0
-network 4.0.0.0

第三步:在ar8上:

-interface GigabitEthernet0/0/0
-Ip address 10.1.113.2 255.255.255.0
-interface GigabitEthernet0/0/1
-ip address 10.1.134.1 255.255.255.0
-interface LoopBack0
-ip address 3.3.3.3 255.255.255.255
-ospf 1 router-id 3.3.3.3
-import-route rip 1 cost 5 type 1
-area 0.0.0.0

  • network 3.3.3.3 0.0.0.0
    -network 10.1.113.0 0.0.0.255
    -rip 1
    -default-route originate
  • version 2
    -network 10.0.0.0
    -import-route ospf 1

    第四步:在ar7上:
    ( -interface GigabitEthernet0/0/0
    -ip address 10.1.113.1 255.255.255.0
    -interface GigabitEthernet0/0/1
    -ip address 10.1.111.1 255.255.255.0
    -interface GigabitEthernet0/0/2
    -ip address 10.1.112.1 255.255.255.0
    -interface GigabitEthernet6/0/0
    -ip address 202.2.12.2 255.255.255.0
    -Nat server protocol tcp global 202.2.12.3 www inside 10.1.100.100 www
    -nat outbound 2000
    -acl number 2000
    -rule 10 permit source 10.1.0.0 0.0.255.255
    interface LoopBack0
    ip address 2.2.2.2 255.255.255.255
    -ospf 1 router-id 2.2.2.2
    -default-route-advertise
    -area 0.0.0.0
    -network 2.2.2.2 0.0.0.0
    -network 10.1.111.0 0.0.0.255
    -network 10.1.112.0 0.0.0.255
    -network 10.1.113.0 0.0.0.255
    -ip route-static 0.0.0.0 0.0.0.0 202.2.12.1

    第五步:在lsw8:
    ( -interface Vlanif11
    -ip address 10.1.11.1 255.255.255.0
    -interface Vlanif12
    -ip address 10.1.12.1 255.255.255.0
    -interface Vlanif1000
    -ip address 10.1.122.11 255.255.255.0
    -interface Vlanif1001
    -ip address 10.1.111.12 255.255.255.0
    -interface Eth-Trunk1
    -port link-type access
    -port default vlan 1000
    -interface GigabitEthernet0/0/1
    -port link-type access
    -port default vlan 1001
    -interface GigabitEthernet0/0/21
    -port link-type access
    -port default vlan 11
    -interface GigabitEthernet0/0/22
    -port link-type access
    -port default vlan 12
    -interface LoopBack0
    -ip address 11.11.11.11 255.255.255.255
    -ospf 1 router-id 11.11.11.11
    -area 0.0.0.0
    -network 11.11.11.11 0.0.0.0
    -network 10.1.11.0 0.0.0.255
    -network 10.1.12.0 0.0.0.255
    -network 10.1.122.0 0.0.0.255
    -network 10.1.111.0 0.0.0.255
    第六步:在lsw9上
    (-interface Vlanif13
    -ip address 10.1.13.1 255.255.255.0
    -interface Vlanif14
    -ip address 10.1.14.1 255.255.255.0
    -interface Vlanif1000
    -ip address 10.1.122.12 255.255.255.0
    -interface Vlanif1002
    -ip address 10.1.112.12 255.255.255.0
    -interface Eth-Trunk1
    -port link-type access
    -port default vlan 1000

-interface GigabitEthernet0/0/2
-port link-type access
-port default vlan 14
(interface GigabitEthernet0/0/11
eth-trunk 1
interface GigabitEthernet0/0/12
eth-trunk 1)
-interface GigabitEthernet0/0/23
-port link-type access
-port default vlan 13
-un sh
-interface LoopBack0
-ip address 22.22.22.22 255.255.255.255
-ospf 1 router-id 22.22.22.22
-area 0.0.0.0
-network 10.1.13.0 0.0.0.255
-network 10.1.14.0 0.0.0.255
-network 10.1.122.0 0.0.0.255
-network 10.1.112.0 0.0.0.255
-network 22.22.22.22 0.0.0.0

第七步:在lsw3上:其他的lsw34567的交換機都一樣
(-interface Ethernet0/0/1
-port link-type access
-port default vlan 11
-interface GigabitEthernet0/0/1
-port link-type access
-port default vlan 11

第八步:在ar6上:
(-interface GigabitEthernet0/0/0
-ip address 202.2.2.1 255.255.255.0
-interface GigabitEthernet0/0/1
-ip address 202.2.12.1 255.255.255.0

3、實驗抓包:
提取pc1:10.1.11.100 24來ping 外網的pc202.2.2.100 24
在這裏插入圖片描述
從中可以發現私網的pc1的10.1.11.100在訪問外網時在經過ar7時轉化爲外網地址202.2.12.2。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章