-
1 # 流沙187705738
-
2 # 精彩網路技術
一、配置思路:
1、將小區1、2、3、4、5、6的攝像頭連線到小區接入交換機的介面分別劃分到vlan10、vlan20、vlan30、vlan40、vlan50、vlan60。
2、小區接入交換機分別劃分對應小區的vlan。如:LSW1上建立vlan10,LSW2上建立vlan20。。。
在核心交換機Core1上,建立vlan10、20、30、40、50、60、100。Vlan100是上連AR1路由器的vlan。建立上連路由器的IP地址:vlanif100:192.168.100.254/24;下連小區1接入交換機vlanif10:192.168.1.254/24;下連小區2接入交換機vlanif20:192.168.2.254/24;下連小區3接入交換機vlanif30:192.168.3.254/24;下連小區4接入交換機vlanif40:192.168.4.254/24;下連小區5接入交換機vlanif50:192.168.5.254/24;下連小區6接入交換機vlanif60:192.168.6.254/24;3、在AR1的GE0/0/0介面配置地址:192.168.100.253/24;
3、在AR1的Loopback0介面配置地址:172.16.1.1/24,這主要是模擬路由器連線的其他網路,可以配置,也可以不配置。
4、在Core1上配置預設靜態路由,在AR1上配置到各小區網路的靜態路由。
二、小區1接入交換機LSW1的主要配置檔案:
#
sysname LSW1
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
Return
三、小區2接入交換機LSW2的主要配置檔案:
#
sysname LSW2
#
vlan batch 20
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return
其他小區的接入交換機配置是一致,這裡不再贅述。
四、核心交換機Core1的主要配置檔案:
#
sysname Core1
#
vlan batch 10 20 30 40 50 60 100
#
interface Vlanif10
ip address 192.168.1.254 255.255.255.0
#
interface Vlanif20
ip address 192.168.2.254 255.255.255.0
#
interface Vlanif30
ip address 192.168.3.254 255.255.255.0
#
interface Vlanif40
ip address 192.168.4.254 255.255.255.0
#
interface Vlanif50
ip address 192.168.5.254 255.255.255.0
#
interface Vlanif60
ip address 192.168.6.254 255.255.255.0
#
interface Vlanif100
ip address 192.168.100.254 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 50
#
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 60
#
interface GigabitEthernet0/0/7
port link-type access
port default vlan 100
#
ip route-static 0.0.0.0 0.0.0.0 192.168.100.253
#
return
五、AR1路由器的主要配置檔案:
#
sysname AR1
#
interface GigabitEthernet0/0/0
ip address 192.168.100.253 255.255.255.0
#
interface LoopBack0
ip address 172.16.1.1 255.255.255.255 //模擬路由器連線其他路由器的網路
#
ip route-static 192.168.1.0 255.255.255.0 192.168.100.254
ip route-static 192.168.2.0 255.255.255.0 192.168.100.254
ip route-static 192.168.3.0 255.255.255.0 192.168.100.254
ip route-static 192.168.4.0 255.255.255.0 192.168.100.254
ip route-static 192.168.5.0 255.255.255.0 192.168.100.254
ip route-static 192.168.6.0 255.255.255.0 192.168.100.254
#
return
六、檢驗結果:
1、小區1攝像頭可以ping通路由器AR1
PC>ping 192.168.100.253
Ping 192.168.100.253: 32 data bytes, Press Ctrl_C to break
From 192.168.100.253: bytes=32 seq=1 ttl=254 time=156 ms
From 192.168.100.253: bytes=32 seq=2 ttl=254 time=78 ms
--- 192.168.100.253 ping statistics ---
2 packet(s) transmitted
2 packet(s) received
0.00% packet loss
round-trip min/avg/max = 78/117/156 ms
2、小區1攝像頭可以ping通路由器AR1連線的其他網路(loopback0的地址)
PC>ping 172.16.1.1
Ping 172.16.1.1: 32 data bytes, Press Ctrl_C to break
From 172.16.1.1: bytes=32 seq=1 ttl=254 time=78 ms
From 172.16.1.1: bytes=32 seq=2 ttl=254 time=62 ms
From 172.16.1.1: bytes=32 seq=3 ttl=254 time=47 ms
From 172.16.1.1: bytes=32 seq=4 ttl=254 time=63 ms
From 172.16.1.1: bytes=32 seq=5 ttl=254 time=62 ms
--- 172.16.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/62/78 ms
本實驗是透過華為模擬器eNSP1。3。00。100版(最新版)完成。該軟體還包含CE、CX、NE40E、NE5000E、NE9000E、USG6000V的裝置IOS,可完成複雜網路測試,需要該模擬器的朋友,可以轉發此文關注小編,私信小編【666】即可獲得。
有6個小區的監控,分別處於不同的網段,例如:小區1是192.168.1.*,小區2是192.168.2.*,……,小區6是192.168.6.*,我現在透過每個小區監控的匯聚交換機的一個埠,用6對光纖收發器把6個小區監控匯聚到了一臺交換機(3層),現在有一臺閘道器伺服器,只能接受一個網段,現在如何透過3層交換機,把6個不同網段路由成一個網段,輸出給閘道器交換機?
回覆列表
1 劃分六個VLAN
vlan10 20 30 40 50 60 70
2 設定vlan地址
vlan10設定ip地址為192.168.1.254/24
vlan20設定ip地址為192.168.2.254/24
vlan30設定ip地址為192.168.3.254/24
vlan40設定ip地址為192.168.4.254/24
vlan50設定ip地址為192.168.5.254/24
vlan60設定ip地址為192.168.6.254/24
vlan70設定ip地址為192.168.7.254/24
3 將vlan掛接到介面上