Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot set gateway of last resort 1

Status
Not open for further replies.

edp773

Technical User
May 18, 2004
5
US
I am trying to connect to internet through e0/0 on a 2612 router. The router is running IOS 12.0 with rip version 2. E0/0 is up/up. I have used command ip default-network with ip address,0's and even ethernet 0/0. The ip route command has the same result. The gateway will not set in routing table. I can connect directly to internet with pc. I am assuming the default address is wrong, or next hop unreachable. Any suggestions?
 
Another way to set the gateway of last resort is to use the command
ip route 0.0.0.0 0.0.0.0 <internet port's ip address>
(Sorry if you are already doing this and I am just insulting your intelligence)

SirNuke
 
Don't worry if output of "show ip route" says gateway of last resort is not set, most important is to have default route in your routing table. As you have configured, use:

Router(config)# ip route 0.0.0.0 0.0.0.0 E0/0

that should be enough to connect you to the Internet, unless you are using private addressing on your internal LAN, in which case you need to set up a NAT. Can you post your IP addressing scheme?

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
Thanks Peter, I will try tk\he the nat.I am running a private ip. Would the commands ip nat inside, and ip nat outside per interface be enough. I will try to post config when I have more time.

Ed
 
No, that is not enough:

1.) create an access-list specifying your inside private subnet, eg:
access-list 1 permit 192.168.1.0 0.0.0.255

2.) bind your acl to interface connecting you to Internet and use NAPT:
ip nat inside source list 1 interface serial 0 overload

3.) specify interface connected to your private LAN as inside, interface that connects you to the Internet as outside:
interface e0
ip add 192.168.1.1 255.255.255.0
ip nat inside
interface s0
! ip address is assigned to you by your ISP:
ip add PUBLIC-IP MASK
ip nat outside

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
I am using ethernet interfaces only. All the commands I find include a serial interface.
 
Don't worry, thay use serial interface, because the most common connection to WAN is via them. I will correct my example config for you:

1.) create an access-list specifying your inside private subnet, eg:
access-list 1 permit 192.168.1.0 0.0.0.255

2.) bind your acl to interface connecting you to Internet and use NAPT:
ip nat inside source list 1 interface ethernet 1 overload

3.) specify interface connected to your private LAN as inside, interface that connects you to the Internet as outside:
interface ethernet 0
ip add 192.168.1.1 255.255.255.0
ip nat inside
interface ethernet 1
! ip address is assigned to you by your ISP:
ip add PUBLIC-IP MASK
ip nat outside

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
Thank you Peter for the info on
nat. I should have been able to figure it out myself.
Here is my latest configuration. Should ip route end with e0/0 instead of ip address?


version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname router
!
enable secret 5 $1$xBgE$3xxT3o7FfoWp8c/YGqSCC.
enable password
!
ip subnet-zero
!
!
!
!
interface Ethernet0/0
ip address 99.99.99.254 255.0.0.0
no ip directed-broadcast
ip nat outside
!
interface Ethernet0/1
ip address 192.168.0.9 255.255.255.0
no ip directed-broadcast
ip nat inside
!
router rip
network 99.0.0.0
network 192.168.0.0
!
ip nat inside source list 1 interface Ethernet0/0 overload
ip classless
ip default-network 99.0.0.0
ip route 0.0.0.0 0.0.0.0 99.99.99.1
!
access-list 1 permit 192.168.0.0 0.0.0.255
!
line con 0
password
login
transport input none
line aux 0
line vty 0 4
password
login
!
no scheduler allocate
end

router#
 
By changing my ip route from 0.0.0.0 0.0.0.0 99.99.99.1 to .0.0.0.0 0.0.0.0. etehernet e0/0, I have made some progress. Under debug ip packet all my outside ping has gone from unroutable to encapsulation failed. I hope this will help.

Ed
 
to set it up so you can ping you must do this
add the folling statements

router(config)# ip name-server (public dns ips)
(this is your isp dns server you can specify up to 6 of them)
router(config)# ip default-gateway (public ip)
(this is your isp gateway info to get you to the next hop)
 
If encapsulation is an issue, verify you have it set up correctly on both sides of connection. Maybe you also have mismatched MTU...

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top