1. 程式人生 > >小型企業網的三層架構(基於CISCO裝置)

小型企業網的三層架構(基於CISCO裝置)

小型企業網的三層架構(基於CISCO裝置,Packet Tracer7.0)

1.網路拓撲圖

在這裡插入圖片描述

2.實驗要求

     	1.Router0為ISP
     	2.三層交換與Router1連線的介面均為3層介面,右邊3層交換機與PC相連的介面也為三層介面
     	3.內網地址為172.16.0.0/16
    	4.HSRP或VRRP、STP、VLAN、DTP、TRUNK、VTP、均使用
     	5.控制路由表條目數量
     	6.全網可達PC DHCP地址

3.配置

(1).ISP

     		Router>enable
          	Router#configure terminal 
             	Router(config)#hostname ISP
             	ISP(config)#no ip domain-lookup
             	ISP(config)#line console 0
             	ISP(config-line)#logging synchronous 
             	ISP(config-line)#exec-timeout 0 0
             	ISP(config-line)#exit 
             	ISP(config)#interface loopback 0 
             	ISP(config-if)#ip address 1.1.1.1 255.255.255.0
             	ISP(config)#interface f0/0
             	ISP(config-if)#ip address 12.1.1.2 255.255.255.0
             	ISP(config-if)#no shutdown

(2).CORE

		Router(config)#hostname CORE
		CORE(config)#no ip domain-lookup 
		CORE(config)#line console 0
		CORE(config-line)#logging synchronous 
		CORE(config-line)#exec-timeout 0 0
		CORE(config-line)#exit
		CORE(config)#interface f1/0
		CORE(config-if)#ip address 12.1.1.1 255.255.255.0
		CORE(config-if)#no shutdown
		CORE(config-if)#exit
		CORE(config)#interface f0/0
		CORE(config-if)#ip address 172.16.0.1 255.255.255.0
		CORE(config-if)#no shutdown
		CORE(config)#interface f0/1
		CORE(config-if)#ip address 172.16.1.1 255.255.255.0
		CORE(config-if)#no shutdown
		**EIGRP**
		CORE(config)#router eigrp 100
		CORE(config-router)#no auto-summary
		CORE(config-router)#network 172.16.0.0
		**訪問外網**
		CORE(config)#interface f0/0
		CORE(config-if)#ip summary-address eigrp 100 0.0.0.0 0.0.0.0
		CORE(config)#interface f0/1
		CORE(config-if)#ip summary-address eigrp 100 0.0.0.0 0.0.0.0
		CORE(config)#ip route 0.0.0.0 0.0.0.0 f1/0
		CORE(config)#access-list 1 permit 172.16.0.0 0.0.255.255
		CORE(config)#interface f1/0
		CORE(config-if)#ip nat outside
		CORE(config)#interface f0/0
		CORE(config-if)#ip nat inside
		CORE(config)#interface f0/1
		CORE(config-if)#ip nat inside
		CORE(config)#ip nat inside source list 1 interface f1/0

(3).converge1

		Switch(config)#hostname CONVERGE1
		CONVERGE1(config)#no ip domain-lookup
		CONVERGE1(config)#line console 0
		CONVERGE1(config-line)#logging synchronous
		CONVERGE1(config-line)#exec-timeout 0 0
		CONVERGE1(config-line)#exit
		CONVERGE1(config)#interface f0/1
		CONVERGE1(config-if)#no switchport
		CONVERGE1(config-if)#ip address 172.16.0.2 255.255.255.0
		CONVERGE1(config-if)#no shutdown
		**Ether channel**
		CONVERGE1(config)#interface range f0/4,f0/5
		CONVERGE1(config-if-range)#channel-group 1 mode on
		CONVERGE1(config-if-range)#exit
		CONVERGE1(config)#interface port-channel 1
		CONVERGE1(config-if)#switchport trunk encapsulation dot1q 
		CONVERGE1(config-if)#switchport mode trunk
		**VTP(使client同步VLAN)**
		CONVERGE1(config)#vlan 2
		CONVERGE1(config-vlan)#name 2
		CONVERGE1(config-vlan)#exit
		CONVERGE1(config)#vlan 3
		CONVERGE1(config-vlan)#name 3
		CONVERGE1(config-vlan)#exit
		CONVERGE1(config)#vtp domain ccie
		CONVERGE1(config)#vtp mode server
		CONVERGE1(config)#vtp password 123
		**Trunk**
		CONVERGE1(config)#interface f0/2
		CONVERGE1(config-if)#switchport trunk encapsulation dot1q
		CONVERGE1(config-if)#switchport mode trunk
		**VLAN**
		CONVERGE1(config)#interface f0/3
		CONVERGE1(config-if)#switchport mode access
		CONVERGE1(config-if)#switchport access vlan 2
		CONVERGE1(config)#interface f0/6
		CONVERGE1(config-if)#switchport mode access
		CONVERGE1(config-if)#switchport access vlan 3
		**DHCP HSRP**
		CONVERGE1(config)#ip dhcp pool 1
		CONVERGE1(dhcp-config)#network 172.16.2.0 255.255.255.0
		CONVERGE1(dhcp-config)#default-router 10.1.1.1
		CONVERGE1(dhcp-config)#dns-server 8.8.8.8
		CONVERGE1(config)#ip dhcp pool 2
		CONVERGE1(dhcp-config)#network 172.16.3.0 255.255.255.0
		CONVERGE1(dhcp-config)#default-router 11.1.1.1
		CONVERGE1(dhcp-config)#dns-server 8.8.8.8
		**EIGRP**
		CONVERGE1(config)#ip routing
		CONVERGE1(config)#router eigrp 100
		CONVERGE1(config-router)#no auto-summary
		CONVERGE1(config-router)#network 0.0.0.0

