|
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: 12/06/2018 |
10 |
| -ms.author: cherylmc |
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 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. |
15 |
| - |
16 |
| -> [!IMPORTANT] |
17 |
| -> 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. |
18 |
| -> |
19 |
| -> |
20 |
| -
|
21 |
| -## MTU and TCP MSS settings on router interfaces |
22 |
| -* 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. |
23 |
| -* Unlike an Azure VPN Gateway, the TCP MSS for an ExpressRoute circuit does not need to be specified. |
24 |
| - |
25 |
| -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. |
26 |
| - |
27 |
| - |
28 |
| -## Cisco IOS-XE based routers |
29 |
| -The samples in this section apply for any router running the IOS-XE OS family. |
30 |
| - |
31 |
| -### 1. Configuring interfaces and sub-interfaces |
32 |
| -You 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. |
33 |
| - |
34 |
| -**Dot1Q interface definition** |
35 |
| - |
36 |
| -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. |
37 |
| - |
38 |
| - interface GigabitEthernet<Interface_Number>.<Number> |
39 |
| - encapsulation dot1Q <VLAN_ID> |
40 |
| - ip address <IPv4_Address><Subnet_Mask> |
41 |
| - |
42 |
| -**QinQ interface definition** |
43 |
| - |
44 |
| -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. |
45 |
| - |
46 |
| - interface GigabitEthernet<Interface_Number>.<Number> |
47 |
| - encapsulation dot1Q <s-tag> seconddot1Q <c-tag> |
48 |
| - ip address <IPv4_Address><Subnet_Mask> |
49 |
| - |
50 |
| -### 2. Setting up eBGP sessions |
51 |
| -You 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. |
52 |
| - |
53 |
| - router bgp <Customer_ASN> |
54 |
| - bgp log-neighbor-changes |
55 |
| - neighbor <IP#2_used_by_Azure> remote-as 12076 |
56 |
| - ! |
57 |
| - address-family ipv4 |
58 |
| - neighbor <IP#2_used_by_Azure> activate |
59 |
| - exit-address-family |
60 |
| - ! |
61 |
| - |
62 |
| -### 3. Setting up prefixes to be advertised over the BGP session |
63 |
| -You can configure your router to advertise select prefixes to Microsoft. You can do so using the sample below. |
64 |
| - |
65 |
| - router bgp <Customer_ASN> |
66 |
| - bgp log-neighbor-changes |
67 |
| - neighbor <IP#2_used_by_Azure> remote-as 12076 |
68 |
| - ! |
69 |
| - address-family ipv4 |
70 |
| - network <Prefix_to_be_advertised> mask <Subnet_mask> |
71 |
| - neighbor <IP#2_used_by_Azure> activate |
72 |
| - exit-address-family |
73 |
| - ! |
74 |
| - |
75 |
| -### 4. Route maps |
76 |
| -You 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. |
77 |
| - |
78 |
| - router bgp <Customer_ASN> |
79 |
| - bgp log-neighbor-changes |
80 |
| - neighbor <IP#2_used_by_Azure> remote-as 12076 |
81 |
| - ! |
82 |
| - address-family ipv4 |
83 |
| - network <Prefix_to_be_advertised> mask <Subnet_mask> |
84 |
| - neighbor <IP#2_used_by_Azure> activate |
85 |
| - neighbor <IP#2_used_by_Azure> route-map <MS_Prefixes_Inbound> in |
86 |
| - exit-address-family |
87 |
| - ! |
88 |
| - route-map <MS_Prefixes_Inbound> permit 10 |
89 |
| - match ip address prefix-list <MS_Prefixes> |
90 |
| - ! |
91 |
| - |
92 |
| - |
93 |
| -## Juniper MX series routers |
94 |
| -The samples in this section apply for any Juniper MX series routers. |
95 |
| - |
96 |
| -### 1. Configuring interfaces and sub-interfaces |
97 |
| - |
98 |
| -**Dot1Q interface definition** |
99 |
| - |
100 |
| -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. |
101 |
| - |
102 |
| - interfaces { |
103 |
| - vlan-tagging; |
104 |
| - <Interface_Number> { |
105 |
| - unit <Number> { |
106 |
| - vlan-id <VLAN_ID>; |
107 |
| - family inet { |
108 |
| - address <IPv4_Address/Subnet_Mask>; |
109 |
| - } |
110 |
| - } |
111 |
| - } |
112 |
| - } |
113 |
| - |
114 |
| - |
115 |
| -**QinQ interface definition** |
116 |
| - |
117 |
| -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. |
118 |
| - |
119 |
| - interfaces { |
120 |
| - <Interface_Number> { |
121 |
| - flexible-vlan-tagging; |
122 |
| - unit <Number> { |
123 |
| - vlan-tags outer <S-tag> inner <C-tag>; |
124 |
| - family inet { |
125 |
| - address <IPv4_Address/Subnet_Mask>; |
126 |
| - } |
127 |
| - } |
128 |
| - } |
129 |
| - } |
130 |
| - |
131 |
| -### 2. Setting up eBGP sessions |
132 |
| -You 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. |
133 |
| - |
134 |
| - routing-options { |
135 |
| - autonomous-system <Customer_ASN>; |
136 |
| - } |
137 |
| - } |
138 |
| - protocols { |
139 |
| - bgp { |
140 |
| - group <Group_Name> { |
141 |
| - peer-as 12076; |
142 |
| - neighbor <IP#2_used_by_Azure>; |
143 |
| - } |
144 |
| - } |
145 |
| - } |
146 |
| - |
147 |
| -### 3. Setting up prefixes to be advertised over the BGP session |
148 |
| -You can configure your router to advertise select prefixes to Microsoft. You can do so using the sample below. |
149 |
| - |
150 |
| - policy-options { |
151 |
| - policy-statement <Policy_Name> { |
152 |
| - term 1 { |
153 |
| - from protocol OSPF; |
154 |
| - route-filter <Prefix_to_be_advertised/Subnet_Mask> exact; |
155 |
| - then { |
156 |
| - accept; |
157 |
| - } |
158 |
| - } |
159 |
| - } |
160 |
| - } |
161 |
| - protocols { |
162 |
| - bgp { |
163 |
| - group <Group_Name> { |
164 |
| - export <Policy_Name> |
165 |
| - peer-as 12076; |
166 |
| - neighbor <IP#2_used_by_Azure>; |
167 |
| - } |
168 |
| - } |
169 |
| - } |
170 |
| - |
171 |
| - |
172 |
| -### 4. Route maps |
173 |
| -You 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. |
174 |
| - |
175 |
| - policy-options { |
176 |
| - prefix-list MS_Prefixes { |
177 |
| - <IP_Prefix_1/Subnet_Mask>; |
178 |
| - <IP_Prefix_2/Subnet_Mask>; |
179 |
| - } |
180 |
| - policy-statement <MS_Prefixes_Inbound> { |
181 |
| - term 1 { |
182 |
| - from { |
183 |
| - prefix-list MS_Prefixes; |
184 |
| - } |
185 |
| - then { |
186 |
| - accept; |
187 |
| - } |
188 |
| - } |
189 |
| - } |
190 |
| - } |
191 |
| - protocols { |
192 |
| - bgp { |
193 |
| - group <Group_Name> { |
194 |
| - export <Policy_Name> |
195 |
| - import <MS_Prefixes_Inbound> |
196 |
| - peer-as 12076; |
197 |
| - neighbor <IP#2_used_by_Azure>; |
198 |
| - } |
199 |
| - } |
200 |
| - } |
201 |
| - |
202 |
| -## Next Steps |
203 |
| -See the [ExpressRoute FAQ](expressroute-faqs.md) for more details. |
204 |
| - |
| 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. |
|
0 commit comments