单核心网络配置实例(Ensp)

拓扑图:包含vlan、地址规划

配置:

<jieru_A>

<jieru_A>dis cu

#

sysname jieru_A

#

vlan batch 10 20 30

#

ip pool vlan1

 gateway-list 192.168.0.254

#

interface Vlanif1

 ip address 192.168.0.1 255.255.255.0

#

interface Vlanif10

 ip address 172.16.10.2 255.255.255.0

#

interface Vlanif20

 ip address 172.16.20.2 255.255.255.0

#

interface Vlanif30

 ip address 172.16.30.2 255.255.255.0

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

ip route-static 0.0.0.0 0.0.0.0 192.168.128.44

ip route-static 192.168.128.40 255.255.255.248 172.16.10.1

ip route-static 192.168.128.40 255.255.255.248 172.16.30.1

#

user-interface con 0

user-interface vty 0 4

#

return

 

<jieru_B>dis cu

#

sysname jieru_B

#

vlan batch 10 20 30

#

ip pool vlan1

 gateway-list 192.168.0.254

#

interface Vlanif1

 ip address 192.168.0.2 255.255.255.0

#

interface Vlanif10

 ip address 172.16.10.3 255.255.255.0

#

interface Vlanif20

 ip address 172.16.20.3 255.255.255.0

#

interface Vlanif30

 ip address 172.16.30.3 255.255.255.0

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

ip route-static 0.0.0.0 0.0.0.0 192.168.128.44

ip route-static 192.168.128.40 255.255.255.248 172.16.10.1

ip route-static 192.168.128.40 255.255.255.248 172.16.20.1

#

user-interface con 0

user-interface vty 0 4

#

return

 

<jieru_C>

<jieru_C>dis cu

#

sysname jieru_C

#

vlan batch 50 60 70

#

ip pool vlan1

 gateway-list 192.168.0.254

#

interface Vlanif1

 ip address 192.168.0.3 255.255.255.0

#

interface Vlanif50

 ip address 172.18.50.2 255.255.255.0

#

interface Vlanif60

 ip address 172.18.60.2 255.255.255.0

#

interface Vlanif70

 ip address 172.18.70.2 255.255.255.0

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

ip route-static 0.0.0.0 0.0.0.0 192.168.129.44

ip route-static 192.168.129.40 255.255.255.248 172.18.50.1

ip route-static 192.168.129.40 255.255.255.248 172.18.60.1

ip route-static 192.168.129.40 255.255.255.248 172.18.70.1

#

user-interface con 0

user-interface vty 0 4

#

return

 

 

<jieru_D>dis cu

#

sysname jieru_D

#

vlan batch 50 60 70

#

ip pool vlan1

 gateway-list 192.168.0.254

#

interface Vlanif1

 ip address 192.168.0.4 255.255.255.0

#

interface Vlanif50

 ip address 172.18.50.3 255.255.255.0

#

interface Vlanif60

 ip address 172.18.60.3 255.255.255.0

#

interface Vlanif70

 ip address 172.18.70.3 255.255.255.0

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

ip route-static 0.0.0.0 0.0.0.0 192.168.129.44

ip route-static 192.168.129.40 255.255.255.248 172.18.50.1

ip route-static 192.168.129.40 255.255.255.248 172.18.60.1

ip route-static 192.168.129.40 255.255.255.248 172.18.70.1

#

user-interface con 0

user-interface vty 0 4

#

return

 

 

<huiju_A>dis cu

#

sysname huiju_A

#

vlan batch 10 20 30 100

#

ip pool vlan1

 gateway-list 192.168.0.254

#

interface Vlanif1

 ip address 192.168.0.5 255.255.255.0

#

interface Vlanif10

 ip address 172.16.10.1 255.255.255.0

#

interface Vlanif20

 ip address 172.16.20.1 255.255.255.0

#

interface Vlanif30

 ip address 172.16.30.1 255.255.255.0

#

interface Vlanif100

 ip address 192.168.128.44 255.255.255.248

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/3

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

ospf 1

 area 0.0.0.0

  network 172.16.10.0 0.0.0.255

  network 172.16.20.0 0.0.0.255

  network 172.16.30.0 0.0.0.255

  network 192.168.128.40 0.0.0.7

#

user-interface con 0

user-interface vty 0 4

#

return

 

 

<huiju_B>dis cu

#