(4).converge2

		Switch(config)#hostname CONVERGE2
		CONVERGE2(config)#no ip domain-lookup
		CONVERGE2(config)#line console 0
		CONVERGE2(config-line)#logging synchronous
		CONVERGE2(config-line)#exec-timeout 0 0
		CONVERGE2(config)#interface f0/1
		CONVERGE2(config-if)#no switchport
		CONVERGE2(config-if)#ip address 172.16.1.2 255.255.255.0
		CONVERGE2(config-if)#no shutdown
		**Ether channel**
		CONVREGE2(config)#interface range f0/4,f0/5
		CONVREGE2(config-if-range)#channel-group 1 mode on
		CONVREGE2(config-if-range)#exit
		CONVREGE2(config)#interface port-channel 1
		CONVREGE2(config-if)#switchport trunk encapsulation dot1q
		CONVREGE2(config-if)#switchport mode trunk
		**VTP(client端)**
		CONVREGE2(config)#vtp domain ccie
		CONVREGE2(config)#vtp mode client
		CONVREGE2(config)#vtp password 123
		**Trunk**
		CONVREGE2(config)#interface f0/6
		CONVREGE2(config-if)#switchport trunk encapsulation dot1q
		CONVREGE2(config-if)#switchport mode trunk
		**VLAN**
		CONVREGE2(config)#interface f0/2
		CONVREGE2(config-if)#switchport mode access
		CONVREGE2(config-if)#switchport access vlan 2
		CONVREGE2(config)#interface f0/3
		CONVREGE2(config-if)#switchport mode access
		CONVREGE2(config-if)#switchport access vlan 3
		**DHCP HSRP**
		CONVREGE2(config)#ip dhcp pool 1
		CONVREGE2(dhcp-config)#network 172.16.2.0 255.255.255.0
		CONVREGE2(dhcp-config)#default-router 10.1.1.1
		CONVREGE2(dhcp-config)#dns-server 8.8.8.8
		CONVREGE2(config)#ip dhcp pool 2
		CONVREGE2(dhcp-config)#network 172.16.3.0 255.255.255.0
		CONVREGE2(dhcp-config)#default-router 11.1.1.1
		CONVREGE2(dhcp-config)#dns-server 8.8.8.8
		**EIGRP**
		CONVREGE2(config)#ip routing
		CONVREGE2(config)#router eigrp 100
		CONVREGE2(config-router)#no auto-summary
		CONVREGE2(config-router)#network 0.0.0.0

(5).SW1

		Switch(config)#hostname SW1
		SW1(config)#no ip domain-lookup
		SW1(config)#line console 0
		SW1(config-line)#logging synchronous
		SW1(config-line)#exec-timeout 0 0
		**VTP(client端)**
		SW1(config)#vtp domain ccie
		SW1(config)#vtp mode client
		SW1(config)#vtp password 123
		**VLAN**
		SW1(config)#interface f0/3
		SW1(config-if)#switchport mode access
		SW1(config-if)#switchport access vlan 2
		SW1(config)#interface f0/4
		SW1(config-if)#switchport mode access
		SW1(config-if)#switchport access vlan 3

(6).SW2

		Switch(config)#hostname SW2
		SW2(config)#no ip domain-lookup
		SW2(config)#line console 0
		SW2(config-line)#logging synchronous
		SW2(config-line)#exec-timeout 0 0
		**VLAN**
		SW2(config)#interface range f0/1-4
		SW2(config-if-range)#switchport mode access
		SW2(config-if-range)#switchport access vlan 2

(7).SW3

		Switch(config)#hostname SW3
		SW3(config)#no ip domain-lookup
		SW3(config)#line console 0
		SW3(config-line)#logging synchronous
		SW3(config-line)#exec-timeout 0 0
		**VLAN**
		SW3(config)#interface range f0/1-4
		SW3(config-if-range)#switchport mode access
		SW3(config-if-range)#switchport access vlan 3

3.實驗結果

PC0

在這裡插入圖片描述

PC1

在這裡插入圖片描述

PC2

在這裡插入圖片描述

PC3

在這裡插入圖片描述

PC4

在這裡插入圖片描述

PC5

在這裡插入圖片描述

HSRP測試

在這裡插入圖片描述
在這裡插入圖片描述
在這裡插入圖片描述

訪問外網

在這裡插入圖片描述