Skip to content

Commit 6168c1b

Browse files
[Magic, several] Work to consolidate partials with conditional rendered content (#19935)
* added content from all partials in static-routes1 * corrected code * deleted unnecessary static routes partials * renamed partial * moved staticroutes outside folder * added optional vars * added conditional vars * removed extra vars * changed to hmtl * removed extra space * created overview partial * corrected vars * corrected vars * added indenting * added all content to same partial * corrected code * deletes old partials * deletes old partials mwan * moves mtu out of folder * corrected partial path * added partials for clamping conditinal render partiasl * removed extra space * added gre ipsec partials mwan * added optional vars to mt
1 parent a37050d commit 6168c1b

File tree

15 files changed

+289
-215
lines changed

15 files changed

+289
-215
lines changed

src/content/docs/magic-transit/analytics/index.mdx

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,15 @@ description: Use Magic Transit's different analytic options for an overview of
99

1010
---
1111

12-
Magic Transit customers can follow the troubleshooting steps listed below to gather information at the beginning of a troubleshooting process, then move to more detailed network data collection and analysis to identify the root cause of a problem.
13-
14-
- Analyze network traffic data over time in [Magic Transit Network Analytics](#magic-transit-network-analytics)
15-
- Perform more detailed troubleshooting with:
16-
- [Traceroutes](#traceroutes)
17-
- [Packet captures](#packet-captures)
18-
19-
## Magic Transit Network Analytics
20-
21-
Network Analytics provides detailed analytics on Magic Transit traffic over time. Customers can filter data on specific traffic characteristics and view traffic analytics over time.
22-
23-
Refer to [Magic Transit Network Analytics](/magic-transit/analytics/network-analytics/) to learn more.
24-
25-
## Traceroutes
26-
27-
Traceroutes provide a hop by hop breakdown of the Internet path network traffic follows as it traverses from Cloudflare's network to a customer's network.
28-
29-
Refer to [Traceroutes](/magic-transit/analytics/traceroutes/) to learn more.
30-
31-
## Packet captures
32-
33-
Packet captures allow customers to analyze the raw packet data that a customer is sending and receiving from Cloudflare's network.
34-
35-
Refer to [packet captures](/magic-firewall/packet-captures/) to learn more.
36-
37-
## Query Analytics with GraphQL
38-
39-
GraphQL Analytics provides customers with a GraphQL API that they can query to receive raw JSON data of their Magic WAN traffic analytics. This data can be ingested into a SIEM or other tool and analyzed further.
40-
41-
- [Querying Magic Transit tunnel bandwidth analytics with GraphQL](/magic-transit/analytics/query-bandwidth/)
42-
- [Querying Magic Transit tunnel health check results with GraphQL](/magic-transit/analytics/query-tunnel-health/)
12+
import { Render } from "~/components";
13+
14+
<Render file="analytics/overview"
15+
product="magic-wan"
16+
params={{
17+
productName: "Magic Transit",
18+
analyticsAnchorHeading: "#magic-transit-network-analytics",
19+
networkAnalyticsURL: "/magic-transit/analytics/network-analytics/",
20+
traceRoutes: "/magic-transit/analytics/traceroutes/",
21+
graphQl: "/magic-transit/"
22+
}}
23+
/>

src/content/docs/magic-transit/how-to/configure-static-routes.mdx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@ description: Magic Transit uses a static configuration to route your traffic
1212

1313
import { Render } from "~/components"
1414

15-
<Render file="static-routes/static-routes1" params={{ productName: "Magic Transit", BGPpath: "/magic-transit/how-to/bgp-peering/", anycastURL: "/magic-transit/reference/tunnels/", trafficSteering: "/magic-transit/reference/traffic-steering/", magicWANecmp: "" }} />
16-
17-
<Render file="static-routes/static-routes2-prefixes-smaller-24" />
18-
19-
<Render file="static-routes/static-routes3" params={{ createPath: "Magic Transit > Configuration", tunnelEndpoints: "/magic-transit/how-to/configure-tunnels/", ipRanges: " " }} />
15+
<Render
16+
file="static-routes"
17+
params={{
18+
magicProduct: "Magic Transit",
19+
productName: "Magic Transit",
20+
BGPpath: "/magic-transit/how-to/bgp-peering/",
21+
anycastURL: "/magic-transit/reference/tunnels/",
22+
trafficSteering: "/magic-transit/reference/traffic-steering/",
23+
magicWANecmp: " ",
24+
createPath: "Magic Transit > Configuration",
25+
tunnelEndpoints: "/magic-transit/how-to/configure-tunnels/",
26+
ipRanges: " "
27+
}}
28+
/>

src/content/docs/magic-transit/how-to/tunnel-health-checks.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ import { Render } from "~/components";
99
file="tunnel-health/update-tunnel-health-checks-frequency"
1010
params={{
1111
productName: "Magic Transit.",
12-
connectorExtraInfo: "",
1312
healthChecksUrl: "/magic-transit/reference/tunnel-health-checks/",
14-
addTunnelsPath: "/magic-transit/how-to/configure-tunnels/#add-tunnels",
15-
connectorNote: "",
16-
connectorTitle1: "",
17-
connectorTitle2: "",
18-
connectorSteps: "",
13+
addTunnelsPath: "/magic-transit/how-to/configure-tunnels/#add-tunnels"
1914
}}
2015
/>

src/content/docs/magic-transit/reference/mtu-mss.mdx

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,10 @@ sidebar:
77

88
import { Render } from "~/components";
99

10-
<Render file="mtu-mss/mtu-mss" params={{ productName: "Magic Transit" }} />
11-
12-
## MSS with Magic Transit and Direct Server Return
13-
14-
<Render file="mtu-mss/mt-dsr" />
15-
16-
## MSS clamping recommendations
17-
18-
### GRE tunnels as off-ramp
19-
20-
<Render file="mtu-mss/mss-clamping-gre" />
21-
22-
### IPsec tunnels
23-
24-
<Render file="mtu-mss/mss-clamping-ipsec" />
10+
<Render
11+
file="mtu-mss/mtu-mss"
12+
params={{
13+
magicProduct: "Magic Transit",
14+
productName: "Magic Transit"
15+
}}
16+
/>

src/content/docs/magic-wan/analytics/index.mdx

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,15 @@ description: Use Magic WAN's different analytic options for an overview of the
99

1010
---
1111

12-
Magic WAN customers can follow the troubleshooting steps listed below to gather information at the beginning of a troubleshooting process, then move to more detailed network data collection and analysis to identify the root cause of a problem.
13-
14-
- Overview in [Magic WAN Site Analytics](#magic-wan-site-analytics)
15-
- Analyze network traffic data overtime in [Magic WAN Network Analytics](#magic-wan-network-analytics)
16-
- Perform more detailed troubleshooting with:
17-
- [Traceroutes](#traceroutes)
18-
- [Packet captures](#packet-captures)
19-
20-
## Magic WAN Site Analytics
21-
22-
Magic WAN Site Analytics provides an overview of the connectivity status and traffic analytics of all Magic WAN sites. This is a great place to start if you receive an alert, need to begin the Magic WAN troubleshooting process, or are performing routine monitoring.
23-
24-
Refer to [Magic WAN Site Analytics](/magic-wan/analytics/site-analytics/) to learn more.
25-
26-
## Magic WAN Network Analytics
27-
28-
Network Analytics provides detailed analytics on Magic WAN traffic over time. Customers can filter data on specific traffic characteristics and view traffic analytics over time.
29-
30-
Refer to [Magic WAN Network Analytics](/magic-wan/analytics/network-analytics/) to learn more.
31-
32-
## Traceroutes
33-
34-
Traceroutes provide a hop by hop breakdown of the Internet path network traffic follows as it traverses from Cloudflare's network to a customer's network.
35-
36-
Refer to [Traceroutes](/magic-wan/analytics/traceroutes/) to learn more.
37-
38-
## Packet captures
39-
40-
Packet captures allow customers to analyze the raw packet data that a customer is sending and receiving from Cloudflare's network.
41-
42-
Refer to [packet captures](/magic-firewall/packet-captures/) to learn more.
43-
44-
## Query Analytics with GraphQL
45-
46-
GraphQL Analytics provides customers with a GraphQL API that they can query to receive raw JSON data of their Magic WAN traffic analytics. This data can be ingested into a SIEM or other tool and analyzed further.
47-
48-
- [Querying Magic WAN tunnel bandwidth analytics with GraphQL](/magic-wan/analytics/query-bandwidth/)
49-
- [Querying Magic WAN tunnel health check results with GraphQL](/magic-wan/analytics/query-tunnel-health/)
12+
import { Render } from "~/components";
13+
14+
<Render file="analytics/overview"
15+
params={{
16+
magicProduct: "Magic WAN",
17+
productName: "Magic WAN",
18+
analyticsAnchorHeading: "#magic-wan-network-analytics",
19+
networkAnalyticsURL: "/magic-wan/analytics/network-analytics/",
20+
traceRoutes: "/magic-wan/analytics/traceroutes/",
21+
graphQl: "/magic-wan/"
22+
}}
23+
/>

src/content/docs/magic-wan/configuration/common-settings/tunnel-health-checks.mdx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,9 @@ import { Render } from "~/components";
1111
file="tunnel-health/update-tunnel-health-checks-frequency"
1212
product="magic-transit"
1313
params={{
14+
magicProduct: "Magic WAN",
1415
productName: "Magic WAN",
15-
connectorExtraInfo: "For Magic WAN Connector, health checks are sent to IPsec tunnel endpoints.",
1616
healthChecksUrl: "/magic-wan/reference/tunnel-health-checks/",
17-
addTunnelsPath:
18-
"/magic-wan/configuration/manually/how-to/configure-tunnels/#add-tunnels",
19-
connectorNote: "<br /> <br /> To configure health checks frequency in Magic WAN Connector, refer to [Configure Connector](#configure-connector).",
20-
connectorTitle1: "Manual configuration",
21-
connectorTitle2: "Configure Connector",
22-
connectorSteps: "<ol><li>Log in to the <a href='https://dash.cloudflare.com/'>Cloudflare dashboard</a> and select your account.</li><li>Go to **Magic WAN** > **Sites**.</li><li>Select your site > **Edit**.</li><li>In **Network** > **WAN configuration** > select your WAN > **Edit**.</li><li>Change the **Health check rate** to your desire rate.</li><li>Select **Save**.</li></ol>",
17+
addTunnelsPath: "/magic-wan/configuration/manually/how-to/configure-tunnels/#add-tunnels"
2318
}}
2419
/>

src/content/docs/magic-wan/configuration/manually/how-to/configure-static-routes.mdx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,20 @@ description: Magic WAN uses a static configuration to route your traffic through
1111

1212
import { Render } from "~/components"
1313

14-
<Render file="static-routes/static-routes1" product="magic-transit" params={{ productName: "Magic WAN", BGPpath: "/magic-wan/configuration/manually/how-to/bgp-peering/", anycastURL: "/magic-wan/reference/tunnels/", trafficSteering: "/magic-wan/reference/traffic-steering/", magicWANecmp: "The maximum number of routes you can have with the same priority is 64." }} />
15-
16-
<Render file="static-routes/static-routes3" product="magic-transit" params={{ createPath: "Magic WAN > Configuration", tunnelEndpoints: "/magic-wan/configuration/manually/how-to/configure-tunnels/", ipRanges: "<br /> When using Magic WAN and Cloudflare Tunnel together, remember to consider the IP ranges utilized in the static routes of Cloudflare Tunnel when selecting static routes for Magic WAN. For more information, refer to [Cloudflare Tunnel](/magic-wan/zero-trust/cloudflare-tunnel/).<br>" }} />
14+
<Render
15+
file="static-routes"
16+
product="magic-transit"
17+
params={{
18+
productName: "Magic WAN",
19+
BGPpath: "/magic-wan/configuration/manually/how-to/bgp-peering/",
20+
anycastURL: "/magic-wan/reference/tunnels/",
21+
trafficSteering: "/magic-wan/reference/traffic-steering/",
22+
magicWANecmp: "The maximum number of routes you can have with the same priority is 64.",
23+
createPath: "Magic WAN > Configuration",
24+
tunnelEndpoints: "/magic-wan/configuration/manually/how-to/configure-tunnels/",
25+
ipRanges: "<br /> When using Magic WAN and Cloudflare Tunnel together, remember to consider the IP ranges utilized in the static routes of Cloudflare Tunnel when selecting static routes for Magic WAN. For more information, refer to [Cloudflare Tunnel](/magic-wan/zero-trust/cloudflare-tunnel/). <p></p>"
26+
}}
27+
/>
1728

1829
## Next steps
1930

src/content/docs/magic-wan/reference/mtu-mss.mdx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,8 @@ import { Render } from "~/components";
1010
<Render
1111
file="mtu-mss/mtu-mss"
1212
product="magic-transit"
13-
params={{ productName: "Magic WAN" }}
14-
/>
15-
16-
## MSS clamping recommendations
17-
18-
### GRE tunnels as off-ramp
19-
20-
<Render file="mtu-mss/mss-clamping-gre" />
21-
22-
### IPsec tunnels
23-
24-
<Render file="mtu-mss/mss-clamping-ipsec" />
13+
params={{
14+
magicProduct: "Magic WAN",
15+
productName: "Magic WAN"
16+
}}
17+
/>

src/content/partials/magic-transit/mtu-mss/mt-dsr.mdx

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/content/partials/magic-transit/mtu-mss/mtu-mss.mdx

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
---
22
params:
3+
- magicProduct?
34
- productName
45
---
56

7+
import { AnchorHeading, Render } from "~/components";
8+
import { Image } from 'astro:assets';
9+
import dsr from "~/assets/images/magic-transit/mtu-mss/dsr.png"
10+
import tunnel from "~/assets/images/magic-transit/mtu-mss/tcp-mss.png"
11+
import mss_ipsec from "~/assets/images/magic-transit/mtu-mss/ipsec-mss.png"
12+
613
{props.productName} has operation requirements that customers should know about to make sure their network works as intended. Customers should pay particular attention to the maximum transmission unit (MTU) and maximum segment size (MSS) values. The incorrect configuration of these values might lead to loss of performance or inability to deliver data packets.
714

815
## MTU and MSS
@@ -17,7 +24,7 @@ One common misconception about MSS/MTU is that setting these values negatively i
1724

1825
Since {props.productName} uses encapsulation to deliver its services, it is also important to understand why MTU and MSS matter in this case.
1926

20-
Encapsulation adds bytes to the packet, since we add a new IP header and (often) some sort of encapsulating header to every packet. For example, in the case of GRE for IPv4, we add 24 bytes - 20 bytes for the IPv4 header, and 4 bytes for the GRE tunnel header.
27+
Encapsulation adds bytes to the packet, since we add a new IP header and (often) some sort of encapsulating header to every packet. For example, in the case of GRE for IPv4, we add 24 bytes 20 bytes for the IPv4 header, and 4 bytes for the GRE tunnel header.
2128

2229
A network interface which performs GRE encapsulation needs to account for the added overhead by reducing its MTU. Since the MTU maximum size is 1,500 bytes, for IPv4 this means that the MTU can be 1,476 bytes (the original 1,500 bytes minus the 24 bytes from the GRE encapsulation). This reduced MTU defines the maximum size of the IP packet that can be encapsulated by GRE.
2330

@@ -29,7 +36,7 @@ Setting the `do not fragment` (DF) bit in the TCP header to `1` denotes that the
2936

3037
If you are experiencing issues with fragmentation and are unable to set an MSS clamp, Cloudflare can clear the `do not fragment` (DF) bit for you. When this option is enabled, Cloudflare fragments packets greater than 1,500 bytes, and the packets are reassembled on your infrastructure after decapsulation. This should be a last resort option. Contact your account team for more information.
3138

32-
### Fragmentation in {props.productName}
39+
<AnchorHeading depth={3} title={`Fragmentation in ${props.productName}`} />
3340

3441
Consider a UDP datagram of size 3,000 bytes (8 bytes for the UDP header + 2,992 bytes for the UDP data). To fit within a standard 1,500 bytes MTU, this UDP datagram would be fragmented across three IP packets as follows:
3542

@@ -64,3 +71,53 @@ Refer to [MSS clamping recommendations](#mss-clamping-recommendations) for infor
6471
:::caution
6572
Cloudflare only recommends applying a MSS clamp to adjust the size of TCP packets. Changing the MTU of a network interface is not recommended as this might have unforeseen impacts on traffic.
6673
:::
74+
75+
{ props.magicProduct === "Magic Transit" && (
76+
<>
77+
<AnchorHeading title="MSS with Magic Transit and Direct Server Return" depth={2} />
78+
<p>Asymmetric routing is a common scenario especially with Magic Transit. Ingress traffic from the Internet enters the Cloudflare network, then traverses a GRE tunnel (MTU of 1,476 bytes), and egress traffic from the datacenter is sent via Direct Server Return (DSR) over the Internet (MTU of 1,500 bytes).</p>
79+
<p>In an asymmetric scenario, we want to reduce the MSS value of packets sent by Magic Transit users to the Internet in order to reduce the size of packets sent from the Internet towards their network. To accomplish this, the configuration must be done either on the customer's end-hosts or through an MSS clamp on an intermediary device on the egress path of traffic leaving their network. How MSS values affect payload sizes on both routing paths is detailed below.</p>
80+
<Image src={dsr} alt="A diagram showing how MSS works with Magic Transit and Direct Server Return." />
81+
<p><em>Key takeaway from the chart above: MSS clamping affects TCP packet payload sizes flowing in the opposite direction vs. where the clamp is applied.</em></p>
82+
<AnchorHeading title="Tunnel-in-tunnel scenario with Magic Transit" depth={2} />
83+
<p>MSS clamping only affects TCP traffic. If, for example, you have a web server on your Magic Transit prefix, then the MSS clamp will take effect on the TCP data from direct server return traffic. However, be aware that you will have to take a different approach for any tunnels inside of your Magic Transit tunnel (tunnel-in-tunnel scenario).</p>
84+
<Image src={tunnel} alt="A diagram showing where the MSS clamp goes with TCP traffic." />
85+
<p>For example, if you have a Magic Transit GRE tunnel set up, and then another IPsec or GRE tunnel running from third-party devices on your premises, MSS clamp will have no impact on the outer packets of the encapsulated traffic. This is because MSS clamping affects only TCP traffic, and IPsec/GRE encapsulated traffic is IP. For this scenario, you will have to lower the MTU of the internal tunnel interface further, both for your ingress and egress traffic.</p>
86+
<Image src={mss_ipsec} alt="A diagram showing where the MSS clamp goes with an IPsec tunnel inside a GRE tunnel." />
87+
</>
88+
)
89+
}
90+
91+
## MSS clamping recommendations
92+
93+
### GRE tunnels as off-ramp
94+
95+
{ props.magicProduct === "Magic WAN" && (
96+
<>
97+
<Render file="mtu-mss/mss-clamping-gre" product="magic-wan"/>
98+
</>
99+
)
100+
}
101+
102+
{ props.magicProduct === "Magic Transit" && (
103+
<>
104+
<Render file="mtu-mss/mss-clamping-gre" />
105+
</>
106+
)
107+
}
108+
109+
### IPsec tunnels
110+
111+
{ props.magicProduct === "Magic WAN" && (
112+
<>
113+
<Render file="mtu-mss/mss-clamping-ipsec" product="magic-wan" />
114+
</>
115+
)
116+
}
117+
118+
{ props.magicProduct === "Magic Transit" && (
119+
<>
120+
<Render file="mtu-mss/mss-clamping-ipsec" />
121+
</>
122+
)
123+
}

0 commit comments

Comments
 (0)