Cisco之中小型企业网络

简介:

    网络架构图如下:

wKiom1kNgx6jZfARAACuVZp5QK4315.jpg-wh_50

一 网络架构方案设计

1.1 方案说明

  • 公司网络由核心层和接入层组成,核心层为网络的骨干部分。

  • 不同部门使用不同的VLAN

  • 把vlan154中的服务器发布到外网,并使VM1可以访问

  • 使vlan155网段可以访问外网

  • 管理vlan为vlan100

  • 使用ACL增强网络的安全性


1.2 IP地址规划

vlan154:172.16.154.0/24    网关:172.16.154.254

vlan155:172.16.155.0/24    网关:172.16.155.254

vlan100:172.16.100.0/24    网关:172.16.100.254


二 方案的实施

建立vlan、配置VTP同步,sw1和sw2操作一致:

SW_R(config)#hostname sw_r

sw_r(config)#ip routing

sw_r(config)#vlan 100

sw_r(config-vlan)#vlan 154

sw_r(config-vlan)#vlan 155

sw_r#show vlan-switch 


VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa1/0, Fa1/1, Fa1/2, Fa1/3

                                                Fa1/4, Fa1/5, Fa1/6, Fa1/7

                                                Fa1/8, Fa1/9, Fa1/10, Fa1/11

                                                Fa1/12, Fa1/13, Fa1/14, Fa1/15

100  VLAN0100                         active    

154  VLAN0154                         active    

155  VLAN0155                         active    


sw_r(config)#int range f1/1 , f1/3

sw_r(config-if-range)#sw mode trunk

sw_r(config)#vtp domain cisco

sw_r(config)#vtp password cisco

sw_r(config)#vtp mode server 

sw_r(config)#vtp pruning 


sw1(config)#hostname sw1

sw1(config)#int f1/1

sw1(config-if)#sw mo tr

sw1(config)#vtp domain cisco

sw1(config)#vtp password cisco

sw1(config)#vtp mode client 

sw1#show vlan-switch 


VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa1/0, Fa1/2, Fa1/3, Fa1/4

                                                Fa1/5, Fa1/6, Fa1/7, Fa1/8

                                                Fa1/9, Fa1/10, Fa1/11, Fa1/12

                                                Fa1/13, Fa1/14, Fa1/15

100  VLAN0100                         active    

154  VLAN0154                         active    

155  VLAN0155                         active  

  

sw1(config)#int range f1/2 - 10

sw1(config-if-range)#sw mo access 

sw1(config-if-range)#sw ac vlan 154

sw1(config)#int range f1/11 - 15

sw1(config-if-range)#sw mo access 

sw1(config-if-range)#sw ac vlan 155

sw1#show vlan-switch 


VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa1/0

100  VLAN0100                         active    

154  VLAN0154                         active    Fa1/2, Fa1/3, Fa1/4, Fa1/5

                                                Fa1/6, Fa1/7, Fa1/8, Fa1/9

                                                Fa1/10

155  VLAN0155                         active    Fa1/11, Fa1/12, Fa1/13, Fa1/14

                                                Fa1/15

sw1#show int trunk


Port      Mode         Encapsulation  Status        Native vlan

Fa1/1     on           802.1q         trunking      1


Port      Vlans allowed on trunk

Fa1/1     1-1005


配置IP地址:

sw_r(config)#int f1/4

sw_r(config-if)#no switchport 

sw_r(config-if)#ip add 192.168.1.1 255.255.255.252

sw_r(config-if)#no sh

sw_r(config)#int vlan 100

sw_r(config-if)#ip add 172.16.100.254 255.255.255.0

sw_r(config-if)#no sh


sw_r(config-if)#int vlan 154

sw_r(config-if)#ip add 172.16.154.254 255.255.255.0 

sw_r(config-if)#no sh


sw_r(config-if)#int vlan 155

sw_r(config-if)#ip add 172.16.155.254 255.255.255.0

sw_r(config-if)#no sh


sw_r#show ip int brief 

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            unassigned      YES unset  administratively down down    

FastEthernet0/1            unassigned      YES unset  administratively down down    

FastEthernet1/0            unassigned      YES unset  up                    down    

FastEthernet1/1            unassigned      YES unset  up                    up      

FastEthernet1/2            unassigned      YES unset  up                    down    

FastEthernet1/3            unassigned      YES unset  up                    up      

