最近在玩一些淘汰下來的FW,在馬雲家淘了一些二手的玩玩,在家搭建了一台zabbix監控,配置了onealert的免費通知插件(支援微信、QQ、郵件、短信、電話等),用來監控我家小PP看卡通片時長,時間過長就要遠端斷網或shutdown交換機接口,因為當着面關他電視後果很嚴重,斷他網他會知道是“壞了”,沒那麼鬧騰。
回到正題,以前一直用無線路由器做NAT轉發,發現即使是cisco 6900和網件R 7000等千元路由器級别都會用到當機。後來幫别人做項目發現juniper ssg和SRX這種企業級的FW在某寶隻要幾百元,果斷出手搞了一些不同型号來測試。
本文的主角:JUNIPER SRX 210H正式登場
當我用210配置完PPPOE後,部分網站可以打開,部分網站打不開,并且在JUNIPER SSG5上面沒有這個問題,是以斷定問題在210上。排錯思路如下:
一、檢查PPPOE鍊路狀态
看起來正常
admin@YY-SRX100H#run show interfaces pp0
Physical interface: pp0, Enabled, Physical link is Up
Interface index: 128, SNMP ifIndex: 501
Type: PPPoE, Link-level type: PPPoE, MTU: 1532
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps
Link type : Full-Duplex
Link flags : None
Input rate : 232 bps (0 pps)
Output rate : 0 bps (0 pps)
Logical interface pp0.0 (Index 79) (SNMP ifIndex 563)
Flags: Point-To-Point SNMP-Traps 0x0 Encapsulation: PPPoE
PPPoE:
State: SessionUp, Session ID: 34772,
Session AC name: SZ-BJ-BAS-5.MAN.NE40E, Remote MAC address: da:86:8e:6c:00:19,
Configured AC name: None, Service name: None,
Auto-reconnect timeout: 10 seconds, Idle timeout: Never,
Underlying interface: fe-0/0/1.0 (Index 78)
Input packets : 24
Output packets: 16
Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3
Keepalive: Input: 3 (00:00:08 ago), Output: 7 (00:00:01 ago)
LCP state: Opened
NCP state: inet: Opened, inet6: Not-configured, iso: Not-configured, mpls: Not-configured
CHAP state: Closed
PAP state: Success
Security: Zone: Null
Protocol inet, MTU: 1492
Flags: Sendbcast-pkt-to-re, User-MTU, Negotiate-Address
Addresses, Flags: Kernel Is-Preferred Is-Primary
Destination: 183.12.26.1, Local: 183.12.26.79
二、檢查區域和政策
也都正常,政策全放開
三、根據網上的建議調整MTU為1400
然并卵,問題依舊
set interfaces pp0 unit 0 family inet mtu 1400
四、根據度娘搜遍了大量相關的蛛絲馬迹,發現一個很少有人問津的tcp-mss參數調整
憑借我多年運維的經驗直覺告訴我,真相很快就要浮出水面了。
Each direction of data flow can use a different MSS.
上面一段話其實簡要概之就是,它和TCP有關。。。也别太較真了
于是乎就抱着試一試的态度,結果之前打不開的網頁都能打開了
set security flow tcp-mss all-tcp mss 1350
本文轉自yangye1985 51CTO部落格,原文連結:http://blog.51cto.com/yangye/1874182,如需轉載請自行聯系原作者