您好,登錄后才能下訂單哦!
最近在玩一些淘汰下來的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參數調整
憑借我多年運維的經驗直覺告訴我,真相很快就要浮出水面了。
The maximum segment size (MSS) is a parameter of the options field of the TCP header that specifies the largest amount of data, specified in bytes, that a computer or communications device can receive in a single TCP segment. It does not count the TCP header or the IP header.[1] The IP datagram containing a TCP segment may be self-contained within a single packet, or it may be reconstructed from several fragmented pieces; either way, the MSS limit applies to the total amount of data contained in the final, reconstructed TCP segment.
To avoid fragmentation in the IP layer, a host must specify the maximum segment size as equal to the largest IP datagram that the host can handle minus the IP header size and TCP header sizes.[2] Therefore, IPv4 hosts are required to be able to handle an MSS of 536 octets (= 576[3] - 20 - 20) and IPv6 hosts are required to be able to handle an MSS of 1220 octets (= 1280[4] - 40 - 20).
Small MSS values will reduce or eliminate IP fragmentation, but will result in higher overhead.[5]
Each direction of data flow can use a different MSS.
For most computer users, the MSS option is established by the operating system.
上面一段話其實簡要概之就是,它和TCP有關。。。也別太較真了
于是乎就抱著試一試的態度,結果之前打不開的網頁都能打開了
set security flow tcp-mss all-tcp mss 1350
五、pppoe全部配置參考本人以下博文
http://yangye.blog.51cto.com/922715/1874180
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。