SANRAD V-Switch manual Adding an IP Route, Setting a Default Gateway

Models: V-Switch

1 300
Download 300 pages 15.92 Kb
Page 73
Image 73

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 V-Switch. If you are working in a V-Switch cluster, you must configure the IP route on both V-Switches in the V-Switch cluster. For more information on V-Switch clusters, see “Introduction to V-Switch Clusters,” page 72.

ip route add

You need four parameters to configure an IP routing path.

SWITCH

PARAMETER

DEFINITION

STATUS

EXAMPLE

-dip

DESTINATION IP

IP OF HOST

MANDATORY

 

 

NETWORK

 

-dmask

DESTINATION

IP MASK OF HOST

MANDATORY

 

MASK

NETWORK

 

-gw

GATEWAY IP

IP ADDRESS OF

MANDATORY

 

ADDRESS

THE GATEWAY

 

 

 

ROUTER

 

10.10.20.0

255.255.255.0

30.30.20.20

-if

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 –dip 10.10.20.0 –dmask 255.255.255.0 –gw 30.30.20.20 –if eth2

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

 

 

 

 

 

-gw

GATEWAY

IP ADDRESS OF

MANDATORY

20.20.10.20

 

 

DEFAULT GATEWAY

 

 

 

 

 

 

 

Chapter 4: V-Switch Configuration

67

Page 73
Image 73
SANRAD V-Switch manual Adding an IP Route, Setting a Default Gateway