FastEthernet1/4            192.168.1.1     YES manual up                    up      

FastEthernet1/5            unassigned      YES unset  up                    down    

FastEthernet1/6            unassigned      YES unset  up                    down    

FastEthernet1/7            unassigned      YES unset  up                    down    

FastEthernet1/8            unassigned      YES unset  up                    down    

FastEthernet1/9            unassigned      YES unset  up                    down    

FastEthernet1/10           unassigned      YES unset  up                    down    

FastEthernet1/11           unassigned      YES unset  up                    down    

FastEthernet1/12           unassigned      YES unset  up                    down    

FastEthernet1/13           unassigned      YES unset  up                    down    

FastEthernet1/14           unassigned      YES unset  up                    down    

FastEthernet1/15           unassigned      YES unset  up                    down    

Vlan1                      unassigned      YES unset  up                    up      

Vlan100                    172.16.100.254  YES manual up                    up      

Vlan154                    172.16.154.254  YES manual up                    up      

Vlan155                    172.16.155.254  YES manual up                    up      


ROUTER(config)#hostname router

router(config)#int f0/0

router(config-if)#ip add 192.168.1.2 255.255.255.252

router(config-if)#no sh

router(config-if)#int f1/0

router(config-if)#ip add 10.1.1.1 255.255.255.252

router(config-if)#no sh

router(config-if)#end

router#show ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            192.168.1.2     YES manual up                    up      

FastEthernet1/0            10.1.1.1        YES manual up                    up      

FastEthernet2/0            unassigned      YES unset  administratively down down    

router#ping 192.168.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/28/64 ms


sw1(config-if)#int vlan 100

sw1(config-if)#ip add 172.16.100.1 255.255.255.0

sw1(config-if)#no sh

sw1(config)#ip default-gateway 172.16.100.254

sw1#show ip int Vlan 100

Vlan100 is up, line protocol is up

  Internet address is 172.16.100.1/24

  Broadcast address is 255.255.255.255

  Address determined by setup command

  MTU is 1500 bytes

...

sw1# ping 172.16.100.254


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.100.254, timeout is 2 seconds:

!!!!!


sw3(config)#int vlan 100

sw3(config-if)#ip add 172.16.100.3 255.255.255.0

sw3(config-if)#no sh

sw3(config)#ip default-gateway 172.16.100.254

sw3#sh ip int vlan 100

Vlan100 is up, line protocol is up

  Internet address is 172.16.100.3/24

  Broadcast address is 255.255.255.255

  Address determined by setup command

...

sw3#ping 172.16.100.254


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.100.254, timeout is 2 seconds:

.!!!!


Internet(config)#hostname Internet

Internet(config)#int f0/0

Internet(config-if)#ip add 10.1.1.2 255.255.255.252

Internet(config-if)#no sh

Internet(config-if)#int f1/0

Internet(config-if)#ip add 10.1.1.5 255.255.255.252

Internet(config-if)#no sh

Internet#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            10.1.1.2        YES manual up                    up      

FastEthernet1/0            10.1.1.5        YES manual up                    up      

Internet#ping 10.1.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 20/34/48 ms


R8(config)#hostname R8

R8(config)#int f0/0

R8(config-if)#ip add 10.1.1.6 255.255.255.252

R8(config-if)#no sh

R8(config-if)#int f1/0

R8(config-if)#ip add 192.168.60.254 255.255.255.0

R8(config-if)#no sh


配置路由:

