Skip to content

Commit

Permalink
[interfaces.j2] Get mtu value from config DB if provided (#1128)
Browse files Browse the repository at this point in the history
Signed-off-by: Haiyang Zheng <[email protected]>
  • Loading branch information
hzheng5 authored and prsunny committed Nov 10, 2017
1 parent 69b8d28 commit a69b353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/image_config/interfaces/interfaces.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ iface eth0 inet dhcp
{% for (name, prefix) in INTERFACE %}
allow-hotplug {{ name }}
iface {{ name }} {{ 'inet' if prefix | ipv4 else 'inet6' }} static
mtu 9100
mtu {{ PORT[name]['mtu'] if PORT[name]['mtu'] else 9100 }}
address {{ prefix | ip }}
netmask {{ prefix | netmask if prefix | ipv4 else prefix | prefixlen }}
#
Expand All @@ -76,7 +76,7 @@ iface {{ member }} inet manual
{% for (name, prefix) in PORTCHANNEL_INTERFACE.keys() | sort %}
allow-hotplug {{ name }}
iface {{ name }} {{ 'inet' if prefix | ipv4 else 'inet6' }} static
mtu 9100
mtu {{ PORTCHANNEL[name]['mtu'] if PORTCHANNEL[name]['mtu'] else 9100 }}
address {{ prefix | ip }}
netmask {{ prefix | netmask if prefix | ipv4 else prefix | prefixlen }}
#
Expand Down

0 comments on commit a69b353

Please sign in to comment.