大型企业网络规划案例

实验拓扑图:
大型企业网络规划案例
实验环境描述:
北大青鸟为了保证企业网关的稳定性,采用双线接入实现容错功能,默认转发数据从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
大型企业网络规划案例

猜你喜欢

转载自blog.51cto.com/14156658/2382516
今日推荐