用eNSP玩企业网络配置,这几点务必注意

号主:老杨丨11年资深网络工程师更多网工提升干货,请关注公众号:网络工程师俱乐部

中午好,我的网工朋友。

这两天公司有个小弟在用eNSP搞企业网络的模拟配置项目,整得手忙脚乱的。

看着年轻人不太上手的样子也是想到了年轻时候的我,但是更不得不说的是模拟工具在网络工程中的重要性。

我们都知道,网络配置是一项既需要理论知识也需要实践经验的工作。而随着企业规模的不断扩大,网络结构也变得越来越复杂。

通过模拟,我们可以在不影响实际网络运行的情况下,进行各种配置的尝试和优化,也大大降低了风险和成本。

今天咱就上个eNSP模拟配置企业网络案例

从网络拓扑的设计到具体的配置步骤,以及一些在配置过程中遇到的坑和解决方案,希望能帮助你在网络配置的路上少走弯路。

今日文章阅读福利:《 eNSP安装包(最新) 》

听说还有人没有eNSP的安装包?

私信我,发送暗号“模拟器”,即可免费获取安装包哈。

01 企业网络拓扑

02 拓扑需求

01 交换部分:

1.将SW1-SW2间的e0/0/5、e0/0/6配置为手工方式的eth-trunk,链路编号为eth-trunk 12

2.将SW1、SW2、SW3、SW4间的所有链路配置为trunk

3.在SW1、SW2、SW3、SW4上创建vlan10、vlan20、vlan11、vlan12:

4.在SW1、SW2、SW3、SW4上开启STP协议

5.将SW1设置为所有VLAN的根交换机,将SW2设置为所有VLAN的备份根交换机

6.将PC3、PC4划入vlan10、将PC7、PC8划入vlan20:

02 路由部分:

1.IP地址规划如下:

vlan10 ----------- 10.1.10.0/24

vlan20 ----------- 10.1.20.0/24

vlan11 ----------- 10.1.11.0/24

vlan12 ----------- 10.1.12.0/24

R1-R2 ------------ 12.1.1.0/24

R2-Client2 ------------ 20.1.1.0/24

2.将SW1设置为vlan10、vlan20的网关,IP地址为vlan对应网段的最后一个可用IP

3.将SW2设置为vlan10、vlan20的备份网关,IP地址为vlan对应网段的倒数第二个可用IP:

4.将SW1的e0/0/1接口划入vlan11,并为vlan11配置对应网段的第一个可用IP:

5.将SW2的e0/0/1接口划入vlan12,并为vlan12配置对应网段的第一个可用IP:

6.将R1的g0/0/0接口IP配置为10.1.11.0/24网段的最后一个可用IP:

7.将R1的g0/0/1接口IP配置为10.1.12.0/24网段的最后一个可用IP:

8.配置R1-R2相连接口的IP地址,R1配置网段第一个可用IP,R2配置网段第二个可用IP:

9.配置R2-Client2相连接口的IP地址,Client2配置网段第一个可用IP,R2配置网段最后一个可用IP

10.在SW1、SW2、R1间运行OSPF 100,将vlan10、vlan20、vlan11、vlan12对应网段宣告进area0

11.在R1上添加缺省静态路由,将下一跳指向R2

12.在R1上将缺省静态路由发布进OSPF 100

13.在R1-R2间运行OSPF 200,将R1-R2间网段以及R2-Client2间网段宣告进area0

03 访问控制部分:

1.在R1上配置PAT,让vlan10、vlan20内的所有主机共用12.1.1.10/24这个IP访问Client2

2.要求vlan10内的主机可以访问Client2的web服务,但不能访问Client2的ftp服务;

3.vlan20内的主机可以访问Client2的ftp服务,但不能访问Client2的web服务,其余流量不做限制。

03 SW1配置

vlan batch 10 to 12 20
stp mode stp
stp instance 0 priority 0
interface Vlanif10
 ip address 10.1.10.254 255.255.255.0
#
interface Vlanif11
 ip address 10.1.11.1 255.255.255.0
#
interface Vlanif20
 ip address 10.1.20.254 255.255.255.0


interface Eth-Trunk12
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 11


interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/5
 eth-trunk 12
#
interface Ethernet0/0/6
 eth-trunk 12


ospf 100 router-id 1.1.1.1
 area 0.0.0.0
  network 10.1.10.0 0.0.0.255
  network 10.1.20.0 0.0.0.255
  network 10.1.11.0 0.0.0.255
#

04 SW2配置

vlan batch 10 to 12 20stp mode stp
stp instance 0 priority 4096


interface Vlanif10
 ip address 10.1.10.253 255.255.255.0
#
interface Vlanif12
 ip address 10.1.12.1 255.255.255.0
#
interface Vlanif20
 ip address 10.1.20.253 255.255.255.0


interface Eth-Trunk12
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 12


interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/5
 eth-trunk 12
#
interface Ethernet0/0/6
 eth-trunk 12


ospf 100 router-id 2.2.2.2
 area 0.0.0.0
  network 10.1.10.0 0.0.0.255
  network 10.1.20.0 0.0.0.255
  network 10.1.12.0 0.0.0.255

05 SW3配置

vlan batch 10 to 12 20
stp mode stp
 interface Ethernet0/0/1 
port link-type access 
port default vlan 10 
interface Ethernet0/0/2 
port link-type access 
port default vlan 20 
interface Ethernet0/0/3 
port link-type trunk 
port trunk allow-pass vlan 2 to 4094


interface Ethernet0/0/4


 port link-type trunk port 
trunk allow-pass vlan 2 to 4094

06 SW4配置

vlan batch 10 to 12 20
stp mode stp
interface Ethernet0/0/1


 port link-type access
 port default vlan 10 
 interface Ethernet0/0/2 
port link-type access 
port default vlan 20


interface Ethernet0/0/3


 port link-type trunk
 port trunk allow-pass vlan 2 to 4094 
interface Ethernet0/0/4 
port link-type trunk 
port trunk allow-pass vlan 2 to 4094

07 AR1配置



acl number 2000  
 rule 5 permit source 10.1.10.0 0.0.0.255 
 rule 10 permit source 10.1.20.0 0.0.0.255 
#
acl number 3000  
 rule 5 permit tcp source 10.1.10.0 0.0.0.255 destination 20.1.1.1 0 destination
-port eq www 
 rule 10 deny tcp source 10.1.10.0 0.0.0.255 destination 20.1.1.1 0 destination-
port eq ftp 
 rule 15 permit tcp source 10.1.20.0 0.0.0.255 destination 20.1.1.1 0 destinatio
n-port eq ftp 
 rule 20 deny tcp source 10.1.20.0 0.0.0.255 destination 20.1.1.1 0 destination-
port eq www 


nat address-group 0 12.1.1.10 12.1.1.10
#
interface GigabitEthernet0/0/0
 ip address 10.1.11.254 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.12.254 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 12.1.1.1 255.255.255.0 
 traffic-filter outbound acl 3000
 nat outbound 2000 address-group 0 


ospf 100 router-id 3.3.3.3 
 default-route-advertise
 area 0.0.0.0 
  network 10.1.11.0 0.0.0.255 
  network 10.1.12.0 0.0.0.255 
#
ospf 200 router-id 3.3.3.3 
 area 0.0.0.0 
  network 12.1.1.0 0.0.0.255 
#
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2

08 AR2配置



interface GigabitEthernet0/0/0
 ip address 20.1.1.254 255.255.255.0 


interface GigabitEthernet0/0/2
 ip address 12.1.1.2 255.255.255.0 


ospf 200 router-id 5.5.5.5 
 area 0.0.0.0 
  network 12.1.1.0 0.0.0.255 
  network 20.1.1.0 0.0.0.255

整理:老杨丨11年资深网络工程师更多网工提升干货,请关注公众号:网络工程师俱乐部

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值