![](/images/new-backgrounds/1143853/143853145x1.webp)
Adding an IP Route
You can enable communications to networks outside of your LAN by configuring an IP routing path. This allows volume access to hosts located on external networks. Use the CLI command ip route add to add an IP routing path to your
ip route add
You need four parameters to configure an IP routing path.
SWITCH | PARAMETER | DEFINITION | STATUS | EXAMPLE |
DESTINATION IP | IP OF HOST | MANDATORY | |
|
| NETWORK |
|
| DESTINATION | IP MASK OF HOST | MANDATORY |
| MASK | NETWORK |
|
GATEWAY IP | IP ADDRESS OF | MANDATORY | |
| ADDRESS | THE GATEWAY |
|
|
| ROUTER |
|
10.10.20.0
255.255.255.0
30.30.20.20
INTERFACE | NETWORK PORT TO | MANDATORY | eth2 |
ALIAS | OPEN |
|
|
| COMMUNICATION |
|
|
| THROUGH |
|
|
Example:
An IP routing path to Network D, IP 10.10.20.0, (IP mask 255.255.255.0) is mapped from network port Eth2 through router gateway 30.30.20.20.
ip route add
Setting a Default Gateway
You can set a default gateway for Eth1 for working with your local gateway. This gateway is used for any IP address not specified in the V- Switch routing table. Use the CLI command ip route default to set the default gateway IP address for Eth1. To change the default gateway, repeat the command with the new default gateway IP address.
ip route default
You need one parameter to configure a default IP routing path.
SWITCH | PARAMETER | DEFINITION | STATUS | EXAMPLE |
|
|
|
|
|
GATEWAY | IP ADDRESS OF | MANDATORY | 20.20.10.20 | |
|
| DEFAULT GATEWAY |
|
|
|
|
|
|
|
Chapter 4: | 67 |