Adding a static route and default route – Allied Telesis AT-S63 User Manual

Page 326

Advertising
background image

Chapter 27: Internet Protocol Version 4 Packet Routing

326

Section VII: Routing

command.

Adding a Static

Route and

Default Route

Building on our example, assume you decided to manually enter a route to
a remote subnet as a static route. The command for creating a static route
is ADD IP ROUTE. Here is the basic information for defining a static route:

ˆ

The IP address of the remote destination.

ˆ

The subnet mask of the remote destination.

ˆ

The IP address of the next hop.

ˆ

The routing interface on the switch where the next hop is located. This
piece of information is optional because the switch can automatically
determine the appropriate interface from the IP address of the next
hop. The IP addresses of the next hop of a static route and the
interface where the hop is located must be members of the same
subnet.

Let’s assume you wanted to add a static route to a remote subnet with the
IP address 149.35.22.0 and a mask of 255.255.255.0. Let’s also assume
that the IP address of the next hop is 149.35.70.26, making it part of the
subnet of the VLAN11-1 interface. Consequently, the static route must be
added to that interface, though you do not need to specify it in the
command. Here is the command for adding the static route:

add ip route=149.35.22.0 nexthop=149.35.70.26
mask=255.255.255.0

A static route becomes active as soon as it is defined and is available to all
of the interfaces on the switch.

Now assume that you want to create a default route for when the switch
receives a packet with a destination address to a network or subnet for
which it does not have a route. All you need to know for a default route is
the IP address of the next hop for the packets. For this example, assume
that the IP address of the next hop will be 149.35.68.12. This locates the
next hop on the VLAN5-0 interface. Here is the command for creating the
default route:

add ip route=0.0.0.0 nexthop=149.35.68.12

A default route does not have a subnet mask. Note also that the
appropriate routing interface for the next hop, in this example VLAN5-0, is
also not defined because, as with other static routes, specifying the
interface is optional.

Advertising