大型企業網絡規劃案例

實驗拓撲圖:
大型企業網絡規劃案例
實驗環境描述:
北大青鳥爲了保證企業網關的穩定性,採用雙線接入實現容錯功能,默認轉發數據從SW1-3L,當SW1-3L發生故障SW2-3L轉發數據。

推薦步驟:
1.交換機互連鏈路使用Trunk
2.SW1-3L和SW2-3L配置以太網通道
3.在交換機上配置VTP域名是benet.com,SW1-3L配置爲VTP的Server模式,其他三臺交換機配置爲Clinet模式
4.在SW1-3L創建VLAN10和VLAN20同步到其他三臺交換機
5.將客戶端加入到不同的VLAN
6.將客戶端的所在接口配置成速端口
7.三層交換機開啓接口的路由功能配置IP地址,配置路由器R1的IP地址
8.SW1-3L交換機配置VLAN接口IP地址如下要求
VLAN10:192.168.10.100/24
VLAN20:192.168.20.100/24
9.SW2-3L交換機配置VLAN接口IP地址如下要求
VLAN10:192.168.10.200/24
VLAN20:192.168.20.200/24
10.在SW1-3L、SW2-3L配置生成樹,SW1-3L是VLAN10、VLAN20的根網橋;SW2-3L是VLAN10、VLAN20的備份根網橋
11.三層交換機配置默認路由,路由器配置靜態路由,全網互通
12.活躍路由器的優先級爲255,備份路由器的優先級爲200
13.PC機的IP地址和網關規劃(5分)
VLAN10_Server:192.168.10.1/24 GW:192.168.10.254
VLAN10-PC1:192.168.10.2/24 GW:192.168.10.254
VLLAN20-PC1:192.168.20.1/24 GW:192.168.20.254
VLAN20-PC2:192.168.20.2/24 GW:192.168.20.254
14.Down掉三層交換機SW1-3L的F0/11~14任意接口,在SW2查看HSRP備份路由器轉換活躍路由器
15.在路由器R1配置基於接口的PAT,客戶端ping外網主機查看地址轉換列表
16.在路由R1配置靜態端口映射NAT,將WEB_Server映射到路由器的R1的f2/0端口,外網主機訪問發佈的WEB服務器

實驗步驟:
此實驗用7個路由器,兩個交換機,橋接一臺虛擬機,自己的真機開啓vmnet1,配置一個IP地址,
大型企業網絡規劃案例
大型企業網絡規劃案例
添加模塊
大型企業網絡規劃案例
連接端口
大型企業網絡規劃案例
1.交換機互連鏈路使用Trunk

SW1-3L SW2-3L連續進入0/12 – 15接口配置爲trunk鏈路
SW1-3L(config)#interface range fastEthernet 0/12 - 15
SW1-3L(config-if-range)#switchport trunk encapsulation dot1q
SW1-3L(config-if-range)#switchport mode trunk
SW2-3L(config)#interface range fastEthernet 0/12 - 15
SW2-3L(config-if-range)#switchport trunk encapsulation dot1q
SW2-3L(config-if-range)#switchport mode trunk

SW3 SW4連續進入0/11 – 12接口配置爲trunk鏈路
SW3(config)#interface range fastEthernet 0/11 - 12
SW3(config-if-range)#switchport trunk encapsulation dot1q
SW3(config-if-range)#switchport mode trunk
SW4(config)#interface range fastEthernet 0/11 - 12
SW4(config-if-range)#switchport trunk encapsulation dot1q
SW4(config-if-range)#switchport mode trunk
2.SW1-3L和SW2-3L配置以太網通道

SW1-3L和SW2-3L連續進入0/12-13接口配置爲以太網通道
SW1-3L(config)#interface range fastEthernet 0/12 - 13
SW1-3L(config-if-range)#switchport mode trunk
SW1-3L(config-if-range)#channel-group 1 mode on
SW2-3L(config)#interface range fastEthernet 0/12 - 13
SW2-3L(config-if-range)#switchport mode trunk
SW2-3L(config-if-range)#channel-group 1 mode on
3.在交換機上配置VTP域名是benet.com,SW1-3L配置爲VTP的Server模式,其他三臺交換機配置爲Clinet模式

在SW1-3L進入vlan數據庫,創建域名爲benet.com 工作模式爲server
SW1-3L#vlan database
SW1-3L(vlan)#vtp domain benet.com
Changing VTP domain name from NULL to benet.com
SW1-3L(vlan)#vtp server
Device mode already VTP SERVER.

在SW2-3L SW3 SW4進入vlan數據庫,配置爲client客戶端
SW2-3L#vlan database
SW2-3L(vlan)#vtp domain benet.com
Domain name already set to benet.com .
SW2-3L(vlan)#vtp client
Setting device to VTP CLIENT mode.
SW3#vlan database
SW3(vlan)#vtp domain benet.com
Domain name already set to benet.com .
SW3(vlan)#vtp client
Setting device to VTP CLIENT mode.
SW4#vlan database
SW4(vlan)#vtp domain benet.com
Domain name already set to benet.com .
SW4(vlan)#vtp client
Setting device to VTP CLIENT mode.
4.在SW1-3L創建VLAN10和VLAN20同步到其他三臺交換機

在SW1-3L進入vlan數據庫,創建vlan10 vlan20
SW1-3L(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
SW1-3L(vlan)#vlan 20
VLAN 20 added:
Name: VLAN0020

在SW1-3L SW2-3L SW3 SW4上show vlan-switch b 查看vlan是否同步
大型企業網絡規劃案例
大型企業網絡規劃案例
大型企業網絡規劃案例
大型企業網絡規劃案例
5.將客戶端加入到不同的VLAN

在SW3將vlan 10加入0/1接口vlan 20加入0/2接口
SW3(config)#interface fastEthernet 0/1
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 10
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/2
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 20

在SW4將vlan 10加入0/1接口vlan 20加入0/2接口
SW4(config)#interface fastEthernet 0/1
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 10
SW4(config-if)#exit
SW4(config)#interface fastEthernet 0/2
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 20
6.將客戶端的所在接口配置成速端口

SW3 SW4連續進入0/1-2接口,配置爲速端口
SW3(config)#interface range fastEthernet 0/1 - 2
SW3(config-if-range)#spanning-tree portfast
SW4(config)#interface range fastEthernet 0/1 - 2
SW4(config-if-range)#spanning-tree portfast
7.三層交換機開啓接口的路由功能配置IP地址,配置路由器R1的IP地址

在SW1開啓路由功能,進入0/11接口,配置IP地址192.168.1.1
SW1-3L(config)#ip routing
SW1-3L(config)#interface fastEthernet 0/11
SW1-3L(config-if)#no switchport
SW1-3L(config-if)#ip address 192.168.1.1 255.255.255.0
SW1-3L(config-if)#no shutdown

在SW2開啓路由功能,進入0/11接口,配置IP地址192.168.2.1
SW2-3L(config)#ip routing
SW2-3L(config)#interface fastEthernet 0/11
SW2-3L(config-if)#no switchport
SW2-3L(config-if)#ip address 192.168.2.1 255.255.255.0
SW2-3L(config-if)#no shutdown

R1進入2/0接口配置IP地址192.168.100.254
R1(config)#interface fastEthernet 2/0
R1(config-if)#ip address 192.168.100.254 255.255.255.0
R1(config-if)#no shutdown

R1進入1/0接口配置IP地址192.168.1.254
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown

R1進入0/0接口配置IP地址192.168.2.254
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.2.254 255.255.255.0
R1(config-if)#no shutdown
8.SW1-3L交換機配置VLAN接口IP地址如下要求
VLAN10:192.168.10.100/24
VLAN20:192.168.20.100/24

SW1-3L進入vlan10 vlan 20 配置IP地址192.168.10.100 192.168.20.100
SW1-3L(config)#interface vlan 10
SW1-3L(config-if)#ip address 192.168.10.100 255.255.255.0
SW1-3L(config-if)#no shutdown
SW1-3L(config-if)#exit
SW1-3L(config)#interface vlan 20
SW1-3L(config-if)#ip address 192.168.20.100 255.255.255.0
SW1-3L(config-if)#no shutdown
9.SW2-3L交換機配置VLAN接口IP地址如下要求
VLAN10:192.168.10.200/24
VLAN20:192.168.20.200/24

SW2-3L進入vlan10 vlan 20 配置IP地址192.168.10.200 192.168.20.200
SW2-3L(config)#interface vlan 10
SW2-3L(config-if)#ip address 192.168.10.200 255.255.255.0
SW2-3L(config-if)#no shutdown
SW2-3L(config-if)#exit
SW2-3L(config)#interface vlan 20
SW2-3L(config-if)#ip address 192.168.20.200 255.255.255.0
SW2-3L(config-if)#no shutdown
10.在SW1-3L、SW2-3L配置生成樹,SW1-3L是VLAN10、VLAN20的根網橋;SW2-3L是VLAN10、VLAN20的備份根網橋

在SW1-3L配置vlan10 vlan20爲根網橋
SW1-3L(config)#interface vlan 10
SW1-3L(config-if)#exit
SW1-3L(config)#spanning-tree vlan 10 root primary
SW1-3L(config)#interface vlan 20
SW1-3L(config-if)#exit
SW1-3L(config)#spanning-tree vlan 20 root primary

在SW2-3L配置vlan10 vlan20爲備份根網橋
SW2-3L(config)#interface vlan 10
SW2-3L(config-if)#exit
SW2-3L(config)#spanning-tree vlan 10 root secondary
SW2-3L(config)#interface vlan 20
SW2-3L(config-if)#exit
SW2-3L(config)#spanning-tree vlan 20 root secondary
11.三層交換機配置默認路由,路由器配置靜態路由,全網互通

在SW1上配置默認路由,下一跳地址爲192.168.1.254
在SW2上配置默認路由,下一跳地址爲192.168.2.254
SW1-3L(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.254
SW2-3L(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.254

在R1配置去往10.0 20.0的靜態路由,下一跳爲192.168.1.1和192.168.2.1
R1(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1
R1(config)#ip route 192.168.20.0 255.255.255.0 192.168.1.1
R1(config)#ip route 192.168.10.0 255.255.255.0 192.168.2.1
R1(config)#ip route 192.168.20.0 255.255.255.0 192.168.2.1

開啓虛擬機,爲虛擬機添加vmnet1的網卡
大型企業網絡規劃案例
大型企業網絡規劃案例
添加完之後點擊確定,開啓虛擬機,配置IP地址,網關爲路由器2/0接口的IP地址,ping路由器2/0接口的IP地址是否互通
大型企業網絡規劃案例
用ping命令ping一下看是否全網互通
大型企業網絡規劃案例
大型企業網絡規劃案例
12.活躍路由器的優先級爲255,備份路由器的優先級爲200

在SW1上將vlan10 vlan20配置爲活躍路由器
SW1-3L(config)#interface vlan 10
SW1-3L(config-if)#standby 10 ip 192.168.10.254
SW1-3L(config-if)#standby 10 priority 255
Mar 1 01:43:48.107: %HSRP-6-STATECHANGE: Vlan10 Grp 10 state Standby -> Active
SW1-3L(config-if)#standby 10 track fastEthernet 0/11 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/12 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/13 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/14 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/15 100
SW1-3L(config-if)#standby 10 preempt
SW1-3L(config-if)#exit
SW1-3L(config)#interface vlan 20
SW1-3L(config-if)#standby 10 ip 192.168.20.254
SW1-3L(config-if)#standby 10 priority 255
SW1-3L(config-if)#standby 10 track fastEthernet 0/11 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/12 100
Mar 1 01:46:55.483: %HSRP-6-STATECHANGE: Vlan20 Grp 10 state Standby -> Active
SW1-3L(config-if)#standby 10 track fastEthernet 0/13 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/14 100
SW1-3L(config-if)#standby 10 track fastEthernet 0/15 100
SW1-3L(config-if)#standby 10 preempt

在SW2將vlan10 vlan20配置爲備份路由器
SW2-3L(config)#interface vlan 10
SW2-3L(config-if)#standby 10 ip 192.168.10.254
SW2-3L(config-if)#standby 10 priority 200
SW2-3L(config-if)#exit
SW2-3L(config)#interface vlan 20
SW2-3L(config-if)#standby 10 ip 192.168.20.254
SW2-3L(config-if)#standby 10 priority 200
13.PC機的IP地址和網關規劃(5分)
VLAN10_Server:192.168.10.1/24 GW:192.168.10.254
VLAN10-PC1:192.168.10.2/24 GW:192.168.10.254
VLLAN20-PC1:192.168.20.1/24 GW:192.168.20.254
VLAN20-PC2:192.168.20.2/24 GW:192.168.20.254

在vlan10-server客戶端關閉路由功能,開啓0/0接口,配置IP地址和網關,192.168.10.1 192.168.10.254
VLAN10-server(config)#no ip routing
VLAN10-server(config)#interface fastEthernet 0/0
VLAN10-server(config-if)#no shutdown
VLAN10-server(config)#interface fastEthernet 0/0
VLAN10-server(config-if)#ip address 192.168.10.1 255.255.255.0
VLAN10-server(config-if)#no shutdown
VLAN10-server(config-if)#exit
VLAN10-server(config)#ip default-gateway 192.168.10.254

在vlan10-pc1客戶端關閉路由功能,開啓0/0接口,配置IP地址和網關,192.168.10.2 192.168.10.254
VLAN10-PC1(config)#no ip routing
VLAN10-PC1(config)#interface fastEthernet 0/0
VLAN10-PC1(config-if)#no shutdown
VLAN10-PC1(config-if)#exit
VLAN10-PC1(config)#interface fastEthernet 0/0
VLAN10-PC1(config-if)#ip address 192.168.10.2 255.255.255.0
VLAN10-PC1(config-if)#no shutdown
VLAN10-PC1(config-if)#exit
VLAN10-PC1(config)#ip default-gateway 192.168.10.254

在vlan20-pc1客戶端關閉路由功能,開啓0/0接口,配置IP地址和網關,192.168.20.1 192.168.20.254
VLAN20-PC1(config)#no ip routing
VLAN20-PC1(config)#interface fastEthernet 0/0
VLAN20-PC1(config-if)#no shutdown
VLAN20-PC1(config-if)#exit
VLAN20-PC1(config)#interface fastEthernet 0/0
VLAN20-PC1(config-if)#ip address 192.168.20.1 255.255.255.0
VLAN20-PC1(config-if)#no shutdown
VLAN20-PC1(config-if)#exit
VLAN20-PC1(config)#ip default-gateway 192.168.20.254

在vlan20-pc2客戶端關閉路由功能,開啓0/0接口,配置IP地址和網關,192.168.20.2 192.168.20.254
VLAN20-PC2(config)#no ip routing
VLAN20-PC2(config)#interface fastEthernet 0/0
VLAN20-PC2(config-if)#no shutdown
VLAN20-PC2(config-if)#exit
VLAN20-PC2(config)#interface fastEthernet 0/0
VLAN20-PC2(config-if)#ip address 192.168.20.2 255.255.255.0
VLAN20-PC2(config-if)#no shutdown
VLAN20-PC2(config-if)#exit
VLAN20-PC2(config)#ip default-gateway 192.168.20.254
14.Down掉三層交換機SW1-3L的F0/11~14任意接口,在SW2查看HSRP備份路由器轉換活躍路由器

在SW1-3L連續進入0/11-15接口,shutdown關閉
SW1-3L(config)#interface range fastEthernet 0/11 - 15
SW1-3L(config-if-range)#shutdown
大型企業網絡規劃案例
15.在路由器R1配置基於接口的PAT,客戶端ping外網主機查看地址轉換列表

配置內部接口
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip nat inside
R1(config-if)#exit

配置外部接口
R1(config)#interface fastEthernet 2/0
R1(config-if)#ip nat outside

創建ACL抓取PAT流量,映射到2/0接口,開啓流量轉換監控
R1(config)#access-list 10 permit 192.168.10.0 0.0.0.255
R1(config)#access-list 10 permit 192.168.20.0 0.0.0.255
R1(config)#ip nat inside source list 10 interface fastEthernet 2/0 overload
R1(config)#exit
R1#
*Mar 1 02:26:01.575: %SYS-5-CONFIG_I: Configured from console by console
R1#debug ip nat
大型企業網絡規劃案例
大型企業網絡規劃案例
16.在路由R1配置靜態端口映射NAT,將WEB_Server映射到路由器的R1的f2/0端口,外網主機訪問發佈的WEB服務器

將WEB server映射到F2/0的IP地址192.168.100.254上
R1(config)#ip nat inside source static tcp 192.168.10.1 80 192.168.100.254 8080 extendable
大型企業網絡規劃案例

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