Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
...
Reserved addresses (important, if manual address assignment is used):
The following address range is reserved to allow AWS to query meta-data about instance configuration: 169.254.0.0/16. This range is automatically configured on every network interface.
The following addresses are reserved in each subnet and cannot be used for E2C instances (shown in the example below for network 10.1.1.0/24):
...
Asymmetric Routing Considerations
This section applies to the case where several interfaces are configured on an instance and they all have IP addresses configured on the Linux level.
From the AWS documentation (https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-secondary-network-interface/):
...
- Create a configuration file (/etc/sysconfig/network-scripts/ifcfg-<interface-name>) for the second interface (if there is no configuration file for the primary interface, create it as well).
- Set the correct interface for default route in /etc/sysconfig/network (example: GATEWAYDEV=eth0).
- To prevent the cloud-init from resetting your custom network configurations, add the following lines to the /etc/cloud/cloud.cfg file:
network:
; config: disabled
- Restart the network.
- Create an additional routing table (use the command: ip route add <path> dev <interface-name> table <table-id>). There must be an entry for every IP address assigned to the second interface and any other route to be used.
- Set rules in the Routing Policy Database (use the command: ip rule add from <ip-address-of-second-interface> lookup <table-id>)
- Create a static route file (/etc/sysconfig/network-scripts/route-<interface-name>)
- Create a static rule file (/etc/sysconfig/network-scripts/rule-<interface-name>)
...