sw_r(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2

router(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.2

router(config)#ip route 172.16.100.0 255.255.255.0 192.168.1.1

router(config)#ip route 172.16.154.0 255.255.255.0 192.168.1.1

router(config)#ip route 172.16.155.0 255.255.255.0 192.168.1.1

R8(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.5


在核心交换机上配置DHCP服务

sw_r(config)#ip dhcp pool vlan154

sw_r(dhcp-config)#network 172.16.154.0 255.255.255.0

sw_r(dhcp-config)#default-router 172.16.154.254

sw_r(dhcp-config)#dns-server 202.96.134.33 202.96.134.133

sw_r(config)#ip dhcp excluded-address 172.16.154.254 

sw_r(config)#ip dhcp pool vlan155

sw_r(dhcp-config)#network 172.16.155.0 255.255.255.0

sw_r(dhcp-config)#dns-server 202.96.134.33 202.96.134.133

sw_r(dhcp-config)#default-router 172.16.155.254 

sw_r(config)#ip dhcp excluded-address 172.16.155.254


vlan155的主机获取到IP:

R6(config)#int f0/0

R6(config-if)#ip add dhcp

R6#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            172.16.155.1    YES DHCP   up                    up      

FastEthernet0/1            unassigned      YES unset  administratively down down    


配置NAT允许vlan155访问外网

ROUTER(config)#access-list 1 permit 172.16.155.0 0.0.0.255

ROUTER(config)#ip nat inside source list 1 interface f1/0 overload 

ROUTER(config)#int f1/0

ROUTER(config-if)#ip nat outside 

ROUTER(config)#int f0/0

ROUTER(config-if)#ip nat inside 


R6#ping 10.1.1.5


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.5, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 36/68/128 ms


查看NAT的统计信息:

ROUTER#sh ip nat statistics 

Total active translations: 2 (0 static, 2 dynamic; 2 extended)

Outside interfaces:

  FastEthernet1/0

Inside interfaces: 

  FastEthernet0/0

Hits: 54  Misses: 6

CEF Translated packets: 60, CEF Punted packets: 0

Expired translations: 4

Dynamic mappings:

-- Inside Source

[Id: 1] access-list 1 interface FastEthernet1/0 refcount 2

Appl doors: 0

Normal doors: 0

Queued Packets: 0

查看当前存在的NAT转换条目,前提是有数据包进行转换(如果没有数据包转换,只能显示静态NAT条目)

ROUTER#sh ip nat translations 

Pro Inside global      Inside local       Outside local      Outside global

icmp 10.1.1.1:20       172.16.155.1:20    10.1.1.6:20        10.1.1.6:20

icmp 10.1.1.1:21       172.16.155.1:21    10.1.1.6:21        10.1.1.6:21

icmp 10.1.1.1:22       172.16.155.1:22    10.1.1.6:22        10.1.1.6:22

对NAT进行监控:

ROUTER#sh ip nat translations verbose 

Pro Inside global      Inside local       Outside local      Outside global

icmp 10.1.1.1:24       172.16.155.1:24    10.1.1.6:24        10.1.1.6:24

    create 00:00:03, use 00:00:03 timeout:60000, left 00:00:56, Map-Id(In): 1, 

    flags: 

extended, use_count: 0, entry-id: 17, lc_entries: 0


向外网发布Web服务器:

ROUTER(config)#ip nat inside source static tcp 172.16.154.1 80 10.1.1.1 80 extendable

查看静态ANT条目:

ROUTER#sh ip nat translations 

Pro Inside global      Inside local       Outside local      Outside global

tcp 10.1.1.1:80        172.16.154.1:80    ---                ---


在Web服务器上开放80端口


在客户端访问:

wKioL1kN1QXDghvnAAJlQ-WaunA266.jpg-wh_50


配置telnet远程管理:

ROUTER(config)#line vty 0 4

ROUTER(config-line)#password cisco

ROUTER(config-line)#login

ROUTER(config)#enable secret cisco


配置SSH远程管理:

sw1(config)#ip domain-name cisco.com

sw1(config)#username best password best1

sw1(config)#crypto key generate rsa general-keys modulus 1024

sw1(config)#ip ssh version 2

sw1(config)#line vty 0 4 

sw1(config-line)#login local

sw1(config-line)#transport input ssh                    #只允许SSH登陆

登陆方式:

Cisco网络设备:ssh -l best 192.168.1.1

Xshell:ssh 172.16.100.254


配置console登陆密码:

sw1(config)#line console 0

sw1(config-line)#password cisco

sw1(config-line)#login



本文转自 zengwj1949 51CTO博客,原文链接:http://blog.51cto.com/zengwj1949/1922768

相关文章
|
15天前
|
算法 安全 大数据
【算法合规新时代】企业如何把握“清朗·网络平台算法典型问题治理”专项行动?
在数字化时代,算法推动社会发展,但也带来了信息茧房、大数据杀熟等问题。中央网信办发布《关于开展“清朗·网络平台算法典型问题治理”专项行动的通知》,针对六大算法问题进行整治,明确企业需落实算法安全主体责任,建立健全审核与管理制度,并对算法进行全面审查和备案。企业应积极自查自纠,确保算法合规透明,防范风险,迎接新机遇。
|
24天前
|
运维 监控 网络协议
面对全球化的泼天流量,出海企业如何观测多地域网络质量?
网络监控与分析在保证网络可靠性、优化用户体验和提升运营效率方面发挥着不可或缺的作用,对于出海企业应对复杂的网络环境和满足用户需求具有重要意义,为出海企业顺利承接泼天流量保驾护航。
|
3月前
|
弹性计算 监控 数据库
制造企业ERP系统迁移至阿里云ECS的实例,详细介绍了从需求分析、数据迁移、应用部署、网络配置到性能优化的全过程
本文通过一个制造企业ERP系统迁移至阿里云ECS的实例,详细介绍了从需求分析、数据迁移、应用部署、网络配置到性能优化的全过程,展示了企业级应用上云的实践方法与显著优势,包括弹性计算资源、高可靠性、数据安全及降低维护成本等,为企业数字化转型提供参考。
94 5
|
3月前
|
安全 虚拟化
在数字化时代,网络项目的重要性日益凸显。本文从前期准备、方案内容和注意事项三个方面,详细解析了如何撰写一个优质高效的网络项目实施方案,帮助企业和用户实现更好的体验和竞争力
在数字化时代,网络项目的重要性日益凸显。本文从前期准备、方案内容和注意事项三个方面,详细解析了如何撰写一个优质高效的网络项目实施方案,帮助企业和用户实现更好的体验和竞争力。通过具体案例,展示了方案的制定和实施过程,强调了目标明确、技术先进、计划周密、风险可控和预算合理的重要性。
76 5
|
3月前
|
机器学习/深度学习 监控 数据可视化
企业上网监控:Kibana 在网络监控数据可视化
在网络监控中,Kibana 作为一款强大的数据可视化工具,与 Elasticsearch 配合使用,可处理大量日志数据,提供丰富的可视化组件,帮助企业高效管理网络活动,保障信息安全。通过索引模式和数据映射,Kibana 能够组织和分类原始数据,支持深入分析和异常检测,助力企业识别潜在安全威胁。
99 5
|
3月前
|
监控 安全 网络安全
企业网络安全:构建高效的信息安全管理体系
企业网络安全:构建高效的信息安全管理体系
128 5
|
4月前
|
运维 供应链 安全
SD-WAN分布式组网:构建高效、灵活的企业网络架构
本文介绍了SD-WAN(软件定义广域网)在企业分布式组网中的应用,强调其智能化流量管理、简化的网络部署、弹性扩展能力和增强的安全性等核心优势,以及在跨国企业、多云环境、零售连锁和制造业中的典型应用场景。通过合理设计网络架构、选择合适的网络连接类型、优化应用流量优先级和定期评估网络性能等最佳实践,SD-WAN助力企业实现高效、稳定的业务连接,加速数字化转型。
SD-WAN分布式组网:构建高效、灵活的企业网络架构
|
4月前
|
运维 监控 安全
SD-WAN异地组网加速:提升企业网络性能的关键
随着企业全球化扩展,异地组网成为重要需求。传统广域网(WAN)存在延迟高、带宽不足等问题,而SD-WAN通过智能流量调度、降低成本、提升安全性和快速部署等优势,成为理想解决方案。本文详细解析SD-WAN在异地组网中的优势、应用场景及最佳实践,帮助企业实现高效跨地域网络连接。
|
4月前
|
安全 物联网 网络安全
中小企业提高网络安全的五种方式
【10月更文挑战第18天】中小企业提高网络安全的五种方式:1. 小企业并非免疫;2. 定期更新软件和硬件;3. 持续教育员工;4. 启用并维护安全功能;5. 制定全面的网络安全策略。天下数据IDC提供专业的服务器解决方案及数据中心安全服务,保障企业信息安全。
66 1
|
4月前
|
机器学习/深度学习 人工智能 运维
企业内训|LLM大模型在服务器和IT网络运维中的应用-某日企IT运维部门
本课程是为某在华日资企业集团的IT运维部门专门定制开发的企业培训课程,本课程旨在深入探讨大型语言模型(LLM)在服务器及IT网络运维中的应用,结合当前技术趋势与行业需求,帮助学员掌握LLM如何为运维工作赋能。通过系统的理论讲解与实践操作,学员将了解LLM的基本知识、模型架构及其在实际运维场景中的应用,如日志分析、故障诊断、网络安全与性能优化等。
136 2

热门文章

最新文章