01-11-2012 09:05 PM - edited 03-04-2019 02:52 PM
I just got my router setup, at least I thought I did. I directly connected my cable modem to port FE0/0 and FE0/1 is connected to the switch, I can pull IP address from the router but no internet access.
Here is my current config:
Current configuration : 1025 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 3640-Internet
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 25
!
!
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.2.1 192.168.2.150
!
ip dhcp pool 192.168.2.0/24
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 68.105.28.12 68.105.29.12 68.105.28.11 8.8.8.8 8.8.4.4
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address dhcp
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
clock rate 2000000
!
interface FastEthernet0/1
ip address 192.168.2.1 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clock rate 2000000
!
no ip http server
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.2.0
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end
Solved! Go to Solution.
01-13-2012 08:30 AM
Jonathan
I see one flaw in the config that you suggest. But other than correcting the default route yes I believe that if your config looks like this then it should provide access to Internet.
Your config has this
default-router 192.168.1.1
which is wrong and should be this
default-router 192.168.2.1
HTH
Rick
01-11-2012 10:20 PM
Hi Jonathan,
I guess your default route is incorrect?
What is the next hop ip?
Regards,
Talha
01-11-2012 11:11 PM
hi
incorrect default route
so do this
1. ip route 0.0.0.0 0.0.0.0 < gateway IP of ISP or int fa 0/0 >
2. and have you done natting ?
regards
srikanth
01-12-2012 09:23 AM
So I can input this: ip route 0.0.0.0 0.0.0.0 int fa 0/0 for the route?
And I have not configured NATing. Would I need to? If so, what would be a good example of what I would need to config for that?
Thanks again for the help.
01-12-2012 09:44 AM
Jonathan
It is not good practice to use a static default route which points to an Ethernet interface. It might not work at all (depending on whether the next hop router has enabled proxy arp or not) and even if it works it makes the router work much harder than it needs to. It would be better to have something that might look like this
ip route 0.0.0.0 0;0;0;0 dhcp
For NAT you need an access list to identify the traffic to translate and an ip nat statement to do the translation. It might look something like this
access-list 15 permit 192.169.2.0 0.0.0.255
ip nat inside source list 15 interface FastEthernet0/0 overload
HTH
Rick
01-12-2012 09:49 AM
As noted above, the default route is incorrect. You can use:
ip route 0.0.0.0 0.0.0.0 dhcp
A good explanation of the difference in the command was provided by Paul Stewart here:
https://learningnetwork.cisco.com/thread/20174
to have the interface address received via DHCP entered into the routing table as the default route.
Regarding NAT, it depends on how your cable modem handles your connection. Does the cable modem provide your end-device a public IP, or does the cable modem keep the public IP and assign private addressing via DHCP?
If it simply passes the public IP to the downstream device, then you will need to perform NAT. if it does not, you may or may not need to perform NAT. Some simple consumer devices will not NAT for networks outside of the single subnet for which they are configured to serve DHCP.
Once you determine if you need NAT, you already have the interfaces identified. You just need to set up an access list to match the networks/addresses for which you want the router to perform NAT. See the following link:
http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094e77.shtml#topic1
Good luck! -Ed
01-13-2012 07:57 AM
So if I understand this right, my config should look like this, and we should be able to have internet access throught the router...
hostname 3640-Internet
ip cef
ip dhcp excluded-address 192.168.2.1 192.168.2.150
!
ip dhcp pool 192.168.2.0/24
network 192.168.2.0 255.255.255.0
default-router 192.168.1.1
dns-server 68.105.28.12 68.105.29.12 68.105.28.11 8.8.8.8 8.8.4.4
!
interface FastEthernet0/0
ip address dhcp
ip nat outside
duplex auto
speed auto
no shut
!
interface FastEthernet0/1
ip address 192.168.2.1 255.255.255.0
ip nat inside
duplex auto
speed auto
no shut
!
ip route 0.0.0.0 0.0.0.0 dhcp
access-list 15 permit 192.169.2.0 0.0.0.255
ip nat inside source list 15 interface FastEthernet0/0 overload
01-13-2012 08:30 AM
Jonathan
I see one flaw in the config that you suggest. But other than correcting the default route yes I believe that if your config looks like this then it should provide access to Internet.
Your config has this
default-router 192.168.1.1
which is wrong and should be this
default-router 192.168.2.1
HTH
Rick
01-13-2012 07:42 PM
Thanks for catching that, got it fixed....but still have one issue. I can ping from the router to the Internet. But the computer connected to the router can't. Same config as above with the corrected default router. Any idea or suggestion?
01-13-2012 10:53 PM
Nevermind, problem solved....fat fingered the access list ip address. Thanks for the help.
01-14-2012 02:27 PM
Jonathan
I am glad that you caught the error in the access list. I see it now but I sure did overlook it the first time
I am glad that our suggestions did lead you to a solution of your problem. Thank you for using the rating system to indicate that the question is answered (and thanks for the points). It makes the forum more useful when people can read about a problem and can know that a solution was found. Your marking has contributed to this process.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide