# Cisco commands for static and default route



## Bluking (Jun 8, 2011)

Hi everyone,

Recently when I was trying to implement static and default route in packet tracer but it fail to implement. May I know whether there is any error in my command?

In Router1:

```
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 2.2.2.1 255.0.0.0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#no shutdown
Router(config-if)#clock rate 56000
Router(config-if)#ip address 200.100.50.2 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up

Router(config-if)#exit
Router(config)#ip route 1.0.0.0 255.0.0.0 1.1.1.1
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    2.0.0.0/8 is directly connected, FastEthernet0/0
C    200.100.50.0/24 is directly connected, Serial0/1/0
```
In Router0:

```
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#ip address 1.1.1.1 255.0.0.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up
no shutdown
Router(config-if)#ip address 200.100.50.1 255.255.255.0
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up

Router(config-if)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 200.100.50.2
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
	
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 200.100.50.2 to network 0.0.0.0

C    1.0.0.0/8 is directly connected, FastEthernet0/0
C    200.100.50.0/24 is directly connected, Serial0/1/0
S*   0.0.0.0/0 [1/0] via 200.100.50.2
```
I have also attached an image that shows the network diagram. Thanks 

P.S. Sorry for double post :/


----------



## BosonMichael (Nov 1, 2011)

How is Router1 supposed to know how to get to 1.1.1.1?


----------



## Bluking (Jun 8, 2011)

BosonMichael said:


> How is Router1 supposed to know how to get to 1.1.1.1?


Thanks Boson


----------



## Bluking (Jun 8, 2011)

Hey Boson, how do you configure PAT in a network?


----------



## BosonMichael (Nov 1, 2011)

The way Cisco recommends it: link

Google is a tech's best resource.


----------



## Bluking (Jun 8, 2011)

BosonMichael said:


> The way Cisco recommends it: link
> 
> Google is a tech's best resource.


Thanks Boson


----------