sysname huiju_B

#

vlan batch 50 60 70 200

#

ip pool vlan1

 gateway-list 192.168.0.254

#

interface Vlanif1

 ip address 192.168.0.6 255.255.255.0

#

interface Vlanif50

 ip address 172.18.50.1 255.255.255.0

#

interface Vlanif60

 ip address 172.18.60.1 255.255.255.0

#

interface Vlanif70

 ip address 172.18.70.1 255.255.255.0

#

interface Vlanif200

 ip address 192.168.129.44 255.255.255.248

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/3

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

ospf 1

 area 0.0.0.0

  network 172.18.50.0 0.0.0.255

  network 172.18.60.0 0.0.0.255

  network 172.18.70.0 0.0.0.255

  network 192.168.129.40 0.0.0.7

#

user-interface con 0

user-interface vty 0 4

#

return

 

 

<hexin_switch>dis cu

#

sysname hexin_switch

#

vlan batch 100 200 300

#

interface Vlanif1

 ip address 192.168.0.254 255.255.255.0

#

interface Vlanif100

 ip address 192.168.128.45 255.255.255.248

#

interface Vlanif200

 ip address 192.168.129.45 255.255.255.248

#

interface Vlanif300

 ip address 192.168.86.17 255.255.255.240

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/10

 port link-type access

 port default vlan 300

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 192.168.86.16 0.0.0.15

  network 192.168.128.40 0.0.0.7

  network 192.168.129.40 0.0.0.7

#

user-interface con 0

user-interface vty 0 4

#

return

 

 

[router-GigabitEthernet0/0/0]dis cu

#

sysname router

#

acl number 2000

 rule 10 permit

#

interface GigabitEthernet0/0/0

 ip address 192.168.86.30 255.255.255.240

 nat static protocol tcp global 210.96.100.86 any inside 192.168.86.30 any netma

sk 255.255.255.255

#

interface GigabitEthernet0/0/1

 ip address 210.96.100.85 255.255.255.252

 nat outbound 2000

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 210.96.100.84 0.0.0.3

  network 192.168.86.16 0.0.0.15

#

user-interface con 0

user-interface vty 0 4

user-interface vty 16 20

#

return



这个实例只做到全网通就可以,可以基本了解单核心网络架构的问题。通过二层vlan和三层vlan实现全网通,路由器和交换机采用ospf,在后期的学习中自己可以加入备份、acl、nat等功能。


  • 8
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
很抱歉,提供的引用内容中没有关于ensp无线网络配置实例代码的信息。但是,根据引用中提到的技术内容,我们可以了解到该项目涉及到了VLAN、DHCP、OSPF、缺省路由、VRRP、ACL、NAT、DNS、FTP、WEB、无线WLAN等内容。因此,我们可以根据这些内容来了解如何进行ensp无线网络配置。 1. 配置VLAN:使用命令vlan batch 10创建VLAN 10。 2. 配置DHCP:使用命令dhcp enable启用DHCP服务,并使用命令dhcp server ip-address pool pool1配置IP地址池。 3. 配置OSPF:使用命令ospf enable启用OSPF协议,并使用命令ospf router-id 1.1.1.1配置路由器ID。 4. 配置缺省路由:使用命令ip route-static 0.0.0.0 0.0.0.0 192.168.1.1配置缺省路由。 5. 配置VRRP:使用命令vrrp vrid 1 virtual-ip 192.168.1.100配置虚拟路由器ID和虚拟IP地址。 6. 配置ACL:使用命令acl number 2000配置ACL规则,并使用命令rule permit source 192.168.1.0 0.0.0.255配置允许访问的源IP地址。 7. 配置NAT:使用命令nat enable启用NAT功能,并使用命令nat server global 192.168.1.1 inside 192.168.1.100配置NAT映射。 8. 配置DNS:使用命令dns resolve enable启用DNS解析功能,并使用命令dns server 8.8.8.8配置DNS服务器地址。 9. 配置FTP:使用命令ftp server enable启用FTP服务器,并使用命令ftp server user admin password admin配置FTP用户和密码。 10. 配置WEB:使用命令http server enable启用WEB服务器,并使用命令http server authentication-mode aaa配置WEB认证方式。 11. 配置无线WLAN:使用命令wlan service-port enable启用无线服务端口,并使用命令wlan ssid ensp-wlan配置SSID名称。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值