思科小型网络配置实例

这篇具有很好参考价值的文章主要介绍了思科小型网络配置实例。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

思科小型网络配置实例

一、配置思路
1.交换机上配置端口连接描述,在实际工作中很有用
2.外网配置,模拟外网:PC的IP地址200.200.200.2,Server的IP地址是200.200.200.3,网关都是200.200.200.1。SW-ISP的连接PC和Server-ISP的口属于vlan 3,,连接路由器侧接口属于vlan 2,,配置生成树的边缘端口,连接路由器侧的IP地址是20.1.1.1 255.255.255.240。R7-Border地址为20.1.1.2 255.255.255.240
3.内网vlan和子网划分:
Manage:vlan 1,172.16.1.0/24
Shichangbu:vlan 10 172.16.10.0/24 网关172.16.10.254/24
Xingzhengbu:vlan 20,172.16.20.0/24,网关172.16.20.254/24
Caiwubu:vlan 30,172.16.30.0/24,网关172.16.30.254/24
Server:vlan 100,172.16.100.1/24,网关172.16.100.254/24
其中连接用户的接口配置stp的portfast和bpduguard,防止用户通过DHCP拿不到IP地址和用户私接交换机
4.内网转化为公网的地址池
XS:20.1.1.3/28
XZ:20.1.1.4/28
CW:20.1.1.5/28
5.核心交换机和边界路由器之间使用172.16.1.0/24网段
二、配置过程
1.交换机上配置端口连接描述
SW-CORE(config)#int e0/0
SW-CORE(config-if)#description toInternet
SW-CORE(config-if)#int e0/1
SW-CORE(config-if)#description toServer
SW-CORE(config-if)#int e2/0
SW-CORE(config-if)#description toXS1
SW-CORE(config-if)#int e3/0
SW-CORE(config-if)#description toXS2
SW-CORE(config-if)#int e4/0
SW-CORE(config-if)#description toXZ1
SW-CORE(config-if)#int e5/0
SW-CORE(config-if)#description toXZ2
SW-CORE(config-if)#int e6/0
SW-CORE(config-if)#description toCW
SW2-XS1(config)#int e0/0
SW2-XS1(config-if)#description to CORE
SW2-XS1(config-if)#int e0/1
SW2-XS1(config-if)#description to XS2
SW3-XS2(config)#int e0/0
SW3-XS2(config-if)#description to CORE
SW3-XS2(config-if)#int e0/1
SW3-XS2(config-if)#description toXS1
SW4-XZ1(config)#int e0/0
SW4-XZ1(config-if)#description to CORE
SW4-XZ1(config-if)#int e0/1
SW4-XZ1(config-if)#description to XZ2
SW5-XS2(config)#int e0/0
SW5-XS2(config-if)#description toCORE
SW5-XS2(config-if)#int e0/1
SW5-XS2(config-if)#description toXZ1
SW6-CW(config)#int e0/0
SW6-CW(config-if)#description toCORE
SW6-CW(config-if)#int e0/1
SW6-CW(config-if)#description toCW
2.外网配置
PC(config)#no ip routing //由于在模拟器中是用路由器模拟的,所有关闭路由功能
PC(config)#no ip routing
PC(config)#ip default-gateway 200.200.200.1 //设置网关
PC(config)#int e0/0
PC(config-if)#ip add 200.200.200.2 255.255.255.0
PC(config-if)#no shutdown
Server-DNS(config)#no ip routing
Server-DNS(config)#ip default-gateway 200.200.200.1
Server-DNS(config)#int e0/0
Server-DNS(config-if)#ip add 200.200.200.3 255.255.255.0
Server-DNS(config-if)#no shut
SW-ISP(config)#vlan 2
SW-ISP(config-vlan)#vlan 3
SW-ISP(config-vlan)#int e0/0
SW-ISP(config-if)#switchport mode access
SW-ISP(config-if)#switchport access vlan 2
SW-ISP(config-if)#int e0/1
SW-ISP(config-if)#switchport mode access
SW-ISP(config-if)#switchport access vlan 3
SW-ISP(config-if)#int e0/2
SW-ISP(config-if)#switchport mode access
SW-ISP(config-if)#switchport access vlan 3
SW-ISP(config-if)#exit
SW-ISP(config)#int vlan 3
SW-ISP(config-if)#ip add 200.200.200.1 255.255.255.0
SW-ISP(config-if)#no shut
SW-ISP(config-if)#int e0/1
SW-ISP(config-if)#spanning-tree portfast
SW-ISP(config-if)#int e0/2
SW-ISP(config-if)#spanning-tree portfast
外网内部已通
思科小型网络配置实例

SW-ISP(config)#int vlan 2
SW-ISP(config-if)#ip add 20.1.1.1 255.255.255.240
SW-ISP(config-if)#no shut
SW-ISP(config)#int e0/0
SW-ISP(config-if)#spanning-tree portfast
SW-ISP(config-if)#no shut
R7-Border(config)#int e0/1
R7-Border(config-if)#ip add 20.1.1.2 255.255.255.240
R7-Border(config-if)#no shut
3.vlan划分
(1)配置trunk:连接交换机的所有接口配置
SW-CORE(config)#int e2/0
SW-CORE(config-if)#switchport trunk encapsulation dot1q
SW-CORE(config-if)#switchport mode trunk
SW-CORE(config-if)#int e3/0
SW-CORE(config-if)#switchport trunk encapsulation dot1q
SW-CORE(config-if)#switchport mode trunk
SW-CORE(config-if)#int e4/0
SW-CORE(config-if)#switchport trunk encapsulation dot1q
SW-CORE(config-if)#switchport mode trunk
SW-CORE(config-if)#int e5/0
SW-CORE(config-if)#switchport trunk encapsulation dot1q
SW-CORE(config-if)#switchport mode trunk
SW-CORE(config-if)#int e6/0
SW-CORE(config-if)#switchport trunk encapsulation dot1q
SW-CORE(config-if)#switchport mode trunk
SW2-XS1(config)#int rang e0/0 - 1
SW2-XS1(config-if-range)#switchport trunk encapsulation dot1q
SW2-XS1(config-if-range)#switchport mode trunk
SW3-XS2(config)#int range e0/0 - 1
SW3-XS2(config-if-range)#switchport trunk encapsulation dot1q
SW3-XS2(config-if-range)#switchport mode trunk
SW4-XZ1(config)#int range e0/0 - 1
SW4-XZ1(config-if-range)#switchport trunk encapsulation dot1q
SW4-XZ1(config-if-range)#switchport mode trunk
SW5-XS2(config)#int range e0/0 - 1
SW5-XS2(config-if-range)#switchport trunk encapsulation dot1q
SW5-XS2(config-if-range)#switchport mode trunk
SW6-CW(config)#int range e0/0 - 1
SW6-CW(config-if-range)#switchport trunk encapsulation dot1q
SW6-CW(config-if-range)#switchport mode trunk
(2)vtp的配置
SW-CORE(config)#vtp domain abc123
SW-CORE(config)#vtp mode server
SW-CORE(config)#vtp password abc123
SW2-XS1(config)#vtp domain abc123
SW2-XS1(config)#vtp mode client
SW2-XS1(config)#vtp password abc123
SW3-XS2(config)#vtp domain abc123
SW3-XS2(config)#vtp mode client
SW3-XS2(config)#vtp password abc123
SW4-XZ1(config)#vtp domain abc123
SW4-XZ1(config)#vtp mode client
SW4-XZ1(config)#vtp password abc123
SW5-XS2(config)#vtp domain abc123
SW5-XS2(config)#vtp mode client
SW5-XS2(config)#vtp password abc123
SW6-CW(config)#vtp domain abc123
SW6-CW(config)#vtp mode client
SW6-CW(config)#vtp password abc123
(3)在vtp server上配置vlan,其他vtp client上将自动创建
SW-CORE(config)#vlan 10
SW-CORE(config-vlan)#name XS
SW-CORE(config-vlan)#vlan 20
SW-CORE(config-vlan)#name XZ
SW-CORE(config-vlan)#vlan 30
SW-CORE(config-vlan)#name CW
SW-CORE(config-vlan)#vlan 100
SW-CORE(config-vlan)#name Server
其他交换机上也已经创建了vlan
思科小型网络配置实例

(4)交换机连接终端的接口加入相应的vlan
SW-CORE(config-if)#int e0/0
SW-CORE(config-if)#switchport mode access
SW-CORE(config-if)#switchport access vlan 1
SW-CORE(config)#int e0/1
SW-CORE(config-if)#switchport mode access
SW-CORE(config-if)#switchport access vlan 100
SW2-XS1(config)#int e0/3
SW2-XS1(config-if)#switchport mode access
SW2-XS1(config-if)#switchport access vlan 10
SW3-XS2(config)#int e0/3
SW3-XS2(config-if)#switchport mode access
SW3-XS2(config-if)#switchport access vlan 10
SW4-XZ1(config-if)#int e0/3
SW4-XZ1(config-if)#switchport mode access
SW4-XZ1(config-if)#switchport access vlan 20
SW5-XS2(config)#int e0/2
SW5-XS2(config-if)#switchport mode access
SW5-XS2(config-if)#switchport access vlan 20
SW6-CW(config)#int e0/1
SW6-CW(config-if)#switchport mode access
SW6-CW(config-if)#switchport access vlan 30
(5)在SW-CORE配置trunk连续允许的vlan
SW-CORE(config)#int range e2/0 ,e3/0
SW-CORE(config-if-range)#switchport trunk allowed vlan 1,10
SW-CORE(config-if-range)#int range e4/0 ,e5/0
SW-CORE(config-if-range)#switchport trunk allowed vlan 1,20
SW-CORE(config-if-range)#int range e6/0
SW-CORE(config-if-range)#switchport trunk allowed vlan 1,30
(6)交换机连接用户的接口配置STP的portfast和bpduguard,其中连接服务器的接口不用配置,因为它是固定IP地址,不是通过DHCP获取IP地址
SW2-XS1(config)#int e0/3
SW2-XS1(config-if)#spanning-tree portfast
SW2-XS1(config-if)#spanning-tree bpduguard enable
SW3-XS2(config)#int e0/3
SW4-XZ1(config)#int e0/3
SW4-XZ1(config-if)#spanning-tree portfast
SW4-XZ1(config-if)#spanning-tree bpduguard enable
SW5-XS2(config)#int e0/2
SW5-XS2(config-if)#spanning-tree portfast
SW5-XS2(config-if)#spanning-tree bpduguard enable
SW6-CW(config)#int e0/1
SW6-CW(config-if)#spanning-tree portfast
SW6-CW(config-if)#spanning-tree bpduguard enable
(7)配置stp:只需要配置每个vlan的主根,不需要配置备根
SW2-XS1(config)#spanning-tree vlan 10 root primary
SW4-XZ1(config)#spanning-tree vlan 20 root primary
SW-CORE(config)#spanning-tree vlan 1 root primary
4.配置IP地址:SW-CORE作为DHCP服务器为用户提供IP地址
(1)配置vlan网关的IP地址
SW-CORE(config)#int vlan 10
SW-CORE(config-if)#ip add 172.16.10.254 255.255.255.0
SW-CORE(config-if)#no shut
SW-CORE(config-if)#int vlan 20
SW-CORE(config-if)#ip add 172.16.20.254 255.255.255.0
SW-CORE(config-if)#no shut
SW-CORE(config-if)#int vlan 30
SW-CORE(config-if)#ip add 172.16.30.254 255.255.255.0
SW-CORE(config-if)#no shut
SW-CORE(config-if)#int vlan 100
SW-CORE(config-if)#ip add 172.16.100.254 255.255.255.0
SW-CORE(config-if)#no shut
(2)配置DHCP功能
SW-CORE(config)#service dhcp //默认已经开启
SW-CORE(config)#ip dhcp pool vlan10
SW-CORE(dhcp-config)#network 172.16.10.0 255.255.255.0
SW-CORE(dhcp-config)#default-router 172.16.10.254
SW-CORE(dhcp-config)#dns-server 8.8.8.8
SW-CORE(config)#ip dhcp pool vlan20
SW-CORE(dhcp-config)#network 172.16.20.0 255.255.255.0
SW-CORE(dhcp-config)#default-router 172.16.20.254
SW-CORE(dhcp-config)#dns-server 8.8.8.8
SW-CORE(config)#ip dhcp pool vlan30
SW-CORE(dhcp-config)#network 172.16.30.0 255.255.255.0
SW-CORE(dhcp-config)#default-router 172.16.30.254
SW-CORE(dhcp-config)#dns-server 8.8.8.8
(2)配置PC以DHCP模式获取地址
PC9(config)#no ip routing
PC9(config)#ip default-gateway 172.16.10.254
PC9(config)#int e0/0
PC9(config-if)#ip add dhcp
PC9(config-if)#no shutdown
PC10(config)#no ip routing
PC10(config)#ip default-gateway 172.16.10.254
PC10(config)#int e0/0
PC10(config-if)#ip add dhcp
PC10(config-if)#no shut
PC11(config)#no ip routing
PC11(config)#ip default-gateway 172.16.20.254
PC11(config)#int e0/0
PC11(config-if)#ip add dhcp
PC11(config-if)#no shut
PC12(config)#no ip routing
PC12(config)#ip default-gateway 172.16.20.254
PC12(config)#int e0/0
PC12(config-if)#ip add dhcp
PC12(config-if)#no shut
PC13(config)#no ip routing
PC13(config)#ip default-gateway 172.16.30.254
PC13(config)#int e0/0
PC13(config-if)#ip add dhcp
PC13(config-if)#no shut
(3)配置Server IP地址
Server(config)#no ip routing
Router(config)#ip default-gateway 172.16.100.254
Server(config)#int e0/0
Server(config-if)#ip add 172.16.100.1 255.255.255.0
Server(config-if)#no shut
(4)配置核心交换机和边界路由互通
SW-CORE(config)#int e0/0
SW-CORE(config-if)#no switchport
SW-CORE(config-if)#ip add 172.16.1.1 255.255.255.0
SW-CORE(config-if)# no shut
R7-Border(config)#int e0/0
R7-Border(config-if)#ip add 172.16.1.2 255.255.255.0
R7-Border(config-if)#no shut
SW-CORE(config)#router ospf 1
SW-CORE(config-router)#network 172.16.1.0 0.0.0.255 area 0
SW-CORE(config-router)#network 172.16.10.0 0.0.0.255 area 0
SW-CORE(config-router)#network 172.16.20.0 0.0.0.255 area 0
SW-CORE(config-router)#network 172.16.30.0 0.0.0.255 area 0
SW-CORE(config-router)#network 172.16.100.0 0.0.0.255 area 0
R7-Border(config)#router ospf 1
R7-Border(config-router)#network 172.16.1.0 0.0.0.255 area 0
SW-CORE(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.2
5.配置NAT地址转换
(1)创建各vlan的nat地址池
SW-CORE(config)#ip nat pool XS 20.1.1.3 20.1.1.3 netmask 255.255.255.240
SW-CORE(config)#ip nat pool XZ 20.1.1.4 20.1.1.4 netmask 255.255.255.240
SW-CORE(config)#ip nat pool CW 20.1.1.5 20.1.1.5 netmask 255.255.255.240
(2)定义对用的访问控制列表:用于放行实际需要的服务协议,可根据实际需要配置
SW-CORE(config)#ip access-list extended XS //对销售部放行部分功能
SW-CORE(config-ext-nacl)#permit tcp 172.16.10.0 0.0.0.255 any eq 80
SW-CORE(config-ext-nacl)#permit tcp 172.16.10.0 0.0.0.255 any eq 443
SW-CORE(config-ext-nacl)#permit tcp 172.16.10.0 0.0.0.255 any eq 53
SW-CORE(config-ext-nacl)#permit udp 172.16.10.0 0.0.0.255 any eq 53
SW-CORE(config-ext-nacl)#permit tcp 172.16.10.0 0.0.0.255 any eq smtp
SW-CORE(config-ext-nacl)#permit tcp 172.16.10.0 0.0.0.255 any eq pop3
SW-CORE(config-ext-nacl)#permit tcp 172.16.10.0 0.0.0.255 any eq telnet
SW-CORE(config)#ip access-list extended XZ //对行政部放行所有功能
SW-CORE(config-ext-nacl)#permit ip any any
SW-CORE(config)#ip access-list extended CW //对财务部放行所有功能
SW-CORE(config-ext-nacl)#permit ip any any
(3)配置地址转换
R7-Border(config)#ip nat inside source list XS pool XS overload
R7-Border(config)#ip nat inside source list XZ pool XZ overload
R7-Border(config)#ip nat inside source list CW pool CW overload
(4)在接口上调用NAT
R7-Border(config)#int e0/0
R7-Border(config-if)#ip nat inside
R7-Border(config-if)#int e0/1
R7-Border(config-if)#ip nat outside
(5)为服务器配置静态nat转换
SW-CORE(config)#ip nat inside source static 172.16.100.1 20.1.1.100文章来源地址https://www.toymoban.com/news/detail-480110.html

到了这里,关于思科小型网络配置实例的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 2021~2022思科网络试题4(模块16-17构建和保护小型网络)

    1技术人员要记录一所大学中所有网络设备的当前配置,包括校园外的建筑物中的设备。为了安全地访问网络设备,最好使用哪一项协议? FTP Telnet SSH HTTP 必须在路由器上配置哪个命令才能完成 SSH 配置? domain-name cisco.com service password-encryption enable secret class 

    2024年02月06日
    浏览(40)
  • 中小型超市的网络规划与设计(完整文档+思科拓扑图)

    大家好,我是小华学长,一名计算机领域的博主。经过多年的学习和实践,我积累了丰富的计算机知识和经验,在这里我想与大家分享我的学习心得和技巧,帮助你成为更好的程序员。 作为一名计算机博主,我一直专注于编程、算法、软件开发等领域,在这些方面积累了大量

    2024年02月03日
    浏览(34)
  • 思科交换机端口模式配置 端口安全配置 思科模拟器

    首先先将拓扑建立出来 分别为pc0、pc1配置IP地址,并相互ping一下 Ping IP              //ping命令得使用 Switch#show mac-address-table    //查看mac地址表 我们可以在特权模式下查看mac地址表,可以看到每个接口上设备的mac地址 1、access: 主要用来接入终端设备,如PC机、服务器、

    2023年04月10日
    浏览(30)
  • 思科交换机DHCP配置

    思科交换机DHCP配置: 拓扑图 SW1 配置: Switchenable ----- 从用户模式进入特权模式 Switch#configure terminal-----从特权模式进入全局配置模式 Switch(config)#hostname sw1-----给交换机指定主机名为sw1 SW1(config)#vlan 10-----创建vlan 10 SW1(config)#vlan 20-----创建vlan 20 SW1(config)#interface fastEthernet 0/2----

    2024年02月08日
    浏览(27)
  • 思科三层交换机配置

    三层交换机是什么 为什么会有三层交换机 三层交换机的工作原理 三层交换机的应用     三层交换机就是具有部分路由器功能的交换机 ,工作在OSI网络标准模型的第三层:网络层。三层交换机的最重要目的是加快大型局域网内部的数据交换,所具有的路由功能也是为这目的

    2024年02月05日
    浏览(36)
  • 实训一 思科交换机基础配置

    交换机的命令行操作模式:用户模式、特权模式、全局配置模式、端口模式 1、命令行操作模式的进入 用户模式switch→输入enable→进入特权模式switch#→输入configure terminal→进入全局配置模式switch(config)→输入interface fastethernet 0/1(端口0/1)→进入端口模式switch(config-if) 2、命令

    2024年02月04日
    浏览(29)
  • 思科三层交换机配置命令

    1. 交换机支持的命令: 交换机基本状态: switch: ;ROM状态, 路由器是rommon hostname ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: switchenable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostnam

    2024年02月06日
    浏览(28)
  • 思科交换机怎么查看某个接口的配置?

    怎样查看思科交换机某个接口的配置,下面由小编介绍下具体操作 1、首先思科交换机开机,电脑连接后,进入用户模式,如图所示: 2、输入“enable\\\" 或”en“,进入特权模式,如图所示: 3、在特权模式下,输入”show interface f0/1“或”show int f0/1“,就可以查看f0/1接口的信息

    2024年02月08日
    浏览(31)
  • 思科交换机密码配置和清除操作步骤

    思科交换机密码配置 一.设置console密码 enable #configure trminal (confing)#line console 0←console口 ①(config-line)#password (cisco)←密码 (config-line)#login ← 一定不能少的. console密码设置完成 exit 二:设置全局密码 enadle #configure terminal ②(config)#enable secret (class)←密码 (config)#login 全局密码设置完

    2024年02月05日
    浏览(39)
  • 思科三层交换机路由功能配置教程

    普通交换机工作在链路层,即二层交换机,无路由功能,也就是只能同一个网段的机器才能通信。 而三层交换机可以在网络层配置路由功能,使不同网段的设备可以通信。现以思科3550交换机为例配置三层路由功能。以实现如下拓扑通信。 ---------------------------------- | 思科35

    2024年02月05日
    浏览(32)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包