Using The Cli - TP-Link T1600G-18TS Configuration Manual

T1600g series
Hide thumbs Also See for T1600G-18TS:
Table of Contents

Advertisement

Configuring Static Routing
2.2

Using the CLI

Follow these steps to create an IPv4 static route.
Step 1
Step 2
Step 3
Step 4
Step 5
The following example shows how to create an IPv4 static route with the destination IP
address as 192.168.2.0, the subnet mask as 255.255.255.0 and the next-hop address as
192.168.0.2:
Switch#configure
Switch(config)#ip route 192.168.2.0 255.255.255.0 192.168.0.2
Switch(config)#show ip route
Codes: C - connected, S - static
* - candidate default
C
192.168.0.0/24 is directly connected, Vlan1
S
192.168.2.0/24 [1/0] via 192.168.0.2, Vlan1
Switch(config)#end
Switch#copy running-config startup-config
configure
Enter global configuration mode.
ip route { dest-address } { mask } { next-hop-address } [ distance ]
Add an IPv4 static route.
Specify the destination IPv4 address of the packets.
dest-address:
Specify the subnet mask of the destination IPv4 address.
mask:
Specify the IPv4 gateway address to which the packet should be sent
next-hop-address:
next.
Specify the administrative distance, which is a rating of the trustworthiness of the
distance:
routing information. A higher value means a lower trust rating. When more than one routing
protocols have routes to the same destination, only the route that has the shortest distance
will be recorded in the IP routing table. The valid values are from 1 to 255 and the default
value is 1.
show ip route [ static | connected ]
Verify the IPv4 route entries of the specified type.
end
Return to privileged EXEC mode.
copy running-config startup-config
Save the settings in the configuration file.
IPv4 Static Routing Configuration
Configuration Guide
393

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents