needs only configure static route that the switch can be operated normally. Static route will not
cover valuable network bandwidth for there is not route refreshing. Default route is also a kind of
static route. Simply default route is only used of there are not any matched routes, i.e. default
route can be used only there are not any proper routes. In route table default route will be found
in the form of Internet 0.0.0.0 (the mask is 0.0.0.0). You can check if it is set through "show ip
route table". If the destination of packet is not in route table and there are not default routes in
route table, the packet will be thrown away at the same time it will return resource end with an
ICMP message to indicate that the purpose address or network cannot be reached. Default
route is much useful in network. In the network including hundred switches dynamic route
selection protocol maybe consume great bandwidth resource, but with default route bandwidth
resource used by route election and tranference will be saved, so in a degree great users can be
satisfied and communication requirements will be achieved.
2. Command
●
Set up static route
Switch(route-config)# ip route <dst> <subnet> <nexthop>
●
Delete static route
Switch(route-config)# no ip route <dst> <subnet>
●
Show the contents of static route table:
Switch(route-config)# show ip static route
●
Show all contents in route table(including dynamic and static routes) :
Switch(route-config)# show ip route
3. Sample
●
Set purpose address ip is 200.1.1.0, sub-net mask is 255.255.255.0, the next is static
route of 10.1.1.2: Switch(route-config)# ip route 200.1.1.0 255.255.255.0 10.1.1.2
●
Delete purpose address ip is 200.1.1.0, sub-net mask is 255.255.255.0, the next is
staticroute of 10.1.1.2: Switch(route-config)# no ip route 200.1.1.0 255.255.255.0