學習網絡很多小伙伴經常會陷入一個怪圈,對著現成的網絡拓撲知道如何敲命令但是卻不知道如何將其利用到實際環境中,下面我就結合實際情況講講一總多分的企業網絡該如何配置有興趣的小伙伴收藏加關注。
需求如下:總部與各分公司之間可以互相通信,但是分公司之間無法互訪,總部與分公司之間是通過運營商的專線對接,且總部出口路由器對外僅有一個出口。
具體規劃如下:
總部
IP規劃:192.168.10X.0/24
網關:192.168.10X.254/24
核心交換機與出口路由器R1對接IP為10.1.12.0/30
分公司1
IP規劃:192.169.10X.0/24
網關:192.169.10X.254/24
核心交換機與出口路由器R1對接IP為20.1.12.0/30
分公司2
IP規劃:192.170.10X.0/24
網關:192.170.10X.254/24
核心交換機與出口路由器R1對接IP為30.1.12.0/30
具體配置如下:
1.配置總部網絡
sw4:
vlan batch 10 101 to 103
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 101
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 102
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 103
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 10 101 to 103
sw1:
vlan batch 10 101 to 103
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 101 to 103
#
interface GigabitEthernet0/0/24
port link-type access
port default vlan 10
#
interface Vlanif10
ip address 10.1.12.1 255.255.255.252
#
interface Vlanif101
ip address 192.168.101.254 255.255.255.0
#
interface Vlanif102
ip address 192.168.102.254 255.255.255.0
#
interface Vlanif103
ip address 192.168.103.254 255.255.255.0
#
[zongbu_R1]
inter gig 0
ip addre 10.1.12.2 30
quit
interface GigabitEthernet0/0/1.1
dot1q termination vid 123
ip address 123.1.1.1 255.255.255.252
arp broadcast enable
#
interface GigabitEthernet0/0/1.2
dot1q termination vid 124
ip address 124.1.1.1 255.255.255.252
arp broadcast enable
#
ISP配置:
#
vlan batch 123 to 124
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 123 to 124
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 123
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 124
#
分公司1網絡配置:
sw5:
vlan batch 20 101 to 102
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 101
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 102
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 20 101 to 102
sw2:
vlan batch 20 101 to 102
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20 101 to 103
#
interface GigabitEthernet0/0/24
port link-type access
port default vlan 20
#
interface Vlanif20
ip address 20.1.12.1 255.255.255.252
#
interface Vlanif101
ip address 192.169.101.254 255.255.255.0
#
interface Vlanif102
ip address 192.169.102.254 255.255.255.0
#
[R2]
inter gig 0/0/1
ip addre 123.1.1.2 30
quit
inter gig 0/0/0
ip addre 20.1.12.2 30
quit
分公司2網絡配置
sw6:
vlan batch 30 101 to 102
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 101
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 102
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 30 101 to 102
sw3:
vlan batch 30 101 to 102
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 30 101 to 102
#
interface GigabitEthernet0/0/24
port link-type access
port default vlan 30
#
interface Vlanif30
ip address 30.1.12.1 255.255.255.252
#
interface Vlanif101
ip address 192.170.101.254 255.255.255.0
#
interface Vlanif102
ip address 192.170.102.254 255.255.255.0
#
[R3]
inter gig 0/0/1
ip addre 124.1.1.2 30
quit
inter gig 0/0/0
ip addre 30.1.12.2 30
quit
配置路由
[sw1]ip route-static 0.0.0.0 0.0.0.0 10.1.12.2
[sw4]ip route-static 0.0.0.0 0.0.0.0 10.1.12.2
[sw2]ip route-static 0.0.0.0 0.0.0.0 20.1.12.2
[sw5]ip route-static 0.0.0.0 0.0.0.0 20.1.12.2
[sw3]ip route-static 0.0.0.0 0.0.0.0 30.1.12.2
[sw6]ip route-static 0.0.0.0 0.0.0.0 30.1.12.2
在各自的出口路由器上配置OSPF
R1:
ospf
area 0.0.0.0
network 123.1.1.1 0.0.0.0
network 124.1.1.1 0.0.0.0
R2:
ospf
area 0.0.0.0
network 123.1.1.2 0.0.0.0
R3:
ospf
area 0.0.0.0
network 124.1.1.2 0.0.0.0
R1:
ip route-static 192.168.101.0 24 10.1.12.1
ip route-static 192.168.102.0 24 10.1.12.1
ip route-static 192.168.103.0 24 10.1.12.1
R2:
ip route-static 192.169.101.0 24 20.1.12.1
ip route-static 192.169.102.0 24 20.1.12.1
R3:
ip route-static 192.170.101.0 24 30.1.12.1
ip route-static 192.170.102.0 24 30.1.12.1
將各自的靜態路由引入到OSPF中
ospf 1
import-route static
結果驗證:
從總部訪問分公司
分公司2訪問總部
分公司1訪問總部:
查看R1上的ospf狀態
查看R1上的路由表
禁止分公司之間網絡互訪:
SW6上配置ACL并應用到出口上
acl number 3000
rule 5 deny ip source 192.170.101.0 0.0.0.255 destination 192.169.101.0 0.0.0.2
55
rule 10 deny ip source 192.170.102.0 0.0.0.255 destination 192.169.101.0 0.0.0.
255
rule 15 deny ip source 192.170.102.0 0.0.0.255 destination 192.169.102.0 0.0.0.
255
rule 20 deny ip source 192.170.101.0 0.0.0.255 destination 192.169.102.0 0.0.0.
255
#
interface GigabitEthernet0/0/24
traffic-filter outbound acl 3000
結果驗證:
經驗證分公司1和分公司2之間網路不能互訪,但都可以跟總部網絡互通,至此所有實驗效果均已達到。
本文發布于:2023-02-28 20:59:00,感謝您對本站的認可!
本文鏈接:http://www.newhan.cn/zhishi/a/167771416495795.html
版權聲明:本站內容均來自互聯網,僅供演示用,請勿用于商業和其他非法用途。如果侵犯了您的權益請與我們聯系,我們將在24小時內刪除。
本文word下載地址:公司網絡(公司網絡安全的治理機構是什么).doc
本文 PDF 下載地址:公司網絡(公司網絡安全的治理機構是什么).pdf
| 留言與評論(共有 0 條評論) |