一、具體需求與實現
1、多wan:兩條寬帶接入鏈路,使用VRRP+BFD技術,實現鏈路冗余;
2、IDC機房遠程管理和登錄限制:使用PPTP+freeRadius+mysql實現VPN,限制指定網段或IP進行撥號認證登錄IDC機房,并編寫腳本檢查非法用戶登錄IDC機房服務器情況;
3、內網VLAN劃分:利于安全管理、IP分流和帶寬限制;
4、內網監控:使用NTOP、cacti等實現;
5、IDC機房服務器監控:使用zabbix、snort、腳本實現;
6、用戶帶寬使用限速:交換機處配置流量整形,對內網IP進行限速;(慎用)
7、訪客控制:需要接入層設備支持Qos、802.1x協議(暫不考慮)
二、關鍵需求分析與考慮
1、多wan
A、以RouterA和RouterB分別撥號直連internet,避開使用同一設備時需編寫策略路由;
B、便于正常時對上網、郵件、視頻及核心業務進行分路,其中一臺設備、鏈路down 的時候,業務快速轉移到正常設備、鏈路上;
C、不同部門上網業務分流管理;
2、IDC機房遠程管理和登錄限制
A、由之前的ItranetVPN(內聯網關:網關–網關),改變為AccessVPN(遠程接入VPN:客
戶端–網關);
B、把VPN用戶認證轉移至Radius服務器上,增加安全性高、節省路由設備有限內存;
C、可記錄VPN用戶的登錄時間,傳送字節數,從而對用戶進行統計;
D、利用mysql實現用戶的增刪查改、中文名記錄和其他信息等
3、內網VLAN劃分
A、有利于登錄IDC的IP在Radius上進行限制;
B、根據網段進行IP分流和部門分鏈路上網;
C、對指定網段進行帶寬限制;
4、內網監控
A、使用Ntop可以實現監控用戶流量行為;
B、cacti主要用于遠程監控IDC機房服務器流量;
5、IDC機房服務器監控
A、將zabbix服務遷移至IDC機房利于減少因網絡不穩定引起的誤報;
6、用戶帶寬使用限速
A、對流量隊列整形限速,由于IP輸出速率被限制在規定范圍內,隊列滿后,無法緩存
報文將被丟棄,造成用戶上網失效和卡頓等(不建議使用)
三、拓撲、設備選型和IP規劃
設備選型、IP規劃略
四、實施
分兩個部分,第一部分為使用VRRP+BFD實現雙線路切換,第二部分為PPTP+MYSQL+FreeRadius實現堡壘機訪問IDC機房
第一部分,雙鏈路內網VRRP+BFD
按照拓撲配置,配置文件如下:
R1,連接移動鏈路
sysname R1 # dns proxy enable # vlan batch 100 200 # dhcp enable # bfd # pki realm default enrollment self-signed # acl number 2001 rule 0 permit source 0.0.0.0 255.255.255.0 # acl number 3100 rule 5 permit ip # traffic classifier 0 operator or if-match acl 3100 # traffic behavior 0 redirect ip-nexthop 192.168.200.253 track nqa internet icmp #####nqa檢測,下一跳地址為 # traffic policy 0 classifier 0 behavior 0 # ip pool 1 ####內網地址池,注意gateway-list gateway-list 192.168.1.2 network 192.168.1.0 mask 255.255.255.0 excluded-ip-address 192.168.1.3 192.168.1.30 excluded-ip-address 192.168.1.220 192.168.1.254 dns-list 114.114.114.114 8.8.8.8 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher %@%@G6`zGlcNl)NORWIru%]F)C_b%@%@ local-user admin service-type telnet http # firewall zone Local priority 16 # interface Vlanif1 # interface Vlanif100 ##########使用雙VRRP保證鏈路下游交換機上行流量負載均衡 ip address 192.168.1.253 255.255.255.0 vrrp vrid 1 virtual-ip 192.168.1.1 vrrp vrid 1 priority 90 vrrp vrid 1 track bfd-session 20 increased 20 vrrp vrid 2 virtual-ip 192.168.1.2 vrrp vrid 2 track bfd-session 20 reduced 20 traffic-policy 0 inbound ####限制進入該路由器ISP dhcp select global # interface Vlanif200 # interface Ethernet0/0/0 undo portswitch ip address 192.168.200.254 255.255.255.0 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 200 # interface Ethernet0/0/2 # interface Ethernet0/0/3 # interface Ethernet0/0/4 ip address 183.239.175.146 255.255.255.252 # interface Cellular0/0/0 # interface NULL0 # bfd vrrp bind peer-ip 192.168.1.254 interface Vlanif100 ####配置bfd檢測,disp bfd可以查看狀態 discriminator local 20 discriminator remote 10 commit # snmp-agent local-engineid 800007DB03E0247F03BDEC # ip route-static 0.0.0.0 0.0.0.0 183.239.175.145 ip route-static XXX.XXX.XXX.XXX 255.255.255.0 192.168.200.253 #####XXXX部分為R2連接第二條鏈路獲取到的IP網段 # nqa test-instance internet icmp ####配置nqa,XXXX為R2路由wan口對端地址 test-type icmp destination-address ipv4 XXX.XXXX.XXXX.XXX frequency 12 timeout 1 start now
R2,連接移動鏈路
R2 # dns proxy enable # vlan batch 100 200 # dhcp enable # bfd # pki realm default enrollment self-signed # ssl policy default_policy type server pki-realm default # acl number 2001 rule 0 permit source 192.168.1.0 0.0.0.255 # acl number 3100 rule 5 permit ip # traffic classifier 0 operator or if-match acl 3100 # traffic behavior 0 redirect ip-nexthop 192.168.200.254 track nqa internet icmp # traffic policy 0 classifier 0 behavior 0 # ip pool 1 gateway-list 192.168.1.1 network 192.168.1.0 mask 255.255.255.0 excluded-ip-address 192.168.1.3 192.168.1.30 excluded-ip-address 192.168.1.220 192.168.1.254 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher %@%@4Rn(:Ke5,~Q5i9-@Zer5)PIb%@%@ local-user admin privilege level 15 local-user admin service-type telnet http # firewall zone Local priority 16 # interface Dialer1 ######由于R2所接鏈路為撥號ADSL,配置撥號 link-protocol ppp ppp pap local-user SZFTTH1224904088 password simple 123456 ppp ipcp dns admit-any ppp ipcp dns request mtu 1492 ip address ppp-negotiate dialer user SZFTTH1224904088 dialer bundle 1 dialer-group 1 nat outbound 2001 # interface Vlanif1 # interface Vlanif100 ip address 192.168.1.254 255.255.255.0 vrrp vrid 1 virtual-ip 192.168.1.1 vrrp vrid 1 track bfd-session 10 reduced 20 vrrp vrid 2 virtual-ip 192.168.1.2 vrrp vrid 2 priority 90 vrrp vrid 2 track bfd-session 10 increased 20 traffic-policy 0 inbound dhcp select global # interface Vlanif200 # interface Ethernet0/0/0 undo portswitch ip address 192.168.200.253 255.255.255.0 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 200 # interface Ethernet0/0/2 # interface Ethernet0/0/3 # interface Ethernet0/0/4 pppoe-client dial-bundle-number 1 # interface Cellular0/0/0 # interface NULL0 # dialer-rule dialer-rule 1 ip permit # bfd vrrp bind peer-ip 192.168.1.253 interface Vlanif100 discriminator local 10 discriminator remote 20 commit # snmp-agent local-engineid 800007DB03E09796A46BBE # http secure-server ssl-policy default_policy http server enable http secure-server enable # ip route-static 0.0.0.0 0.0.0.0 Dialer1 ip route-static XXXX.XXXX.XXX.XXX 255.255.255.252 192.168.200.254 # nqa test-instance internet icmp test-type icmp destination-address ipv4 XXX.XXXX.XXX.XXX frequency 12 timeout 1 start now #
下游交換機
# interface Vlanif100 ip address 192.168.1.252 255.255.255.0 # interface Ethernet0/0/0 port hybrid pvid vlan 100 port hybrid untagged vlan 100 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 200 # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 100 200 # http secure-server ssl-policy default_policy http server enable http secure-server enable # ip route-static 0.0.0.0 0.0.0.0 192.168.1.1 ip route-static 0.0.0.0 0.0.0.0 192.168.1.2 #
以上,實現了雙鏈路切換,可以自行端口鏈路測試配置結果,并使用disp bfd\NQA\VRRP\iprouting-table檢查配置結果,并逐一排錯。
下一篇為PPTP+MYSQL+FreeRadius實現IDC堡壘機部分
原創文章,作者:handsomeyoleen@qq.com,如若轉載,請注明出處:http://www.www58058.com/35905