03-29-2018 08:58 AM - edited 03-08-2019 02:27 PM
I have an old 1812 cisco router.
I am newbie. I am learning the configuration of cisco devices with this.
It's a bit difficult.
This router has 2 WAN ports fe0 and fe1 and 8 switch ports from fe2 and fe9.
I configured a VLAN on the switch ports and I also configured DHCP on the switch.
I configured the fe0 port as a wan port. I connected the WAN port to my LAN.
I connected a pc to the switch.
The switch provides the ip address but does not allow me to surf the internet.
I show the configuration below.
Is there any more experienced person who can help me? Thanks in advance
Current configuration : 1511 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname mioRouter ! boot-start-marker boot-end-marker ! ! no aaa new-model ! ! dot11 syslog ! ! ip cef no ip dhcp use vrf connected ! ip dhcp pool NETPOOL network 192.168.5.0 255.255.255.0 default-router 192.168.5.1 dns-server 8.8.8.8 8.8.4.4 ! ! ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ! multilink bundle-name authenticated ! ! ! ! archive log config hidekeys ! ! ! ! ! interface FastEthernet0 ip address 192.168.1.66 255.255.255.0 duplex auto speed auto ! interface FastEthernet1 no ip address shutdown duplex auto speed auto ! interface BRI0 no ip address encapsulation hdlc shutdown ! interface FastEthernet2 ! interface FastEthernet3 ! interface FastEthernet4 ! interface FastEthernet5 ! interface FastEthernet6 ! interface FastEthernet7 ! interface FastEthernet8 ! interface FastEthernet9 ! interface Dot11Radio0 no ip address shutdown speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0 station-role root ! interface Dot11Radio1 no ip address shutdown speed basic-6.0 9.0 basic-12.0 18.0 basic-24.0 36.0 48.0 54.0 station-role root ! interface Vlan1 ip address 192.168.5.1 255.255.255.0 ! ip forward-protocol nd ip route 192.168.5.0 255.255.255.0 192.168.1.0 ! ! no ip http server no ip http secure-server ! ! ! ! ! ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! end
03-29-2018 12:16 PM
The most important issue is about routing on this router. You have this static route configured
ip route 192.168.5.0 255.255.255.0 192.168.1.0
There are several issues with it. In the first place you do not need it because 192.168.5.0 is a connected network (on vlan 1) and you do not need route statements for connected networks. Also the next hop address is a network address and it should be a host address.
The other important issue is that you do not have a default route.You can not access the Internet if you do not have a default route.
The other potential important issue is about address translation. There is not any address translation in your configuration. The drawing seems to show that your traffic will pass through another router. If that other router will translate traffic from your router then you are ok. Otherwise you will need to configure address translation.
HTH
Rick
03-30-2018 02:19 AM
Hi Richard.
Thanks in advance for your attention.
I am a bit confused about between default-route and static-route in my scenario.
I want to forward the internet traffic generated on vlan1 (192.168.5.0/24) to the network 192.168.1.0/24 which gateway is 192.168.1.254 (this is a router with nat).
I ask you:
the address 192.168.5.1/24 on interface VLAN1 and the address 192.168.1.66/24 on Wan port are right?
I tried to define a default-route so but is not run:
ip route 0.0.0.0 0.0.0.0 192.168.1.254
Thanks
03-30-2018 05:23 AM - edited 03-30-2018 06:46 AM
Hi
A static route is basically a method to specify manually the way to reach a known host or network (destinations), this entry is added to the routing table if it has a valid next hop IP. Example of a static route:
ip route 10.10.5.0 255.255.255.0 172.16.240.20
A default (static or not) route is an entry into the routing table to reach any unknown host or network (destinations), why static or not? because you could have a default route (0.0.0.0/0) entry into the routing table via static route (manually) or learnt via a routing protocol (dynamic).
Example of a static default route:
ip route 0.0.0.0 0.0.0.0 172.16.240.20
Now if you want to provide Internet access to your internal networks you have to configure as Richard mentioned:
- NAT
- Default route.
So your configuration should be:
ip dhcp pool NETPOOL network 192.168.5.0 255.255.255.0 default-router 192.168.5.1 dns-server 8.8.8.8 8.8.4.4 ! ! ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ! multilink bundle-name authenticated ! ! ! ! archive log config hidekeys ! ! ! ! ! interface FastEthernet0
description (INTERNET)
ip nat outside ip address 192.168.1.66 255.255.255.0 duplex auto speed auto ! interface FastEthernet1 no ip address shutdown duplex auto speed auto ! interface BRI0 no ip address encapsulation hdlc shutdown ! interface FastEthernet2 ! interface FastEthernet3 ! interface FastEthernet4 ! interface FastEthernet5 ! interface FastEthernet6 ! interface FastEthernet7 ! interface FastEthernet8 ! interface FastEthernet9 ! interface Dot11Radio0 no ip address shutdown speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0 station-role root ! interface Dot11Radio1 no ip address shutdown speed basic-6.0 9.0 basic-12.0 18.0 basic-24.0 36.0 48.0 54.0 station-role root ! interface Vlan1
description (MY INTERNAL NETWORK)
ip nat inside ip address 192.168.5.1 255.255.255.0 ! ip forward-protocol nd no ip route 192.168.5.0 255.255.255.0 192.168.1.0
ip route 0.0.0.0 0.0.0.0 192.168.1.x (the IP 192.168.1.x is the IP of the next hop, basically is the IP or gateway or your ISP)
ip access-list standard MY-INTERNAL-NETWORKS
permit 192.168.5.0 0.0.0.255
ip nat inside source list MY-INTERNAL-NETWORKS interface fa0 overload
If your interface fa0 is connected to your ISP and they are providing the network 192.168.1.0/24 so the next hop probably is the IP 192.168.1.1 in the ISP side. Connect a PC to the ISP router o modem and verify the default gateway.
Hope it is useful
:-)
03-30-2018 06:41 AM
Julio offers a good explanation of static routing and of default route. The original poster says that he configured a default route but that it did not run. I do not understand in what sense did it not run? The syntax looks ok so what did not work? Did it not get entered into the routing table? Did access to Internet not work and he believes that is because of default route not working? or what?
I would offer one correction to the config that Julio proposes. The ACL for address translation points to the wrong network. It should be
ip access-list standard MY-INTERNAL-NETWORKS
permit 192.168.5.0 0.0.0.255
HTH
Rick
03-30-2018 06:42 AM - edited 03-30-2018 06:43 AM
Hi Richards,
You are correct! thanks for fixing it.
:-)
03-30-2018 06:47 AM
Julio
You are welcome. It was a good response with one small mistake. And an easy mistake to make since there was reference to the network 192.168.1.0 in the config. One of the advantages of these forums is that we have multiple people looking at these discussions and one of us sees something that someone else did not.
HTH
Rick
03-30-2018 06:49 AM
Totally agree, thank you so much again
:-)
03-30-2018 07:09 AM - edited 03-30-2018 07:11 AM
Hi Richard, Hi Julio.
The router with the configuration you suggested me works.
I thank you very much. I do not write very well in English.
I want to tell you that you have been very useful to me.
But I have to study your solution because it is full of news for me.
I have to go deep.
The first thing I understand is this: Cisco routers are not like ISP routers that work almost alone.
they are very complex devices.
This is why Cisco certifications are so difficult to obtain.
Tnaks again.
I show the final configuration. it could be useful to someone.
I do not close the discussion.
After the study I will have many questions
Current configuration : 1761 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname mioRouter ! boot-start-marker boot-end-marker ! ! no aaa new-model ! ! dot11 syslog ! ! ip cef no ip dhcp use vrf connected ! ip dhcp pool NETPOOL network 192.168.5.0 255.255.255.0 default-router 192.168.5.1 dns-server 8.8.8.8 8.8.4.4 ! ! ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ! multilink bundle-name authenticated ! ! ! ! archive log config hidekeys ! ! ! ! ! interface FastEthernet0 description (INTERNET) ip address 192.168.1.66 255.255.255.0 ip nat outside ip virtual-reassembly duplex auto speed auto ! interface FastEthernet1 no ip address shutdown duplex auto speed auto ! interface BRI0 no ip address encapsulation hdlc shutdown ! interface FastEthernet2 ! interface FastEthernet3 ! interface FastEthernet4 ! interface FastEthernet5 ! interface FastEthernet6 ! interface FastEthernet7 ! interface FastEthernet8 ! interface FastEthernet9 ! interface Dot11Radio0 no ip address shutdown speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0 station-role root ! interface Dot11Radio1 no ip address shutdown speed basic-6.0 9.0 basic-12.0 18.0 basic-24.0 36.0 48.0 54.0 station-role root ! interface Vlan1 ip address 192.168.5.1 255.255.255.0 ip nat inside ip virtual-reassembly ! ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.1.254 ! ! no ip http server no ip http secure-server ip nat inside source list MY-INTERNAL-NETWORKS interface FastEthernet0 overload ! ip access-list standard MY-INTERNAL-NETWORKS permit 192.168.5.0 0.0.0.255 ! ! ! ! ! ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! end
03-30-2018 07:15 AM
Hi
It was a pleasure to us and we are happy to see it was resolved.
Have a great day!
:-)
03-30-2018 07:28 AM
I agree with Julio that it has been a pleasure helping you to understand what needed to be done. Perhaps you do not write well in English but you do communicate clearly and effectively. I am glad that you have learned a lot from it (and still have much to learn). These forums are excellent places to ask questions and to learn about networking. I hope to see you continue to be active in the forums.
HTH
Rick
04-01-2018 09:52 AM
Thanks, Richard. Internetworking is very interesting but learning alone is not easy. This forum will help me a lot.:-)
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