赞
踩
企业网络综合项目分析、大型企业网络搭建
一家网络公司,有若干服务器,通过NAT技术将业务服务器与Internet互联;已有技术:
1)现有网络环境问题分析:
2)项目需求:
3)解决方案:
1.配置主机IP:
PC1:192.168.10.1 /24 192.168.10.254(VRRP)
PC2:192.168.20.1 /24 192.168.20.254(VRRP)
PC3:192.168.30.1 /24 192.168.30.254(VRRP)
PC4:192.168.40.1 /24 192.168.40.254(VRRP)
PC5:192.168.40.2 /24 192.168.40.254(VRRP)
2.配置二层交换机:
3.配置三层交换机:
4.配置路由器:
5.模拟外网环境:
步骤1:配置二层交换机,修改主机名并创建vlan10、20、30、40
[Huawei]sysname sw1 [sw1] [sw1] vlan batch 10 20 30 40 [sw1] displan vlan [Huawei]sysname sw2 [sw2] [sw2] vlan batch 10 20 30 40 [sw2] displan vlan [Huawei]sysname sw3 [sw3] [sw3] vlan batch 10 20 30 40 [sw3] displan vlan [Huawei]sysname sw4 [sw4] [sw4] vlan batch 10 20 30 40 [sw4] displan vlan
步骤2:配置二层交换机端口并加入对应VLAN
[sw1]interface Ethernet 0/0/1 [sw1-Ethernet0/0/1]port link-type access [sw1-Ethernet0/0/1]port default vlan 10 [sw2]interface Ethernet 0/0/1 [sw2-Ethernet0/0/1]port link-type access [sw2-Ethernet0/0/1]port default vlan 20 [sw3]interface Ethernet 0/0/1 [sw3-Ethernet0/0/1]port link-type access [sw3-Ethernet0/0/1]port default vlan 30 [sw4]interface Ethernet 0/0/1 [sw4-Ethernet0/0/1]port link-type access [sw4-Ethernet0/0/1]port default vlan 40 [sw4]interface Ethernet 0/0/2 [sw4-Ethernet0/0/1]port link-type access [sw4-Ethernet0/0/1]port default vlan 40
步骤3:配置二层交换机千兆口端口类型为Trunk
- [sw1] port-group 1
- [sw1-port-group-1] group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/2
- [sw1-port-group-1] port link-type trunk
- [sw1-port-group-1] port trunk allow-pass vlan all
- [sw2] port-group 1
- [sw2-port-group-1] group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/2
- [sw2-port-group-1] port link-type trunk
- [sw2-port-group-1] port trunk allow-pass vlan all
- [sw3] port-group 1
- [sw3-port-group-1] group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/2
- [sw3-port-group-1] port link-type trunk
- [sw3-port-group-1] port trunk allow-pass vlan all
- [sw4] port-group 1
- [sw4-port-group-1] group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/2
- [sw4-port-group-1] port link-type trunk
- [sw4-port-group-1] port trunk allow-pass vlan all
步骤4:配置三层交换机,修改主机名及创建VLAN及接口类型为Trunk
- [Huawei]sysname sw5
- [sw5]vlan batch 10 20 30 40
- [sw5]port-group 1
- [sw5-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/4
- [sw5-port-group-1]port link-type trunk
- [sw5-port-group-1]port trunk allow-pass vlan all
-
- [Huawei]sysname sw6
- [sw6]vlan batch 10 20 30 40
- [sw6]port-group 1
- [sw6-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/4
- [sw6-port-group-1]port link-type trunk
- [sw6-port-group-1]port trunk allow-pass vlan all
步骤5:配置三层交换机聚合链路
- [sw5]interface Eth-Trunk 1
- [sw5-Eth-Trunk1]trunkport GigabitEthernet 0/0/5 0/0/6
- [sw5-Eth-Trunk1]port link-type trunk
- [sw5-Eth-Trunk1]port trunk allow-pass vlan all
- [sw6]interface Eth-Trunk 1
- [sw6-Eth-Trunk1]trunkport GigabitEthernet 0/0/5 0/0/6
- [sw6-Eth-Trunk1]port link-type trunk
- [sw6-Eth-Trunk1]port trunk allow-pass vlan all
步骤6:配置三层交换机虚拟接口
- [sw5]inter vlan10
- [sw5-Vlanif10]ip add 192.168.10.252 24
- [sw5-Vlanif10]inter vlan20
- [sw5-Vlanif20]ip add 192.168.20.252 24
- [sw5-Vlanif20]inter vlan30
- [sw5-Vlanif30]ip add 192.168.30.252 24
- [sw5-Vlanif30]inter vlan40
- [sw5-Vlanif40]ip add 192.168.40.252 24
- [sw5-Vlanif40]display ip interface brief
- [sw6]inter vlan10
- [sw6-Vlanif10]ip add 192.168.10.253 24
- [sw6-Vlanif10]inter vlan20
- [sw6-Vlanif20]ip add 192.168.20.253 24
- [sw6-Vlanif20]inter vlan30
- [sw6-Vlanif30]ip add 192.168.30.253 24
- [sw6-Vlanif30]inter vlan40
- [sw6-Vlanif40]ip add 192.168.40.253 24
- [sw6-Vlanif40]display ip interface brief
步骤7:配置VRRP虚拟冗余协议,添加虚拟网关
- [sw5]interface Vlanif 10
- [sw5-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
- [sw5-Vlanif10]vrrp vrid 10 priority 105
- [sw5-Vlanif10]inter vlan 20
- [sw5-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
- [sw5-Vlanif20]vrrp vrid 20 priority 105
- [sw5-Vlanif20]inter vlan 30
- [sw5-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
- [sw5-Vlanif30]inter vlan 40
- [sw5-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254
- [sw6]interface Vlanif 10
- [sw6-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
- [sw6-Vlanif10]inter vlan 20
- [sw6-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
- [sw6-Vlanif20]inter vlan 30
- [sw6-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
- [sw6-Vlanif30]vrrp vrid 30 priority 105
- [sw6-Vlanif30]inter vlan 40
- [sw6-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254
- [sw6-Vlanif40]vrrp vrid 40 priority 105
步骤8:配置路由器IP地址
AR1:
- [ar1]interface GigabitEthernet 0/0/0
- [ar1-GigabitEthernet0/0/0]ip add 192.168.50.1 24
SW5:
- [sw5]vlan 50
- [sw5]interface vlan 50
- [sw5-Vlanif50]ip add 192.168.50.2 24
- [sw5]interface GigabitEthernet 0/0/7
- [sw5-GigabitEthernet0/0/7]port link-type access
- [sw5-GigabitEthernet0/0/7]port default vlan 50
- [sw5]ping 192.168.50.1 //测试
AR1:
- [ar1]interface GigabitEthernet 0/0/1
- [ar1-GigabitEthernet0/0/0]ip add 192.168.60.1 24
SW6:
- [sw6]vlan 60
- [sw6]interface vlan 60
- [sw6-Vlanif60]ip add 192.168.60.2 24
- [sw6]interface GigabitEthernet 0/0/7
- [sw6-GigabitEthernet0/0/7]port link-type access
- [sw6-GigabitEthernet0/0/7]port default vlan 60
- [sw6]ping 192.168.60.1 //测试
AR2:
- [ar2]interface GigabitEthernet 0/0/0
- [ar2-GigabitEthernet0/0/0]ip add 192.168.70.1 24
SW5:
- [sw5]vlan 70
- [sw5]interface vlan 70
- [sw5-Vlanif70]ip add 192.168.70.2 24
- [sw5]interface GigabitEthernet 0/0/8
- [sw5-GigabitEthernet0/0/8]port link-type access
- [sw5-GigabitEthernet0/0/8]port default vlan 70
- [sw5]ping 192.168.70.1 //测试
AR2:
- [ar2]interface GigabitEthernet 0/0/1
- [ar2-GigabitEthernet0/0/0]ip add 192.168.80.1 24
SW6
- [sw6]vlan 80
- [sw6]interface vlan 80
- [sw6-Vlanif80]ip add 192.168.80.2 24
- [sw6]interface GigabitEthernet 0/0/8
- [sw6-GigabitEthernet0/0/8]port link-type access
- [sw6-GigabitEthernet0/0/8]port default vlan 80
- [sw6]ping 192.168.80.1 //测试
[ar1] display ip interface brief
[ar2] display ip interface brief
[sw5] display ip interface brief
[sw6] display ip interface brief
步骤9:配置OSPF动态路由协议
SW5:
- [sw5]ospf
- [sw5-ospf-1]area 0
- [sw5-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
- [sw5-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
- [sw5-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
- [sw5-ospf-1-area-0.0.0.0]network 192.168.40.0 0.0.0.255
- [sw5-ospf-1-area-0.0.0.0]network 192.168.50.0 0.0.0.255
- [sw5-ospf-1-area-0.0.0.0]network 192.168.70.0 0.0.0.255
SW6:
- [sw6]ospf
- [sw6-ospf-1]area 0
- [sw6-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
- [sw6-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
- [sw6-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
- [sw6-ospf-1-area-0.0.0.0]network 192.168.40.0 0.0.0.255
- [sw6-ospf-1-area-0.0.0.0]network 192.168.60.0 0.0.0.255
- [sw6-ospf-1-area-0.0.0.0]network 192.168.80.0 0.0.0.255
AR1:
- [ar1]ospf
- [ar1-ospf-1]area 0
- [ar1-ospf-1-area-0.0.0.0]network 192.168.50.0 0.0.0.255
- [ar1-ospf-1-area-0.0.0.0]network 192.168.60.0 0.0.0.255
AR2:
- [ar2]ospf
- [ar2-ospf-1]area 0
- [ar2-ospf-1-area-0.0.0.0]network 192.168.70.0 0.0.0.255
- [ar2-ospf-1-area-0.0.0.0]network 192.168.80.0 0.0.0.255
[ar1] display ip routing-table | include /24
[ar2] display ip routing-table | include /24
步骤10:模拟外网环境,配置相关IP
SW7:
- [Huawei]sysname sw7
- [sw7]interface Vlanif 1
- [sw7-Vlanif1]ip add 100.0.0.10 8
AR1:
- [ar1]interface GigabitEthernet 0/0/2
- [ar1-GigabitEthernet0/0/2]ip add 100.0.0.1 8
AR2:
- [ar2]interface GigabitEthernet 0/0/2
- [ar2-GigabitEthernet0/0/2]ip add 100.0.0.2 8
步骤11:配置静态默认路由及宣告默认路由
AR1:
- [ar1]ip route-static 0.0.0.0 0 100.0.0.10 //配置静态默认路由,指定下一跳
- [ar1]ospf
- [ar1-ospf-1]default-route-advertise //宣告默认路由
[ar1-ospf-1]display ip routing-table
[sw5]display ip routing-table //三层交换机通过宣告学习到默认路由
AR2:
- [ar2]ip route-static 0.0.0.0 0 100.0.0.10 //配置静态默认路由,指定下一跳
- [ar2]ospf
- [ar2-ospf-1]default-route-advertise //宣告默认路由
[ar2-ospf-1]display ip routing-table
[sw6]display ip routing-table //三层交换机通过宣告学习到默认路由
步骤12:配置NAT-Easy IP方式地址转换
- [ar1]acl 2000
- [ar1-acl-basic-2000]rule permit source any
- [ar1-acl-basic-2000]quit
- [ar1]interface GigabitEthernet 0/0/2
- [ar1-GigabitEthernet0/0/2]nat outbound 2000
-
- [ar2]acl 2000
- [ar2-acl-basic-2000]rule permit source any
- [ar2-acl-basic-2000]quit
- [ar2]interface GigabitEthernet 0/0/2
- [ar2-GigabitEthernet0/0/2]nat outbound 2000
步骤13:PING测试结果
回顾:display
本篇章节为【第二阶段】NETWORK-DAY6 的学习笔记,这篇笔记可以初步了解到 企业网络综合项目分析、大型企业网络搭建。
Tip:毕竟两个人的智慧大于一个人的智慧,如果你不理解本章节的内容或需要相关笔记、视频,可私信小安,请不要害羞和回避,可以向他人请教,花点时间直到你真正的理解
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。