码迷,mamicode.com
首页 > 其他好文 > 详细

网络综合部署

时间:2020-10-18 16:47:25      阅读:32      评论:0      收藏:0      [点我收藏+]

标签:source   ISE   eth-trunk   version   vlan   csdn   ==   stat   abi   

目的:

跨越公网和私网实现全网互通。

部署拓扑图:

技术图片

配置文件:

LSW1
#
sysname lsw1
#
vlan batch 11 to 12 1001
#
interface Vlanif11
 ip address 10.1.11.1 255.255.255.0
#
interface Vlanif12
 ip address 10.1.12.1 255.255.255.0
#
interface Vlanif1001
 ip address 10.1.111.1 255.255.255.0
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 1001
#
interface GigabitEthernet0/0/2
 eth-trunk 1
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 11
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 12
#
interface GigabitEthernet0/0/5
 eth-trunk 1
#
ospf 110
 area 0.0.0.0
  network 10.1.111.0 0.0.0.255
  network 10.1.11.0 0.0.0.255
  network 10.1.12.0 0.0.0.255
 

LSW2
#
sysname lsw2
#
vlan batch 13 to 14 1002
#
interface Vlanif13
 ip address 10.1.13.1 255.255.255.0
#
interface Vlanif14
 ip address 10.1.14.1 255.255.255.0
#
interface Vlanif1002
 ip address 10.1.112.1 255.255.255.0
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
 eth-trunk 1
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 13
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 14
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 1002
#
interface GigabitEthernet0/0/5
 eth-trunk 1
#
ospf 110
 area 0.0.0.0
  network 10.1.112.0 0.0.0.255
  network 10.1.13.0 0.0.0.255
  network 10.1.14.0 0.0.0.255
 

LSW8
#
sysname sw1
#
vlan batch 11 to 12
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 11
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 11


LSW9
#
sysname sw2
#
vlan batch 11 to 12
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 12
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 12


LSW10
#
sysname sw3
#
vlan batch 13 to 14
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 13
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 13

LSW11
#
sysname sw4
#
vlan batch 13 to 14
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 14
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 14


LSW12
#
sysname sw5
#
vlan batch 21 to 22
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 21
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 22
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 21 to 22

AR1
#
 sysname r1
#
interface GigabitEthernet0/0/0
 ip address 202.2.2.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 202.2.12.1 255.255.255.0 
 


AR2
#
 sysname r2
#
acl number 3000  
 rule 5 permit ip source 10.1.0.0 0.0.0.255 

interface GigabitEthernet0/0/0
 ip address 202.2.12.2 255.255.255.0 
 nat outbound 3000
#
interface GigabitEthernet0/0/1
 ip address 10.1.113.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.1.111.2 255.255.255.0 
#
interface GigabitEthernet2/0/0
 ip address 10.1.112.2 255.255.255.0 
#
ospf 110 router-id 2.2.2.2 
 default-route-advertise 

area 0.0.0.0 
  network 2.2.2.2 0.0.0.0 
  network 10.1.111.0 0.0.0.255 
  network 10.1.112.0 0.0.0.255 
  network 10.1.113.0 0.0.0.255 
#
ip route-static 0.0.0.0 0.0.0.0 202.2.12.1

AR3
#
 sysname r3
#
interface GigabitEthernet0/0/0
 ip address 10.1.113.3 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.134.3 255.255.255.0 
#
ospf 110 router-id 3.3.3.3 
 import-route rip 1 cost 100
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 10.1.113.0 0.0.0.255 
#
rip 1
 default-route originate
undo summary 

version 2
 network 10.0.0.0
 import-route ospf 110 cost 0

 

AR4
#
 sysname r4
#
interface GigabitEthernet0/0/0
 ip address 10.1.134.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.145.4 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/2.21
 dot1q termination vid 21
 ip address 10.1.21.1 255.255.255.0 
 arp broadcast enable
#
interface GigabitEthernet0/0/2.22
 dot1q termination vid 22
 ip address 10.1.22.1 255.255.255.0 
 arp broadcast enable
#
ospf 110 
 import-route rip 1 cost 100
#
rip 1
undo summary 

version 2
 network 10.0.0.0
 import-route ospf 110 cost 0
 

AR5
#
 sysname r5
#
interface GigabitEthernet0/0/0
 ip address 10.1.145.5 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.100.5 255.255.255.0 
#
rip 1

undo summary 

version 2
 network 10.0.0.0
 

 

结果:

用所有PC ping PC1,看能否实现互通

PC2 ping PC1

技术图片

 

PC3 ping PC1

技术图片

 

PC4 ping PC1

技术图片

 

PC5 ping PC1

技术图片

 

PC6 ping PC1

技术图片

 

PC7 ping PC1

技术图片

 

SERVICE ping PC1

技术图片

网络综合部署

标签:source   ISE   eth-trunk   version   vlan   csdn   ==   stat   abi   

原文地址:https://www.cnblogs.com/xuhao0705/p/13828377.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!