Configure a default route on a Cisco router
Posted by Quinn McHenry in Cisco router
The default route is the IP address of the next hop when no other routes are known.
To configure the default route to be 192.168.1.1:
config t
ip route 0.0.0.0 0.0.0.0 192.168.1.1
An interface can be used as an alternative to and IP address. To use serial0/0 for destinations not in the routing table, use:
ip route 0.0.0.0 0.0.0.0 serial 0/0
About Quinn McHenry
View more articles by Quinn McHenry
The Conversation
Follow the reactions below and share your own thoughts.
April 10, 2009 at 6:47 am, Sridhar V said:
Sir I have two serial ports with 2 MB internet connectivity with static IP given by the ISP.
At the local LAN the router has one ethernet port which i am using for local lan. How can i configure default route on both the serial ports
April 30, 2010 at 6:28 am, Anonymous said:
Dear Sridhar V
Router#config t
Router(config)#interface FastEthernet0/0
Router(config-if)# ip address local ip 255.255.255.0
Router(config-if)# ip nat inside
Router(config-if)# exit
Router(config)#interface FastEthernet0/1
Router(config-if)# ip address public ip 255.255.255.0
Router(config-if)# ip nat outside
Router(config-if)# exit
Router(config)#ip route 0.0.0.0 0.0.0.0 public IP
Router(config)#access-list 101 permit ip local ip 0.0.0.255 any
Router(config)#ip nat inside source list 101 interface FastEthernet0/1 overload
August 07, 2010 at 6:27 pm, Will said:
If you were running OSPF would you add the fa outside interface IP network to your routing networks, or program that IP for the default route?
Do you have to configure the default route back to this IP on every router with the ip route command?
January 12, 2011 at 11:27 am, Tushar said:
A router gateway is a node on a TCP/IP network that serves as an access point to another network. which provides the actual path for the packet in and out of the gateway.The default gateway commonly connects the internal networks and the outside network (Internet).
Configure Ethernet Port Command -
Router(config)# inte f0/0
Router(config-if)# ip add 192.168.0.1 255.255.255.0
Router(config-if)# no shut
Configure Serial Port Command -
Router(config-if)# inte s 0/0/0
Router(config-if)# ip add 192.168.20.1 255.255.255.0
Router(config-if)# no shut
Thanks,
Tushar
March 27, 2011 at 8:43 am, GebRiel said:
How to configure default route using the outbound interface to the internet???
can some one help me????
March 27, 2011 at 12:08 pm, Will said:
To use the INTERFACE, Instead of placing the next hop ip on your ip route 0.0.0.0 0.0.0.0 x.x.x.x
Do ip route 0.0.0.0 0.0.0.0 s0/1
So all traffic will be default routed out local serial int 0/1
April 13, 2011 at 1:39 pm, Seanchief2008 said:
i have one public ip 41.76.89… 255.255.255….. 41.76.89….. my router has 2 ports 1 for link from the isp and the other 1 for lan how can configure that please..
June 05, 2011 at 6:10 am, Love_ciggar said:
Hi,
June 05, 2011 at 6:10 am, Love_ciggar said:
Hi,
June 05, 2011 at 6:17 am, NMS-VS said:
I also Need a Help Dears, I am connected from the Via Sat Satellite Internet with the iDirect 3000 Series Modem, the provider provided me Public IP addresss block of /29, xx.xx.151.121 is the Modem Gateway and 5 more IPs I have free to use Locally. The xx.xx.151.122 is configured in Wireless router and work as DHCP, Now I want do a practice in Cisco Router 2801 Series. I want to configure the F0/0 port as WAN and assign Public IP xx.xx.151.123 ( if i am wrong then please suggest) and configure the f0/1 port as LAN to provide internet for the LAN IPs. I need Your help to provide me step by step help, I believe You u have the Public Address Rnage with u.
waiting for response.
the reason I am doing this, Bcz I dont have WIC card in my Cisco router.
September 08, 2011 at 1:10 am, tony said:
i have an uplink and im connected to an IXP, but all my traffic wants to go through the uplink only, how do i let traffic from my customers ( i am an ISP) to access resources from the IXP and the Uplink as well? thanks
May 14, 2012 at 11:16 pm, Chamal said:
Please help me on following matter,
i have a cisco router which is connected to the home broadband D-Link wireless router. the D-link router using 192.168.0.0/24 range and cisco fe0/0 ip is 192.168.0.160. i have configured fe0/1 to 192.168.10.1/24 and that network has a pc with ip 192.168.10.2. that pc can’t ping to D-link router or that network. i just wondering i need to give a static route or default gateway or something. i tried ospf but still didn’t work. please help me on this. thanks
July 22, 2012 at 9:32 am, singh said:
I am Having 1841 Router with 1T card and Cable ISP Has Given Ip Address
LAN POOL
September 27, 2012 at 1:59 am, siason said:
how?
September 27, 2012 at 2:58 pm, COCXEL said:
default routing is use if you don’t know destination address
November 25, 2012 at 5:35 pm, Hammad Bilal said:
I need Help on this please…
Default route tells the router where to go when there is no specified route available in their routing table.
I want to know that in the same situation, what will happen if no default route is configured. I mean if there is no specified route available in the routing table and also default route is not configured, then what a router will do?
November 29, 2012 at 9:52 am, Kumaran said:
Hi All,
Need your advise i have a wan router going to a AMG(Gateway) thru X2 port, i need the routing where any connection come to the router must go thru the Gateway and re-direct accordingly if it want to go LAN or Internet accordingly. Please advise, thanks in advance?
December 12, 2012 at 6:26 am, norm said:
Start with router 1
enable
configure terminal
hostname R1
enable secret 111111
line con 0
password 111111
login
exit
line vty 0 15
password 111111
login
exit
banner motd # This is my MOTD#
no ip domain-lookup
no logging console
Fast Ethernet
interface fa 0/0
desc Fast internet 0/0 for network ??.??.??.??
ip address 172.16.0.1 255.255.0.0
description R1 gateway
ip nat inside
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 172.17.0.2
ip dhcp excluded-address 172.16.0.1 172.16.0.5
ip dhcp pool pool1
network 172.16.0.0 255.255.0.0
default-router 172.16.0.1
end
copy run start
Repeat for router 2
Serial on R1
interface serial 0/0/0
Desc Serial 0/0/0 for network ??.??.??.??
ip address 172.17.0.1 255.255.0.0
no shutdown
ip nat outside
clockrate xxxxx (where xxxxx equals the baud rate you wish to set)
December 12, 2012 at 6:33 am, norm said:
enable
configure terminal
hostname R1
enable secret 111111
line con 0
password 111111
login
exit
line vty 0 15
password 111111
login
exit
banner motd # This is my MOTD#
no ip domain-lookup
no logging console
Fast Ethernet
interface fa 0/0
desc Fast internet 0/0 for network ??.??.??.??
ip address 172.16.0.1 255.255.0.0
description R1 gateway
ip nat inside
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 172.17.0.2
ip dhcp excluded-address 172.16.0.1 172.16.0.5
ip dhcp pool pool1
network 172.16.0.0 255.255.0.0
default-router 172.16.0.1
end
copy run start
Repeat for router 2
Serial on R1
interface serial 0/0/0
Desc Serial 0/0/0 for network ??.??.??.??
ip address 172.17.0.1 255.255.0.0
no shutdown
ip nat outside
clockrate xxxxx (where xxxxx equals the baud rate you wish to set)
January 19, 2013 at 8:49 am, mwesiigwa peter said:
good ideas but how can I know all the router configurations on my hand tips