Skip to content

Commit 27b7703

Browse files
authored
Merge pull request #110321 from Court72/expressroute-config-samples-routing
edit pass: expressroute-config-samples-routing
2 parents 85932f9 + c00464e commit 27b7703

File tree

1 file changed

+244
-1
lines changed

1 file changed

+244
-1
lines changed
Lines changed: 244 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,244 @@
1-
---title: 'Azure ExpressRoute: Router configuration samples'description: This page provides router config samples for Cisco and Juniper routers.services: expressrouteauthor: cherylmcms.service: expressroutems.topic: articlems.date: 03/26/2020ms.author: osamaz---# Router configuration samples to set up and manage routingThis page provides interface and routing configuration samples for Cisco IOS-XE and Juniper MX series routers when working with ExpressRoute. These are intended to be samples for guidance only and must not be used as is. You can work with your vendor to come up with appropriate configurations for your network. > [!IMPORTANT]> Samples in this page are intended to be purely for guidance. You must work with your vendor's sales / technical team and your networking team to come up with appropriate configurations to meet your needs. Microsoft will not support issues related to configurations listed in this page. You must contact your device vendor for support issues.> > ## MTU and TCP MSS settings on router interfaces* The MTU for the ExpressRoute interface is 1500, which is the typical default MTU for an Ethernet interface on a router. Unless your router has a different MTU by default, there is no need to specify a value on the router interface.* Unlike an Azure VPN Gateway, the TCP MSS for an ExpressRoute circuit does not need to be specified.Router configuration samples below apply to all peerings. Review [ExpressRoute peerings](expressroute-circuit-peerings.md) and [ExpressRoute routing requirements](expressroute-routing.md) for more details on routing.## Cisco IOS-XE based routersThe samples in this section apply for any router running the IOS-XE OS family.### 1. Configuring interfaces and sub-interfacesYou will require a sub interface per peering in every router you connect to Microsoft. A sub interface can be identified with a VLAN ID or a stacked pair of VLAN IDs and an IP address.**Dot1Q interface definition**This sample provides the sub-interface definition for a sub-interface with a single VLAN ID. The VLAN ID is unique per peering. The last octet of your IPv4 address will always be an odd number. interface GigabitEthernet<Interface_Number>.<Number> encapsulation dot1Q <VLAN_ID> ip address <IPv4_Address><Subnet_Mask>**QinQ interface definition**This sample provides the sub-interface definition for a sub-interface with a two VLAN IDs. The outer VLAN ID (s-tag), if used remains the same across all the peerings. The inner VLAN ID (c-tag) is unique per peering. The last octet of your IPv4 address will always be an odd number. interface GigabitEthernet<Interface_Number>.<Number> encapsulation dot1Q <s-tag> seconddot1Q <c-tag> ip address <IPv4_Address><Subnet_Mask>### 2. Setting up eBGP sessionsYou must setup a BGP session with Microsoft for every peering. The sample below enables you to setup a BGP session with Microsoft. If the IPv4 address you used for your sub interface was a.b.c.d, the IP address of the BGP neighbor (Microsoft) will be a.b.c.d+1. The last octet of the BGP neighbor's IPv4 address will always be an even number. router bgp <Customer_ASN> bgp log-neighbor-changes neighbor <IP#2_used_by_Azure> remote-as 12076 ! address-family ipv4 neighbor <IP#2_used_by_Azure> activate exit-address-family !### 3. Setting up prefixes to be advertised over the BGP sessionYou can configure your router to advertise select prefixes to Microsoft. You can do so using the sample below. router bgp <Customer_ASN> bgp log-neighbor-changes neighbor <IP#2_used_by_Azure> remote-as 12076 ! address-family ipv4 network <Prefix_to_be_advertised> mask <Subnet_mask> neighbor <IP#2_used_by_Azure> activate exit-address-family !### 4. Route mapsYou can use route-maps and prefix lists to filter prefixes propagated into your network. You can use the sample below to accomplish the task. Ensure that you have appropriate prefix lists setup. router bgp <Customer_ASN> bgp log-neighbor-changes neighbor <IP#2_used_by_Azure> remote-as 12076 ! address-family ipv4 network <Prefix_to_be_advertised> mask <Subnet_mask> neighbor <IP#2_used_by_Azure> activate neighbor <IP#2_used_by_Azure> route-map <MS_Prefixes_Inbound> in exit-address-family ! route-map <MS_Prefixes_Inbound> permit 10 match ip address prefix-list <MS_Prefixes> !### 5. Configuring BFDYou will configure BFD in two places. One at the interface level and other at BGP level. The example below is for QinQ interface. interface GigabitEthernet<Interface_Number>.<Number> bfd interval 300 min_rx 300 multiplier 3 encapsulation dot1Q <s-tag> seconddot1Q <c-tag> ip address <IPv4_Address><Subnet_Mask> router bgp <Customer_ASN> bgp log-neighbor-changes neighbor <IP#2_used_by_Azure> remote-as 12076 ! address-family ipv4 neighbor <IP#2_used_by_Azure> activate neighbor <IP#2_used_by_Azure> fall-over bfd exit-address-family !## Juniper MX series routersThe samples in this section apply for any Juniper MX series routers.### 1. Configuring interfaces and sub-interfaces**Dot1Q interface definition**This sample provides the sub-interface definition for a sub-interface with a single VLAN ID. The VLAN ID is unique per peering. The last octet of your IPv4 address will always be an odd number. interfaces { vlan-tagging; <Interface_Number> { unit <Number> { vlan-id <VLAN_ID>; family inet { address <IPv4_Address/Subnet_Mask>; } } } }**QinQ interface definition**This sample provides the sub-interface definition for a sub-interface with a two VLAN IDs. The outer VLAN ID (s-tag), if used remains the same across all the peerings. The inner VLAN ID (c-tag) is unique per peering. The last octet of your IPv4 address will always be an odd number. interfaces { <Interface_Number> { flexible-vlan-tagging; unit <Number> { vlan-tags outer <S-tag> inner <C-tag>; family inet { address <IPv4_Address/Subnet_Mask>; } } } } ### 2. Setting up eBGP sessionsYou must setup a BGP session with Microsoft for every peering. The sample below enables you to setup a BGP session with Microsoft. If the IPv4 address you used for your sub interface was a.b.c.d, the IP address of the BGP neighbor (Microsoft) will be a.b.c.d+1. The last octet of the BGP neighbor's IPv4 address will always be an even number. routing-options { autonomous-system <Customer_ASN>; } } protocols { bgp { group <Group_Name> { peer-as 12076; neighbor <IP#2_used_by_Azure>; } } }### 3. Setting up prefixes to be advertised over the BGP sessionYou can configure your router to advertise select prefixes to Microsoft. You can do so using the sample below. policy-options { policy-statement <Policy_Name> { term 1 { from protocol OSPF; route-filter <Prefix_to_be_advertised/Subnet_Mask> exact; then { accept; } } } } protocols { bgp { group <Group_Name> { export <Policy_Name> peer-as 12076; neighbor <IP#2_used_by_Azure>; } } }### 4. Route PoliciesYou can use route-maps and prefix lists to filter prefixes propagated into your network. You can use the sample below to accomplish the task. Ensure that you have appropriate prefix lists setup. policy-options { prefix-list MS_Prefixes { <IP_Prefix_1/Subnet_Mask>; <IP_Prefix_2/Subnet_Mask>; } policy-statement <MS_Prefixes_Inbound> { term 1 { from { prefix-list MS_Prefixes; } then { accept; } } } } protocols { bgp { group <Group_Name> { export <Policy_Name> import <MS_Prefixes_Inbound> peer-as 12076; neighbor <IP#2_used_by_Azure>; } } }### 4. Configuring BFDYou will configure BFD under the protocol BGP section only. protocols { bgp { group <Group_Name> { peer-as 12076; neighbor <IP#2_used_by_Azure>; bfd-liveness-detection { minimum-interval 3000; multiplier 3; } } } }## Next StepsSee the [ExpressRoute FAQ](expressroute-faqs.md) for more details.
1+
---
2+
title: 'Azure ExpressRoute: Router configuration samples'
3+
description: This page provides router config samples for Cisco and Juniper routers.
4+
services: expressroute
5+
author: cherylmc
6+
7+
ms.service: expressroute
8+
ms.topic: article
9+
ms.date: 03/26/2020
10+
ms.author: osamaz
11+
12+
---
13+
# Router configuration samples to set up and manage routing
14+
This page provides interface and routing configuration samples for Cisco IOS-XE and Juniper MX series routers when you're working with Azure ExpressRoute.
15+
16+
> [!IMPORTANT]
17+
> Samples on this page are purely for guidance. You must work with your vendor's sales/technical team and your networking team to find appropriate configurations to meet your needs. Microsoft won't support issues related to configurations listed in this page. Contact your device vendor for support issues.
18+
>
19+
>
20+
21+
## MTU and TCP MSS settings on router interfaces
22+
The maximum transmission unit (MTU) for the ExpressRoute interface is 1500, which is the typical default MTU for an Ethernet interface on a router. Unless your router has a different MTU by default, there is no need to specify a value on the router interface.
23+
24+
Unlike an Azure VPN gateway, the TCP maximum segment size (MSS) for an ExpressRoute circuit does not need to be specified.
25+
26+
The router configuration samples in this article apply to all peerings. Review [ExpressRoute peerings](expressroute-circuit-peerings.md) and [ExpressRoute routing requirements](expressroute-routing.md) for more details on routing.
27+
28+
29+
## Cisco IOS-XE based routers
30+
The samples in this section apply to any router running the IOS-XE OS family.
31+
32+
### Configure interfaces and subinterfaces
33+
You'll need one subinterface per peering in every router that you connect to Microsoft. A subinterface can be identified with a VLAN ID or a stacked pair of VLAN IDs and an IP address.
34+
35+
**Dot1Q interface definition**
36+
37+
This sample provides the subinterface definition for a subinterface with a single VLAN ID. The VLAN ID is unique per peering. The last octet of your IPv4 address will always be an odd number.
38+
39+
interface GigabitEthernet<Interface_Number>.<Number>
40+
encapsulation dot1Q <VLAN_ID>
41+
ip address <IPv4_Address><Subnet_Mask>
42+
43+
**QinQ interface definition**
44+
45+
This sample provides the subinterface definition for a subinterface with two VLAN IDs. The outer VLAN ID (s-tag), if used, remains the same across all peerings. The inner VLAN ID (c-tag) is unique per peering. The last octet of your IPv4 address will always be an odd number.
46+
47+
interface GigabitEthernet<Interface_Number>.<Number>
48+
encapsulation dot1Q <s-tag> seconddot1Q <c-tag>
49+
ip address <IPv4_Address><Subnet_Mask>
50+
51+
### Set up eBGP sessions
52+
You must set up a BGP session with Microsoft for every peering. Set up a BGP session by using the following sample. If the IPv4 address that you used for your subinterface was a.b.c.d, then the IP address of the BGP neighbor (Microsoft) will be a.b.c.d+1. The last octet of the BGP neighbor's IPv4 address will always be an even number.
53+
54+
router bgp <Customer_ASN>
55+
bgp log-neighbor-changes
56+
neighbor <IP#2_used_by_Azure> remote-as 12076
57+
!
58+
address-family ipv4
59+
neighbor <IP#2_used_by_Azure> activate
60+
exit-address-family
61+
!
62+
63+
### Set up prefixes to be advertised over the BGP session
64+
Configure your router to advertise select prefixes to Microsoft by using the following sample.
65+
66+
router bgp <Customer_ASN>
67+
bgp log-neighbor-changes
68+
neighbor <IP#2_used_by_Azure> remote-as 12076
69+
!
70+
address-family ipv4
71+
network <Prefix_to_be_advertised> mask <Subnet_mask>
72+
neighbor <IP#2_used_by_Azure> activate
73+
exit-address-family
74+
!
75+
76+
### Route maps
77+
Use route maps and prefix lists to filter prefixes propagated into your network. See the following sample, and ensure that you have the appropriate prefix lists set up.
78+
79+
router bgp <Customer_ASN>
80+
bgp log-neighbor-changes
81+
neighbor <IP#2_used_by_Azure> remote-as 12076
82+
!
83+
address-family ipv4
84+
network <Prefix_to_be_advertised> mask <Subnet_mask>
85+
neighbor <IP#2_used_by_Azure> activate
86+
neighbor <IP#2_used_by_Azure> route-map <MS_Prefixes_Inbound> in
87+
exit-address-family
88+
!
89+
route-map <MS_Prefixes_Inbound> permit 10
90+
match ip address prefix-list <MS_Prefixes>
91+
!
92+
93+
### Configure BFD
94+
95+
You'll configure BFD in two places: one at the interface level and another at BGP level. The example here is for the QinQ interface.
96+
97+
interface GigabitEthernet<Interface_Number>.<Number>
98+
bfd interval 300 min_rx 300 multiplier 3
99+
encapsulation dot1Q <s-tag> seconddot1Q <c-tag>
100+
ip address <IPv4_Address><Subnet_Mask>
101+
102+
router bgp <Customer_ASN>
103+
bgp log-neighbor-changes
104+
neighbor <IP#2_used_by_Azure> remote-as 12076
105+
!
106+
address-family ipv4
107+
neighbor <IP#2_used_by_Azure> activate
108+
neighbor <IP#2_used_by_Azure> fall-over bfd
109+
exit-address-family
110+
!
111+
112+
113+
## Juniper MX series routers
114+
The samples in this section apply to any Juniper MX series router.
115+
116+
### Configure interfaces and subinterfaces
117+
118+
**Dot1Q interface definition**
119+
120+
This sample provides the subinterface definition for a subinterface with a single VLAN ID. The VLAN ID is unique per peering. The last octet of your IPv4 address will always be an odd number.
121+
122+
interfaces {
123+
vlan-tagging;
124+
<Interface_Number> {
125+
unit <Number> {
126+
vlan-id <VLAN_ID>;
127+
family inet {
128+
address <IPv4_Address/Subnet_Mask>;
129+
}
130+
}
131+
}
132+
}
133+
134+
135+
**QinQ interface definition**
136+
137+
This sample provides the subinterface definition for a subinterface with two VLAN IDs. The outer VLAN ID (s-tag), if used, remains the same across all peerings. The inner VLAN ID (c-tag) is unique per peering. The last octet of your IPv4 address will always be an odd number.
138+
139+
interfaces {
140+
<Interface_Number> {
141+
flexible-vlan-tagging;
142+
unit <Number> {
143+
vlan-tags outer <S-tag> inner <C-tag>;
144+
family inet {
145+
address <IPv4_Address/Subnet_Mask>;
146+
}
147+
}
148+
}
149+
}
150+
151+
### Set up eBGP sessions
152+
You must set up a BGP session with Microsoft for every peering. Set up a BGP session by using the following sample. If the IPv4 address that you used for your subinterface was a.b.c.d, then the IP address of the BGP neighbor (Microsoft) will be a.b.c.d+1. The last octet of the BGP neighbor's IPv4 address will always be an even number.
153+
154+
routing-options {
155+
autonomous-system <Customer_ASN>;
156+
}
157+
}
158+
protocols {
159+
bgp {
160+
group <Group_Name> {
161+
peer-as 12076;
162+
neighbor <IP#2_used_by_Azure>;
163+
}
164+
}
165+
}
166+
167+
### Set up prefixes to be advertised over the BGP session
168+
Configure your router to advertise select prefixes to Microsoft by using the following sample.
169+
170+
policy-options {
171+
policy-statement <Policy_Name> {
172+
term 1 {
173+
from protocol OSPF;
174+
route-filter
175+
<Prefix_to_be_advertised/Subnet_Mask> exact;
176+
then {
177+
accept;
178+
}
179+
}
180+
}
181+
}
182+
protocols {
183+
bgp {
184+
group <Group_Name> {
185+
export <Policy_Name>
186+
peer-as 12076;
187+
neighbor <IP#2_used_by_Azure>;
188+
}
189+
}
190+
}
191+
192+
193+
### Route policies
194+
You can use route maps and prefix lists to filter prefixes propagated into your network. See the following sample, and ensure you have the appropriate prefix lists set up.
195+
196+
policy-options {
197+
prefix-list MS_Prefixes {
198+
<IP_Prefix_1/Subnet_Mask>;
199+
<IP_Prefix_2/Subnet_Mask>;
200+
}
201+
policy-statement <MS_Prefixes_Inbound> {
202+
term 1 {
203+
from {
204+
prefix-list MS_Prefixes;
205+
}
206+
then {
207+
accept;
208+
}
209+
}
210+
}
211+
}
212+
protocols {
213+
bgp {
214+
group <Group_Name> {
215+
export <Policy_Name>
216+
import <MS_Prefixes_Inbound>
217+
peer-as 12076;
218+
neighbor <IP#2_used_by_Azure>;
219+
}
220+
}
221+
}
222+
223+
### Configure BFD
224+
Configure BFD under the protocol BGP section only.
225+
226+
protocols {
227+
bgp {
228+
group <Group_Name> {
229+
peer-as 12076;
230+
neighbor <IP#2_used_by_Azure>;
231+
bfd-liveness-detection {
232+
minimum-interval 3000;
233+
multiplier 3;
234+
}
235+
}
236+
}
237+
}
238+
239+
240+
## Next steps
241+
See the [ExpressRoute FAQ](expressroute-faqs.md) for more details.
242+
243+
244+

0 commit comments

Comments
 (0)